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