| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863 |
- <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
- >
- <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>
- </div>
- <div class="changeItems">
- <div
- class="changeItem"
- :class="roomTypeIndex == '全部' ? 'changeItem_active' : ''"
- @click="changeTypes('全部')"
- >
- 全部
- </div>
- <div
- v-for="i in roomTypes"
- 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">
- <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">
- <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="deblocking"
- src="@/assets/icons/nfc.png"
- alt=""
- />
- <span>NFC启用</span>
- </div>
- <div
- @click="nfcClick(i,0)"
- v-if="nfcFunction==1"
- >
- <img
- class="deblocking"
- src="@/assets/icons/nfc.png"
- alt=""
- />
- <span>NFC禁用</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">
- <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="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="InfoFilled"
- 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="InfoFilled"
- 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="edit(scope.row)">修改</div> -->
- <el-popconfirm
- width="220"
- confirm-button-text="确认"
- cancel-button-text="取消"
- :icon="InfoFilled"
- 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"
- @change="staffChange($event,'密码')"
- v-if="keypassflag == '系统'"
- >
- <el-option
- v-for="i in staffList"
- :label="`${i.userName} ( ${i.department} )`"
- :value="i.id"
- />
- </el-select>
- <el-input
- v-model.trim="passManagementRuleForm.name"
- placeholder="请输入用户"
- style="width: 500px"
- 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="请输入号码"
- 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"
- >
- <template #append>
- <div @click="randomCipher">随机生成</div>
- </template>
- </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="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"
- @change="staffChange($event,'指纹')"
- v-if="keypassflag == '系统'"
- >
- <el-option
- v-for="i in staffList"
- :label="`${i.userName} ( ${i.department} )`"
- :value="i.id"
- />
- </el-select>
- <el-input
- v-model.trim="fingerprintRuleForm.name"
- placeholder="请输入用户"
- style="width: 214px"
- v-if="keypassflag == '自定义'"
- />
- </el-form-item>
- <el-form-item
- label="号码 :"
- prop="phone"
- v-if="keypassflag == '自定义'"
- >
- <el-input
- v-model.trim="fingerprintRuleForm.phone"
- placeholder="请输入号码"
- style="width: 214px"
- >
- </el-input>
- </el-form-item>
- <el-form-item label="指纹 :" prop="fingerprintNum">
- <el-input
- v-model="fingerprintRuleForm.fingerprintNum"
- placeholder="请录入指纹"
- style="width: 300px"
- type="textarea"
- rows="4"
- />
- <span
- style="
- color: rgba(0, 97, 255, 1);
- margin-left: 10px;
- cursor: pointer;
- "
- @click="fingerprintNext"
- >录入</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="添加身份证"
- 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="name">
- <el-select
- v-model="identityCardRuleForm.name"
- class="m-2"
- placeholder="再请选择用户"
- style="width: 214px"
- @change="staffChange($event,'房卡')"
- v-if="keypassflag == '系统'"
- >
- <el-option
- v-for="i in staffList"
- :label="`${i.userName} ( ${i.department} )`"
- :value="i.id"
- />
- </el-select>
- <el-input
- v-model.trim="identityCardRuleForm.name"
- placeholder="请输入用户"
- 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="请输入号码"
- 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="icCard">
- <el-input
- v-model.trim="identityCardRuleForm.icCard"
- placeholder="请输入卡号"
- style="width: 300px"
- type="textarea"
- rows="4"
- >
- </el-input>
- <span
- style="
- color: rgba(0, 97, 255, 1);
- margin-left: 10px;
- cursor: pointer;
- "
- @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>
- </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 } 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: [
- { roomlength: "/ 共3间" },
- { roomlength: "/ 共3间" },
- { roomlength: "/ 共3间" },
- { roomlength: "/ 共3间" },
- { roomlength: "/ 共3间" },
- { roomlength: "/ 共3间" },
- { roomlength: "/ 共3间" },
- { roomlength: "/ 共3间" },
- { roomlength: "/ 共3间" },
- ],
- });
- const searchInput = reactive({
- keyWord: "",
- buildingId:"",
- houseType:''
- }); // 搜索按钮数据
- const buildData = ref(); // 楼栋数据
- const roomTypes = ref(); // 房间类型数据
- const roomTypeIndex = ref("全部"); // 选中的房间类型
- const roomList = reactive({
- list: [
- {
- title: "18#1单元-2层",
- roomlength: "/ 共3间",
- children: [
- {
- roomNum: "201",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "202",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "203",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- ],
- },
- {
- title: "18#1单元-3层",
- roomlength: "/ 共3间",
- children: [
- {
- roomNum: "201",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "202",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "203",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "204",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "205",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "206",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "207",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "208",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "209",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- ],
- },
- {
- title: "18#1单元-4层",
- roomlength: "/ 共3间",
- children: [
- {
- roomNum: "201",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "202",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "203",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "204",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "205",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "206",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "207",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "208",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- {
- roomNum: "209",
- shebei: "L6-VVIFI-QINGKE",
- wangluo: "WIFI",
- wifiMAC: "80A036AE239D",
- lanyaMAC: "F3F401122AF2",
- time: "2022年11月24日10:27:04",
- dianliang: "75%",
- statu: "在线",
- shebeiStatu: "启用",
- lastLock: "2023年11月02日 15:45:34",
- visible: false,
- },
- ],
- },
- ],
- });
- const electricQuantity = ref(); // 每个房间的电量
- const nfcFunction = ref(); // nfc标识
- const houseLockId=ref();// 门锁表id
- // 设置临时总卡 (头部按钮--------------------------------------------------------)
- 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 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 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 passManagementRef = ref();
- const passManagementRuleForm = reactive({
- // level: '',
- name: "",
- phone: "",
- effectiveTime: "",
- failureTime: "",
- pass: "",
- id: "",
- });
- // 表单验证
- 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",
- },
- ],
- });
- const staffList=ref();// 选择的员工数据
- // 钥匙管理 添加指纹(--------------------------------------------------------)
- const fingerprintVisible = ref(false);
- const fingerprintRef = ref();
- 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 identityCardVisible = ref(false);
- const identityCardRef = ref();
- const identityCardRuleForm = reactive({
- level: "",
- name: "",
- phone: "",
- icCard: "",
- cardType: "",
- effectiveTime: "",
- failureTime: "",
- id: "",
- });
- // 表单验证
- const identityCardRules = reactive({
- name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
- phone: [{ 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 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 () => {
- 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();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- 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 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 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
- // rolesList();
- // fingerprintChangeList.value=""
- passManagementVisible.value = true;
- // passManagementRuleForm.level = "";
- passManagementRuleForm.name = "";
- passManagementRuleForm.phone = "";
- passManagementRuleForm.effectiveTime = "";
- passManagementRuleForm.failureTime = "";
- passManagementRuleForm.pass = "";
- nextTick(()=>{
- passManagementRef.value.resetFields()
- })
- };
- 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=='系统'){
- 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(keypassflag.value=='自定义'){
- 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 {
- 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 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=='系统'){
- 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(keypassflag.value=='自定义'){
- 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,
- });
- }
- }
- }
- });
- };
- // 钥匙管理中删除系统用户
- 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
- }else{
- cardFlag.value=""
- }
- // rolesList();
- // fingerprintChangeList.value=""
- identityCardVisible.value = true;
- 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 = "读卡成功";
- }, 1500);
- }
- // 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) {
- if(keypassflag.value=='系统'){
- if(cardFlag.value=='房卡'){
- identityCardRuleForm.cardType=0 // 0:房卡 1:身份证
- }else if(cardFlag.value=='身份证'){
- identityCardRuleForm.cardType=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) {
- identityCardVisible.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(cardFlag.value=='房卡'){
- identityCardRuleForm.cardType=0 // 0:房卡 1:身份证
- }else if(cardFlag.value=='身份证'){
- identityCardRuleForm.cardType=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) {
- identityCardVisible.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 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;
- flex-wrap: wrap;
- align-items: center;
- padding: 10px 0 0 0;
- .search {
- color: #fff;
- }
- .condition {
- display: flex;
- 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: 4px;
- }
- .footer::-webkit-scrollbar-thumb {
- background: #57b2ff;
- border-radius: 4px;
- height: 3px;
- width: 4px;
- }
- .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(.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>
|