| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029 |
- <template>
- <div class="content-box">
- <div class="left">
- <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
- <span class="cameratxt">门锁管理</span>
- </div>
- <div class="middles">
- <div class="middle">
- <div class="filter">
- <div class="condition">
- <el-input
- :clearable="true"
- @clear="searchBtn"
- v-model.trim="searchInput.keyWord"
- class="w-50 m-2"
- placeholder="请输入关键字查询"
- style="width: 230px"
- />
- <el-button
- style="margin-left: 20px"
- color="rgba(41, 109, 227, 1)"
- type="primary"
- class="search"
- @click="searchBtn"
- ><el-icon>
- <Search />
- </el-icon>
- <span>查询</span></el-button
- >
- <el-button
- v-if="flagBtn.daoru == 1"
- style="margin-left: 20px"
- color="rgba(41, 109, 227, 1)"
- type="primary"
- class="search"
- @click="bulkImportClick"
- >批量导入</el-button
- >
- <el-button
- style="margin-left: 20px"
- color="rgba(41, 109, 227, 1)"
- type="primary"
- class="search"
- @click="identityCardClick('总卡', '总卡')"
- >制作总卡</el-button
- >
- <el-button
- style="margin-left: 20px"
- color="rgba(41, 109, 227, 1)"
- type="primary"
- class="search"
- @click="allPassClick"
- >制作总密码</el-button
- >
- <div class="condition" style="margin-left: 30px">
- <span>楼栋单元</span>
- <el-select
- v-model="searchInput.buildingId"
- placeholder="请选择楼栋单元"
- style="width: 200px; margin-left: 10px"
- @change="searchBtn"
- :clearable="true"
- >
- <el-option
- v-for="item in buildData"
- :key="item.id"
- :label="`${item.building}-${item.element}`"
- :value="item.id"
- />
- </el-select>
- </div>
- <div class="condition" style="margin-left: 30px">
- <span>房间类型</span>
- <el-select
- style="width: 180px; margin-left: 10px"
- v-model="searchInput.houseType"
- class="m-2"
- placeholder="请选择类型"
- :clearable="true"
- @change="searchBtn"
- >
- <el-option label="全日房" value="1" />
- <el-option label="钟点房" value="2" />
- </el-select>
- </div>
- <div class="condition" style="margin-left: 20px">
- <el-button
- color="rgba(41, 109, 227, 1)"
- type="primary"
- class="search"
- @click="detailChange"
- >总卡明细</el-button
- >
- </div>
- <div class="condition" style="margin-left: 20px">
- <el-button
- color="rgba(41, 109, 227, 1)"
- type="primary"
- class="search"
- @click="allPassDetailChange"
- >总密码明细</el-button
- >
- </div>
- </div>
- </div>
- <div class="changeItems">
- <div
- class="changeItem"
- :class="roomTypeIndex == '全部' ? 'changeItem_active' : ''"
- @click="changeTypes('全部')"
- >
- 全部
- </div>
- <div
- v-for="i in roomTypes"
- :key="i"
- class="changeItem"
- :class="roomTypeIndex == i ? 'changeItem_active' : ''"
- @click="changeTypes(i)"
- >
- {{ i }}
- </div>
- </div>
- <!-- <div class="changeItems">
- <el-button
- color="rgba(41, 109, 227, 1)"
- type="primary"
- class="search"
- @click="searchBtn"
- >
- 重置管理员密码</el-button
- >
- <el-button
- color="rgba(41, 109, 227, 1)"
- type="primary"
- class="search"
- @click="addTemporaryCard"
- >
- 添加总卡</el-button
- >
- <el-button
- color="rgba(41, 109, 227, 1)"
- type="primary"
- class="search"
- @click="searchBtn"
- >
- 批量下发开门密码</el-button
- >
- <el-button
- color="rgba(41, 109, 227, 1)"
- type="primary"
- class="search"
- @click="searchBtn"
- >
- 批量导入</el-button
- >
- </div> -->
- </div>
- <div class="footer" v-loading="loading">
- <div class="floor" v-for="item in roomList.list" :key="item">
- <div class="title">
- <span class="t1"
- >{{ item.name }}
- <span style="color: #1e7dfb"
- >( {{ item.roomType == 1 ? "全" : "钟" }} )</span
- ></span
- >
- <span class="t2"> / 共{{ item.total }}间</span>
- </div>
- <div class="roomList">
- <div class="room" v-for="i in item.vos" :key="i">
- <el-popover
- popper-class="roominfoPopper"
- placement="bottom-start"
- :width="460"
- trigger="click"
- effect="light"
- :visible="i.visible"
- >
- <template #reference>
- <div @click="itemClick(i)">
- <div class="roomNum">{{ i.roomNumber }}</div>
- <div class="rLock">房间锁</div>
- <div class="wifi">
- <img
- v-if="i.equipmentState == 1"
- src="@/assets/icons/wifiOpen.png"
- alt=""
- />
- <img v-else src="@/assets/icons/wifiClose.png" alt="" />
- {{ i.equipmentType }}
- </div>
- </div>
- </template>
- <div class="roomInfo">
- <div class="close" @click="closeRoom(i)">
- <img src="@/assets/icons/close.png" alt="" />
- </div>
- <div class="title">{{ i.roomNumber }} (房间锁)</div>
- <div class="content">
- <div class="lefts">
- <div>
- <span>设备型号</span>
- <span>{{ i.equipmentType }}</span>
- </div>
- <div>
- <span>网络类型</span>
- <span>{{ i.networkType }}</span>
- </div>
- <div>
- <span>WIFI MAC</span>
- <span>{{ i.wifiMac }}</span>
- </div>
- <div>
- <span>绑定时间</span>
- <span>{{ i.bindingTime }}</span>
- </div>
- <div>
- <span>电量</span>
- <span v-if="electricQuantity"
- >{{ electricQuantity }}%</span
- >
- </div>
- <div>
- <span>网络状态</span>
- <span v-if="i.networkState == 1">在线</span>
- <span v-if="i.networkState == 0">离线</span>
- <span v-if="i.networkState == null"></span>
- </div>
- <div>
- <span>设备状态</span>
- <span v-if="i.equipmentState == 1">在线</span>
- <span v-if="i.equipmentState == 0">离线</span>
- <span v-if="i.equipmentState == null"></span>
- </div>
- </div>
- <div class="rigths">
- <!-- <div @click="forbiddenClick">
- <img src="@/assets/icons/forbidden.png" alt="" />
- <span>禁用门锁</span>
- </div> -->
- <div @click="keyClick(i)" v-if="flagBtn.daoru == 1">
- <img src="@/assets/icons/key.png" alt="" />
- <span>钥匙管理</span>
- </div>
- <div @click="newsClick(i)" v-if="flagBtn.daoru == 1">
- <img src="@/assets/icons/news.png" alt="" />
- <span>消息列表</span>
- </div>
- <div @click="unlockingClick(i)" v-if="flagBtn.daoru == 1">
- <img src="@/assets/icons/unlocking.png" alt="" />
- <span>远程开锁</span>
- </div>
- <!-- <div @click="resetPassClick">
- <img src="@/assets/icons/resetPass.png" alt="" />
- <span>重置管理员密码</span>
- </div> -->
- <div
- @click="bindingClick(i)"
- v-if="i.equipmentState != 1 && flagBtn.daoru == 1"
- >
- <img
- class="deblocking"
- src="@/assets/icons/binding.png"
- alt=""
- />
- <span>绑定设备</span>
- </div>
- <div
- @click="deblockingClick(i)"
- v-if="i.equipmentState == 1 && flagBtn.daoru == 1"
- >
- <img
- class="deblocking"
- src="@/assets/icons/deblocking.png"
- alt=""
- />
- <span>解绑设备</span>
- </div>
- <div
- @click="nfcClick(i, 1)"
- v-if="nfcFunction == 0 && flagBtn.daoru == 1"
- >
- <img
- class=""
- src="@/assets/icons/nfc.png"
- alt=""
- />
- <span>NFC启用</span>
- </div>
- <div @click="nfcClick(i, 0)" v-if="nfcFunction == 1">
- <img
- class=""
- src="@/assets/icons/nfc.png"
- alt=""
- />
- <span>NFC禁用</span>
- </div>
- <div @click="sendAdminPass(i)" v-if="flagBtn.adminPass == 1">
- <img
- class=""
- src="@/assets/icons/sendAdminPass.png"
- alt=""
- />
- <span>下发管理员密码</span>
- </div>
- </div>
- </div>
- </div>
- </el-popover>
- </div>
- </div>
- </div>
- </div>
- <!-- 消息列表 -->
- <el-dialog
- class="newsDialog"
- v-model="newsVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="消息列表"
- align-center
- width="1000"
- :before-close="cancelNews"
- >
- <div class="middle">
- <div class="changeItems">
- <div
- class="changeNews"
- :class="newsIndex == 1 ? 'changeNews_active' : ''"
- @click="changeNews(1)"
- >
- 开锁记录
- </div>
- <div
- class="changeNews"
- :class="newsIndex == 2 ? 'changeNews_active' : ''"
- @click="changeNews(2)"
- >
- 操作记录
- </div>
- </div>
- </div>
- <div v-if="newsIndex == 1">
- <div class="footers" v-loading="loading">
- <el-table
- :row-class-name="tableRowClassName"
- :data="newTableList"
- @selection-change="handleSelectionChange"
- style="width: 100%; height: 550px"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <el-table-column align="center" prop="roomNumber" label="房间号">
- </el-table-column>
- <el-table-column align="center" prop="type" label="类型" />
- <el-table-column align="center" prop="unlockType" label="操作" />
- <el-table-column
- align="center"
- prop="updateTime"
- label="消息时间"
- >
- </el-table-column>
- </el-table>
- </div>
- <div class="pageSize">
- <span></span>
- <el-pagination
- background
- :current-page="newsPage"
- :page-size="newsSize"
- layout="total, prev, pager, next, jumper, slot"
- :total="newsTotal"
- @update:current-page="newsHandleCurrentChange"
- />
- </div>
- </div>
- <div v-if="newsIndex == 2">
- <div class="footers" v-loading="loading">
- <el-table
- :row-class-name="tableRowClassName"
- :data="newTableList"
- @selection-change="handleSelectionChange"
- style="width: 100%; height: 550px"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <el-table-column align="center" prop="roomNumber" label="房间号">
- </el-table-column>
- <el-table-column align="center" prop="type" label="类型" />
- <el-table-column
- align="center"
- prop="operatorName"
- label="操作人"
- />
- <el-table-column
- align="center"
- prop="dataTime"
- label="操作时间"
- />
- <el-table-column align="center" prop="content" label="操作内容">
- </el-table-column>
- </el-table>
- </div>
- <div class="pageSize">
- <span></span>
- <el-pagination
- background
- :current-page="newsPage"
- :page-size="newsSize"
- layout="total, prev, pager, next, jumper, slot"
- :total="newsTotal"
- @update:current-page="newsHandleCurrentChange"
- />
- </div>
- </div>
- </el-dialog>
- <!-- 远程开锁 -->
- <el-dialog
- class="unlockingDialog"
- v-model="unlockingVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="远程开锁"
- align-center
- width="400"
- :before-close="cancelUnlocking"
- >
- <div class="middle" v-loading="unlockingLoading" element-loading-text="远程开锁中...">
- <div class="content">
- 确定远程开锁吗?<br /><span class="marning"
- >注: 远程开锁前,门锁需要先按“4#”进入请求远程开锁模式</span
- >
- </div>
- <div class="options">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="unlockingSubmit"
- >
- 确定
- </el-button>
- <el-button @click="cancelUnlocking">取消</el-button>
- </div>
- </div>
- </el-dialog>
- <!-- 制作总密码 -->
- <el-dialog
- class="passManagementDialog"
- v-model="allPassVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="制作总密码"
- align-center
- width="650"
- :before-close="cancelAllPass"
- >
- <el-form
- ref="allPassRef"
- :model="allPassRuleForm"
- :rules="allPassRules"
- label-width="100px"
- class="demo-ruleForm"
- :size="formSize"
- label-position="left"
- status-icon
- >
- <el-form-item
- label="单元 :"
- prop="buildingId"
- >
- <el-select
- v-model="allPassRuleForm.buildingId"
- placeholder="请选择楼栋单元"
- style="width: 500px"
- :clearable="true"
- >
- <el-option
- v-for="item in buildData"
- :key="item.id"
- :label="`${item.building}-${item.element}`"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="用户 :" prop="name">
- <el-select
- v-model="allPassRuleForm.name"
- class="m-2"
- placeholder="请选择用户"
- style="width: 500px"
- >
- <el-option
- v-for="i in staffList"
- :key="i"
- :label="`${i.userName} ( ${i.department} )`"
- :value="i.id"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="密码 :" prop="pass">
- <el-input
- v-model.trim="allPassRuleForm.pass"
- placeholder="请输入6或8位数密码或者点击随机生成"
- style="width: 500px"
- >
- <template #append>
- <div @click="randomCipherAllPass">随机生成</div>
- </template>
- </el-input>
- </el-form-item>
- <el-form-item label="生效时间 :" prop="effectiveTime">
- <div class="block">
- <el-date-picker
- v-model="allPassRuleForm.effectiveTime"
- type="datetime"
- placeholder="选择生效时间"
- style="width: 500px"
- format="YYYY-MM-DD HH:mm:ss"
- value-format="YYYY-MM-DD HH:mm:ss"
- />
- </div>
- </el-form-item>
- <el-form-item label="失效时间 :" prop="failureTime">
- <div class="block">
- <el-date-picker
- v-model="allPassRuleForm.failureTime"
- type="datetime"
- placeholder="选择失效时间"
- style="width: 500px"
- format="YYYY-MM-DD HH:mm:ss"
- value-format="YYYY-MM-DD HH:mm:ss"
- />
- </div>
- </el-form-item>
- <el-form-item class="options">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="allPassConfig(allPassRef)"
- >
- 确定
- </el-button>
- <el-button @click="cancelAllPass(allPassRef)"
- >取消</el-button
- >
- </el-form-item>
- </el-form>
- </el-dialog>
- <!-- 绑定设备 -->
- <el-dialog
- class="BindingDialog"
- v-model="bindingVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="绑定设备"
- align-center
- width="450"
- :before-close="cancelBinding"
- >
- <div class="middle">
- <el-form
- ref="bindingRef"
- :model="bindingList"
- :rules="bindingrules"
- label-width="100px"
- class="demo-ruleForm"
- :size="formSize"
- label-position="left"
- status-icon
- >
- <el-form-item label="绑定设备 :" prop="luid">
- <el-input
- style="width: 250px"
- v-model.trim="bindingList.luid"
- placeholder="请输入设备id"
- clearable
- />
- </el-form-item>
- <el-form-item class="options">
- <el-button
- color="rgba(0, 97, 255, 1)"
- class="queding"
- type="primary"
- @click="bindingSubmit(bindingRef)"
- >
- 确定
- </el-button>
- <el-button @click="cancelBinding">取消</el-button>
- </el-form-item>
- </el-form>
- </div>
- </el-dialog>
- <!-- 解绑设备 -->
- <el-dialog
- class="unlockingDialog"
- v-model="deblockingVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="解绑设备"
- align-center
- width="400"
- :before-close="cancelDeblocking"
- >
- <div class="middle">
- <div class="content">确定解绑设备吗?</div>
- <div class="options">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="deblockSubmit"
- >
- 确定
- </el-button>
- <el-button @click="cancelDeblocking">取消</el-button>
- </div>
- </div>
- </el-dialog>
- <!-- 批量导入 -->
- <el-dialog
- class="bulkImportDialog"
- v-model="bulkImportVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="批量导入"
- align-center
- width="570"
- :before-close="cancelBulkImport"
- >
- <div class="middle">
- <el-upload
- style="width: 500px"
- class="upload-demo"
- ref="bulkImportref"
- drag
- action="#"
- :on-preview="handlePreview"
- :on-remove="handleRemove"
- :on-change="handleChange"
- :http-request="handleUpload"
- :before-upload="beforeAvatarUpload"
- :limit="1"
- :on-exceed="handleExceed"
- >
- <el-icon class="el-icon--upload"><upload-filled /></el-icon>
- <div class="el-upload__text">
- <span style="font-size: 20px">点击上传或拖拽文件</span><br />
- <em>请按照标准模板填写信息</em><br />
- <em> </em>
- </div>
- <!-- <template #tip>
- <div class="el-upload__tip">
- jpg/png files with a size less than 500kb
- </div>
- </template> -->
- </el-upload>
- <div class="startImport">
- <el-button
- v-if="bulkImportFile"
- type="primary"
- color="rgba(0, 97, 255, 1)"
- style="width: 200px"
- @click="bulkImportConfig"
- plain
- >开始导入</el-button
- >
- <span
- v-else
- type="primary"
- color="rgba(236, 245, 255, 1)"
- style="
- display: inline-block;
- width: 200px;
- height: 42px;
- text-align: center;
- line-height: 42px;
- color: rgb(160, 207, 255);
- border: 1px solid #dcdfe6;
- border-radius: 4px;
- "
- plain
- >开始导入</span
- >
- <span
- style="
- width: 120px;
- margin-left: 20px;
- cursor: pointer;
- color: rgba(0, 97, 255, 1);
- "
- @click="resetImport"
- >重置</span
- >
- <span class="downLoad" @click="downbulkImport">下载模板</span>
- </div>
- <!-- <div class="options">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="bulkImportConfig"
- >
- 确定
- </el-button>
- <el-button @click="cancelBulkImport">取消</el-button>
- </div> -->
- </div>
- </el-dialog>
- <!-- 钥匙管理 -->
- <el-dialog
- class="keyDialog"
- v-model="keyVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :title="keyTitle"
- align-center
- width="1200"
- :before-close="cancelKey"
- >
- <div class="footers" v-loading="loading">
- <div class="title">
- <div class="keyTitle">
- <span class="txt">住客</span>
- </div>
- <el-collapse v-model="activeUser">
- <el-collapse-item name="1">
- <div class="table">
- <el-table
- :row-class-name="tableRowClassName"
- :data="userList"
- @selection-change="handleSelectionChange"
- style="width: 100%; height: 200px"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <el-table-column align="center" prop="name" label="姓名">
- </el-table-column>
- <el-table-column
- align="center"
- prop="phone"
- label="手机号"
- />
- <el-table-column
- align="center"
- prop="roomlength"
- label="类型"
- >
- <template #default="{ row }">
- <span v-if="row.lockStatus == 1">密码</span>
- <span v-if="row.lockStatus == 2">卡片</span>
- <span v-if="row.lockStatus == 3">指纹</span>
- <span v-if="row.lockStatus == 4">身份证</span>
- <span v-if="row.lockStatus == 5">钥匙</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="roomlength"
- label="时效"
- >
- <template #default="{ row }">
- <span v-if="row.type == 1">管理员用户</span>
- <span v-if="row.type == 2">普通用户</span>
- <span v-if="row.type == 4">时效性用户</span>
- <span v-if="row.type == 5">一次性时效密码用户</span>
- <span v-if="row.type == 100">时效性无网络密码用户</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="startTime"
- label="开始时间"
- width="120"
- >
- <template #default="{ row }">
- <span v-if="row.type == 4 || row.type == 100">{{
- row.startTime
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="endTime"
- label="结束时间"
- width="120"
- >
- <template #default="{ row }">
- <span v-if="row.type == 4 || row.type == 100">{{
- row.endTime
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="createTime"
- label="创建时间"
- width="120"
- >
- </el-table-column>
- <el-table-column align="center" label="操作" width="200">
- <template #default="scope">
- <div class="options">
- <div class="reset" @click="edit(scope.row)">修改</div>
- <el-popconfirm
- width="220"
- confirm-button-text="确认"
- cancel-button-text="取消"
- icon-color="#f89626"
- title="是否删除此账号?"
- @confirm="del(scope.row)"
- @cancel="cancelEvent"
- >
- <template #reference>
- <div class="reset">删除</div>
- </template>
- </el-popconfirm>
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-collapse-item>
- </el-collapse>
- </div>
- <div class="title titles">
- <div class="keyTitle">
- <span class="txt">员工</span>
- <div class="dropdown">
- <el-dropdown trigger="click" :hide-on-click="false">
- <el-button type="primary"> 添加电子钥匙 </el-button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item @click="passManagementClick('系统')"
- >密码</el-dropdown-item
- >
- <el-dropdown-item
- @click="identityCardClick('系统', '房卡')"
- >房卡</el-dropdown-item
- >
- <el-dropdown-item @click="fingerprintClick('系统')"
- >指纹</el-dropdown-item
- >
- <el-dropdown-item
- @click="identityCardClick('系统', '身份证')"
- >身份证</el-dropdown-item
- >
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- </div>
- </div>
- <el-collapse v-model="activeSystem">
- <el-collapse-item name="2">
- <div class="table">
- <el-table
- :row-class-name="tableRowClassName"
- :data="systemUserList"
- @selection-change="handleSelectionChange"
- style="width: 100%; height: 200px"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <el-table-column align="center" prop="name" label="姓名">
- </el-table-column>
- <el-table-column
- align="center"
- prop="phone"
- label="手机号"
- width="130"
- />
- <el-table-column
- align="center"
- prop="roomlength"
- label="类型"
- >
- <template #default="{ row }">
- <span v-if="row.lockStatus == 1">密码</span>
- <span v-if="row.lockStatus == 2">房卡</span>
- <span v-if="row.lockStatus == 3">指纹</span>
- <span v-if="row.lockStatus == 4">身份证</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="passWord"
- label="密码"
- width="110"
- >
- </el-table-column>
- <el-table-column
- align="center"
- prop="roomlength"
- label="时效"
- width="200"
- >
- <template #default="{ row }">
- <div>{{ row.startTime }}</div>
- <div>{{ row.endTime }}</div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="roomlength"
- label="状态"
- >
- <template #default="{ row }">
- <span v-if="row.type == 1">管理员用户</span>
- <span v-if="row.type == 2">普通用户(永久)</span>
- <span v-if="row.type == 4">时效性用户</span>
- <span v-if="row.type == 5">一次性时效密码用户</span>
- <span v-if="row.type == 100">时效性无网络密码用户</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="createTime"
- label="创建时间"
- width="200"
- >
- </el-table-column>
- <el-table-column align="center" label="操作" width="200">
- <template #default="scope">
- <div class="options">
- <div
- class="reset"
- @click="fingerprintEdit(scope.row)"
- >
- 编辑
- </div>
- <el-popconfirm
- width="220"
- confirm-button-text="确认"
- cancel-button-text="取消"
- icon-color="#f89626"
- title="是否删除此用户?"
- @confirm="fingerprintDel(scope.row)"
- @cancel="cancelEvent"
- >
- <template #reference>
- <div class="reset">删除</div>
- </template>
- </el-popconfirm>
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-collapse-item>
- </el-collapse>
- </div>
- <div class="title titles">
- <div class="keyTitle">
- <span class="txt">自定义用户</span>
- <div class="dropdown">
- <el-dropdown trigger="click" :hide-on-click="false">
- <el-button type="primary">
- 添加电子钥匙
- <!-- <el-icon class="el-icon--right"><arrow-down /></el-icon> -->
- </el-button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item @click="passManagementClick('自定义')"
- >密码</el-dropdown-item
- >
- <el-dropdown-item
- @click="identityCardClick('自定义', '房卡')"
- >房卡</el-dropdown-item
- >
- <el-dropdown-item @click="fingerprintClick('自定义')"
- >指纹</el-dropdown-item
- >
- <el-dropdown-item
- @click="identityCardClick('自定义', '身份证')"
- >身份证</el-dropdown-item
- >
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- </div>
- </div>
- <el-collapse v-model="activeCustom">
- <el-collapse-item name="3">
- <div class="table">
- <el-table
- :row-class-name="tableRowClassName"
- :data="customList"
- @selection-change="handleSelectionChange"
- style="width: 100%; height: 200px"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <el-table-column align="center" prop="name" label="姓名">
- </el-table-column>
- <el-table-column
- align="center"
- prop="phone"
- label="手机号"
- width="130"
- />
- <el-table-column
- align="center"
- prop="roomlength"
- label="类型"
- >
- <template #default="{ row }">
- <span v-if="row.lockStatus == 1">密码</span>
- <span v-if="row.lockStatus == 2">房卡</span>
- <span v-if="row.lockStatus == 3">指纹</span>
- <span v-if="row.lockStatus == 4">身份证</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="passWord"
- label="密码"
- width="110"
- >
- </el-table-column>
- <el-table-column
- align="center"
- prop="roomlength"
- label="时效"
- width="200"
- >
- <template #default="{ row }">
- <div>{{ row.startTime }}</div>
- <div>{{ row.endTime }}</div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="roomlength"
- label="状态"
- >
- <template #default="{ row }">
- <span v-if="row.type == 1">管理员用户</span>
- <span v-if="row.type == 2">普通用户(永久)</span>
- <span v-if="row.type == 4">时效性用户</span>
- <span v-if="row.type == 5">一次性时效密码用户</span>
- <span v-if="row.type == 100">时效性无网络密码用户</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="createTime"
- label="创建时间"
- width="200"
- >
- </el-table-column>
- <el-table-column align="center" label="操作" width="200">
- <template #default="scope">
- <div class="options">
- <div class="reset" @click="customFingerprintEdit(scope.row)">编辑</div>
- <el-popconfirm
- width="220"
- confirm-button-text="确认"
- cancel-button-text="取消"
- icon-color="#f89626"
- title="是否删除此用户?"
- @confirm="customDel(scope.row)"
- @cancel="cancelEvent"
- >
- <template #reference>
- <div class="reset">删除</div>
- </template>
- </el-popconfirm>
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-collapse-item>
- </el-collapse>
- </div>
- </div>
- </el-dialog>
- <!-- 添加电子钥匙 密码管理 -->
- <el-dialog
- class="passManagementDialog"
- v-model="passManagementVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="密码管理"
- align-center
- width="650"
- :before-close="cancelPassManagement"
- >
- <el-tabs
- v-model="passManagementIndex"
- class="demo-tabs"
- @tab-change="passManagementHandleClick"
- >
- <el-tab-pane label="时效密码" :name="1"> </el-tab-pane>
- <!-- <el-tab-pane label="无网络密码" :name="2"> </el-tab-pane>
- <el-tab-pane label="临时密码" :name="3"> </el-tab-pane> -->
- </el-tabs>
- <el-form
- ref="passManagementRef"
- :model="passManagementRuleForm"
- :rules="passManagementRules"
- label-width="100px"
- class="demo-ruleForm"
- :size="formSize"
- label-position="left"
- status-icon
- >
- <!-- <el-form-item
- label="角色 :"
- prop="level"
- v-if="keypassflag == '系统'"
- >
- <el-cascader
- @change="fingerprintChange"
- v-model="passManagementRuleForm.level"
- :options="fingerprintoptions"
- :props="fingerprintprops"
- :show-all-levels="false"
- :clearable="false"
- />
- </el-form-item> -->
- <el-form-item label="用户 :" prop="name">
- <el-select
- v-model="passManagementRuleForm.name"
- class="m-2"
- placeholder="请选择用户"
- style="width: 500px"
- :disabled="passManagementEditFlag==2"
- @change="staffChange($event, '密码')"
- v-if="keypassflag == '系统'"
- >
- <el-option
- v-for="i in staffList"
- :key="i"
- :label="`${i.userName} ( ${i.department} )`"
- :value="i.id"
- />
- </el-select>
- <el-input
- v-model.trim="passManagementRuleForm.name"
- placeholder="请输入用户"
- style="width: 500px"
- :disabled="passManagementEditFlag==2"
- v-if="keypassflag == '自定义'"
- >
- </el-input>
- </el-form-item>
- <el-form-item
- label="号码 :"
- prop="phone"
- v-if="keypassflag == '自定义'"
- >
- <el-input
- v-model.trim="passManagementRuleForm.phone"
- placeholder="请输入号码"
- :disabled="passManagementEditFlag==2"
- style="width: 500px"
- >
- </el-input>
- </el-form-item>
- <el-form-item label="密码 :" prop="pass">
- <el-input
- v-model.trim="passManagementRuleForm.pass"
- placeholder="请输入6或8位数密码或者点击随机生成"
- style="width: 500px"
- v-if="passManagementEditFlag==1"
- >
- <template #append>
- <div @click="randomCipher">随机生成</div>
- </template>
- </el-input>
- <el-input
- v-if="passManagementEditFlag==2"
- v-model.trim="passManagementRuleForm.pass"
- placeholder="请输入6或8位数密码或者点击随机生成"
- style="width: 500px"
- :disabled="true"
- >
- </el-input>
- </el-form-item>
- <el-form-item label="生效时间 :" prop="effectiveTime">
- <div class="block">
- <el-date-picker
- v-model="passManagementRuleForm.effectiveTime"
- type="datetime"
- placeholder="选择生效时间"
- style="width: 500px"
- format="YYYY-MM-DD HH:mm:ss"
- value-format="YYYY-MM-DD HH:mm:ss"
- />
- </div>
- </el-form-item>
- <el-form-item label="失效时间 :" prop="failureTime">
- <div class="block">
- <el-date-picker
- v-model="passManagementRuleForm.failureTime"
- type="datetime"
- placeholder="选择失效时间"
- style="width: 500px"
- format="YYYY-MM-DD HH:mm:ss"
- value-format="YYYY-MM-DD HH:mm:ss"
- />
- </div>
- </el-form-item>
- <el-form-item class="options">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="passManagementSend(passManagementRef)"
- >
- 确定
- </el-button>
- <el-button @click="cancelPassManagement(passManagementRef)"
- >取消</el-button
- >
- </el-form-item>
- </el-form>
- </el-dialog>
- <!-- 下发管理员密码 -->
- <el-dialog
- class="passManagementDialog"
- v-model="sendAdminPassVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="下发管理员密码"
- align-center
- width="450"
- :before-close="cancelSendAdminPass"
- >
- <el-form
- ref="sendAdminPassRef"
- :model="sendAdminPassRuleForm"
- :rules="sendAdminPassRules"
- label-width="70px"
- class="demo-ruleForm"
- :size="formSize"
- label-position="left"
- status-icon
- >
- <el-form-item label="密码 :" prop="pass">
- <el-input
- v-model.trim="sendAdminPassRuleForm.pass"
- placeholder="请输入6或8位数字密码"
- style="width: 500px"
- >
- </el-input>
- </el-form-item>
- <el-form-item class="options">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="sendAdminPassConfig(sendAdminPassRef)"
- >
- 确定
- </el-button>
- <el-button @click="cancelSendAdminPass(sendAdminPassRef)"
- >取消</el-button
- >
- </el-form-item>
- </el-form>
- </el-dialog>
- <!-- 添加电子钥匙 添加指纹 -->
- <el-dialog
- class="fingerprintDialog"
- v-model="fingerprintVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="添加指纹"
- align-center
- width="550"
- :before-close="cancelFingerprint"
- >
- <el-form
- ref="fingerprintRef"
- :model="fingerprintRuleForm"
- :rules="fingerprintRules"
- label-width="100px"
- class="demo-ruleForm"
- :size="formSize"
- label-position="left"
- status-icon
- >
- <!-- <el-form-item
- label="角色 :"
- prop="level"
- v-if="keypassflag == '系统'"
- >
- <el-cascader
- @change="fingerprintChange"
- v-model="fingerprintRuleForm.level"
- :options="fingerprintoptions"
- :props="fingerprintprops"
- :show-all-levels="false"
- :clearable="false"
- />
- </el-form-item> -->
- <el-form-item label="用户 :" prop="name">
- <el-select
- v-model="fingerprintRuleForm.name"
- class="m-2"
- placeholder="请选择用户"
- style="width: 214px"
- :disabled="fingerprintEditFlag==2"
- @change="staffChange($event, '指纹')"
- v-if="keypassflag == '系统'"
- >
- <el-option
- v-for="i in staffList"
- :key="i"
- :label="`${i.userName} ( ${i.department} )`"
- :value="i.id"
- />
- </el-select>
- <el-input
- v-model.trim="fingerprintRuleForm.name"
- placeholder="请输入用户"
- style="width: 214px"
- v-if="keypassflag == '自定义'"
- :disabled="fingerprintEditFlag==2"
- />
- </el-form-item>
- <el-form-item
- label="号码 :"
- prop="phone"
- v-if="keypassflag == '自定义'"
- >
- <el-input
- v-model.trim="fingerprintRuleForm.phone"
- placeholder="请输入号码"
- :disabled="fingerprintEditFlag==2"
- style="width: 214px"
- >
- </el-input>
- </el-form-item>
- <el-form-item label="指纹 :" :prop="fingerprintEditFlag==2?'':'fingerprintNum'">
- <el-input
- v-model="fingerprintRuleForm.fingerprintNum"
- placeholder="请录入指纹"
- style="width: 300px"
- type="textarea"
- rows="4"
- :disabled="fingerprintEditFlag==2"
- />
- <span
- style="
- color: rgba(0, 97, 255, 1);
- margin-left: 10px;
- cursor: pointer;
- "
- @click="fingerprintNext"
- v-if="fingerprintEditFlag==1"
- >录入</span
- >
- </el-form-item>
- <el-form-item label="生效时间 :" prop="effectiveTime">
- <div class="block">
- <el-date-picker
- v-model="fingerprintRuleForm.effectiveTime"
- type="datetime"
- placeholder="选择生效时间"
- style="width: 214px"
- format="YYYY-MM-DD HH:mm:ss"
- value-format="YYYY-MM-DD HH:mm:ss"
- />
- </div>
- </el-form-item>
- <el-form-item label="失效时间 :" prop="failureTime">
- <div class="block">
- <el-date-picker
- v-model="fingerprintRuleForm.failureTime"
- type="datetime"
- placeholder="选择失效时间"
- style="width: 214px"
- format="YYYY-MM-DD HH:mm:ss"
- value-format="YYYY-MM-DD HH:mm:ss"
- />
- </div>
- </el-form-item>
- <el-form-item class="options">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="fingerprintconfig(fingerprintRef)"
- >
- 确定
- </el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- <!-- 指纹读取弹窗 -->
- <el-dialog
- class="fingerprint"
- v-model="addFingerprintVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="添加指纹"
- align-center
- width="550"
- :before-close="cancelAddFingerprint"
- >
- <div class="el-footer">
- <div style="height: 350px; margin: 30px auto">
- <el-steps direction="vertical" :active="stepindex">
- <el-step
- v-for="i in step.list"
- :key="i.id"
- :title="`步骤 ${i.id}`"
- :description="i.title"
- ></el-step>
- </el-steps>
- </div>
- </div>
- </el-dialog>
- <!-- 添加电子钥匙 添加身份证 -->
- <el-dialog
- class="identityCard"
- v-model="identityCardVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :title="addIdentityCardVisibleTitle"
- align-center
- width="550"
- :before-close="cancelIdentityCard"
- >
- <el-form
- ref="identityCardRef"
- :model="identityCardRuleForm"
- :rules="identityCardRules"
- label-width="100px"
- class="demo-ruleForm"
- :size="formSize"
- label-position="left"
- status-icon
- >
- <!-- <el-form-item
- label="角色 :"
- prop="level"
- v-if="keypassflag == '系统'"
- >
- <el-cascader
- @change="fingerprintChange"
- v-model="identityCardRuleForm.level"
- :options="fingerprintoptions"
- :props="fingerprintprops"
- :show-all-levels="false"
- :clearable="false"
- />
- </el-form-item> -->
- <el-form-item
- label="单元 :"
- prop="buildingId"
- v-if="keypassflag == '总卡'"
- >
- <el-select
- v-model="identityCardRuleForm.buildingId"
- placeholder="请选择楼栋单元"
- style="width: 214px"
- :clearable="true"
- >
- <el-option
- v-for="item in buildData"
- :key="item.id"
- :label="`${item.building}-${item.element}`"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="用户 :" prop="name">
- <el-select
- v-model="identityCardRuleForm.name"
- class="m-2"
- placeholder="再请选择用户"
- style="width: 214px"
- :disabled="identityCardEditFlag==2"
- @change="staffChange($event, '房卡')"
- v-if="keypassflag == '系统' || keypassflag == '总卡'"
- >
- <el-option
- v-for="i in staffList"
- :key="i"
- :label="`${i.userName} ( ${i.department} )`"
- :value="i.id"
- />
- </el-select>
- <el-input
- v-model.trim="identityCardRuleForm.name"
- placeholder="请输入用户"
- :disabled="identityCardEditFlag==2"
- style="width: 214px"
- v-if="keypassflag == '自定义'"
- />
- </el-form-item>
- <el-form-item
- label="号码 :"
- prop="phone"
- v-if="keypassflag == '自定义'"
- >
- <el-input
- v-model.trim="identityCardRuleForm.phone"
- placeholder="请输入号码"
- :disabled="identityCardEditFlag==2"
- style="width: 214px"
- />
- </el-form-item>
- <!-- <el-form-item label="类型 :" prop="cardType">
- <el-radio-group v-model="identityCardRuleForm.cardType">
- <el-radio :value="1">密码</el-radio>
- <el-radio :value="2">房卡</el-radio>
- <el-radio :value="3">指纹</el-radio>
- <el-radio :value="4">身份证</el-radio>
- <el-radio :value="5">钥匙</el-radio>
- </el-radio-group>
- </el-form-item> -->
- <el-form-item label="卡号 :" :prop="identityCardEditFlag==2?'':'icCard'">
- <el-input
- v-model.trim="identityCardRuleForm.icCard"
- placeholder="请输入卡号"
- :disabled="identityCardEditFlag==2"
- style="width: 300px"
- type="textarea"
- rows="4"
- >
- </el-input>
- <span
- style="
- color: rgba(0, 97, 255, 1);
- margin-left: 10px;
- cursor: pointer;
- "
- v-if="identityCardEditFlag==1"
- @click="identityCardNext"
- >读卡</span
- >
- </el-form-item>
- <el-form-item label="生效时间 :" prop="effectiveTime">
- <div class="block">
- <el-date-picker
- v-model="identityCardRuleForm.effectiveTime"
- type="datetime"
- placeholder="选择生效时间"
- style="width: 200px"
- format="YYYY-MM-DD HH:mm:ss"
- value-format="YYYY-MM-DD HH:mm:ss"
- />
- </div>
- </el-form-item>
- <el-form-item label="失效时间 :" prop="failureTime">
- <div class="block">
- <el-date-picker
- v-model="identityCardRuleForm.failureTime"
- type="datetime"
- placeholder="选择失效时间"
- style="width: 200px"
- format="YYYY-MM-DD HH:mm:ss"
- value-format="YYYY-MM-DD HH:mm:ss"
- />
- </div>
- </el-form-item>
- <el-form-item class="options">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="identityCardConfig(identityCardRef)"
- >
- 确定
- </el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- <!-- 身份证读卡弹窗 -->
- <el-dialog
- class="addIdentityCard"
- v-model="addIdentityCardVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="添加身份证"
- align-center
- width="650"
- :before-close="cancelAddIdentityCard"
- >
- <!-- <div class="el-footer">
- {{ identityCardTitle }}
- </div>
- <div class="el-footer">卡号 :{{ identityCardNum }}</div> -->
- <div class="steps">
- <el-steps
- :space="200"
- :active="identityCardIndex"
- finish-status="success"
- >
- <el-step title="环境准备" />
- <el-step title="配置" />
- <el-step title="完成" />
- </el-steps>
- </div>
- <div
- class="title"
- v-if="identityCardIndex == 0 || identityCardIndex == 1"
- style="color: #fc2307"
- >
- {{ identityCardTitle }}
- </div>
- <div class="title" v-else style="color: #68c23c">
- {{ identityCardTitle }}
- </div>
- <div class="icons">
- <img
- v-if="identityCardIndex == 0 || identityCardIndex == 1"
- src="@/assets/icons/error.png"
- alt=""
- />
- <img
- v-if="identityCardIndex == 2"
- class="loading"
- src="@/assets/icons/loading.png"
- alt=""
- />
- <img
- v-if="identityCardIndex == 3"
- src="@/assets/icons/success.png"
- alt=""
- />
- </div>
- <div class="retry">可以尝试<span @click="retry">重试</span></div>
- </el-dialog>
- <!-- 总卡明细 -->
- <el-dialog
- class="detailDialog"
- v-model="detailVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="总卡明细"
- align-center
- width="1200"
- :before-close="cancelDetail"
- >
- <div class="middle" style="display: flex">
- <div class="condition">
- <span>用户</span>
- <el-input
- :clearable="true"
- @clear="detailList"
- v-model.trim="detailInput.keyWord"
- class="w-50 m-2"
- placeholder="请输入用户"
- style="width: 230px; margin-left: 10px"
- />
- </div>
- <div class="condition">
- <span>楼栋单元</span>
- <el-select
- v-model="detailInput.buildingId"
- placeholder="请选择楼栋单元"
- style="width: 200px; margin-left: 10px"
- @change="detailList"
- :clearable="true"
- >
- <el-option
- v-for="item in buildData"
- :key="item.id"
- :label="`${item.building}-${item.element}`"
- :value="item.id"
- />
- </el-select>
- </div>
- <div class="condition">
- <span>创建时间 </span>
- <el-date-picker
- v-model="detailInput.createTime"
- type="daterange"
- unlink-panels
- range-separator="-"
- start-placeholder="起始时间"
- end-placeholder="结束时间"
- format="YYYY-MM-DD"
- value-format="YYYY-MM-DD"
- :prefix-icon="Calendar"
- placeholder="请选择日期"
- @change="detailList"
- />
- </div>
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- @click="detailList"
- ><span>查询</span></el-button
- >
- </div>
- <div class="footers" v-loading="detailLoading">
- <el-table
- :row-class-name="tableRowClassName"
- :data="detailData.list"
- @selection-change="handleSelectionChange"
- style="width: 100%; height: 550px"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <el-table-column align="center" prop="startTime" label="生效时间">
- </el-table-column>
- <el-table-column align="center" prop="endTime" label="失效时间" />
- <el-table-column
- align="center"
- prop="employeeUsersName"
- label="用户"
- />
- <el-table-column align="center" width="200" label="楼栋单元">
- <template #default="{ row }">
- <span>{{ row.building }}-{{ row.element }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="roomCardInformation"
- label="卡号"
- />
- <el-table-column
- align="center"
- prop="createTime"
- label="创建时间"
- />
- <el-table-column align="center" prop="unlockType" label="操作">
- <template #default="{ row }">
- <el-popconfirm
- width="220"
- confirm-button-text="确认"
- cancel-button-text="取消"
- icon-color="#f89626"
- title="是否删除此卡?"
- @confirm="detailDel(row)"
- @cancel="cancelEvent"
- >
- <template #reference>
- <span style="cursor: pointer; color: #0061ff">删除</span>
- </template>
- </el-popconfirm>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div class="pageSize">
- <span></span>
- <el-pagination
- background
- :current-page="detailPage"
- :page-size="detailSize"
- layout="total, prev, pager, next, jumper, slot"
- :total="detailTotal"
- @update:current-page="detailHandleCurrentChange"
- />
- </div>
- </el-dialog>
- <!-- 总密码明细 -->
- <el-dialog
- class="detailDialog"
- v-model="allPassDetailVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="总密码明细"
- align-center
- width="1200"
- :before-close="cancelAllPassDetail"
- >
- <div class="middle" style="display: flex">
- <div class="condition">
- <span>用户</span>
- <el-input
- :clearable="true"
- @clear="allPassDetailList"
- v-model.trim="allPassDetailInput.employeeName"
- class="w-50 m-2"
- placeholder="请输入用户"
- style="width: 230px; margin-left: 10px"
- />
- </div>
- <div class="condition">
- <span>楼栋单元</span>
- <el-select
- v-model="allPassDetailInput.buildingId"
- placeholder="请选择楼栋单元"
- style="width: 200px; margin-left: 10px"
- @change="allPassDetailList"
- :clearable="true"
- >
- <el-option
- v-for="item in buildData"
- :key="item.id"
- :label="`${item.building}-${item.element}`"
- :value="item.id"
- />
- </el-select>
- </div>
- <div class="condition">
- <span>创建时间 </span>
- <el-date-picker
- v-model="allPassDetailInput.createTime"
- type="daterange"
- unlink-panels
- range-separator="-"
- start-placeholder="起始时间"
- end-placeholder="结束时间"
- format="YYYY-MM-DD"
- value-format="YYYY-MM-DD"
- :prefix-icon="Calendar"
- placeholder="请选择日期"
- @change="allPassDetailList"
- />
- </div>
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- @click="allPassDetailList"
- ><span>查询</span></el-button
- >
- </div>
- <div class="footers" v-loading="allPassDetailLoading">
- <el-table
- :row-class-name="tableRowClassName"
- :data="allPassDetailData.list"
- style="width: 100%; height: 550px"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <el-table-column align="center" prop="startTime" label="生效时间">
- </el-table-column>
- <el-table-column align="center" prop="endTime" label="失效时间" />
- <el-table-column
- align="center"
- prop="employeeUsersName"
- label="用户"
- />
- <el-table-column align="center" width="200" label="楼栋单元">
- <template #default="{ row }">
- <span>{{ row.building }}-{{ row.element }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="passWord"
- label="密码"
- />
- <el-table-column
- align="center"
- prop="createTime"
- label="创建时间"
- />
- <el-table-column align="center" prop="unlockType" label="操作">
- <template #default="{ row }">
- <el-popconfirm
- width="220"
- confirm-button-text="确认"
- cancel-button-text="取消"
- icon-color="#f89626"
- title="是否删除此密码?"
- @confirm="allPassDetailDel(row)"
- @cancel="cancelEvent"
- >
- <template #reference>
- <span style="cursor: pointer; color: #0061ff">删除</span>
- </template>
- </el-popconfirm>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div class="pageSize">
- <span></span>
- <el-pagination
- background
- :current-page="allPassDetailPage"
- :page-size="allPassDetailSize"
- layout="total, prev, pager, next, jumper, slot"
- :total="allPassDetailTotal"
- @update:current-page="allPassDetailHandleCurrentChange"
- />
- </div>
- </el-dialog>
- </div>
- </div>
- </template>
- <script setup>
- import {
- ref,
- reactive,
- nextTick,
- watch,
- onBeforeMount,
- onUnmounted,
- } from "vue";
- import { useRouter } from "vue-router";
- import { ElMessage, ElMessageBox, genFileId } from "element-plus";
- import { Calendar } from "@element-plus/icons-vue";
- import vidiconsApi from "@/api/vidicons.js";
- import { dayjs, ElLoading } from "element-plus";
- import lodash from "lodash";
- import axios from "axios";
- import { useStore } from "vuex";
- const store = useStore();
- const api = ref("");
- const router = useRouter();
- const flagBtn = ref(); // 按钮权限
- const nowDay = ref(dayjs().format("YYYY-MM-DD HH:mm:ss"));
- // 表格数据
- const loading = ref(false);
- const tableData = reactive({
- list: [],
- });
- const searchInput = reactive({
- keyWord: "",
- buildingId: "",
- houseType: "",
- }); // 搜索按钮数据
- const buildData = ref(); // 楼栋数据
- const roomTypes = ref(); // 房间类型数据
- const roomTypeIndex = ref("全部"); // 选中的房间类型
- const roomList = reactive({
- list: [],
- });
- const electricQuantity = ref(); // 每个房间的电量
- const nfcFunction = ref(); // nfc标识
- const houseLockId = ref(); // 门锁表id
- // 总卡明细
- const detailVisible = ref(false);
- const detailInput = reactive({
- keyWord: "",
- buildingId: "",
- createTime: "",
- });
- const detailLoading = ref(false);
- const detailData = reactive({ list: [] });
- const detailPage = ref(1);
- const detailSize = ref(10);
- const detailTotal = ref();
- // 总卡明细 (--------------------------------------------------------)
- const allPassDetailVisible = ref(false);
- const allPassDetailInput = reactive({
- employeeName: "",// 员工名称
- buildingId: "",// 楼栋单元id
- createTime: "",//
- });
- const allPassDetailLoading = ref(false);
- const allPassDetailData = reactive({ list: [] });
- const allPassDetailPage = ref(1);
- const allPassDetailSize = ref(10);
- const allPassDetailTotal = ref();
- // 设置临时总卡 (头部按钮--------------------------------------------------------)
- const temporaryCardVisible = ref(false);
- const temporaryCardRef = ref();
- const temporaryCardRuleForm = reactive({
- level: 1,
- name: "",
- effectiveTime: "",
- failureTime: "",
- serialNumber: "",
- id: "",
- });
- var checkFullName = (rule, value, callback) => {
- if (!value) {
- return callback(new Error("请输入姓名"));
- }
- var reg = /^[\u4e00-\u9fa5]{2,6}$/;
- if (!reg.test(value)) {
- callback(new Error("必须为2-6个汉字!"));
- } else {
- callback();
- }
- };
- // 表单验证
- const temporaryCardRules = reactive({
- name: [
- { required: true, message: "姓名不能为空", trigger: "blur" },
- { validator: checkFullName, trigger: "blur" },
- ],
- level: [
- {
- required: true,
- message: "角色不能为空",
- trigger: "blur",
- },
- ],
- effectiveTime: [
- {
- required: true,
- message: "生效时间不能为空",
- trigger: "blur",
- },
- ],
- failureTime: [
- {
- required: true,
- message: "失效时间不能为空",
- trigger: "blur",
- },
- ],
- serialNumber: [
- {
- required: true,
- message: "至少选择一间房",
- trigger: "blur",
- },
- ],
- });
- // 制作总密码(--------------------------------------------------------)
- const allPassVisible = ref(false);
- const allPassRef = ref();
- const allPassRuleForm = reactive({
- buildingId:"",// 楼栋单元
- name: "",// 员工
- effectiveTime: "",// 开始时间
- failureTime: "",//结束时间
- pass: "",
- });
- var allPassRule = (rule, value, callback) => {
- var reg = /^\d{6}$|^\d{8}$/;
- if (!reg.test(value)) {
- callback(new Error("请输入6或8位数字密码!"));
- } else {
- callback();
- }
- };
- // 表单验证
- const allPassRules = reactive({
- name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
- buildingId: [{ required: true, message: "楼栋单元不能为空", trigger: "blur" }],
- phone: [{ required: true, message: "号码不能为空", trigger: "blur" }],
- level: [
- {
- required: true,
- message: "角色不能为空",
- trigger: "blur",
- },
- ],
- effectiveTime: [
- {
- required: true,
- message: "生效时间不能为空",
- trigger: "blur",
- },
- ],
- failureTime: [
- {
- required: true,
- message: "失效时间不能为空",
- trigger: "blur",
- },
- ],
- pass: [
- {
- required: true,
- message: "密码不能为空",
- trigger: "blur",
- },
- { validator: allPassRule, trigger: "blur" },
- ],
- });
- // 消息列表弹窗(----------------------------------------------------)
- const newsVisible = ref(false);
- const newsIndex = ref(1);
- const newshouseNumberId = ref();
- const newsPage = ref(1); // 当前页
- const newsSize = ref(10);
- const newsTotal = ref(20); // 当前总数
- const newTableList = ref();
- // 远程开锁(--------------------------------------------------------)
- const unlockingVisible = ref(false);
- const unlockingLoading = ref(false);
- const unlockList = reactive({ luid: "", roomNumber: "", houseNumberId: "" });
- // 绑定设备 (--------------------------------------------------------)
- const bindingVisible = ref(false);
- const bindingRef = ref();
- const bindingList = reactive({ houseNumberId: "", luid: "" });
- // 表单验证
- const bindingrules = reactive({
- luid: [{ required: true, message: "设备id不能为空", trigger: "blur" }],
- });
- // 解绑设备 (--------------------------------------------------------)
- const deblockingVisible = ref(false);
- const dellockList = reactive({ houseNumberId: "" });
- // 批量导入 (--------------------------------------------------------)
- const bulkImportVisible = ref(false);
- const uploadFileShow = ref(false);
- const bulkImportref = ref();
- const bulkImportFile = ref();
- // 重置管理员密码 (--------------------------------------------------------)
- const resetPassVisible = ref(false);
- const resetPassRef = ref();
- const resetPassRuleForm = reactive({
- password: "",
- againPass: "",
- id: "",
- });
- // 表单验证
- const resetPassRules = reactive({
- password: [
- {
- required: true,
- message: "密码不能为空",
- trigger: "blur",
- },
- {
- min: 8,
- max: 20,
- pattern:
- /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\._\+(){}])[0-9a-zA-Z!@#$%^&*,\\._\+(){}]{8,20}$/,
- message: "请输入8-20位正确密码(大小写字母·字符·数字)",
- trigger: "blur",
- },
- ],
- againPass: [
- {
- required: true,
- message: "确认密码不能为空",
- trigger: "blur",
- },
- {
- min: 8,
- max: 20,
- pattern:
- /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\._\+(){}])[0-9a-zA-Z!@#$%^&*,\\._\+(){}]{8,20}$/,
- message: "请输入8-20位正确密码(大小写字母·字符·数字)",
- trigger: "blur",
- },
- ],
- // desc: [{ required: true, message: "Please input activity form", trigger: "blur" }],
- });
- // 钥匙管理 (--------------------------------------------------------)
- const keyVisible = ref(false);
- const keyData = reactive({
- houseNumberId: "",
- equipmentType: "",
- });
- const activeUser = ref("1");
- const activeSystem = ref("2");
- const activeCustom = ref("3");
- const keyTitle = ref();
- const userList = ref(); // 用户
- const systemUserList = ref(); // 系统用户
- const customList = ref(); // 自定义用户
- const keypassflag = ref(""); // 添加系统或者自定义用户
- const cardFlag = ref(""); // 判断是添加房卡还是身份证
- // 钥匙管理 密码管理(--------------------------------------------------------)
- const passManagementVisible = ref(false);
- const passManagementIndex = ref(1); // 默认选中 时效密码
- const passManagementEditFlag=ref(1) // 判断是添加还是编辑 1.添加 2.编辑
- const passManagementRef = ref();
- const passManagementRuleForm = reactive({
- // level: '',
- name: "",
- phone: "",
- effectiveTime: "",// 开始时间
- failureTime: "",//结束时间
- pass: "",
- id: "",
- });
- var passManagementRule = (rule, value, callback) => {
- var reg = /^\d{6}$|^\d{8}$/;
- if (!reg.test(value)) {
- callback(new Error("请输入6或8位数字密码!"));
- } else {
- callback();
- }
- };
- // 表单验证
- const passManagementRules = reactive({
- name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
- phone: [{ required: true, message: "号码不能为空", trigger: "blur" }],
- level: [
- {
- required: true,
- message: "角色不能为空",
- trigger: "blur",
- },
- ],
- effectiveTime: [
- {
- required: true,
- message: "生效时间不能为空",
- trigger: "blur",
- },
- ],
- failureTime: [
- {
- required: true,
- message: "失效时间不能为空",
- trigger: "blur",
- },
- ],
- pass: [
- {
- required: true,
- message: "密码不能为空",
- trigger: "blur",
- },
- { validator: passManagementRule, trigger: "blur" },
- ],
- });
- // 钥匙管理 下发管理员密码(--------------------------------------------------------)
- const sendAdminPassVisible = ref(false);
- const sendAdminPassRef = ref();
- const sendAdminPassRuleForm = reactive({
- pass: "",
- });
- var passRule = (rule, value, callback) => {
- var reg = /^\d{6}$|^\d{8}$/;
- if (!reg.test(value)) {
- callback(new Error("请输入6或8位数字密码!"));
- } else {
- callback();
- }
- };
- // 表单验证
- const sendAdminPassRules = reactive({
- pass: [
- {
- required: true,
- message: "密码不能为空",
- trigger: "blur",
- },
- { validator: passRule, trigger: "blur" },
- ],
- });
- const staffList = ref(); // 选择的员工数据
- // 钥匙管理 添加指纹(--------------------------------------------------------)
- const fingerprintVisible = ref(false);
- const fingerprintRef = ref();
- const fingerprintEditFlag=ref(1)// 判断是1、添加还是2、编辑
- const fingerprintprops = {
- checkStrictly: true,
- label: "name",
- value: "id",
- };
- const fingerprintoptions = ref();
- // const fingerprintChangeList = ref();
- const fingerprintRuleForm = reactive({
- level: "",
- name: "",
- phone: "",
- fingerprintNum: "",
- effectiveTime: "",
- failureTime: "",
- id: "",
- });
- var fingerprintName = (rule, value, callback) => {
- if (!value) {
- return callback(new Error("请输入姓名"));
- }
- var reg = /^[\u4e00-\u9fa5]{2,6}$/;
- if (!reg.test(value)) {
- callback(new Error("必须为2-6个汉字!"));
- } else {
- callback();
- }
- };
- // 表单验证
- const fingerprintRules = reactive({
- name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
- phone: [{ required: true, message: "号码不能为空", trigger: "blur" }],
- level: [
- {
- required: true,
- message: "角色不能为空",
- trigger: "blur",
- },
- ],
- fingerprintNum: [
- {
- required: true,
- message: "指纹不能为空",
- trigger: "blur",
- },
- ],
- effectiveTime: [
- {
- required: true,
- message: "生效时间不能为空",
- trigger: "blur",
- },
- ],
- failureTime: [
- {
- required: true,
- message: "失效时间不能为空",
- trigger: "blur",
- },
- ],
- });
- // 添加指纹弹窗
- const addFingerprintVisible = ref(false);
- const stepindex = ref(0); // 录取指纹步骤
- const step = reactive({
- list: [
- { id: 1, title: "" },
- { id: 2, title: "" },
- { id: 3, title: "" },
- { id: 4, title: "" },
- ],
- }); // 指纹步骤数据
- const ws = ref("");
- // 钥匙管理 添加身份证(--------------------------------------------------------)
- const addIdentityCardVisibleTitle = ref("添加身份证");
- const identityCardVisible = ref(false);
- const identityCardEditFlag=ref(1) // 判断是添加还是编辑 1.添加 2.编辑
- const identityCardRef = ref();
- const identityCardRuleForm = reactive({
- level: "",
- buildingId: "", // 总卡中的楼栋单元
- name: "",
- phone: "",
- icCard: "",
- cardType: "",
- effectiveTime: "",
- failureTime: "",
- id: "",
- });
- // 表单验证
- const identityCardRules = reactive({
- name: [{ required: true, message: "用户不能为空", trigger: "blur" }],
- phone: [{ required: true, message: "号码不能为空", trigger: "blur" }],
- buildingId: [
- { required: true, message: "楼栋单元不能为空", trigger: "blur" },
- ],
- level: [
- {
- required: true,
- message: "角色不能为空",
- trigger: "blur",
- },
- ],
- cardType: [
- {
- required: true,
- message: "类型不能为空",
- trigger: "blur",
- },
- ],
- icCard: [
- {
- required: true,
- message: "卡号不能为空",
- trigger: "blur",
- },
- ],
- effectiveTime: [
- {
- required: true,
- message: "生效时间不能为空",
- trigger: "blur",
- },
- ],
- failureTime: [
- {
- required: true,
- message: "失效时间不能为空",
- trigger: "blur",
- },
- ],
- });
- // 添加身份证弹窗
- const addIdentityCardVisible = ref(false);
- // const wsidentityCard = ref("");
- const identityCardTitle = ref("");
- // const identityCardNum = ref(""); // 身份证卡号
- const identityCardIndex = ref(0); // 读卡步骤
- // 点击房间查看面板操作 (--------------------------------------------------)
- const itemClick = async (i) => {
- roomList.list.forEach((item) => {
- item.vos.forEach((ii) => {
- ii.visible = false;
- });
- });
- i.visible = true;
- let data = {
- houseNumberId: i.houseNumberId,
- permissionSettingId: sessionStorage.getItem("permissionSettingId"),
- };
- let res = await axios({
- method: "get",
- url: api.value + "/house-lock/particular",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "门锁详情");
- if (res.data.code == 200) {
- electricQuantity.value = res.data.data.electricQuantity;
- nfcFunction.value = res.data.data.nfcFunction;
- houseLockId.value = res.data.data.id;
- // i.visible = true;
- } else {
- // i.visible = false;
- electricQuantity.value = "";
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 关闭操作面板
- const closeRoom = (i) => {
- i.visible = false;
- };
- // 房型列表展示条
- const roomNameTypeData = async () => {
- let res = await axios({
- method: "get",
- url: api.value + "/house/roomNameType",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("user_head"),
- },
- });
- console.log(res, "房型管理");
- if (res.data.code == 200) {
- roomTypes.value = res.data.data;
- // roomTypeIndex.value=roomTypes.value[0]
- loading.value = false;
- // ElMessage({
- // type: "success",
- // showClose: true,
- // message: res.data.message,
- // center: true,
- // });
- } else {
- loading.value = false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- const changeTypes = (val) => {
- console.log(val);
- roomTypeIndex.value = val;
- getList().then(() => {
- roomList.list.forEach((item) => {
- item.vos.forEach((ii) => {
- ii.visible = false;
- });
- });
- });
- };
- // 楼栋单元数据
- const schoolData = async () => {
- let res = await axios({
- method: "get",
- url: api.value + "/building/beDisplayBar",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("user_head"),
- },
- });
- console.log(res, "楼栋单元下拉框");
- if (res.data.code == 200) {
- buildData.value = res.data.data;
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 查看员工列表
- const getList = async () => {
- loading.value = true;
- let data = {
- roomNumber: searchInput.keyWord,
- permissionSettingId: sessionStorage.getItem("permissionSettingId"),
- roomName: roomTypeIndex.value,
- buildingId: searchInput.buildingId,
- houseType: searchInput.houseType,
- };
- if (roomTypeIndex.value == "全部") {
- data.roomName = "";
- }
- let res = await axios({
- method: "get",
- url: api.value + "/house-lock/list",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "门锁页面展示");
- if (res.data.code == 200) {
- loading.value = false;
- let arr = [];
- res.data.data.forEach((item) => {
- if (item.vos) {
- item.total = item.vos.length;
- arr.push(item);
- }
- });
- roomList.list = arr;
- } else {
- loading.value = false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 搜索功能
- const searchBtn = lodash.debounce(async () => {
- getList();
- }, 300);
- // 制作总密码
- const allPassClick=()=>{
- staffData();// 用户数据
- allPassVisible.value=true
- allPassRuleForm.name=""
- allPassRuleForm.pass=""
- allPassRuleForm.effectiveTime=""
- allPassRuleForm.failureTime=""
- }
- const randomCipherAllPass=async ()=>{
- let res = await axios({
- method: "get",
- url: api.value + "/unlocking-admin/getPassWord",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- });
- console.log(res, "随机密码");
- if (res.data.code == 200) {
- allPassRuleForm.pass = res.data.data.passWord;
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- const cancelAllPass=()=>{
- allPassVisible.value=false
- allPassRef.value.resetFields()
- }
- // 确定总密码设备
- const allPassConfig = async (formEl) => {
- if (!formEl) return;
- await formEl.validate(async (valid, fields) => {
- if (valid) {
- const loading = ElLoading.service({
- lock: true,
- text: "加载中...",
- background: "rgba(255, 255, 255, 0.7)",
- });
- let data = {
- adminId: sessionStorage.getItem("id"), //管理员id
- employeeUsersId: allPassRuleForm.name, //房间号id
- buildingId: allPassRuleForm.buildingId,
- passWord: allPassRuleForm.pass, //房间号id
- startTime:allPassRuleForm.effectiveTime,
- endTime:allPassRuleForm.failureTime,
- };
- let res = await axios({
- method: "post",
- url: api.value + "/total-pass-word/saveEmployeeTotalPassWord",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("user_head"),
- },
- data: data,
- });
- console.log(res, "确定总密码设备");
- if (res.data.code == 200) {
- // getList();
- allPassVisible.value=false
- loading.close();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- bindingVisible.value = false;
- bindingRef.value.resetFields();
- } else {
- loading.close();
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else {
- console.log("error submit!", fields);
- }
- });
- };
- // 消息列表 (---------------------------------------------------------------)
- const newsClick = async (row) => {
- newsVisible.value = true;
- console.log(row, "消息列表");
- newshouseNumberId.value = row.houseNumberId;
- if (newsIndex.value == 1) {
- let data = {
- houseNumberId: newshouseNumberId.value,
- permissionSettingId: sessionStorage.getItem("permissionSettingId"),
- page: newsPage.value,
- size: newsSize.value,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/unlocking-record/pageList",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "开锁记录");
- if (res.data.code == 200) {
- newTableList.value = res.data.data.records;
- newsTotal.value = res.data.data.total;
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else if (newsIndex.value == 2) {
- let data = {
- houseNumberId: newshouseNumberId.value,
- permissionSettingId: sessionStorage.getItem("permissionSettingId"),
- page: newsPage.value,
- size: newsSize.value,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/operating-record/pageList",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "操作记录");
- if (res.data.code == 200) {
- newTableList.value = res.data.data.records;
- newsTotal.value = res.data.data.total;
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- };
- // 切换消息列表
- const changeNews = async (ind) => {
- newsIndex.value = ind;
- if (ind == 1) {
- let data = {
- houseNumberId: newshouseNumberId.value,
- permissionSettingId: sessionStorage.getItem("permissionSettingId"),
- page: newsPage.value,
- size: newsSize.value,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/unlocking-record/pageList",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "开锁记录");
- if (res.data.code == 200) {
- newTableList.value = res.data.data.records;
- newsTotal.value = res.data.data.total;
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else if (ind == 2) {
- let data = {
- houseNumberId: newshouseNumberId.value,
- permissionSettingId: sessionStorage.getItem("permissionSettingId"),
- page: newsPage.value,
- size: newsSize.value,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/operating-record/pageList",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "开锁记录");
- if (res.data.code == 200) {
- newTableList.value = res.data.data.records;
- newsTotal.value = res.data.data.total;
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- };
- // 关闭弹窗列表
- const cancelNews = () => {
- newsVisible.value = false;
- };
- // 消息列表分页
- const newsHandleCurrentChange = (value) => {
- // console.log(value);
- newsPage.value = value;
- changeNews(newsIndex.value);
- };
- // 远程开锁(-----------------------------------------------------------------)
- const unlockingClick = (row) => {
- console.log(row, "远程开锁");
- unlockingVisible.value = true;
- unlockList.luid = row.equipmentType;
- unlockList.roomNumber = row.roomNumber;
- unlockList.houseNumberId = row.houseNumberId;
- };
- // 确定远程开锁
- const unlockingSubmit = async () => {
- unlockingLoading.value=true
- let data = {
- luid: unlockList.luid,
- roomNumber: unlockList.roomNumber,
- houseNumberId: unlockList.houseNumberId,
- permissionSettingId: sessionStorage.getItem("permissionSettingId"),
- };
- let res = await axios({
- method: "post",
- url: api.value + "/house-lock/remoteUnlocking",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "确定远程开锁");
- if (res.data.code == 200) {
- unlockingVisible.value = false;
- getList();
- unlockingLoading.value=false
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- unlockingLoading.value=false
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- const cancelUnlocking = () => {
- unlockingVisible.value = false;
- };
- // 绑定设备(-----------------------------------------------------------------)
- const bindingClick = (row) => {
- console.log(row, "绑定设备");
- bindingVisible.value = true;
- bindingList.houseNumberId = row.houseNumberId;
- };
- // 确定绑定设备
- const bindingSubmit = async (formEl) => {
- if (!formEl) return;
- await formEl.validate(async (valid, fields) => {
- if (valid) {
- let data = {
- permissionSettingId: sessionStorage.getItem("permissionSettingId"),
- houseNumberId: bindingList.houseNumberId, //房间号id
- adminId: sessionStorage.getItem("id"), //管理员id
- luid: bindingList.luid, //锁设备ID
- };
- let res = await axios({
- method: "post",
- url: api.value + "/house-lock/binding",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("user_head"),
- },
- data: data,
- });
- console.log(res, "确定绑定设备");
- if (res.data.code == 200) {
- getList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- bindingVisible.value = false;
- bindingRef.value.resetFields();
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else {
- console.log("error submit!", fields);
- }
- });
- };
- // 取消绑定设备
- const cancelBinding = () => {
- bindingVisible.value = false;
- bindingRef.value.resetFields();
- };
- // nfc操作
- const nfcClick = async (row, flag) => {
- console.log(row, "nfc操作");
- let data = {
- houseLockId: houseLockId.value,
- nfcFunction: flag,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/house-lock/nfc",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "nfc操作");
- if (res.data.code == 200) {
- getList();
- roomList.list.forEach((item) => {
- item.vos.forEach((ii) => {
- ii.visible = false;
- });
- });
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- const cancelEvent=()=>{}
- // 解绑设备(-----------------------------------------------------------------)
- const deblockingClick = (row) => {
- console.log(row, "解绑设备");
- deblockingVisible.value = true;
- dellockList.houseNumberId = row.houseNumberId;
- };
- // 确定解绑设备
- const deblockSubmit = async () => {
- let data = {
- houseNumberId: dellockList.houseNumberId,
- permissionSettingId: sessionStorage.getItem("permissionSettingId"),
- adminId: sessionStorage.getItem("id"),
- };
- let res = await axios({
- method: "get",
- url: api.value + "/house-lock/unbind",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "确定解绑设备");
- if (res.data.code == 200) {
- deblockingVisible.value = false;
- getList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 取消绑定
- const cancelDeblocking = () => {
- deblockingVisible.value = false;
- };
- // 下发管理员密码
- const sendAdminPass=async (i)=>{
- sendAdminPassVisible.value=true
- }
- const cancelSendAdminPass=()=>{
- sendAdminPassVisible.value=false
- sendAdminPassRef.value.resetFields()
- }
- const sendAdminPassConfig=async (formEl)=>{
- if (!formEl) return;
- await formEl.validate(async (valid, fields) => {
- if (valid) {
- let data = {
- houseLockId: houseLockId.value,
- passWord: sendAdminPassRuleForm.pass, //房间号id
- };
- let res = await axios({
- method: "post",
- url: api.value + "/house-lock/saveAdministratorPassword",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("user_head"),
- },
- data: data,
- });
- console.log(res, "确定下发管理员密码");
- if (res.data.code == 200) {
- // getList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- sendAdminPassVisible.value = false;
- sendAdminPassRef.value.resetFields();
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else {
- console.log("error submit!", fields);
- }
- });
- }
- // 总卡明细 (=========================================================)
- const detailChange = () => {
- detailVisible.value = true;
- detailList();
- };
- // 总卡明细数据
- const detailList = async () => {
- detailLoading.value = true;
- let data = {
- page: detailPage.value,
- size: detailSize.value,
- employeeName: detailInput.keyWord, // 房型名称
- buildingId: detailInput.buildingId,
- };
- if (detailInput.createTime) {
- data.startTime = detailInput.createTime[0];
- data.endTime = detailInput.createTime[1];
- }
- let res = await axios({
- method: "get",
- url: api.value + "/total-card/listEmployeeTotalCard",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("user_head"),
- },
- params: data,
- });
- console.log(res, "总卡明细");
- if (res.data.code == 200) {
- detailLoading.value = false;
- detailData.list = res.data.data.list;
- detailTotal.value = res.data.data.totalCount;
- } else {
- detailLoading.value = false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 总卡明细分页
- const detailHandleCurrentChange = (val) => {
- detailPage.value = val;
- detailList();
- };
- // 总卡明细删除
- const detailDel = async (row) => {
- const loading = ElLoading.service({
- lock: true,
- text: "加载中...",
- background: "rgba(255, 255, 255, 0.7)",
- });
- let data = {
- id: row.id,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/total-card/deleteEmployeeTotalCard",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("user_head"),
- },
- params: data,
- });
- console.log(res, "总卡明细删除");
- if (res.data.code == 200) {
- loading.close();
- detailList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- loading.close();
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- const cancelDetail = () => {
- detailVisible.value = false;
- };
- // 总密码明细 (=========================================================)
- const allPassDetailChange = () => {
- allPassDetailVisible.value = true;
- allPassDetailList();
- };
- // 总密码明细数据
- const allPassDetailList = async () => {
- allPassDetailLoading.value = true;
- let data = {
- page: allPassDetailPage.value,
- size: allPassDetailSize.value,
- employeeName: allPassDetailInput.employeeName, // 房型名称
- buildingId:allPassDetailInput.buildingId
- };
- if (allPassDetailInput.createTime) {
- data.startTime = allPassDetailInput.createTime[0];
- data.endTime = allPassDetailInput.createTime[1];
- }
- let res = await axios({
- method: "get",
- url: api.value + "/total-pass-word/listEmployeeTotalPassWord",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("user_head"),
- },
- params: data,
- });
- console.log(res, "总密码明细");
- if (res.data.code == 200) {
- allPassDetailLoading.value = false;
- allPassDetailData.list = res.data.data.list;
- allPassDetailTotal.value = res.data.data.totalCount;
- } else {
- allPassDetailLoading.value = false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 总密码明细分页
- const allPassDetailHandleCurrentChange = (val) => {
- allPassDetailPage.value = val;
- allPassDetailList();
- };
- // 总密码明细删除
- const allPassDetailDel = async (row) => {
- const loading = ElLoading.service({
- lock: true,
- text: "加载中...",
- background: "rgba(255, 255, 255, 0.7)",
- });
- let data = {
- id: row.id,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/total-pass-word/deleteEmployeeTotalPassWord",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("user_head"),
- },
- params: data,
- });
- console.log(res, "总密码明细删除");
- if (res.data.code == 200) {
- loading.close();
- allPassDetailList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- loading.close();
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- const cancelAllPassDetail = () => {
- allPassDetailVisible.value = false;
- };
- // 批量导入(-----------------------------------------------------------------)
- const bulkImportClick = () => {
- bulkImportVisible.value = true;
- bulkImportFile.value = "";
- nextTick(() => {
- bulkImportref.value.clearFiles();
- });
- };
- // 移出照片
- const handleRemove = (uploadFile, uploadFiles) => {
- bulkImportFile.value = "";
- };
- // 点击图片的查看按钮
- const handlePreview = (file) => {
- console.log(file);
- };
- // 限制上传图片的大小
- const beforeAvatarUpload = (rawFile) => {
- console.log(rawFile.type, "文件类型");
- if (
- rawFile.type !==
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
- ) {
- ElMessage.error("文件格式必须为xlsx格式!");
- return false;
- } else if (rawFile.size / 1024 / 1024 > 100) {
- ElMessage.error("文件的大小不能超过100MB!");
- return false;
- }
- return true;
- };
- // 添加照片时往fileList列表中添加图片信息
- const handleChange = async (file, fileLists) => {
- console.log(file, "1111");
- // fileList.list.push(file);
- bulkImportFile.value = file.raw;
- uploadFileShow.value = true;
- };
- // 可以获取图片参数
- const handleUpload = async (file) => {
- // if (fileList.list.length >= 6) {
- // ElMessage.error("最多可上传6张图片!");
- // return false;
- // }
- console.log(file, "22222222");
- // let data = new FormData();
- // data.set("files", file.file);
- // let res = await axios({
- // method: "post",
- // url: api.value + "/file/cos/upload",
- // headers: {},
- // data: data,
- // });
- // console.log(res, "图片上传成功详情图");
- // if (res.data.code == 1) {
- // // res.data.data.uid = file.file.uid;
- // // console.log([res.data.data]);
- // let arr = {
- // uid: file.file.uid,
- // url: res.data.data,
- // };
- // fileList.list = fileList.list.concat([arr]);
- // ruleForm.fileListJson = fileList.list;
- // }
- };
- // 上传文件时覆盖上一个文件
- const handleExceed = (files) => {
- bulkImportref.value.clearFiles();
- const file = files[0];
- file.uid = genFileId();
- bulkImportref.value.handleStart(file);
- };
- // 重置按钮 重置上传文件
- const resetImport = () => {
- bulkImportFile.value = "";
- bulkImportref.value.clearFiles();
- };
- // 下载模板
- const downbulkImport = async () => {
- let res = await axios({
- method: "get",
- url: api.value + "/house-lock/lockExport",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- responseType: "blob",
- });
- console.log(res, "批量导入模板下载");
- if (res.status == 200) {
- let name = `门锁模板`;
- var content = res.data;
- var datas = new Blob([content]);
- var downloadUrl = window.URL.createObjectURL(datas);
- var anchor = document.createElement("a");
- anchor.href = downloadUrl;
- anchor.download = name + ".xlsx";
- anchor.click();
- window.URL.revokeObjectURL(datas);
- ElMessage({
- type: "success",
- showClose: true,
- message: "下载成功",
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 确定导入
- const bulkImportConfig = async () => {
- let data = new FormData();
- data.append("file", bulkImportFile.value);
- let res = await axios({
- method: "post",
- url: api.value + "/house-lock/lockImport",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "确定导入");
- if (res.status == 200) {
- getList();
- bulkImportVisible.value = false;
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- const cancelBulkImport = () => {
- bulkImportVisible.value = false;
- };
- // 钥匙管理(-----------------------------------------------------------------)
- const keyListData = async () => {
- let data = {
- permissionSettingId: sessionStorage.getItem("permissionSettingId"),
- houseNumberId: keyData.houseNumberId,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/house-lock/key",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "住客,系统用户");
- if (res.data.code == 200) {
- userList.value = res.data.data.order;
- systemUserList.value = res.data.data.employee;
- customList.value = res.data.data.custom;
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 员工数据
- const staffData = async () => {
- // let data = {
- // permissionSettingId: sessionStorage.getItem("permissionSettingId"),
- // houseNumberId: keyData.houseNumberId,
- // };
- let res = await axios({
- method: "get",
- url: api.value + "/employeeUsers/getAllUser",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- });
- console.log(res, "员工数据");
- if (res.data.code == 200) {
- staffList.value = res.data.data;
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 改变用户选择
- const staffChange = (val, flag) => {
- console.log(val, flag, "改变用户选择");
- if (flag == "房卡") {
- staffList.value.forEach((i) => {
- if (i.id == val) {
- // console.log(i,'房卡 用户数据');
- if (cardFlag.value == "房卡") {
- identityCardRuleForm.icCard = "";
- } else if (cardFlag.value == "身份证") {
- identityCardRuleForm.icCard = i.idCardInformation;
- }
- }
- });
- } else if (flag == "指纹") {
- staffList.value.forEach((i) => {
- if (i.id == val) {
- console.log(i, "指纹 用户数据");
- fingerprintRuleForm.fingerprintNum = i.fingerprint;
- }
- });
- }
- };
- const keyClick = async (row) => {
- console.log(row, "钥匙管理");
- keyTitle.value = row.roomNumber;
- keyData.houseNumberId = row.houseNumberId;
- keyData.equipmentType = row.equipmentType;
- keyVisible.value = true;
- keyListData(); // 住客,员工 自定义用户
- staffData(); // 员工筛选数据
- };
- const cancelKey = () => {
- keyVisible.value = false;
- };
- // 钥匙管理 密码管理(-----------------------------------------------------------------)
- const passManagementClick = (val) => {
- keypassflag.value = val;
- passManagementEditFlag.value=1
- // rolesList();
- // fingerprintChangeList.value=""
- passManagementVisible.value = true;
- // passManagementRuleForm.level = "";
- passManagementRuleForm.name = "";
- passManagementRuleForm.phone = "";
- passManagementRuleForm.effectiveTime = "";
- passManagementRuleForm.failureTime = "";
- passManagementRuleForm.pass = "";
- };
- const cancelPassManagement = () => {
- passManagementVisible.value = false;
- passManagementRef.value.resetFields();
- };
- // 判断切换 时效密码 无网络密码 临时密码
- const passManagementHandleClick = (value) => {
- console.log(value);
- passManagementRef.value.resetFields();
- };
- // 确定密码
- const passManagementSend = (formEl) => {
- if (!formEl) return;
- formEl.validate(async (valid, fields) => {
- if (valid) {
- if (keypassflag.value == "系统") {
- if(passManagementEditFlag.value==1){
- let data = {
- permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
- adminId: sessionStorage.getItem("id"), //管理员id
- houseNumberId: keyData.houseNumberId, //房间号id
- startTime: passManagementRuleForm.effectiveTime, // 开始时间
- endTime: passManagementRuleForm.failureTime, //结束时间
- usersId: passManagementRuleForm.name, //用户id
- equipmentType: keyData.equipmentType, //设备id
- passWord: passManagementRuleForm.pass, // 密码
- type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
- };
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-employee/savePassWord",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "系统添加密码");
- if (res.data.code == 200) {
- passManagementVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }else if(passManagementEditFlag.value==2){
- let data = {
- unlockingAdminId: passManagementRuleForm.id, //系统用户钥匙id
- startTime: passManagementRuleForm.effectiveTime, // 开始时间
- endTime: passManagementRuleForm.failureTime, //结束时间
- };
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-employee/updateLock",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "员工编辑密码时效");
- if (res.data.code == 200) {
- passManagementVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- } else if (keypassflag.value == "自定义") {
- if(passManagementEditFlag.value==1){
- let data = {
- permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
- adminId: sessionStorage.getItem("id"), //管理员id
- houseNumberId: keyData.houseNumberId, //房间号id
- startTime: passManagementRuleForm.effectiveTime, // 开始时间
- endTime: passManagementRuleForm.failureTime, //结束时间
- userName: passManagementRuleForm.name, //用户id
- phone: passManagementRuleForm.phone, //用户id
- equipmentType: keyData.equipmentType, //设备id
- passWord: passManagementRuleForm.pass, // 密码
- type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
- };
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-custom/savePassWord",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "自定义添加密码");
- if (res.data.code == 200) {
- passManagementVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }else if(passManagementEditFlag.value==2){
- let data = {
- unlockingAdminId: passManagementRuleForm.id, //系统用户钥匙id
- startTime: passManagementRuleForm.effectiveTime, // 开始时间
- endTime: passManagementRuleForm.failureTime, //结束时间
- };
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-custom/updateLock",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "员工编辑密码时效");
- if (res.data.code == 200) {
- passManagementVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- }
- } else {
- console.log("error submit!", fields);
- }
- });
- };
- // 随机八位数密码
- const randomCipher = async () => {
- let res = await axios({
- method: "get",
- url: api.value + "/unlocking-admin/getPassWord",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- });
- console.log(res, "随机密码");
- if (res.data.code == 200) {
- passManagementRuleForm.pass = res.data.data.passWord;
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // (员工)编辑密码,指纹,卡片,身份证时效
- const fingerprintEdit=(row)=>{
- console.log(row,'编辑密码,指纹,卡片,身份证时效');
- passManagementEditFlag.value=2
- if(row.lockStatus==1){
- passManagementVisible.value = true;
- keypassflag.value ="系统"
- // passManagementRuleForm.level = "";
- // passManagementRuleForm.name = "";
- passManagementRuleForm.name = row.employeeUserId;
- passManagementRuleForm.effectiveTime = row.startTime;
- passManagementRuleForm.failureTime = row.endTime;
- passManagementRuleForm.pass = row.passWord;
- passManagementRuleForm.id = row.id;
- }else if(row.lockStatus==2){
- addIdentityCardVisibleTitle.value = "编辑房卡";
- keypassflag.value = '系统'
- identityCardEditFlag.value=2
- identityCardVisible.value = true;
- identityCardRuleForm.name = row.employeeUserId;
- identityCardRuleForm.icCard = row.card;
- identityCardRuleForm.effectiveTime = row.startTime;
- identityCardRuleForm.failureTime = row.endTime;
- identityCardRuleForm.id=row.id
- }else if(row.lockStatus==4){
- addIdentityCardVisibleTitle.value = "编辑身份证";
- keypassflag.value = '系统'
- identityCardEditFlag.value=2
- identityCardVisible.value = true;
- identityCardRuleForm.name = row.employeeUserId;
- identityCardRuleForm.icCard = row.card;
- identityCardRuleForm.effectiveTime = row.startTime;
- identityCardRuleForm.failureTime = row.endTime;
- identityCardRuleForm.id=row.id
- }else if(row.lockStatus==3){
- addIdentityCardVisibleTitle.value = "编辑指纹";
- keypassflag.value = '系统'
- fingerprintEditFlag.value=2
- fingerprintVisible.value = true;
- fingerprintRuleForm.name = row.employeeUserId;
- fingerprintRuleForm.fingerprintNum = row.fingerprintData;
- fingerprintRuleForm.effectiveTime = row.startTime;
- fingerprintRuleForm.failureTime = row.endTime;
- fingerprintRuleForm.id=row.id
- }
- }
- // (自定义)编辑密码,指纹,卡片,身份证时效
- const customFingerprintEdit=(row)=>{
- console.log(row,'编辑密码,指纹,卡片,身份证时效');
- passManagementEditFlag.value=2
- if(row.lockStatus==1){
- passManagementVisible.value = true;
- keypassflag.value ="自定义"
- // passManagementRuleForm.level = "";
- // passManagementRuleForm.name = "";
- passManagementRuleForm.name = row.name;
- passManagementRuleForm.effectiveTime = row.startTime;
- passManagementRuleForm.failureTime = row.endTime;
- passManagementRuleForm.pass = row.passWord;
- passManagementRuleForm.phone = row.phone;
- passManagementRuleForm.id = row.id;
- }else if(row.lockStatus==2){
- addIdentityCardVisibleTitle.value = "编辑房卡";
- keypassflag.value = '自定义'
- identityCardEditFlag.value=2
- identityCardVisible.value = true;
- identityCardRuleForm.name = row.name;
- identityCardRuleForm.phone = row.phone;
- identityCardRuleForm.icCard = row.card;
- identityCardRuleForm.effectiveTime = row.startTime;
- identityCardRuleForm.failureTime = row.endTime;
- identityCardRuleForm.id=row.id
- }else if(row.lockStatus==4){
- addIdentityCardVisibleTitle.value = "编辑身份证";
- keypassflag.value = '自定义'
- identityCardEditFlag.value=2
- identityCardVisible.value = true;
- identityCardRuleForm.name = row.name;
- identityCardRuleForm.phone = row.phone;
- identityCardRuleForm.icCard = row.card;
- identityCardRuleForm.effectiveTime = row.startTime;
- identityCardRuleForm.failureTime = row.endTime;
- identityCardRuleForm.id=row.id
- }else if(row.lockStatus==3){
- addIdentityCardVisibleTitle.value = "编辑指纹";
- keypassflag.value = '自定义'
- fingerprintEditFlag.value=2
- fingerprintVisible.value = true;
- fingerprintRuleForm.name = row.name;
- fingerprintRuleForm.phone = row.phone;
- fingerprintRuleForm.fingerprintNum = row.fingerprintData;
- fingerprintRuleForm.effectiveTime = row.startTime;
- fingerprintRuleForm.failureTime = row.endTime;
- fingerprintRuleForm.id=row.id
- }
- }
- // // 获取管理端角色信息
- // const rolesList = async () => {
- // let res = await axios({
- // method: "get",
- // url: api.value + "/admin-menu/getUserRole",
- // headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- // },
- // });
- // console.log(res, "管理端角色");
- // if (res.data.code == 200) {
- // fingerprintoptions.value = res.data.data;
- // } else {
- // ElMessage({
- // type: "error",
- // showClose: true,
- // message: res.data.message,
- // center: true,
- // });
- // }
- // };
- // // 改变管理端角色 获取用户角色信息
- // const fingerprintChange = async (val) => {
- // console.log(val);
- // let data = {
- // adminMenuId: val[val.length - 1],
- // };
- // let res = await axios({
- // method: "get",
- // url: api.value + "/admin/userList",
- // headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- // },
- // params: data,
- // });
- // console.log(res, "用户角色");
- // if (res.data.code == 200) {
- // fingerprintChangeList.value = res.data.data;
- // } else {
- // ElMessage({
- // type: "error",
- // showClose: true,
- // message: res.data.message,
- // center: true,
- // });
- // }
- // };
- // 钥匙管理 添加指纹(-----------------------------------------------------------------)
- const fingerprintClick = (val) => {
- console.log("添加指纹", val);
- keypassflag.value = val;
- // rolesList();
- // fingerprintChangeList.value=""
- fingerprintVisible.value = true;
- // fingerprintRuleForm.level = "";
- fingerprintRuleForm.name = "";
- fingerprintRuleForm.phone = "";
- fingerprintRuleForm.fingerprintNum = "";
- fingerprintRuleForm.effectiveTime = "";
- fingerprintRuleForm.failureTime = "";
- nextTick(() => {
- fingerprintRef.value.resetFields();
- });
- };
- const cancelFingerprint = () => {
- fingerprintVisible.value = false;
- fingerprintRef.value.resetFields();
- };
- // 指纹录取
- const fingerprintNext = (formEl) => {
- addFingerprintVisible.value = true;
- step.list = [
- { id: 1, title: "" },
- { id: 2, title: "" },
- { id: 3, title: "" },
- { id: 4, title: "" },
- ];
- stepindex.value = 0;
- var wsUrl = "ws://localhost:8181/";
- let websocket = new WebSocket(wsUrl);
- ws.value = websocket;
- websocket.onopen = function (evt) {
- var params = { type: 101, data: null };
- websocket.send(JSON.stringify(params));
- };
- websocket.onmessage = function (evt) {
- // console.log(evt.data, "输出指纹数据");
- let data = JSON.parse(evt.data);
- if (data.type == 0) {
- console.log(data.data.portNames);
- let num = 0;
- if (data.data.portNames) {
- num = data.data.portNames.length;
- console.log(JSON.parse(evt.data).data.portNames[num - 1]);
- }
- // console.log(JSON.parse(evt.data).data.portNames[1]); // 获取到 USB接口
- let params1 = {
- type: 1,
- data: {
- type: 0,
- portName: JSON.parse(evt.data).data.portNames[num - 1],
- baudRate: 115200,
- },
- };
- websocket.send(JSON.stringify(params1));
- } else if (data.type == 110) {
- console.log("已获取设备信息");
- } else if (data.type == 11) {
- var params2 = {
- type: 2,
- data: {
- totalStep: 4,
- },
- };
- websocket.send(JSON.stringify(params2));
- } else if (data.type == 21) {
- if (data.data.step == 0) {
- // console.log("请按压指纹");
- ElMessage({
- message: "请开始按压指纹",
- type: "success",
- });
- } else {
- // console.log(`请按下同一指纹,第${data.data.step}次按压`);
- if (data.data.step <= 4) {
- step.list.forEach((item) => {
- if (item.id == data.data.step) {
- item.title = `请按下同一指纹,第${data.data.step}次录入指纹成功`;
- }
- });
- }
- stepindex.value = data.data.step;
- }
- // _this.$message.warning("请将手指按在传感器上");
- if (data.data.step > 4) {
- var params = {
- type: 3,
- data: {
- id: data.data.id,
- },
- };
- websocket.send(JSON.stringify(params));
- }
- } else if (data.type == 31) {
- fingerprintRuleForm.fingerprintNum = data.data.template;
- console.log(data.data.template, "指纹数据");
- addFingerprintVisible.value = false;
- ws.value.close();
- ElMessage({
- message: "指纹录取成功",
- type: "success",
- });
- // setTimeout(() => {
- // _this.fingerprintShow = false;
- // ws.value.close();
- // }, 1500);
- } else {
- ElMessage({
- message: "设备连接失败,请刷新重新录入",
- type: "error",
- });
- }
- };
- websocket.onclose = function (evt) {
- console.log("关闭连接");
- // ws.value.close();
- };
- websocket.onerror = function (evt) {
- // console.log("错误提示");
- };
- };
- const fingerprintconfig = (formEl) => {
- if (!formEl) return;
- formEl.validate(async (valid, fields) => {
- if (valid) {
- if (keypassflag.value == "系统") {
- if(passManagementEditFlag.value==1){
- let data = {
- permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
- adminId: sessionStorage.getItem("id"), //管理员id
- houseNumberId: keyData.houseNumberId, //房间号id
- startTime: fingerprintRuleForm.effectiveTime, // 开始时间
- endTime: fingerprintRuleForm.failureTime, //结束时间
- usersId: fingerprintRuleForm.name, //用户id
- luid: keyData.equipmentType, //设备id
- fingerprintData: fingerprintRuleForm.fingerprintNum, //指纹特征值
- type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
- };
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-employee/saveFingerprint",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "系统添加指纹钥匙");
- if (res.data.code == 200) {
- fingerprintVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }else if(passManagementEditFlag.value==2){
- let data = {
- unlockingAdminId: fingerprintRuleForm.id, //系统用户钥匙id
- startTime: fingerprintRuleForm.effectiveTime, // 开始时间
- endTime: fingerprintRuleForm.failureTime, //结束时间
- };
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-employee/updateLock",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "系统编辑指纹钥匙");
- if (res.data.code == 200) {
- fingerprintVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
-
- } else if (keypassflag.value == "自定义") {
- if(passManagementEditFlag.value==1){
- let data = {
- permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
- adminId: sessionStorage.getItem("id"), //管理员id
- houseNumberId: keyData.houseNumberId, //房间号id
- startTime: fingerprintRuleForm.effectiveTime, // 开始时间
- endTime: fingerprintRuleForm.failureTime, //结束时间
- userName: fingerprintRuleForm.name, //用户id
- phone: fingerprintRuleForm.phone, //用户id
- luid: keyData.equipmentType, //设备id
- fingerprintData: fingerprintRuleForm.fingerprintNum, //指纹特征值
- type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
- };
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-custom/saveFingerprint",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "自定义添加指纹钥匙");
- if (res.data.code == 200) {
- fingerprintVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }else if(passManagementEditFlag.value==2){
- let data = {
- unlockingAdminId: fingerprintRuleForm.id, //系统用户钥匙id
- startTime: fingerprintRuleForm.effectiveTime, // 开始时间
- endTime: fingerprintRuleForm.failureTime, //结束时间
- };
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-custom/updateLock",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "自定义编辑指纹钥匙");
- if (res.data.code == 200) {
- fingerprintVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- }
- }
- });
- };
- // 钥匙管理中删除系统用户
- const fingerprintDel = async (row) => {
- console.log(row);
- let data = {
- unlockingEmpId: row.id, //权限表id
- };
- let res = await axios({
- method: "get",
- url: api.value + "/unlocking-employee/deleteLock",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "删除指纹钥匙");
- if (res.data.code == 200) {
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 钥匙管理中删除自定义用户
- const customDel = async (row) => {
- console.log(row);
- let data = {
- unlockingAdminId: row.id, //权限表id
- };
- let res = await axios({
- method: "get",
- url: api.value + "/unlocking-custom/deleteLock",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "删除指纹钥匙");
- if (res.data.code == 200) {
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 关闭指纹录入
- const cancelAddFingerprint = () => {
- addFingerprintVisible.value = false;
- // var wsUrl = "ws://localhost:8181/";
- // const websocket = new WebSocket(wsUrl);
- ws.value.close();
- };
- // 钥匙管理 添加身份证(-----------------------------------------------------------------)
- const identityCardClick = (val, card) => {
- keypassflag.value = val;
- if (card) {
- cardFlag.value = card;
- if (card == "房卡") {
- addIdentityCardVisibleTitle.value = "添加房卡";
- } else if (card == "身份证") {
- addIdentityCardVisibleTitle.value = "添加身份证";
- } else if (card == "总卡") {
- addIdentityCardVisibleTitle.value = "制作总卡";
- identityCardRuleForm.buildingId = "";
- staffData(); // 员工筛选数据
- }
- } else {
- cardFlag.value = "";
- }
- // rolesList();
- // fingerprintChangeList.value=""
- identityCardVisible.value = true;
- identityCardEditFlag.value=1
- identityCardRuleForm.level = "";
- identityCardRuleForm.name = "";
- identityCardRuleForm.phone = "";
- identityCardRuleForm.icCard = "";
- identityCardRuleForm.cardType = "";
- identityCardRuleForm.effectiveTime = "";
- identityCardRuleForm.failureTime = "";
- // nextTick(() => {
- // identityCardRef.value.resetFields();
- // });
- };
- const cancelIdentityCard = () => {
- identityCardVisible.value = false;
- identityCardRef.value.resetFields();
- };
- const Card = () => {
- var wsUrl = "ws://localhost:8181/";
- let websocket = new WebSocket(wsUrl);
- // wsidentityCard.value = websocket;
- websocket.onopen = function (evt) {
- var params = { type: 104, data: null };
- websocket.send(JSON.stringify(params));
- };
- websocket.onmessage = function (evt) {
- let data = JSON.parse(evt.data);
- console.log(data);
- if (data.type == 141) {
- identityCardTitle.value = "请插入设备";
- identityCardIndex.value = 0;
- } else if (data.type == 150) {
- identityCardTitle.value = "配置失败,请检查卡片是否已放置设备上";
- identityCardIndex.value = 1;
- } else if (data.type == 140) {
- // identityCardNum.value = data.data.uid;
- console.log(data.data.uid, "读取的卡号");
- identityCardIndex.value = 2;
- identityCardTitle.value = "读卡中";
- if (data.data.uid) {
- setTimeout(() => {
- identityCardIndex.value = 3;
- identityCardTitle.value = "读卡成功";
- }, 1000);
- identityCardRuleForm.icCard = data.data.uid;
- setTimeout(() => {
- addIdentityCardVisible.value = false;
- }, 2000);
- }
- // ElMessage({
- // type: "success",
- // showClose: true,
- // message: "添加卡片成功",
- // center: true,
- // });
- // identityCardTitle.value = "获取卡号成功";
- // addIdentityCardVisible.value = false;
- // identityCardVisible.value = false;
- // identityCardRef.value.resetFields();
- // setTimeout(() => {
- // _this.icCardShow = false;
- // }, 2000);
- }
- };
- };
- // 身份证读卡
- const identityCardNext = () => {
- addIdentityCardVisible.value = true;
- Card();
- };
- const identityCardConfig = (formEl) => {
- if (!formEl) return;
- formEl.validate(async (valid, fields) => {
- if (valid) {
- const loading = ElLoading.service({
- lock: true,
- text: "加载中...",
- background: "rgba(255, 255, 255, 0.7)",
- });
- if (keypassflag.value == "系统") {
- if (cardFlag.value == "房卡") {
- identityCardRuleForm.cardType = 0; // 0:房卡 1:身份证
- } else if (cardFlag.value == "身份证") {
- identityCardRuleForm.cardType = 1;
- }
- if(identityCardEditFlag.value==1){
- let data = {
- permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
- adminId: sessionStorage.getItem("id"), //管理员id
- houseNumberId: keyData.houseNumberId, //房间号id
- startTime: identityCardRuleForm.effectiveTime, // 开始时间
- endTime: identityCardRuleForm.failureTime, //结束时间
- usersId: identityCardRuleForm.name, //用户id
- luid: keyData.equipmentType, //设备id
- card: identityCardRuleForm.icCard, //指纹特征值
- cardType: identityCardRuleForm.cardType, //指纹特征值
- type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
- };
-
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-employee/saveCard",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "系统添加卡片钥匙");
- if (res.data.code == 200) {
- loading.close();
- identityCardVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- loading.close();
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }else if(identityCardEditFlag.value==2){
- let data = {
- startTime: identityCardRuleForm.effectiveTime, // 开始时间
- endTime: identityCardRuleForm.failureTime, //结束时间
- unlockingAdminId: identityCardRuleForm.id, //用户id
- };
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-employee/updateLock",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "编辑添加卡片时效");
- if (res.data.code == 200) {
- loading.close();
- identityCardVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- loading.close();
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
-
- } else if (keypassflag.value == "自定义") {
- if (cardFlag.value == "房卡") {
- identityCardRuleForm.cardType = 0; // 0:房卡 1:身份证
- } else if (cardFlag.value == "身份证") {
- identityCardRuleForm.cardType = 1;
- }
- if(identityCardEditFlag.value==1){
- let data = {
- permissionSettingId: sessionStorage.getItem("permissionSettingId"), //权限表id
- adminId: sessionStorage.getItem("id"), //管理员id
- houseNumberId: keyData.houseNumberId, //房间号id
- startTime: identityCardRuleForm.effectiveTime, // 开始时间
- endTime: identityCardRuleForm.failureTime, //结束时间
- userName: identityCardRuleForm.name, //用户id
- phone: identityCardRuleForm.phone, //用户id
- luid: keyData.equipmentType, //设备id
- card: identityCardRuleForm.icCard, //指纹特征值
- cardType: identityCardRuleForm.cardType, //指纹特征值
- type: "4", //1:管理员用户,2:普通用户(永久),4:时效性用户,5:一次性时效密码用户,100:时效性无网络密码用户
- };
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-custom/saveCard",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "自定义编辑卡片钥匙");
- if (res.data.code == 200) {
- loading.close();
- identityCardVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- loading.close();
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }else if(identityCardEditFlag.value==2){
- let data = {
- unlockingAdminId:identityCardRuleForm.id,
- startTime: identityCardRuleForm.effectiveTime, // 开始时间
- endTime: identityCardRuleForm.failureTime, //结束时间
- };
- let res = await axios({
- method: "post",
- url: api.value + "/unlocking-custom/updateLock",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "自定义编辑身份证钥匙");
- if (res.data.code == 200) {
- loading.close();
- identityCardVisible.value = false;
- keyListData();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- loading.close();
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
-
- } else if (keypassflag.value == "总卡") {
- let data = {
- adminId: sessionStorage.getItem("id"), //管理员id
- employeeUsersId: identityCardRuleForm.name, //员工id
- buildingId: identityCardRuleForm.buildingId, //楼栋单元id
- roomCardInformation: identityCardRuleForm.icCard, //房卡特殊编码
- startTime: identityCardRuleForm.effectiveTime, //开始时间
- endTime: identityCardRuleForm.failureTime, //结束时间
- };
- console.log(data);
- let res = await axios({
- method: "post",
- url: api.value + "/total-card/saveEmployeeTotalCard",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "添加总卡");
- if (res.data.code == 200) {
- loading.close();
- identityCardVisible.value = false;
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- loading.close();
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- }
- });
- };
- // 重试 身份卡
- const retry = () => {
- // identityCardNum.value = "";
- Card();
- };
- const cancelAddIdentityCard = () => {
- addIdentityCardVisible.value = false;
- identityCardIndex.value = 0;
- };
- //导出功能
- const importExcel = lodash.debounce(async () => {
- let data = {
- ledgerParam: searchInput.keyWord,
- managerId: sessionStorage.getItem("token"),
- };
- if (searchInput.createTime) {
- data.payStartTime = searchInput.createTime[0];
- data.payEndTime = searchInput.createTime[1];
- }
- if (searchInput.status) {
- data.orderStatus = searchInput.status;
- }
- let res = await axios({
- method: "post",
- url: api.value + "/mhotel/booktoBookExcel.action",
- headers: {
- // token: sessionStorage.getItem("token"),
- },
- params: data,
- });
- console.log(res, "导出订单管理");
- if (res.data.code == 200) {
- var downloadPath = res.data.downurl;
- // window.open(downloadPath);
- window.location.href = downloadPath;
- var downloadLink = document.createElement("a");
- downloadLink.style.display = "none"; // 使其隐藏
- downloadLink.href = downloadPath;
- downloadLink.download = "";
- downloadLink.click();
- document.body.appendChild(downloadLink);
- document.body.removeChild(downloadLink);
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }, 1000);
- // 表格斑马纹颜色修改
- const tableRowClassName = ({ row, rowIndex }) => {
- if (rowIndex % 2 === 0) {
- return "even";
- } else if (rowIndex % 2 !== 0) {
- return "odd";
- }
- return "";
- };
- // 分页
- const handleCurrentChange = (value) => {
- // console.log(value);
- currentPage.value = value;
- getList();
- };
- onBeforeMount(async () => {
- api.value = store.state.user.api;
- const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
- flagBtn.value = btnflag.doorLock;
- console.log(flagBtn.value, "按钮权限");
- roomNameTypeData();
- getList();
- schoolData();
- });
- onUnmounted(() => {
- // document.removeEventListener("keyup", Enters);
- });
- </script>
- <style scoped lang="scss">
- .content-box {
- width: 97.5%;
- height: calc(100vh - 105px);
- margin: 20px auto;
- background-color: #fff;
- color: #fff;
- display: flex;
- flex-direction: column;
- box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
- .left {
- // width: calc(100wh - 40px);
- display: flex;
- align-items: center;
- height: 60px;
- margin: 0 30px;
- border-bottom: 1px solid #ccc;
- color: rgb(0, 0, 0);
- font-size: 18px;
- font-weight: 600;
- .cameratxt {
- height: 60px;
- line-height: 60px;
- }
- }
- .middles {
- height: calc(100% - 81px);
- display: flex;
- flex-direction: column;
- }
- .middle {
- width: calc(100% - 60px);
- margin: 0 auto;
- color: #000;
- // border-bottom: 1px solid rgb(231, 231, 231);
- .filter {
- display: flex;
-
- align-items: center;
- padding: 10px 0 0 0;
- .search {
- color: #fff;
- }
- .condition {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- // margin: 0 0 10px 0;
- }
- }
- .changeItems {
- display: flex;
- flex-wrap: wrap;
- margin: 10px 0 0 0;
- .changeItem {
- padding: 0 15px;
- height: 30px;
- background-color: rgba(230, 230, 230, 1);
- text-align: center;
- line-height: 30px;
- font-size: 14px;
- margin: 0 15px 10px 0;
- border-radius: 3px;
- color: rgba(166, 166, 166, 1);
- cursor: pointer;
- border: 1px solid transparent;
- }
- .changeItem_active {
- background-color: rgba(222, 234, 252, 1);
- color: rgba(0, 97, 255, 1);
- border: 1px solid rgba(0, 97, 255, 1);
- }
- .search {
- margin-right: 5px;
- }
- }
- .gongneng {
- margin: 10px 0 20px 0;
- span {
- color: #fff;
- }
- }
- :deep(.cont) {
- width: 60%;
- margin: 20px auto;
- }
- :deep(.download) {
- display: flex;
- align-items: center;
- margin: 10px;
- }
- :deep(.download span) {
- font-size: 16px;
- margin-left: 20px;
- }
- :deep(.cont .el-button) {
- margin-left: 60px;
- margin-bottom: 30px;
- }
- :deep(.cont .accomplish) {
- width: 100%;
- display: flex;
- justify-content: center;
- }
- :deep(.cont .accomplish .el-button) {
- width: 50%;
- margin: 0;
- }
- }
- .footer {
- width: calc(100% - 60px);
- flex: 1;
- overflow: auto;
- margin: 0 auto;
- color: #000;
- overflow: auto;
- .floor {
- .title {
- margin: 8px 0;
- .t1 {
- font-weight: 600;
- margin-right: 10px;
- }
- .t2 {
- font-size: 13px;
- color: rgba(102, 102, 102, 1);
- }
- }
- .roomList {
- display: flex;
- flex-wrap: wrap;
- font-size: 14px;
- .room {
- width: 193px;
- height: 114px;
- opacity: 1;
- border-radius: 4px;
- background: rgba(240, 243, 247, 1);
- margin: 5px 18px 18px 0;
- // padding-left: 15px;
- .roomNum {
- font-size: 16px;
- // height: 24px;
- font-weight: 600;
- padding: 15px 0 5px 15px;
- }
- .rLock {
- color: rgba(128, 128, 128, 1);
- padding: 0 0 0 15px;
- }
- .wifi {
- display: flex;
- align-items: center;
- padding: 10px 0 10px 15px;
- color: rgba(51, 51, 51, 1);
- img {
- width: 14px;
- padding-right: 5px;
- }
- }
- }
- }
- }
- // 添加员工弹窗样式
- :deep(.addStaff) {
- // height: 600px;
- overflow: hidden;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- overflow: auto;
- padding: 0px 20px 10px 20px;
- .order_info {
- margin: 20px 0 15px 0;
- .title {
- display: flex;
- align-items: center;
- margin: 25px 0 10px 0;
- img {
- width: 20px;
- height: 20px;
- margin-right: 10px;
- }
- span {
- color: #000;
- font-size: 18px;
- font-weight: 800;
- }
- }
- // 排列模式样式
- .workNum {
- display: flex;
- align-items: center;
- margin-bottom: 12px;
- font-size: 16px;
- .titles {
- color: rgba(128, 128, 128, 1);
- margin-right: 12px;
- font-weight: 200;
- width: 80px;
- }
- span {
- color: #000;
- font-weight: 600;
- }
- ul {
- list-style: none;
- display: flex;
- flex-wrap: wrap;
- margin: 0;
- padding: 0;
- li {
- border: 1px solid rgba(166, 166, 166, 1);
- margin-right: 10px;
- padding: 1px 4px;
- border-radius: 6px;
- cursor: pointer;
- }
- li.is_active {
- background-color: rgba(9, 101, 98, 1);
- color: #fff;
- }
- }
- // .el-checkbox-button {
- // margin-right: 10px;
- // border: 1px solid #ccc;
- // border-radius: 4px;
- // box-sizing: border-box;
- // .el-checkbox-button__inner {
- // border: none;
- // border-radius: 3px;
- // }
- // }
- // .el-checkbox-button.is-focus {
- // .el-checkbox-button__inner {
- // color: #fff;
- // background-color: rgba(9, 101, 98, 1);
- // }
- // }
- }
- }
- .options {
- margin: 0 0 10px 0;
- width: 95%;
- display: flex;
- flex-direction: row-reverse;
- .queding {
- margin-left: 20px;
- color: #fff;
- }
- }
- .houseNumber {
- margin: 20px 0;
- // .el-checkbox-button {
- // margin-right: 10px;
- // border: 1px solid #ccc;
- // border-radius: 4px;
- // box-sizing: border-box;
- // .el-checkbox-button__inner {
- // border: none;
- // border-radius: 3px;
- // }
- // }
- // .el-checkbox-button.is-focus {
- // .el-checkbox-button__inner {
- // color: #fff;
- // background-color: rgba(9, 101, 98, 1);
- // }
- // }
- ul {
- list-style: none;
- display: flex;
- flex-wrap: wrap;
- margin: 0;
- padding: 0;
- li {
- border: 1px solid rgba(166, 166, 166, 1);
- margin-right: 10px;
- padding: 1px 4px;
- border-radius: 6px;
- cursor: pointer;
- }
- li.is_active {
- background-color: rgba(9, 101, 98, 1);
- color: #fff;
- }
- }
- }
- }
- }
- }
- .footer::-webkit-scrollbar-track {
- background-color: #daeeff;
- }
- .footer::-webkit-scrollbar {
- background-color: #0888f8;
- height: 3px;
- width: 6px;
- }
- .footer::-webkit-scrollbar-thumb {
- background: #57b2ff;
- border-radius: 4px;
- height: 3px;
- width: 6px;
- cursor: pointer;
- }
- .pageSize {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin: 0 30px;
- span {
- color: #000;
- }
- .el-pagination {
- // width: 1600px;
- :deep(.el-pagination__total) {
- color: #000;
- }
- :deep(.el-pagination__goto) {
- color: #000;
- }
- :deep(.el-pagination__classifier) {
- color: #000;
- }
- :deep(.el-input__wrapper) {
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- box-shadow: none;
- }
- :deep(.el-pager li) {
- margin: 0 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.el-pager li.is-active) {
- background-color: rgba(111, 182, 184, 1);
- }
- :deep(.btn-prev) {
- margin-right: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.btn-next) {
- margin-left: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- }
- }
- }
- .el-input {
- width: 192px;
- }
- .firstLogin {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: calc(100vh);
- background-color: rgba(0, 0, 0, 0.2);
- z-index: 1000000;
- display: flex;
- justify-content: center;
- align-items: center;
- .goInfo {
- width: 655px;
- height: 408px;
- background-color: #fff;
- border-radius: 9px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- color: #000;
- h2 {
- margin: 0;
- font-size: 28px;
- }
- p {
- margin: 60px 0;
- padding: 0;
- font-size: 18px;
- }
- }
- }
- // 弹出的信息框
- .roominfoPopper {
- .roomInfo {
- // border: 1px solid red;
- color: #fff;
- font-size: 14px;
- position: relative;
- .close {
- position: absolute;
- cursor: pointer;
- right: -40px;
- top: -30px;
- img {
- width: 30px;
- height: 30px;
- }
- }
- .title {
- font-size: 16px;
- padding: 7.5px 0;
- border-bottom: 1px solid rgba(255, 255, 255, 0.5);
- }
- .content {
- display: flex;
- .lefts {
- border-right: 1px solid rgba(255, 255, 255, 0.5);
- span:nth-child(1) {
- text-align: right;
- display: inline-block;
- width: 72px;
- margin: 5px 15px 5px 0;
- }
- span:nth-child(2) {
- text-align: left;
- display: inline-block;
- width: 190px;
- }
- }
- .rigths {
- width: 140px;
- margin-left: 15px;
- div {
- display: flex;
- align-items: center;
- height: 30px;
- cursor: pointer;
- img {
- width: 18px;
- height: 18px;
- margin-right: 5px;
- }
- span {
- text-align: left;
- display: inline-block;
- }
- .deblocking {
- transform: translateX(3px);
- }
- }
- }
- }
- }
- }
- // 消息列表弹窗
- :deep(.newsDialog) {
- // height: 600px;
- overflow: hidden;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- overflow: auto;
- padding: 0px 20px 10px 20px;
- .middle {
- width: 96%;
- margin: 0 auto;
- color: #000;
- // 切换 消息记录 操作记录
- .changeItems {
- display: flex;
- margin: 15px 0 0 0;
- .changeNews {
- // width: 80px;
- padding: 0 10px;
- height: 30px;
- background-color: rgba(230, 230, 230, 1);
- text-align: center;
- line-height: 30px;
- font-size: 14px;
- margin-right: 15px;
- border-radius: 3px;
- color: rgba(166, 166, 166, 1);
- cursor: pointer;
- }
- .changeNews_active {
- background-color: rgba(222, 234, 252, 1);
- color: rgba(0, 97, 255, 1);
- }
- }
- // border-bottom: 1px solid rgb(231, 231, 231);
- .filter {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- margin: 10px 0 0 0;
- justify-content: start;
- .search {
- color: #fff;
- }
- .condition {
- display: flex;
- align-items: center;
- margin: 10px 30px 10px 0;
- :deep(.el-input .el-input__inner) {
- font-size: 14px;
- }
- // span {
- // margin: 0 10px 0 0;
- // }
- }
- }
- .gongneng {
- margin: 10px 0 20px 0;
- span {
- color: #fff;
- }
- }
- :deep(.cont) {
- width: 60%;
- margin: 20px auto;
- }
- :deep(.download) {
- display: flex;
- align-items: center;
- margin: 10px;
- }
- :deep(.download span) {
- font-size: 16px;
- margin-left: 20px;
- }
- :deep(.cont .el-button) {
- margin-left: 60px;
- margin-bottom: 30px;
- }
- :deep(.cont .accomplish) {
- width: 100%;
- display: flex;
- justify-content: center;
- }
- :deep(.cont .accomplish .el-button) {
- width: 50%;
- margin: 0;
- }
- }
- .pageSize {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin: 10px 30px;
- span {
- color: #000;
- }
- .el-pagination {
- // width: 1600px;
- .el-pagination__total {
- color: #000;
- }
- .el-pagination__goto {
- color: #000;
- }
- .el-pagination__classifier {
- color: #000;
- }
- .el-input__wrapper {
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- box-shadow: none;
- }
- .el-pager li {
- margin: 0 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- .el-pager li.is-active {
- // background-color: rgba(111, 182, 184, 1);
- border: 1px solid rgba(0, 97, 255, 1);
- color: rgba(0, 97, 255, 1);
- // border: 1px solid red;
- }
- .btn-prev {
- margin-right: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- .btn-next {
- margin-left: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- }
- }
- .footers {
- width: 96%;
- // height: 402px;
- margin: 10px auto 20px;
- .el-table--fit {
- height: 100%;
- .el-table__header-wrapper {
- background-color: #000;
- font-size: 15px;
- tr {
- color: #000;
- }
- }
- .el-table__row {
- height: 50px;
- font-size: 15px;
- color: #000;
- .orderNum {
- color: rgba(111, 182, 184, 1);
- cursor: pointer;
- }
- }
- .el-table__row:nth-child(2n) {
- .el-table-fixed-column--right {
- background-color: rgba(240, 243, 247, 1);
- }
- }
- .el-table__row td {
- padding: 0;
- border: 0;
- }
- .el-button--primary {
- margin-left: 5px;
- }
- .el-table__body .even {
- background-color: #fff;
- }
- .el-table__body .odd {
- background-color: rgba(240, 243, 247, 1);
- }
- }
- }
- }
- }
- // 总卡明细弹窗
- :deep(.detailDialog) {
- // height: 600px;
- overflow: hidden;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- overflow: auto;
- padding: 0px 20px 10px 20px;
- .middle {
- width: calc(100% - 40px);
- margin: 15px auto;
- color: #000;
- .condition {
- display: flex;
- align-items: center;
- margin-right: 20px;
- :deep(.el-input .el-input__inner) {
- font-size: 14px;
- }
- // span {
- // margin: 0 10px 0 0;
- // }
- }
- // border-bottom: 1px solid rgb(231, 231, 231);
- }
- .pageSize {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin: 10px 30px;
- span {
- color: #000;
- }
- .el-pagination {
- // width: 1600px;
- .el-pagination__total {
- color: #000;
- }
- .el-pagination__goto {
- color: #000;
- }
- .el-pagination__classifier {
- color: #000;
- }
- .el-input__wrapper {
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- box-shadow: none;
- }
- .el-pager li {
- margin: 0 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- .el-pager li.is-active {
- // background-color: rgba(111, 182, 184, 1);
- border: 1px solid rgba(0, 97, 255, 1);
- color: rgba(0, 97, 255, 1);
- // border: 1px solid red;
- }
- .btn-prev {
- margin-right: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- .btn-next {
- margin-left: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- }
- }
- .footers {
- width: calc(100% - 40px);
- margin: 10px auto 20px;
- .el-table--fit {
- height: 100%;
- .el-table__header-wrapper {
- background-color: #000;
- font-size: 15px;
- tr {
- color: #000;
- }
- }
- .el-table__row {
- height: 50px;
- font-size: 15px;
- color: #000;
- .orderNum {
- color: rgba(111, 182, 184, 1);
- cursor: pointer;
- }
- }
- .el-table__row:nth-child(2n) {
- .el-table-fixed-column--right {
- background-color: rgba(240, 243, 247, 1);
- }
- }
- .el-table__row td {
- padding: 0;
- border: 0;
- }
- .el-button--primary {
- margin-left: 5px;
- }
- .el-table__body .even {
- background-color: #fff;
- }
- .el-table__body .odd {
- background-color: rgba(240, 243, 247, 1);
- }
- }
- }
- }
- }
- // 远程开锁弹窗
- :deep(.unlockingDialog) {
- // height: 600px;
- overflow: hidden;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(245, 249, 255, 1);
- font-weight: 600;
- height: 60px;
- padding: 0 20px;
- line-height: 60px;
- margin: 0;
- border-bottom: 1px solid rgba(230, 230, 230, 1);
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 0px 20px 20px 20px;
- // height: 200px;
- // display: flex;
- // flex-direction: column-reverse;
- .middle {
- width: 96%;
- color: #000;
- .content {
- height: 100px;
- padding: 50px 0 0 0;
- font-size: 16px;
- letter-spacing: 1px;
- }
- .marning {
- font-size: 12px;
- color: red;
- }
- .options {
- display: flex;
- flex-direction: row-reverse;
- align-items: center;
- margin: 10px 0;
- .queding {
- margin-left: 20px;
- }
- }
- .item {
- display: flex;
- align-items: center;
- margin: 24px 0;
- .title {
- width: 100px;
- text-align: right;
- margin-right: 10px;
- }
- }
- .againPass {
- margin: 24px 0 40px 0;
- }
- }
- }
- }
- // 批量导入
- :deep(.bulkImportDialog) {
- // height: 600px;
- overflow: hidden;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(245, 249, 255, 1);
- font-weight: 600;
- height: 60px;
- padding: 0 20px;
- line-height: 60px;
- margin: 0;
- border-bottom: 1px solid rgba(230, 230, 230, 1);
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 20px 0 30px 0;
- // height: 200px;
- // display: flex;
- // flex-direction: column-reverse;
- .middle {
- width: calc(100% - 40px);
- color: #000;
- .content {
- height: 100px;
- padding: 50px 0 0 20px;
- font-size: 16px;
- letter-spacing: 1px;
- }
- .options {
- display: flex;
- flex-direction: row-reverse;
- align-items: center;
- margin: 10px 0;
- .queding {
- margin-left: 20px;
- }
- }
- .startImport {
- .el-button {
- width: 500px;
- height: 42px;
- }
- .downLoad {
- color: rgba(0, 97, 255, 1);
- font-size: 14px;
- margin-left: 15px;
- cursor: pointer;
- }
- }
- }
- }
- }
- // 绑定设备弹窗
- :deep(.BindingDialog) {
- height: 300px;
- overflow: hidden;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(245, 249, 255, 1);
- font-weight: 600;
- height: 60px;
- padding: 0 20px;
- line-height: 60px;
- margin: 0;
- border-bottom: 1px solid rgba(230, 230, 230, 1);
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 20px;
- .middle {
- width: 96%;
- color: #000;
- .options {
- display: flex;
- flex-direction: row-reverse;
- align-items: center;
- margin: 120px 0 0 0;
- .el-form-item__content {
- flex: none;
- }
- .queding {
- margin-left: 20px;
- }
- }
- }
- }
- }
- // 设置临时总卡
- :deep(.temporaryCardDialog) {
- // height: 420px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 30px 20px 10px 20px;
- // .el-input {
- // // width: 200px;
- // .el-input__suffix-inner {
- // color: rgba(61, 81, 232, 1);
- // }
- // }
- .el-form-item__content {
- width: 200px;
- }
- .options {
- margin: 10px 20px 20px 0;
- width: 100%;
- .el-form-item__content {
- display: flex;
- flex-direction: row-reverse;
- }
- .queding {
- color: #fff;
- margin-left: 15px;
- }
- }
- }
- }
- // 钥匙管理
- :deep(.keyDialog) {
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- // padding: 10px 20px 10px 20px;
- max-height: 750px;
- overflow: auto;
- .el-form-item__content {
- width: 200px;
- }
- .title {
- margin: 20px;
- box-sizing: border-box;
- .keyTitle {
- width: 1130px;
- height: 50px;
- background: rgba(235, 235, 235, 1);
- display: flex;
- justify-content: space-between;
- align-items: center;
- position: relative;
- z-index: 99;
- .Addkey {
- width: 120px;
- }
- .txt {
- color: rgba(0, 0, 0, 1);
- margin-left: 25px;
- font-weight: 400;
- }
- }
- .el-collapse {
- border: none;
- position: relative;
- top: -50px;
- }
- .el-collapse-item {
- // border-radius: 5px;
- .el-collapse-item__header {
- border: none;
- background: rgba(235, 235, 235, 1);
- width: 33px;
- height: 50px;
- transform: translateX(1130px);
- border-radius: 0;
- outline: none;
- }
- .el-collapse-item__wrap {
- border: 1px solid rgba(229, 229, 229, 1);
- }
- }
- .el-collapse-item__content {
- padding: 0;
- .table {
- width: 1160px;
- margin: 20px auto;
- .el-table--fit {
- .el-table__header-wrapper {
- font-size: 15px;
- tr {
- color: #000;
- }
- }
- .el-table__row {
- height: 50px;
- font-size: 15px;
- color: #000;
- }
- .el-table__row td {
- padding: 0;
- border: 0;
- }
- .el-table__body .even {
- background-color: #fff;
- }
- .el-table__body .odd {
- background-color: rgba(240, 243, 247, 1);
- }
- }
- .options {
- display: flex;
- justify-content: center;
- .reset {
- margin: 0 5px;
- color: rgba(0, 97, 255, 1);
- cursor: pointer;
- }
- }
- }
- }
- }
- }
- }
- // 钥匙管理 密码管理
- :deep(.passManagementDialog) {
- // height: 420px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 10px 20px 10px 20px;
- // .el-input {
- // // width: 200px;
- // .el-input__suffix-inner {
- // color: rgba(61, 81, 232, 1);
- // }
- // }
- .el-form-item__content {
- .el-input-group__append {
- background-color: rgba(222, 234, 252, 1);
- color: rgba(0, 97, 255, 1);
- cursor: pointer;
- user-select: none;
- }
- }
- .options {
- margin: 10px 20px 20px 0;
- width: 100%;
- .el-form-item__content {
- display: flex;
- flex-direction: row-reverse;
- }
- .queding {
- color: #fff;
- margin-left: 15px;
- }
- }
- }
- }
- // 钥匙管理 添加指纹
- :deep(.fingerprintDialog) {
- // height: 420px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 30px 20px 10px 20px;
- .el-form-item__content {
- width: 200px;
- }
- .options {
- margin: 10px 20px 20px 0;
- width: 100%;
- .el-form-item__content {
- display: flex;
- flex-direction: row-reverse;
- }
- .options {
- margin: 10px 20px 20px 0;
- width: 100%;
- .el-form-item__content {
- display: flex;
- flex-direction: row-reverse;
- }
- .queding {
- color: #fff;
- margin-left: 15px;
- }
- }
- }
- }
- }
- // 指纹弹窗
- :deep(.fingerprint) {
- width: 611px;
- height: 486px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 0;
- .elbody {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 20px 20px;
- font-size: 18px;
- color: #000;
- border-bottom: 0.5px solid #ccc;
- i {
- cursor: pointer;
- }
- }
- }
- .el-dialog__footer {
- .el-button--primary {
- background: rgba(41, 109, 227, 1);
- }
- }
- }
- // 钥匙管理 添加身份证
- :deep(.identityCard) {
- // height: 420px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 30px 20px 10px 20px;
- .el-form-item__content {
- width: 200px;
- }
- .options {
- margin: 10px 20px 20px 0;
- width: 100%;
- .el-form-item__content {
- display: flex;
- flex-direction: row-reverse;
- }
- .queding {
- color: #fff;
- margin-left: 15px;
- }
- }
- }
- }
- // 身份证读取
- :deep(.addIdentityCard) {
- // height: 420px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 30px 20px 10px 20px;
- height: 330px;
- font-size: 16px;
- font-weight: 600;
- color: #000;
- .el-steps {
- width: 600px;
- transform: translateX(90px);
- margin: 0 0 40px 0;
- }
- .title {
- text-align: center;
- }
- .icons {
- display: flex;
- justify-content: center;
- img {
- width: 70px;
- margin: 40px 0;
- }
- .loading {
- animation: move 3s linear;
- }
- @keyframes move {
- 0% {
- transform: rotate(0);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- }
- .retry {
- text-align: center;
- span {
- color: red;
- padding: 0 8px;
- cursor: pointer;
- }
- }
- }
- }
- </style>
- <style lang="scss">
- .roominfoPopper {
- background: rgba(0, 0, 0, 0.8) !important;
- border: none !important;
- .el-popper__arrow::before {
- background: rgba(0, 0, 0, 0.8) !important;
- }
- }
- </style>
|