| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052 |
- if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
- Promise.prototype.finally = function(callback) {
- const promise = this.constructor;
- return this.then(
- (value) => promise.resolve(callback()).then(() => value),
- (reason) => promise.resolve(callback()).then(() => {
- throw reason;
- })
- );
- };
- }
- ;
- if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
- const global2 = uni.requireGlobal();
- ArrayBuffer = global2.ArrayBuffer;
- Int8Array = global2.Int8Array;
- Uint8Array = global2.Uint8Array;
- Uint8ClampedArray = global2.Uint8ClampedArray;
- Int16Array = global2.Int16Array;
- Uint16Array = global2.Uint16Array;
- Int32Array = global2.Int32Array;
- Uint32Array = global2.Uint32Array;
- Float32Array = global2.Float32Array;
- Float64Array = global2.Float64Array;
- BigInt64Array = global2.BigInt64Array;
- BigUint64Array = global2.BigUint64Array;
- }
- ;
- if (uni.restoreGlobal) {
- uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
- }
- (function(vue) {
- "use strict";
- function formatAppLog(type, filename, ...args) {
- if (uni.__log__) {
- uni.__log__(type, filename, ...args);
- } else {
- console[type].apply(console, [...args, filename]);
- }
- }
- function resolveEasycom(component, easycom) {
- return typeof component === "string" ? easycom : component;
- }
- const popup = {
- data() {
- return {};
- },
- created() {
- this.popup = this.getParent();
- },
- methods: {
- /**
- * 获取父元素实例
- */
- getParent(name = "uniPopup") {
- let parent = this.$parent;
- let parentName = parent.$options.name;
- while (parentName !== name) {
- parent = parent.$parent;
- if (!parent)
- return false;
- parentName = parent.$options.name;
- }
- return parent;
- }
- }
- };
- const _export_sfc = (sfc, props) => {
- const target = sfc.__vccOpts || sfc;
- for (const [key, val] of props) {
- target[key] = val;
- }
- return target;
- };
- const _sfc_main$h = {
- name: "uniPopupMessage",
- mixins: [popup],
- props: {
- /**
- * 主题 success/warning/info/error 默认 success
- */
- type: {
- type: String,
- default: "success"
- },
- /**
- * 消息文字
- */
- message: {
- type: String,
- default: ""
- },
- /**
- * 显示时间,设置为 0 则不会自动关闭
- */
- duration: {
- type: Number,
- default: 3e3
- },
- maskShow: {
- type: Boolean,
- default: false
- }
- },
- data() {
- return {};
- },
- created() {
- this.popup.maskShow = this.maskShow;
- this.popup.messageChild = this;
- },
- methods: {
- timerClose() {
- if (this.duration === 0)
- return;
- clearTimeout(this.timer);
- this.timer = setTimeout(() => {
- this.popup.close();
- }, this.duration);
- }
- }
- };
- function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "uni-popup-message" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["uni-popup-message__box fixforpc-width", "uni-popup__" + $props.type])
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["uni-popup-message-text", "uni-popup__" + $props.type + "-text"])
- },
- vue.toDisplayString($props.message),
- 3
- /* TEXT, CLASS */
- )
- ], true)
- ],
- 2
- /* CLASS */
- )
- ]);
- }
- const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-a4566996"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue"]]);
- class MPAnimation {
- constructor(options, _this) {
- this.options = options;
- this.animation = uni.createAnimation({
- ...options
- });
- this.currentStepAnimates = {};
- this.next = 0;
- this.$ = _this;
- }
- _nvuePushAnimates(type, args) {
- let aniObj = this.currentStepAnimates[this.next];
- let styles = {};
- if (!aniObj) {
- styles = {
- styles: {},
- config: {}
- };
- } else {
- styles = aniObj;
- }
- if (animateTypes1.includes(type)) {
- if (!styles.styles.transform) {
- styles.styles.transform = "";
- }
- let unit = "";
- if (type === "rotate") {
- unit = "deg";
- }
- styles.styles.transform += `${type}(${args + unit}) `;
- } else {
- styles.styles[type] = `${args}`;
- }
- this.currentStepAnimates[this.next] = styles;
- }
- _animateRun(styles = {}, config = {}) {
- let ref = this.$.$refs["ani"].ref;
- if (!ref)
- return;
- return new Promise((resolve, reject) => {
- nvueAnimation.transition(ref, {
- styles,
- ...config
- }, (res) => {
- resolve();
- });
- });
- }
- _nvueNextAnimate(animates, step = 0, fn) {
- let obj = animates[step];
- if (obj) {
- let {
- styles,
- config
- } = obj;
- this._animateRun(styles, config).then(() => {
- step += 1;
- this._nvueNextAnimate(animates, step, fn);
- });
- } else {
- this.currentStepAnimates = {};
- typeof fn === "function" && fn();
- this.isEnd = true;
- }
- }
- step(config = {}) {
- this.animation.step(config);
- return this;
- }
- run(fn) {
- this.$.animationData = this.animation.export();
- this.$.timer = setTimeout(() => {
- typeof fn === "function" && fn();
- }, this.$.durationTime);
- }
- }
- const animateTypes1 = [
- "matrix",
- "matrix3d",
- "rotate",
- "rotate3d",
- "rotateX",
- "rotateY",
- "rotateZ",
- "scale",
- "scale3d",
- "scaleX",
- "scaleY",
- "scaleZ",
- "skew",
- "skewX",
- "skewY",
- "translate",
- "translate3d",
- "translateX",
- "translateY",
- "translateZ"
- ];
- const animateTypes2 = ["opacity", "backgroundColor"];
- const animateTypes3 = ["width", "height", "left", "right", "top", "bottom"];
- animateTypes1.concat(animateTypes2, animateTypes3).forEach((type) => {
- MPAnimation.prototype[type] = function(...args) {
- this.animation[type](...args);
- return this;
- };
- });
- function createAnimation(option, _this) {
- if (!_this)
- return;
- clearTimeout(_this.timer);
- return new MPAnimation(option, _this);
- }
- const _sfc_main$g = {
- name: "uniTransition",
- emits: ["click", "change"],
- props: {
- show: {
- type: Boolean,
- default: false
- },
- modeClass: {
- type: [Array, String],
- default() {
- return "fade";
- }
- },
- duration: {
- type: Number,
- default: 300
- },
- styles: {
- type: Object,
- default() {
- return {};
- }
- },
- customClass: {
- type: String,
- default: ""
- },
- onceRender: {
- type: Boolean,
- default: false
- }
- },
- data() {
- return {
- isShow: false,
- transform: "",
- opacity: 1,
- animationData: {},
- durationTime: 300,
- config: {}
- };
- },
- watch: {
- show: {
- handler(newVal) {
- if (newVal) {
- this.open();
- } else {
- if (this.isShow) {
- this.close();
- }
- }
- },
- immediate: true
- }
- },
- computed: {
- // 生成样式数据
- stylesObject() {
- let styles = {
- ...this.styles,
- "transition-duration": this.duration / 1e3 + "s"
- };
- let transform = "";
- for (let i2 in styles) {
- let line = this.toLine(i2);
- transform += line + ":" + styles[i2] + ";";
- }
- return transform;
- },
- // 初始化动画条件
- transformStyles() {
- return "transform:" + this.transform + ";opacity:" + this.opacity + ";" + this.stylesObject;
- }
- },
- created() {
- this.config = {
- duration: this.duration,
- timingFunction: "ease",
- transformOrigin: "50% 50%",
- delay: 0
- };
- this.durationTime = this.duration;
- },
- methods: {
- /**
- * ref 触发 初始化动画
- */
- init(obj = {}) {
- if (obj.duration) {
- this.durationTime = obj.duration;
- }
- this.animation = createAnimation(Object.assign(this.config, obj), this);
- },
- /**
- * 点击组件触发回调
- */
- onClick() {
- this.$emit("click", {
- detail: this.isShow
- });
- },
- /**
- * ref 触发 动画分组
- * @param {Object} obj
- */
- step(obj, config = {}) {
- if (!this.animation)
- return;
- for (let i2 in obj) {
- try {
- if (typeof obj[i2] === "object") {
- this.animation[i2](...obj[i2]);
- } else {
- this.animation[i2](obj[i2]);
- }
- } catch (e2) {
- formatAppLog("error", "at uni_modules/uni-transition/components/uni-transition/uni-transition.vue:148", `方法 ${i2} 不存在`);
- }
- }
- this.animation.step(config);
- return this;
- },
- /**
- * ref 触发 执行动画
- */
- run(fn) {
- if (!this.animation)
- return;
- this.animation.run(fn);
- },
- // 开始过度动画
- open() {
- clearTimeout(this.timer);
- this.transform = "";
- this.isShow = true;
- let { opacity, transform } = this.styleInit(false);
- if (typeof opacity !== "undefined") {
- this.opacity = opacity;
- }
- this.transform = transform;
- this.$nextTick(() => {
- this.timer = setTimeout(() => {
- this.animation = createAnimation(this.config, this);
- this.tranfromInit(false).step();
- this.animation.run();
- this.$emit("change", {
- detail: this.isShow
- });
- }, 20);
- });
- },
- // 关闭过度动画
- close(type) {
- if (!this.animation)
- return;
- this.tranfromInit(true).step().run(() => {
- this.isShow = false;
- this.animationData = null;
- this.animation = null;
- let { opacity, transform } = this.styleInit(false);
- this.opacity = opacity || 1;
- this.transform = transform;
- this.$emit("change", {
- detail: this.isShow
- });
- });
- },
- // 处理动画开始前的默认样式
- styleInit(type) {
- let styles = {
- transform: ""
- };
- let buildStyle = (type2, mode) => {
- if (mode === "fade") {
- styles.opacity = this.animationType(type2)[mode];
- } else {
- styles.transform += this.animationType(type2)[mode] + " ";
- }
- };
- if (typeof this.modeClass === "string") {
- buildStyle(type, this.modeClass);
- } else {
- this.modeClass.forEach((mode) => {
- buildStyle(type, mode);
- });
- }
- return styles;
- },
- // 处理内置组合动画
- tranfromInit(type) {
- let buildTranfrom = (type2, mode) => {
- let aniNum = null;
- if (mode === "fade") {
- aniNum = type2 ? 0 : 1;
- } else {
- aniNum = type2 ? "-100%" : "0";
- if (mode === "zoom-in") {
- aniNum = type2 ? 0.8 : 1;
- }
- if (mode === "zoom-out") {
- aniNum = type2 ? 1.2 : 1;
- }
- if (mode === "slide-right") {
- aniNum = type2 ? "100%" : "0";
- }
- if (mode === "slide-bottom") {
- aniNum = type2 ? "100%" : "0";
- }
- }
- this.animation[this.animationMode()[mode]](aniNum);
- };
- if (typeof this.modeClass === "string") {
- buildTranfrom(type, this.modeClass);
- } else {
- this.modeClass.forEach((mode) => {
- buildTranfrom(type, mode);
- });
- }
- return this.animation;
- },
- animationType(type) {
- return {
- fade: type ? 0 : 1,
- "slide-top": `translateY(${type ? "0" : "-100%"})`,
- "slide-right": `translateX(${type ? "0" : "100%"})`,
- "slide-bottom": `translateY(${type ? "0" : "100%"})`,
- "slide-left": `translateX(${type ? "0" : "-100%"})`,
- "zoom-in": `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
- "zoom-out": `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
- };
- },
- // 内置动画类型与实际动画对应字典
- animationMode() {
- return {
- fade: "opacity",
- "slide-top": "translateY",
- "slide-right": "translateX",
- "slide-bottom": "translateY",
- "slide-left": "translateX",
- "zoom-in": "scale",
- "zoom-out": "scale"
- };
- },
- // 驼峰转中横线
- toLine(name) {
- return name.replace(/([A-Z])/g, "-$1").toLowerCase();
- }
- }
- };
- function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
- ref: "ani",
- animation: $data.animationData,
- class: vue.normalizeClass($props.customClass),
- style: vue.normalizeStyle($options.transformStyles),
- onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args))
- }, [
- vue.renderSlot(_ctx.$slots, "default")
- ], 14, ["animation"])), [
- [vue.vShow, $data.isShow]
- ]);
- }
- const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
- const _sfc_main$f = {
- name: "uniPopup",
- components: {},
- emits: ["change", "maskClick"],
- props: {
- // 开启动画
- animation: {
- type: Boolean,
- default: true
- },
- // 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
- // message: 消息提示 ; dialog : 对话框
- type: {
- type: String,
- default: "center"
- },
- // maskClick
- isMaskClick: {
- type: Boolean,
- default: null
- },
- // TODO 2 个版本后废弃属性 ,使用 isMaskClick
- maskClick: {
- type: Boolean,
- default: null
- },
- backgroundColor: {
- type: String,
- default: "none"
- },
- safeArea: {
- type: Boolean,
- default: true
- },
- maskBackgroundColor: {
- type: String,
- default: "rgba(0, 0, 0, 0.4)"
- },
- borderRadius: {
- type: String
- }
- },
- watch: {
- /**
- * 监听type类型
- */
- type: {
- handler: function(type) {
- if (!this.config[type])
- return;
- this[this.config[type]](true);
- },
- immediate: true
- },
- isDesktop: {
- handler: function(newVal) {
- if (!this.config[newVal])
- return;
- this[this.config[this.type]](true);
- },
- immediate: true
- },
- /**
- * 监听遮罩是否可点击
- * @param {Object} val
- */
- maskClick: {
- handler: function(val) {
- this.mkclick = val;
- },
- immediate: true
- },
- isMaskClick: {
- handler: function(val) {
- this.mkclick = val;
- },
- immediate: true
- },
- // H5 下禁止底部滚动
- showPopup(show) {
- }
- },
- data() {
- return {
- duration: 300,
- ani: [],
- showPopup: false,
- showTrans: false,
- popupWidth: 0,
- popupHeight: 0,
- config: {
- top: "top",
- bottom: "bottom",
- center: "center",
- left: "left",
- right: "right",
- message: "top",
- dialog: "center",
- share: "bottom"
- },
- maskClass: {
- position: "fixed",
- bottom: 0,
- top: 0,
- left: 0,
- right: 0,
- backgroundColor: "rgba(0, 0, 0, 0.4)"
- },
- transClass: {
- backgroundColor: "transparent",
- borderRadius: this.borderRadius || "0",
- position: "fixed",
- left: 0,
- right: 0
- },
- maskShow: true,
- mkclick: true,
- popupstyle: "top"
- };
- },
- computed: {
- getStyles() {
- let res = { backgroundColor: this.bg };
- if (this.borderRadius || "0") {
- res = Object.assign(res, { borderRadius: this.borderRadius });
- }
- return res;
- },
- isDesktop() {
- return this.popupWidth >= 500 && this.popupHeight >= 500;
- },
- bg() {
- if (this.backgroundColor === "" || this.backgroundColor === "none") {
- return "transparent";
- }
- return this.backgroundColor;
- }
- },
- mounted() {
- const fixSize = () => {
- const {
- windowWidth,
- windowHeight,
- windowTop,
- safeArea,
- screenHeight,
- safeAreaInsets
- } = uni.getSystemInfoSync();
- this.popupWidth = windowWidth;
- this.popupHeight = windowHeight + (windowTop || 0);
- if (safeArea && this.safeArea) {
- this.safeAreaInsets = safeAreaInsets.bottom;
- } else {
- this.safeAreaInsets = 0;
- }
- };
- fixSize();
- },
- // TODO vue3
- unmounted() {
- this.setH5Visible();
- },
- activated() {
- this.setH5Visible(!this.showPopup);
- },
- deactivated() {
- this.setH5Visible(true);
- },
- created() {
- if (this.isMaskClick === null && this.maskClick === null) {
- this.mkclick = true;
- } else {
- this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick;
- }
- if (this.animation) {
- this.duration = 300;
- } else {
- this.duration = 0;
- }
- this.messageChild = null;
- this.clearPropagation = false;
- this.maskClass.backgroundColor = this.maskBackgroundColor;
- },
- methods: {
- setH5Visible(visible = true) {
- },
- /**
- * 公用方法,不显示遮罩层
- */
- closeMask() {
- this.maskShow = false;
- },
- /**
- * 公用方法,遮罩层禁止点击
- */
- disableMask() {
- this.mkclick = false;
- },
- // TODO nvue 取消冒泡
- clear(e2) {
- e2.stopPropagation();
- this.clearPropagation = true;
- },
- open(direction) {
- if (this.showPopup) {
- return;
- }
- let innerType = ["top", "center", "bottom", "left", "right", "message", "dialog", "share"];
- if (!(direction && innerType.indexOf(direction) !== -1)) {
- direction = this.type;
- }
- if (!this.config[direction]) {
- formatAppLog("error", "at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:298", "缺少类型:", direction);
- return;
- }
- this[this.config[direction]]();
- this.$emit("change", {
- show: true,
- type: direction
- });
- },
- close(type) {
- this.showTrans = false;
- this.$emit("change", {
- show: false,
- type: this.type
- });
- clearTimeout(this.timer);
- this.timer = setTimeout(() => {
- this.showPopup = false;
- }, 300);
- },
- // TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
- touchstart() {
- this.clearPropagation = false;
- },
- onTap() {
- if (this.clearPropagation) {
- this.clearPropagation = false;
- return;
- }
- this.$emit("maskClick");
- if (!this.mkclick)
- return;
- this.close();
- },
- /**
- * 顶部弹出样式处理
- */
- top(type) {
- this.popupstyle = this.isDesktop ? "fixforpc-top" : "top";
- this.ani = ["slide-top"];
- this.transClass = {
- position: "fixed",
- left: 0,
- right: 0,
- backgroundColor: this.bg,
- borderRadius: this.borderRadius || "0"
- };
- if (type)
- return;
- this.showPopup = true;
- this.showTrans = true;
- this.$nextTick(() => {
- if (this.messageChild && this.type === "message") {
- this.messageChild.timerClose();
- }
- });
- },
- /**
- * 底部弹出样式处理
- */
- bottom(type) {
- this.popupstyle = "bottom";
- this.ani = ["slide-bottom"];
- this.transClass = {
- position: "fixed",
- left: 0,
- right: 0,
- bottom: 0,
- paddingBottom: this.safeAreaInsets + "px",
- backgroundColor: this.bg,
- borderRadius: this.borderRadius || "0"
- };
- if (type)
- return;
- this.showPopup = true;
- this.showTrans = true;
- },
- /**
- * 中间弹出样式处理
- */
- center(type) {
- this.popupstyle = "center";
- this.ani = ["zoom-out", "fade"];
- this.transClass = {
- position: "fixed",
- display: "flex",
- flexDirection: "column",
- bottom: 0,
- left: 0,
- right: 0,
- top: 0,
- justifyContent: "center",
- alignItems: "center",
- borderRadius: this.borderRadius || "0"
- };
- if (type)
- return;
- this.showPopup = true;
- this.showTrans = true;
- },
- left(type) {
- this.popupstyle = "left";
- this.ani = ["slide-left"];
- this.transClass = {
- position: "fixed",
- left: 0,
- bottom: 0,
- top: 0,
- backgroundColor: this.bg,
- borderRadius: this.borderRadius || "0",
- display: "flex",
- flexDirection: "column"
- };
- if (type)
- return;
- this.showPopup = true;
- this.showTrans = true;
- },
- right(type) {
- this.popupstyle = "right";
- this.ani = ["slide-right"];
- this.transClass = {
- position: "fixed",
- bottom: 0,
- right: 0,
- top: 0,
- backgroundColor: this.bg,
- borderRadius: this.borderRadius || "0",
- display: "flex",
- flexDirection: "column"
- };
- if (type)
- return;
- this.showPopup = true;
- this.showTrans = true;
- }
- }
- };
- function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$3);
- return $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["uni-popup", [$data.popupstyle, $options.isDesktop ? "fixforpc-z-index" : ""]])
- },
- [
- vue.createElementVNode(
- "view",
- {
- onTouchstart: _cache[1] || (_cache[1] = (...args) => $options.touchstart && $options.touchstart(...args))
- },
- [
- $data.maskShow ? (vue.openBlock(), vue.createBlock(_component_uni_transition, {
- key: "1",
- name: "mask",
- "mode-class": "fade",
- styles: $data.maskClass,
- duration: $data.duration,
- show: $data.showTrans,
- onClick: $options.onTap
- }, null, 8, ["styles", "duration", "show", "onClick"])) : vue.createCommentVNode("v-if", true),
- vue.createVNode(_component_uni_transition, {
- key: "2",
- "mode-class": $data.ani,
- name: "content",
- styles: $data.transClass,
- duration: $data.duration,
- show: $data.showTrans,
- onClick: $options.onTap
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["uni-popup__wrapper", [$data.popupstyle]]),
- style: vue.normalizeStyle($options.getStyles),
- onClick: _cache[0] || (_cache[0] = (...args) => $options.clear && $options.clear(...args))
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 6
- /* CLASS, STYLE */
- )
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["mode-class", "styles", "duration", "show", "onClick"])
- ],
- 32
- /* NEED_HYDRATION */
- )
- ],
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true);
- }
- const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-4dd3c44b"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
- const pages = [
- {
- path: "pages/index/index",
- style: {
- navigationBarTitleText: ""
- }
- },
- {
- path: "pages/home/index",
- style: {
- navigationBarTitleText: ""
- }
- },
- {
- path: "pages/details/index",
- style: {
- navigationBarTitleText: ""
- }
- },
- {
- path: "pages/electricity/index",
- style: {
- navigationBarTitleText: ""
- }
- },
- {
- path: "pages/supply/supply",
- style: {
- navigationBarTitleText: ""
- }
- },
- {
- path: "pages/supplyss/supplyss",
- style: {
- navigationBarTitleText: ""
- }
- },
- {
- path: "pages/faultlist/index",
- style: {
- navigationBarTitleText: ""
- }
- },
- {
- path: "pages/SYSifo/index",
- style: {
- navigationBarTitleText: ""
- }
- }
- ];
- const globalStyle = {
- navigationBarTextStyle: "black",
- navigationBarTitleText: "",
- navigationStyle: "custom",
- navigationBarBackgroundColor: "#F8F8F8",
- backgroundColor: "#F8F8F8"
- };
- const uniIdRouter = {};
- const e = {
- pages,
- globalStyle,
- uniIdRouter
- };
- var define_process_env_UNI_SECURE_NETWORK_CONFIG_default = [];
- function t$2(e2) {
- return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
- }
- function n(e2, t2, n2) {
- return e2(n2 = { path: t2, exports: {}, require: function(e3, t3) {
- return function() {
- throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
- }(null == t3 && n2.path);
- } }, n2.exports), n2.exports;
- }
- var s = n(function(e2, t2) {
- var n2;
- e2.exports = (n2 = n2 || function(e3, t3) {
- var n3 = Object.create || /* @__PURE__ */ function() {
- function e4() {
- }
- return function(t4) {
- var n4;
- return e4.prototype = t4, n4 = new e4(), e4.prototype = null, n4;
- };
- }(), s2 = {}, r2 = s2.lib = {}, i2 = r2.Base = { extend: function(e4) {
- var t4 = n3(this);
- return e4 && t4.mixIn(e4), t4.hasOwnProperty("init") && this.init !== t4.init || (t4.init = function() {
- t4.$super.init.apply(this, arguments);
- }), t4.init.prototype = t4, t4.$super = this, t4;
- }, create: function() {
- var e4 = this.extend();
- return e4.init.apply(e4, arguments), e4;
- }, init: function() {
- }, mixIn: function(e4) {
- for (var t4 in e4)
- e4.hasOwnProperty(t4) && (this[t4] = e4[t4]);
- e4.hasOwnProperty("toString") && (this.toString = e4.toString);
- }, clone: function() {
- return this.init.prototype.extend(this);
- } }, o2 = r2.WordArray = i2.extend({ init: function(e4, n4) {
- e4 = this.words = e4 || [], this.sigBytes = n4 != t3 ? n4 : 4 * e4.length;
- }, toString: function(e4) {
- return (e4 || c2).stringify(this);
- }, concat: function(e4) {
- var t4 = this.words, n4 = e4.words, s3 = this.sigBytes, r3 = e4.sigBytes;
- if (this.clamp(), s3 % 4)
- for (var i3 = 0; i3 < r3; i3++) {
- var o3 = n4[i3 >>> 2] >>> 24 - i3 % 4 * 8 & 255;
- t4[s3 + i3 >>> 2] |= o3 << 24 - (s3 + i3) % 4 * 8;
- }
- else
- for (i3 = 0; i3 < r3; i3 += 4)
- t4[s3 + i3 >>> 2] = n4[i3 >>> 2];
- return this.sigBytes += r3, this;
- }, clamp: function() {
- var t4 = this.words, n4 = this.sigBytes;
- t4[n4 >>> 2] &= 4294967295 << 32 - n4 % 4 * 8, t4.length = e3.ceil(n4 / 4);
- }, clone: function() {
- var e4 = i2.clone.call(this);
- return e4.words = this.words.slice(0), e4;
- }, random: function(t4) {
- for (var n4, s3 = [], r3 = function(t5) {
- t5 = t5;
- var n5 = 987654321, s4 = 4294967295;
- return function() {
- var r4 = ((n5 = 36969 * (65535 & n5) + (n5 >> 16) & s4) << 16) + (t5 = 18e3 * (65535 & t5) + (t5 >> 16) & s4) & s4;
- return r4 /= 4294967296, (r4 += 0.5) * (e3.random() > 0.5 ? 1 : -1);
- };
- }, i3 = 0; i3 < t4; i3 += 4) {
- var a3 = r3(4294967296 * (n4 || e3.random()));
- n4 = 987654071 * a3(), s3.push(4294967296 * a3() | 0);
- }
- return new o2.init(s3, t4);
- } }), a2 = s2.enc = {}, c2 = a2.Hex = { stringify: function(e4) {
- for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) {
- var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255;
- s3.push((i3 >>> 4).toString(16)), s3.push((15 & i3).toString(16));
- }
- return s3.join("");
- }, parse: function(e4) {
- for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3 += 2)
- n4[s3 >>> 3] |= parseInt(e4.substr(s3, 2), 16) << 24 - s3 % 8 * 4;
- return new o2.init(n4, t4 / 2);
- } }, u2 = a2.Latin1 = { stringify: function(e4) {
- for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) {
- var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255;
- s3.push(String.fromCharCode(i3));
- }
- return s3.join("");
- }, parse: function(e4) {
- for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3++)
- n4[s3 >>> 2] |= (255 & e4.charCodeAt(s3)) << 24 - s3 % 4 * 8;
- return new o2.init(n4, t4);
- } }, h2 = a2.Utf8 = { stringify: function(e4) {
- try {
- return decodeURIComponent(escape(u2.stringify(e4)));
- } catch (e5) {
- throw new Error("Malformed UTF-8 data");
- }
- }, parse: function(e4) {
- return u2.parse(unescape(encodeURIComponent(e4)));
- } }, l2 = r2.BufferedBlockAlgorithm = i2.extend({ reset: function() {
- this._data = new o2.init(), this._nDataBytes = 0;
- }, _append: function(e4) {
- "string" == typeof e4 && (e4 = h2.parse(e4)), this._data.concat(e4), this._nDataBytes += e4.sigBytes;
- }, _process: function(t4) {
- var n4 = this._data, s3 = n4.words, r3 = n4.sigBytes, i3 = this.blockSize, a3 = r3 / (4 * i3), c3 = (a3 = t4 ? e3.ceil(a3) : e3.max((0 | a3) - this._minBufferSize, 0)) * i3, u3 = e3.min(4 * c3, r3);
- if (c3) {
- for (var h3 = 0; h3 < c3; h3 += i3)
- this._doProcessBlock(s3, h3);
- var l3 = s3.splice(0, c3);
- n4.sigBytes -= u3;
- }
- return new o2.init(l3, u3);
- }, clone: function() {
- var e4 = i2.clone.call(this);
- return e4._data = this._data.clone(), e4;
- }, _minBufferSize: 0 });
- r2.Hasher = l2.extend({ cfg: i2.extend(), init: function(e4) {
- this.cfg = this.cfg.extend(e4), this.reset();
- }, reset: function() {
- l2.reset.call(this), this._doReset();
- }, update: function(e4) {
- return this._append(e4), this._process(), this;
- }, finalize: function(e4) {
- return e4 && this._append(e4), this._doFinalize();
- }, blockSize: 16, _createHelper: function(e4) {
- return function(t4, n4) {
- return new e4.init(n4).finalize(t4);
- };
- }, _createHmacHelper: function(e4) {
- return function(t4, n4) {
- return new d2.HMAC.init(e4, n4).finalize(t4);
- };
- } });
- var d2 = s2.algo = {};
- return s2;
- }(Math), n2);
- }), r = s, i = (n(function(e2, t2) {
- var n2;
- e2.exports = (n2 = r, function(e3) {
- var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = [];
- !function() {
- for (var t4 = 0; t4 < 64; t4++)
- a2[t4] = 4294967296 * e3.abs(e3.sin(t4 + 1)) | 0;
- }();
- var c2 = o2.MD5 = i2.extend({ _doReset: function() {
- this._hash = new r2.init([1732584193, 4023233417, 2562383102, 271733878]);
- }, _doProcessBlock: function(e4, t4) {
- for (var n3 = 0; n3 < 16; n3++) {
- var s3 = t4 + n3, r3 = e4[s3];
- e4[s3] = 16711935 & (r3 << 8 | r3 >>> 24) | 4278255360 & (r3 << 24 | r3 >>> 8);
- }
- var i3 = this._hash.words, o3 = e4[t4 + 0], c3 = e4[t4 + 1], p2 = e4[t4 + 2], f2 = e4[t4 + 3], g2 = e4[t4 + 4], m2 = e4[t4 + 5], y2 = e4[t4 + 6], _2 = e4[t4 + 7], w2 = e4[t4 + 8], v2 = e4[t4 + 9], I2 = e4[t4 + 10], S2 = e4[t4 + 11], b2 = e4[t4 + 12], k2 = e4[t4 + 13], T2 = e4[t4 + 14], A2 = e4[t4 + 15], P2 = i3[0], C2 = i3[1], x2 = i3[2], O2 = i3[3];
- P2 = u2(P2, C2, x2, O2, o3, 7, a2[0]), O2 = u2(O2, P2, C2, x2, c3, 12, a2[1]), x2 = u2(x2, O2, P2, C2, p2, 17, a2[2]), C2 = u2(C2, x2, O2, P2, f2, 22, a2[3]), P2 = u2(P2, C2, x2, O2, g2, 7, a2[4]), O2 = u2(O2, P2, C2, x2, m2, 12, a2[5]), x2 = u2(x2, O2, P2, C2, y2, 17, a2[6]), C2 = u2(C2, x2, O2, P2, _2, 22, a2[7]), P2 = u2(P2, C2, x2, O2, w2, 7, a2[8]), O2 = u2(O2, P2, C2, x2, v2, 12, a2[9]), x2 = u2(x2, O2, P2, C2, I2, 17, a2[10]), C2 = u2(C2, x2, O2, P2, S2, 22, a2[11]), P2 = u2(P2, C2, x2, O2, b2, 7, a2[12]), O2 = u2(O2, P2, C2, x2, k2, 12, a2[13]), x2 = u2(x2, O2, P2, C2, T2, 17, a2[14]), P2 = h2(P2, C2 = u2(C2, x2, O2, P2, A2, 22, a2[15]), x2, O2, c3, 5, a2[16]), O2 = h2(O2, P2, C2, x2, y2, 9, a2[17]), x2 = h2(x2, O2, P2, C2, S2, 14, a2[18]), C2 = h2(C2, x2, O2, P2, o3, 20, a2[19]), P2 = h2(P2, C2, x2, O2, m2, 5, a2[20]), O2 = h2(O2, P2, C2, x2, I2, 9, a2[21]), x2 = h2(x2, O2, P2, C2, A2, 14, a2[22]), C2 = h2(C2, x2, O2, P2, g2, 20, a2[23]), P2 = h2(P2, C2, x2, O2, v2, 5, a2[24]), O2 = h2(O2, P2, C2, x2, T2, 9, a2[25]), x2 = h2(x2, O2, P2, C2, f2, 14, a2[26]), C2 = h2(C2, x2, O2, P2, w2, 20, a2[27]), P2 = h2(P2, C2, x2, O2, k2, 5, a2[28]), O2 = h2(O2, P2, C2, x2, p2, 9, a2[29]), x2 = h2(x2, O2, P2, C2, _2, 14, a2[30]), P2 = l2(P2, C2 = h2(C2, x2, O2, P2, b2, 20, a2[31]), x2, O2, m2, 4, a2[32]), O2 = l2(O2, P2, C2, x2, w2, 11, a2[33]), x2 = l2(x2, O2, P2, C2, S2, 16, a2[34]), C2 = l2(C2, x2, O2, P2, T2, 23, a2[35]), P2 = l2(P2, C2, x2, O2, c3, 4, a2[36]), O2 = l2(O2, P2, C2, x2, g2, 11, a2[37]), x2 = l2(x2, O2, P2, C2, _2, 16, a2[38]), C2 = l2(C2, x2, O2, P2, I2, 23, a2[39]), P2 = l2(P2, C2, x2, O2, k2, 4, a2[40]), O2 = l2(O2, P2, C2, x2, o3, 11, a2[41]), x2 = l2(x2, O2, P2, C2, f2, 16, a2[42]), C2 = l2(C2, x2, O2, P2, y2, 23, a2[43]), P2 = l2(P2, C2, x2, O2, v2, 4, a2[44]), O2 = l2(O2, P2, C2, x2, b2, 11, a2[45]), x2 = l2(x2, O2, P2, C2, A2, 16, a2[46]), P2 = d2(P2, C2 = l2(C2, x2, O2, P2, p2, 23, a2[47]), x2, O2, o3, 6, a2[48]), O2 = d2(O2, P2, C2, x2, _2, 10, a2[49]), x2 = d2(x2, O2, P2, C2, T2, 15, a2[50]), C2 = d2(C2, x2, O2, P2, m2, 21, a2[51]), P2 = d2(P2, C2, x2, O2, b2, 6, a2[52]), O2 = d2(O2, P2, C2, x2, f2, 10, a2[53]), x2 = d2(x2, O2, P2, C2, I2, 15, a2[54]), C2 = d2(C2, x2, O2, P2, c3, 21, a2[55]), P2 = d2(P2, C2, x2, O2, w2, 6, a2[56]), O2 = d2(O2, P2, C2, x2, A2, 10, a2[57]), x2 = d2(x2, O2, P2, C2, y2, 15, a2[58]), C2 = d2(C2, x2, O2, P2, k2, 21, a2[59]), P2 = d2(P2, C2, x2, O2, g2, 6, a2[60]), O2 = d2(O2, P2, C2, x2, S2, 10, a2[61]), x2 = d2(x2, O2, P2, C2, p2, 15, a2[62]), C2 = d2(C2, x2, O2, P2, v2, 21, a2[63]), i3[0] = i3[0] + P2 | 0, i3[1] = i3[1] + C2 | 0, i3[2] = i3[2] + x2 | 0, i3[3] = i3[3] + O2 | 0;
- }, _doFinalize: function() {
- var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes;
- n3[r3 >>> 5] |= 128 << 24 - r3 % 32;
- var i3 = e3.floor(s3 / 4294967296), o3 = s3;
- n3[15 + (r3 + 64 >>> 9 << 4)] = 16711935 & (i3 << 8 | i3 >>> 24) | 4278255360 & (i3 << 24 | i3 >>> 8), n3[14 + (r3 + 64 >>> 9 << 4)] = 16711935 & (o3 << 8 | o3 >>> 24) | 4278255360 & (o3 << 24 | o3 >>> 8), t4.sigBytes = 4 * (n3.length + 1), this._process();
- for (var a3 = this._hash, c3 = a3.words, u3 = 0; u3 < 4; u3++) {
- var h3 = c3[u3];
- c3[u3] = 16711935 & (h3 << 8 | h3 >>> 24) | 4278255360 & (h3 << 24 | h3 >>> 8);
- }
- return a3;
- }, clone: function() {
- var e4 = i2.clone.call(this);
- return e4._hash = this._hash.clone(), e4;
- } });
- function u2(e4, t4, n3, s3, r3, i3, o3) {
- var a3 = e4 + (t4 & n3 | ~t4 & s3) + r3 + o3;
- return (a3 << i3 | a3 >>> 32 - i3) + t4;
- }
- function h2(e4, t4, n3, s3, r3, i3, o3) {
- var a3 = e4 + (t4 & s3 | n3 & ~s3) + r3 + o3;
- return (a3 << i3 | a3 >>> 32 - i3) + t4;
- }
- function l2(e4, t4, n3, s3, r3, i3, o3) {
- var a3 = e4 + (t4 ^ n3 ^ s3) + r3 + o3;
- return (a3 << i3 | a3 >>> 32 - i3) + t4;
- }
- function d2(e4, t4, n3, s3, r3, i3, o3) {
- var a3 = e4 + (n3 ^ (t4 | ~s3)) + r3 + o3;
- return (a3 << i3 | a3 >>> 32 - i3) + t4;
- }
- t3.MD5 = i2._createHelper(c2), t3.HmacMD5 = i2._createHmacHelper(c2);
- }(Math), n2.MD5);
- }), n(function(e2, t2) {
- var n2;
- e2.exports = (n2 = r, void function() {
- var e3 = n2, t3 = e3.lib.Base, s2 = e3.enc.Utf8;
- e3.algo.HMAC = t3.extend({ init: function(e4, t4) {
- e4 = this._hasher = new e4.init(), "string" == typeof t4 && (t4 = s2.parse(t4));
- var n3 = e4.blockSize, r2 = 4 * n3;
- t4.sigBytes > r2 && (t4 = e4.finalize(t4)), t4.clamp();
- for (var i2 = this._oKey = t4.clone(), o2 = this._iKey = t4.clone(), a2 = i2.words, c2 = o2.words, u2 = 0; u2 < n3; u2++)
- a2[u2] ^= 1549556828, c2[u2] ^= 909522486;
- i2.sigBytes = o2.sigBytes = r2, this.reset();
- }, reset: function() {
- var e4 = this._hasher;
- e4.reset(), e4.update(this._iKey);
- }, update: function(e4) {
- return this._hasher.update(e4), this;
- }, finalize: function(e4) {
- var t4 = this._hasher, n3 = t4.finalize(e4);
- return t4.reset(), t4.finalize(this._oKey.clone().concat(n3));
- } });
- }());
- }), n(function(e2, t2) {
- e2.exports = r.HmacMD5;
- })), o = n(function(e2, t2) {
- e2.exports = r.enc.Utf8;
- }), a = n(function(e2, t2) {
- var n2;
- e2.exports = (n2 = r, function() {
- var e3 = n2, t3 = e3.lib.WordArray;
- function s2(e4, n3, s3) {
- for (var r2 = [], i2 = 0, o2 = 0; o2 < n3; o2++)
- if (o2 % 4) {
- var a2 = s3[e4.charCodeAt(o2 - 1)] << o2 % 4 * 2, c2 = s3[e4.charCodeAt(o2)] >>> 6 - o2 % 4 * 2;
- r2[i2 >>> 2] |= (a2 | c2) << 24 - i2 % 4 * 8, i2++;
- }
- return t3.create(r2, i2);
- }
- e3.enc.Base64 = { stringify: function(e4) {
- var t4 = e4.words, n3 = e4.sigBytes, s3 = this._map;
- e4.clamp();
- for (var r2 = [], i2 = 0; i2 < n3; i2 += 3)
- for (var o2 = (t4[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255) << 16 | (t4[i2 + 1 >>> 2] >>> 24 - (i2 + 1) % 4 * 8 & 255) << 8 | t4[i2 + 2 >>> 2] >>> 24 - (i2 + 2) % 4 * 8 & 255, a2 = 0; a2 < 4 && i2 + 0.75 * a2 < n3; a2++)
- r2.push(s3.charAt(o2 >>> 6 * (3 - a2) & 63));
- var c2 = s3.charAt(64);
- if (c2)
- for (; r2.length % 4; )
- r2.push(c2);
- return r2.join("");
- }, parse: function(e4) {
- var t4 = e4.length, n3 = this._map, r2 = this._reverseMap;
- if (!r2) {
- r2 = this._reverseMap = [];
- for (var i2 = 0; i2 < n3.length; i2++)
- r2[n3.charCodeAt(i2)] = i2;
- }
- var o2 = n3.charAt(64);
- if (o2) {
- var a2 = e4.indexOf(o2);
- -1 !== a2 && (t4 = a2);
- }
- return s2(e4, t4, r2);
- }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" };
- }(), n2.enc.Base64);
- });
- const c = "FUNCTION", u = "OBJECT", h = "CLIENT_DB", l = "pending", d = "fulfilled", p = "rejected";
- function f(e2) {
- return Object.prototype.toString.call(e2).slice(8, -1).toLowerCase();
- }
- function g(e2) {
- return "object" === f(e2);
- }
- function m(e2) {
- return "function" == typeof e2;
- }
- function y(e2) {
- return function() {
- try {
- return e2.apply(e2, arguments);
- } catch (e3) {
- console.error(e3);
- }
- };
- }
- const _ = "REJECTED", w = "NOT_PENDING";
- class v {
- constructor({ createPromise: e2, retryRule: t2 = _ } = {}) {
- this.createPromise = e2, this.status = null, this.promise = null, this.retryRule = t2;
- }
- get needRetry() {
- if (!this.status)
- return true;
- switch (this.retryRule) {
- case _:
- return this.status === p;
- case w:
- return this.status !== l;
- }
- }
- exec() {
- return this.needRetry ? (this.status = l, this.promise = this.createPromise().then((e2) => (this.status = d, Promise.resolve(e2)), (e2) => (this.status = p, Promise.reject(e2))), this.promise) : this.promise;
- }
- }
- function I(e2) {
- return e2 && "string" == typeof e2 ? JSON.parse(e2) : e2;
- }
- const S = true, b = "app", T = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), A = b, P = I(""), C = I("[]") || [];
- let O = "";
- try {
- O = "__UNI__8782431";
- } catch (e2) {
- }
- let E, L = {};
- function R(e2, t2 = {}) {
- var n2, s2;
- return n2 = L, s2 = e2, Object.prototype.hasOwnProperty.call(n2, s2) || (L[e2] = t2), L[e2];
- }
- function U() {
- return E || (E = function() {
- if ("undefined" != typeof globalThis)
- return globalThis;
- if ("undefined" != typeof self)
- return self;
- if ("undefined" != typeof window)
- return window;
- function e2() {
- return this;
- }
- return void 0 !== e2() ? e2() : new Function("return this")();
- }(), E);
- }
- L = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {};
- const N = ["invoke", "success", "fail", "complete"], D = R("_globalUniCloudInterceptor");
- function M(e2, t2) {
- D[e2] || (D[e2] = {}), g(t2) && Object.keys(t2).forEach((n2) => {
- N.indexOf(n2) > -1 && function(e3, t3, n3) {
- let s2 = D[e3][t3];
- s2 || (s2 = D[e3][t3] = []), -1 === s2.indexOf(n3) && m(n3) && s2.push(n3);
- }(e2, n2, t2[n2]);
- });
- }
- function q(e2, t2) {
- D[e2] || (D[e2] = {}), g(t2) ? Object.keys(t2).forEach((n2) => {
- N.indexOf(n2) > -1 && function(e3, t3, n3) {
- const s2 = D[e3][t3];
- if (!s2)
- return;
- const r2 = s2.indexOf(n3);
- r2 > -1 && s2.splice(r2, 1);
- }(e2, n2, t2[n2]);
- }) : delete D[e2];
- }
- function K(e2, t2) {
- return e2 && 0 !== e2.length ? e2.reduce((e3, n2) => e3.then(() => n2(t2)), Promise.resolve()) : Promise.resolve();
- }
- function F(e2, t2) {
- return D[e2] && D[e2][t2] || [];
- }
- function j(e2) {
- M("callObject", e2);
- }
- const $ = R("_globalUniCloudListener"), B = "response", W = "needLogin", H = "refreshToken", J = "clientdb", z = "cloudfunction", V = "cloudobject";
- function G(e2) {
- return $[e2] || ($[e2] = []), $[e2];
- }
- function Y(e2, t2) {
- const n2 = G(e2);
- n2.includes(t2) || n2.push(t2);
- }
- function Q(e2, t2) {
- const n2 = G(e2), s2 = n2.indexOf(t2);
- -1 !== s2 && n2.splice(s2, 1);
- }
- function X(e2, t2) {
- const n2 = G(e2);
- for (let e3 = 0; e3 < n2.length; e3++) {
- (0, n2[e3])(t2);
- }
- }
- let Z, ee = false;
- function te() {
- return Z || (Z = new Promise((e2) => {
- ee && e2(), function t2() {
- if ("function" == typeof getCurrentPages) {
- const t3 = getCurrentPages();
- t3 && t3[0] && (ee = true, e2());
- }
- ee || setTimeout(() => {
- t2();
- }, 30);
- }();
- }), Z);
- }
- function ne(e2) {
- const t2 = {};
- for (const n2 in e2) {
- const s2 = e2[n2];
- m(s2) && (t2[n2] = y(s2));
- }
- return t2;
- }
- class se extends Error {
- constructor(e2) {
- super(e2.message), this.errMsg = e2.message || e2.errMsg || "unknown system error", this.code = this.errCode = e2.code || e2.errCode || "SYSTEM_ERROR", this.errSubject = this.subject = e2.subject || e2.errSubject, this.cause = e2.cause, this.requestId = e2.requestId;
- }
- toJson(e2 = 0) {
- if (!(e2 >= 10))
- return e2++, { errCode: this.errCode, errMsg: this.errMsg, errSubject: this.errSubject, cause: this.cause && this.cause.toJson ? this.cause.toJson(e2) : this.cause };
- }
- }
- var re = { request: (e2) => uni.request(e2), uploadFile: (e2) => uni.uploadFile(e2), setStorageSync: (e2, t2) => uni.setStorageSync(e2, t2), getStorageSync: (e2) => uni.getStorageSync(e2), removeStorageSync: (e2) => uni.removeStorageSync(e2), clearStorageSync: () => uni.clearStorageSync(), connectSocket: (e2) => uni.connectSocket(e2) };
- function ie(e2) {
- return e2 && ie(e2.__v_raw) || e2;
- }
- function oe() {
- return { token: re.getStorageSync("uni_id_token") || re.getStorageSync("uniIdToken"), tokenExpired: re.getStorageSync("uni_id_token_expired") };
- }
- function ae({ token: e2, tokenExpired: t2 } = {}) {
- e2 && re.setStorageSync("uni_id_token", e2), t2 && re.setStorageSync("uni_id_token_expired", t2);
- }
- let ce, ue;
- function he() {
- return ce || (ce = uni.getSystemInfoSync()), ce;
- }
- function le() {
- let e2, t2;
- try {
- if (uni.getLaunchOptionsSync) {
- if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1)
- return;
- const { scene: n2, channel: s2 } = uni.getLaunchOptionsSync();
- e2 = s2, t2 = n2;
- }
- } catch (e3) {
- }
- return { channel: e2, scene: t2 };
- }
- let de = {};
- function pe() {
- const e2 = uni.getLocale && uni.getLocale() || "en";
- if (ue)
- return { ...de, ...ue, locale: e2, LOCALE: e2 };
- const t2 = he(), { deviceId: n2, osName: s2, uniPlatform: r2, appId: i2 } = t2, o2 = ["appId", "appLanguage", "appName", "appVersion", "appVersionCode", "appWgtVersion", "browserName", "browserVersion", "deviceBrand", "deviceId", "deviceModel", "deviceType", "osName", "osVersion", "romName", "romVersion", "ua", "hostName", "hostVersion", "uniPlatform", "uniRuntimeVersion", "uniRuntimeVersionCode", "uniCompilerVersion", "uniCompilerVersionCode"];
- for (const e3 in t2)
- Object.hasOwnProperty.call(t2, e3) && -1 === o2.indexOf(e3) && delete t2[e3];
- return ue = { PLATFORM: r2, OS: s2, APPID: i2, DEVICEID: n2, ...le(), ...t2 }, { ...de, ...ue, locale: e2, LOCALE: e2 };
- }
- var fe = { sign: function(e2, t2) {
- let n2 = "";
- return Object.keys(e2).sort().forEach(function(t3) {
- e2[t3] && (n2 = n2 + "&" + t3 + "=" + e2[t3]);
- }), n2 = n2.slice(1), i(n2, t2).toString();
- }, wrappedRequest: function(e2, t2) {
- return new Promise((n2, s2) => {
- t2(Object.assign(e2, { complete(e3) {
- e3 || (e3 = {});
- const t3 = e3.data && e3.data.header && e3.data.header["x-serverless-request-id"] || e3.header && e3.header["request-id"];
- if (!e3.statusCode || e3.statusCode >= 400) {
- const n3 = e3.data && e3.data.error && e3.data.error.code || "SYS_ERR", r3 = e3.data && e3.data.error && e3.data.error.message || e3.errMsg || "request:fail";
- return s2(new se({ code: n3, message: r3, requestId: t3 }));
- }
- const r2 = e3.data;
- if (r2.error)
- return s2(new se({ code: r2.error.code, message: r2.error.message, requestId: t3 }));
- r2.result = r2.data, r2.requestId = t3, delete r2.data, n2(r2);
- } }));
- });
- }, toBase64: function(e2) {
- return a.stringify(o.parse(e2));
- } };
- var ge = class {
- constructor(e2) {
- ["spaceId", "clientSecret"].forEach((t2) => {
- if (!Object.prototype.hasOwnProperty.call(e2, t2))
- throw new Error(`${t2} required`);
- }), this.config = Object.assign({}, { endpoint: 0 === e2.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com" }, e2), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = re, this._getAccessTokenPromiseHub = new v({ createPromise: () => this.requestAuth(this.setupRequest({ method: "serverless.auth.user.anonymousAuthorize", params: "{}" }, "auth")).then((e3) => {
- if (!e3.result || !e3.result.accessToken)
- throw new se({ code: "AUTH_FAILED", message: "获取accessToken失败" });
- this.setAccessToken(e3.result.accessToken);
- }), retryRule: w });
- }
- get hasAccessToken() {
- return !!this.accessToken;
- }
- setAccessToken(e2) {
- this.accessToken = e2;
- }
- requestWrapped(e2) {
- return fe.wrappedRequest(e2, this.adapter.request);
- }
- requestAuth(e2) {
- return this.requestWrapped(e2);
- }
- request(e2, t2) {
- return Promise.resolve().then(() => this.hasAccessToken ? t2 ? this.requestWrapped(e2) : this.requestWrapped(e2).catch((t3) => new Promise((e3, n2) => {
- !t3 || "GATEWAY_INVALID_TOKEN" !== t3.code && "InvalidParameter.InvalidToken" !== t3.code ? n2(t3) : e3();
- }).then(() => this.getAccessToken()).then(() => {
- const t4 = this.rebuildRequest(e2);
- return this.request(t4, true);
- })) : this.getAccessToken().then(() => {
- const t3 = this.rebuildRequest(e2);
- return this.request(t3, true);
- }));
- }
- rebuildRequest(e2) {
- const t2 = Object.assign({}, e2);
- return t2.data.token = this.accessToken, t2.header["x-basement-token"] = this.accessToken, t2.header["x-serverless-sign"] = fe.sign(t2.data, this.config.clientSecret), t2;
- }
- setupRequest(e2, t2) {
- const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" };
- return "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = fe.sign(n2, this.config.clientSecret), { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: s2 };
- }
- getAccessToken() {
- return this._getAccessTokenPromiseHub.exec();
- }
- async authorize() {
- await this.getAccessToken();
- }
- callFunction(e2) {
- const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e2.name, functionArgs: e2.data || {} }) };
- return this.request({ ...this.setupRequest(t2), timeout: e2.timeout });
- }
- getOSSUploadOptionsFromPath(e2) {
- const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e2) };
- return this.request(this.setupRequest(t2));
- }
- uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) {
- return new Promise((o2, a2) => {
- const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, header: { "X-OSS-server-side-encrpytion": "AES256" }, success(e3) {
- e3 && e3.statusCode < 400 ? o2(e3) : a2(new se({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
- }, fail(e3) {
- a2(new se({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
- } });
- "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => {
- i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
- });
- });
- }
- reportOSSUpload(e2) {
- const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e2) };
- return this.request(this.setupRequest(t2));
- }
- async uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", cloudPathAsRealPath: s2 = false, onUploadProgress: r2, config: i2 }) {
- if ("string" !== f(t2))
- throw new se({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });
- if (!(t2 = t2.trim()))
- throw new se({ code: "INVALID_PARAM", message: "cloudPath不可为空" });
- if (/:\/\//.test(t2))
- throw new se({ code: "INVALID_PARAM", message: "cloudPath不合法" });
- const o2 = i2 && i2.envType || this.config.envType;
- if (s2 && ("/" !== t2[0] && (t2 = "/" + t2), t2.indexOf("\\") > -1))
- throw new se({ code: "INVALID_PARAM", message: "使用cloudPath作为路径时,cloudPath不可包含“\\”" });
- const a2 = (await this.getOSSUploadOptionsFromPath({ env: o2, filename: s2 ? t2.split("/").pop() : t2, fileId: s2 ? t2 : void 0 })).result, c2 = "https://" + a2.cdnDomain + "/" + a2.ossPath, { securityToken: u2, accessKeyId: h2, signature: l2, host: d2, ossPath: p2, id: g2, policy: m2, ossCallbackUrl: y2 } = a2, _2 = { "Cache-Control": "max-age=2592000", "Content-Disposition": "attachment", OSSAccessKeyId: h2, Signature: l2, host: d2, id: g2, key: p2, policy: m2, success_action_status: 200 };
- if (u2 && (_2["x-oss-security-token"] = u2), y2) {
- const e3 = JSON.stringify({ callbackUrl: y2, callbackBody: JSON.stringify({ fileId: g2, spaceId: this.config.spaceId }), callbackBodyType: "application/json" });
- _2.callback = fe.toBase64(e3);
- }
- const w2 = { url: "https://" + a2.host, formData: _2, fileName: "file", name: "file", filePath: e2, fileType: n2 };
- if (await this.uploadFileToOSS(Object.assign({}, w2, { onUploadProgress: r2 })), y2)
- return { success: true, filePath: e2, fileID: c2 };
- if ((await this.reportOSSUpload({ id: g2 })).success)
- return { success: true, filePath: e2, fileID: c2 };
- throw new se({ code: "UPLOAD_FAILED", message: "文件上传失败" });
- }
- getTempFileURL({ fileList: e2 } = {}) {
- return new Promise((t2, n2) => {
- Array.isArray(e2) && 0 !== e2.length || n2(new se({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" })), t2({ fileList: e2.map((e3) => ({ fileID: e3, tempFileURL: e3 })) });
- });
- }
- async getFileInfo({ fileList: e2 } = {}) {
- if (!Array.isArray(e2) || 0 === e2.length)
- throw new se({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
- const t2 = { method: "serverless.file.resource.info", params: JSON.stringify({ id: e2.map((e3) => e3.split("?")[0]).join(",") }) };
- return { fileList: (await this.request(this.setupRequest(t2))).result };
- }
- };
- var me = { init(e2) {
- const t2 = new ge(e2), n2 = { signInAnonymously: function() {
- return t2.authorize();
- }, getLoginState: function() {
- return Promise.resolve(false);
- } };
- return t2.auth = function() {
- return n2;
- }, t2.customAuth = t2.auth, t2;
- } };
- const ye = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
- var _e;
- !function(e2) {
- e2.local = "local", e2.none = "none", e2.session = "session";
- }(_e || (_e = {}));
- var we = function() {
- }, ve = n(function(e2, t2) {
- var n2;
- e2.exports = (n2 = r, function(e3) {
- var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = [], c2 = [];
- !function() {
- function t4(t5) {
- for (var n4 = e3.sqrt(t5), s4 = 2; s4 <= n4; s4++)
- if (!(t5 % s4))
- return false;
- return true;
- }
- function n3(e4) {
- return 4294967296 * (e4 - (0 | e4)) | 0;
- }
- for (var s3 = 2, r3 = 0; r3 < 64; )
- t4(s3) && (r3 < 8 && (a2[r3] = n3(e3.pow(s3, 0.5))), c2[r3] = n3(e3.pow(s3, 1 / 3)), r3++), s3++;
- }();
- var u2 = [], h2 = o2.SHA256 = i2.extend({ _doReset: function() {
- this._hash = new r2.init(a2.slice(0));
- }, _doProcessBlock: function(e4, t4) {
- for (var n3 = this._hash.words, s3 = n3[0], r3 = n3[1], i3 = n3[2], o3 = n3[3], a3 = n3[4], h3 = n3[5], l2 = n3[6], d2 = n3[7], p2 = 0; p2 < 64; p2++) {
- if (p2 < 16)
- u2[p2] = 0 | e4[t4 + p2];
- else {
- var f2 = u2[p2 - 15], g2 = (f2 << 25 | f2 >>> 7) ^ (f2 << 14 | f2 >>> 18) ^ f2 >>> 3, m2 = u2[p2 - 2], y2 = (m2 << 15 | m2 >>> 17) ^ (m2 << 13 | m2 >>> 19) ^ m2 >>> 10;
- u2[p2] = g2 + u2[p2 - 7] + y2 + u2[p2 - 16];
- }
- var _2 = s3 & r3 ^ s3 & i3 ^ r3 & i3, w2 = (s3 << 30 | s3 >>> 2) ^ (s3 << 19 | s3 >>> 13) ^ (s3 << 10 | s3 >>> 22), v2 = d2 + ((a3 << 26 | a3 >>> 6) ^ (a3 << 21 | a3 >>> 11) ^ (a3 << 7 | a3 >>> 25)) + (a3 & h3 ^ ~a3 & l2) + c2[p2] + u2[p2];
- d2 = l2, l2 = h3, h3 = a3, a3 = o3 + v2 | 0, o3 = i3, i3 = r3, r3 = s3, s3 = v2 + (w2 + _2) | 0;
- }
- n3[0] = n3[0] + s3 | 0, n3[1] = n3[1] + r3 | 0, n3[2] = n3[2] + i3 | 0, n3[3] = n3[3] + o3 | 0, n3[4] = n3[4] + a3 | 0, n3[5] = n3[5] + h3 | 0, n3[6] = n3[6] + l2 | 0, n3[7] = n3[7] + d2 | 0;
- }, _doFinalize: function() {
- var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes;
- return n3[r3 >>> 5] |= 128 << 24 - r3 % 32, n3[14 + (r3 + 64 >>> 9 << 4)] = e3.floor(s3 / 4294967296), n3[15 + (r3 + 64 >>> 9 << 4)] = s3, t4.sigBytes = 4 * n3.length, this._process(), this._hash;
- }, clone: function() {
- var e4 = i2.clone.call(this);
- return e4._hash = this._hash.clone(), e4;
- } });
- t3.SHA256 = i2._createHelper(h2), t3.HmacSHA256 = i2._createHmacHelper(h2);
- }(Math), n2.SHA256);
- }), Ie = ve, Se = n(function(e2, t2) {
- e2.exports = r.HmacSHA256;
- });
- const be = () => {
- let e2;
- if (!Promise) {
- e2 = () => {
- }, e2.promise = {};
- const t3 = () => {
- throw new se({ message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.' });
- };
- return Object.defineProperty(e2.promise, "then", { get: t3 }), Object.defineProperty(e2.promise, "catch", { get: t3 }), e2;
- }
- const t2 = new Promise((t3, n2) => {
- e2 = (e3, s2) => e3 ? n2(e3) : t3(s2);
- });
- return e2.promise = t2, e2;
- };
- function ke(e2) {
- return void 0 === e2;
- }
- function Te(e2) {
- return "[object Null]" === Object.prototype.toString.call(e2);
- }
- function Ae(e2 = "") {
- return e2.replace(/([\s\S]+)\s+(请前往云开发AI小助手查看问题:.*)/, "$1");
- }
- function Pe(e2 = 32) {
- const t2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", n2 = t2.length;
- let s2 = "";
- for (let r2 = 0; r2 < e2; r2++)
- s2 += t2.charAt(Math.floor(Math.random() * n2));
- return s2;
- }
- var Ce;
- function xe(e2) {
- const t2 = (n2 = e2, "[object Array]" === Object.prototype.toString.call(n2) ? e2 : [e2]);
- var n2;
- for (const e3 of t2) {
- const { isMatch: t3, genAdapter: n3, runtime: s2 } = e3;
- if (t3())
- return { adapter: n3(), runtime: s2 };
- }
- }
- !function(e2) {
- e2.WEB = "web", e2.WX_MP = "wx_mp";
- }(Ce || (Ce = {}));
- const Oe = { adapter: null, runtime: void 0 }, Ee = ["anonymousUuidKey"];
- class Le extends we {
- constructor() {
- super(), Oe.adapter.root.tcbObject || (Oe.adapter.root.tcbObject = {});
- }
- setItem(e2, t2) {
- Oe.adapter.root.tcbObject[e2] = t2;
- }
- getItem(e2) {
- return Oe.adapter.root.tcbObject[e2];
- }
- removeItem(e2) {
- delete Oe.adapter.root.tcbObject[e2];
- }
- clear() {
- delete Oe.adapter.root.tcbObject;
- }
- }
- function Re(e2, t2) {
- switch (e2) {
- case "local":
- return t2.localStorage || new Le();
- case "none":
- return new Le();
- default:
- return t2.sessionStorage || new Le();
- }
- }
- class Ue {
- constructor(e2) {
- if (!this._storage) {
- this._persistence = Oe.adapter.primaryStorage || e2.persistence, this._storage = Re(this._persistence, Oe.adapter);
- const t2 = `access_token_${e2.env}`, n2 = `access_token_expire_${e2.env}`, s2 = `refresh_token_${e2.env}`, r2 = `anonymous_uuid_${e2.env}`, i2 = `login_type_${e2.env}`, o2 = "device_id", a2 = `token_type_${e2.env}`, c2 = `user_info_${e2.env}`;
- this.keys = { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2, anonymousUuidKey: r2, loginTypeKey: i2, userInfoKey: c2, deviceIdKey: o2, tokenTypeKey: a2 };
- }
- }
- updatePersistence(e2) {
- if (e2 === this._persistence)
- return;
- const t2 = "local" === this._persistence;
- this._persistence = e2;
- const n2 = Re(e2, Oe.adapter);
- for (const e3 in this.keys) {
- const s2 = this.keys[e3];
- if (t2 && Ee.includes(e3))
- continue;
- const r2 = this._storage.getItem(s2);
- ke(r2) || Te(r2) || (n2.setItem(s2, r2), this._storage.removeItem(s2));
- }
- this._storage = n2;
- }
- setStore(e2, t2, n2) {
- if (!this._storage)
- return;
- const s2 = { version: n2 || "localCachev1", content: t2 }, r2 = JSON.stringify(s2);
- try {
- this._storage.setItem(e2, r2);
- } catch (e3) {
- throw e3;
- }
- }
- getStore(e2, t2) {
- try {
- if (!this._storage)
- return;
- } catch (e3) {
- return "";
- }
- t2 = t2 || "localCachev1";
- const n2 = this._storage.getItem(e2);
- if (!n2)
- return "";
- if (n2.indexOf(t2) >= 0) {
- return JSON.parse(n2).content;
- }
- return "";
- }
- removeStore(e2) {
- this._storage.removeItem(e2);
- }
- }
- const Ne = {}, De = {};
- function Me(e2) {
- return Ne[e2];
- }
- class qe {
- constructor(e2, t2) {
- this.data = t2 || null, this.name = e2;
- }
- }
- class Ke extends qe {
- constructor(e2, t2) {
- super("error", { error: e2, data: t2 }), this.error = e2;
- }
- }
- const Fe = new class {
- constructor() {
- this._listeners = {};
- }
- on(e2, t2) {
- return function(e3, t3, n2) {
- n2[e3] = n2[e3] || [], n2[e3].push(t3);
- }(e2, t2, this._listeners), this;
- }
- off(e2, t2) {
- return function(e3, t3, n2) {
- if (n2 && n2[e3]) {
- const s2 = n2[e3].indexOf(t3);
- -1 !== s2 && n2[e3].splice(s2, 1);
- }
- }(e2, t2, this._listeners), this;
- }
- fire(e2, t2) {
- if (e2 instanceof Ke)
- return console.error(e2.error), this;
- const n2 = "string" == typeof e2 ? new qe(e2, t2 || {}) : e2;
- const s2 = n2.name;
- if (this._listens(s2)) {
- n2.target = this;
- const e3 = this._listeners[s2] ? [...this._listeners[s2]] : [];
- for (const t3 of e3)
- t3.call(this, n2);
- }
- return this;
- }
- _listens(e2) {
- return this._listeners[e2] && this._listeners[e2].length > 0;
- }
- }();
- function je(e2, t2) {
- Fe.on(e2, t2);
- }
- function $e(e2, t2 = {}) {
- Fe.fire(e2, t2);
- }
- function Be(e2, t2) {
- Fe.off(e2, t2);
- }
- const We = "loginStateChanged", He = "loginStateExpire", Je = "loginTypeChanged", ze = "anonymousConverted", Ve = "refreshAccessToken";
- var Ge;
- !function(e2) {
- e2.ANONYMOUS = "ANONYMOUS", e2.WECHAT = "WECHAT", e2.WECHAT_PUBLIC = "WECHAT-PUBLIC", e2.WECHAT_OPEN = "WECHAT-OPEN", e2.CUSTOM = "CUSTOM", e2.EMAIL = "EMAIL", e2.USERNAME = "USERNAME", e2.NULL = "NULL";
- }(Ge || (Ge = {}));
- class Ye {
- constructor() {
- this._fnPromiseMap = /* @__PURE__ */ new Map();
- }
- async run(e2, t2) {
- let n2 = this._fnPromiseMap.get(e2);
- return n2 || (n2 = new Promise(async (n3, s2) => {
- try {
- await this._runIdlePromise();
- const s3 = t2();
- n3(await s3);
- } catch (e3) {
- s2(e3);
- } finally {
- this._fnPromiseMap.delete(e2);
- }
- }), this._fnPromiseMap.set(e2, n2)), n2;
- }
- _runIdlePromise() {
- return Promise.resolve();
- }
- }
- class Qe {
- constructor(e2) {
- this._singlePromise = new Ye(), this._cache = Me(e2.env), this._baseURL = `https://${e2.env}.ap-shanghai.tcb-api.tencentcloudapi.com`, this._reqClass = new Oe.adapter.reqClass({ timeout: e2.timeout, timeoutMsg: `请求在${e2.timeout / 1e3}s内未完成,已中断`, restrictedMethods: ["post"] });
- }
- _getDeviceId() {
- if (this._deviceID)
- return this._deviceID;
- const { deviceIdKey: e2 } = this._cache.keys;
- let t2 = this._cache.getStore(e2);
- return "string" == typeof t2 && t2.length >= 16 && t2.length <= 48 || (t2 = Pe(), this._cache.setStore(e2, t2)), this._deviceID = t2, t2;
- }
- async _request(e2, t2, n2 = {}) {
- const s2 = { "x-request-id": Pe(), "x-device-id": this._getDeviceId() };
- if (n2.withAccessToken) {
- const { tokenTypeKey: e3 } = this._cache.keys, t3 = await this.getAccessToken(), n3 = this._cache.getStore(e3);
- s2.authorization = `${n3} ${t3}`;
- }
- return this._reqClass["get" === n2.method ? "get" : "post"]({ url: `${this._baseURL}${e2}`, data: t2, headers: s2 });
- }
- async _fetchAccessToken() {
- const { loginTypeKey: e2, accessTokenKey: t2, accessTokenExpireKey: n2, tokenTypeKey: s2 } = this._cache.keys, r2 = this._cache.getStore(e2);
- if (r2 && r2 !== Ge.ANONYMOUS)
- throw new se({ code: "INVALID_OPERATION", message: "非匿名登录不支持刷新 access token" });
- const i2 = await this._singlePromise.run("fetchAccessToken", async () => (await this._request("/auth/v1/signin/anonymously", {}, { method: "post" })).data), { access_token: o2, expires_in: a2, token_type: c2 } = i2;
- return this._cache.setStore(s2, c2), this._cache.setStore(t2, o2), this._cache.setStore(n2, Date.now() + 1e3 * a2), o2;
- }
- isAccessTokenExpired(e2, t2) {
- let n2 = true;
- return e2 && t2 && (n2 = t2 < Date.now()), n2;
- }
- async getAccessToken() {
- const { accessTokenKey: e2, accessTokenExpireKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2), s2 = this._cache.getStore(t2);
- return this.isAccessTokenExpired(n2, s2) ? this._fetchAccessToken() : n2;
- }
- async refreshAccessToken() {
- const { accessTokenKey: e2, accessTokenExpireKey: t2, loginTypeKey: n2 } = this._cache.keys;
- return this._cache.removeStore(e2), this._cache.removeStore(t2), this._cache.setStore(n2, Ge.ANONYMOUS), this.getAccessToken();
- }
- async getUserInfo() {
- return this._singlePromise.run("getUserInfo", async () => (await this._request("/auth/v1/user/me", {}, { withAccessToken: true, method: "get" })).data);
- }
- }
- const Xe = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"], Ze = { "X-SDK-Version": "1.3.5" };
- function et(e2, t2, n2) {
- const s2 = e2[t2];
- e2[t2] = function(t3) {
- const r2 = {}, i2 = {};
- n2.forEach((n3) => {
- const { data: s3, headers: o3 } = n3.call(e2, t3);
- Object.assign(r2, s3), Object.assign(i2, o3);
- });
- const o2 = t3.data;
- return o2 && (() => {
- var e3;
- if (e3 = o2, "[object FormData]" !== Object.prototype.toString.call(e3))
- t3.data = { ...o2, ...r2 };
- else
- for (const e4 in r2)
- o2.append(e4, r2[e4]);
- })(), t3.headers = { ...t3.headers || {}, ...i2 }, s2.call(e2, t3);
- };
- }
- function tt() {
- const e2 = Math.random().toString(16).slice(2);
- return { data: { seqId: e2 }, headers: { ...Ze, "x-seqid": e2 } };
- }
- class nt {
- constructor(e2 = {}) {
- var t2;
- this.config = e2, this._reqClass = new Oe.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: `请求在${this.config.timeout / 1e3}s内未完成,已中断`, restrictedMethods: ["post"] }), this._cache = Me(this.config.env), this._localCache = (t2 = this.config.env, De[t2]), this.oauth = new Qe(this.config), et(this._reqClass, "post", [tt]), et(this._reqClass, "upload", [tt]), et(this._reqClass, "download", [tt]);
- }
- async post(e2) {
- return await this._reqClass.post(e2);
- }
- async upload(e2) {
- return await this._reqClass.upload(e2);
- }
- async download(e2) {
- return await this._reqClass.download(e2);
- }
- async refreshAccessToken() {
- let e2, t2;
- this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
- try {
- e2 = await this._refreshAccessTokenPromise;
- } catch (e3) {
- t2 = e3;
- }
- if (this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t2)
- throw t2;
- return e2;
- }
- async _refreshAccessToken() {
- const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2, loginTypeKey: s2, anonymousUuidKey: r2 } = this._cache.keys;
- this._cache.removeStore(e2), this._cache.removeStore(t2);
- let i2 = this._cache.getStore(n2);
- if (!i2)
- throw new se({ message: "未登录CloudBase" });
- const o2 = { refresh_token: i2 }, a2 = await this.request("auth.fetchAccessTokenWithRefreshToken", o2);
- if (a2.data.code) {
- const { code: e3 } = a2.data;
- if ("SIGN_PARAM_INVALID" === e3 || "REFRESH_TOKEN_EXPIRED" === e3 || "INVALID_REFRESH_TOKEN" === e3) {
- if (this._cache.getStore(s2) === Ge.ANONYMOUS && "INVALID_REFRESH_TOKEN" === e3) {
- const e4 = this._cache.getStore(r2), t3 = this._cache.getStore(n2), s3 = await this.send("auth.signInAnonymously", { anonymous_uuid: e4, refresh_token: t3 });
- return this.setRefreshToken(s3.refresh_token), this._refreshAccessToken();
- }
- $e(He), this._cache.removeStore(n2);
- }
- throw new se({ code: a2.data.code, message: `刷新access token失败:${a2.data.code}` });
- }
- if (a2.data.access_token)
- return $e(Ve), this._cache.setStore(e2, a2.data.access_token), this._cache.setStore(t2, a2.data.access_token_expire + Date.now()), { accessToken: a2.data.access_token, accessTokenExpire: a2.data.access_token_expire };
- a2.data.refresh_token && (this._cache.removeStore(n2), this._cache.setStore(n2, a2.data.refresh_token), this._refreshAccessToken());
- }
- async getAccessToken() {
- const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2 } = this._cache.keys;
- if (!this._cache.getStore(n2))
- throw new se({ message: "refresh token不存在,登录状态异常" });
- let s2 = this._cache.getStore(e2), r2 = this._cache.getStore(t2), i2 = true;
- return this._shouldRefreshAccessTokenHook && !await this._shouldRefreshAccessTokenHook(s2, r2) && (i2 = false), (!s2 || !r2 || r2 < Date.now()) && i2 ? this.refreshAccessToken() : { accessToken: s2, accessTokenExpire: r2 };
- }
- async request(e2, t2, n2) {
- const s2 = `x-tcb-trace_${this.config.env}`;
- let r2 = "application/x-www-form-urlencoded";
- const i2 = { action: e2, env: this.config.env, dataVersion: "2019-08-16", ...t2 };
- let o2;
- if (-1 === Xe.indexOf(e2) && (this._cache.keys, i2.access_token = await this.oauth.getAccessToken()), "storage.uploadFile" === e2) {
- o2 = new FormData();
- for (let e3 in o2)
- o2.hasOwnProperty(e3) && void 0 !== o2[e3] && o2.append(e3, i2[e3]);
- r2 = "multipart/form-data";
- } else {
- r2 = "application/json", o2 = {};
- for (let e3 in i2)
- void 0 !== i2[e3] && (o2[e3] = i2[e3]);
- }
- let a2 = { headers: { "content-type": r2 } };
- n2 && n2.timeout && (a2.timeout = n2.timeout), n2 && n2.onUploadProgress && (a2.onUploadProgress = n2.onUploadProgress);
- const c2 = this._localCache.getStore(s2);
- c2 && (a2.headers["X-TCB-Trace"] = c2);
- const { parse: u2, inQuery: h2, search: l2 } = t2;
- let d2 = { env: this.config.env };
- u2 && (d2.parse = true), h2 && (d2 = { ...h2, ...d2 });
- let p2 = function(e3, t3, n3 = {}) {
- const s3 = /\?/.test(t3);
- let r3 = "";
- for (let e4 in n3)
- "" === r3 ? !s3 && (t3 += "?") : r3 += "&", r3 += `${e4}=${encodeURIComponent(n3[e4])}`;
- return /^http(s)?\:\/\//.test(t3 += r3) ? t3 : `${e3}${t3}`;
- }(ye, "//tcb-api.tencentcloudapi.com/web", d2);
- l2 && (p2 += l2);
- const f2 = await this.post({ url: p2, data: o2, ...a2 }), g2 = f2.header && f2.header["x-tcb-trace"];
- if (g2 && this._localCache.setStore(s2, g2), 200 !== Number(f2.status) && 200 !== Number(f2.statusCode) || !f2.data)
- throw new se({ code: "NETWORK_ERROR", message: "network request error" });
- return f2;
- }
- async send(e2, t2 = {}, n2 = {}) {
- const s2 = await this.request(e2, t2, { ...n2, onUploadProgress: t2.onUploadProgress });
- if (("ACCESS_TOKEN_DISABLED" === s2.data.code || "ACCESS_TOKEN_EXPIRED" === s2.data.code) && -1 === Xe.indexOf(e2)) {
- await this.oauth.refreshAccessToken();
- const s3 = await this.request(e2, t2, { ...n2, onUploadProgress: t2.onUploadProgress });
- if (s3.data.code)
- throw new se({ code: s3.data.code, message: Ae(s3.data.message) });
- return s3.data;
- }
- if (s2.data.code)
- throw new se({ code: s2.data.code, message: Ae(s2.data.message) });
- return s2.data;
- }
- setRefreshToken(e2) {
- const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys;
- this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2);
- }
- }
- const st = {};
- function rt(e2) {
- return st[e2];
- }
- class it {
- constructor(e2) {
- this.config = e2, this._cache = Me(e2.env), this._request = rt(e2.env);
- }
- setRefreshToken(e2) {
- const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys;
- this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2);
- }
- setAccessToken(e2, t2) {
- const { accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys;
- this._cache.setStore(n2, e2), this._cache.setStore(s2, t2);
- }
- async refreshUserInfo() {
- const { data: e2 } = await this._request.send("auth.getUserInfo", {});
- return this.setLocalUserInfo(e2), e2;
- }
- setLocalUserInfo(e2) {
- const { userInfoKey: t2 } = this._cache.keys;
- this._cache.setStore(t2, e2);
- }
- }
- class ot {
- constructor(e2) {
- if (!e2)
- throw new se({ code: "PARAM_ERROR", message: "envId is not defined" });
- this._envId = e2, this._cache = Me(this._envId), this._request = rt(this._envId), this.setUserInfo();
- }
- linkWithTicket(e2) {
- if ("string" != typeof e2)
- throw new se({ code: "PARAM_ERROR", message: "ticket must be string" });
- return this._request.send("auth.linkWithTicket", { ticket: e2 });
- }
- linkWithRedirect(e2) {
- e2.signInWithRedirect();
- }
- updatePassword(e2, t2) {
- return this._request.send("auth.updatePassword", { oldPassword: t2, newPassword: e2 });
- }
- updateEmail(e2) {
- return this._request.send("auth.updateEmail", { newEmail: e2 });
- }
- updateUsername(e2) {
- if ("string" != typeof e2)
- throw new se({ code: "PARAM_ERROR", message: "username must be a string" });
- return this._request.send("auth.updateUsername", { username: e2 });
- }
- async getLinkedUidList() {
- const { data: e2 } = await this._request.send("auth.getLinkedUidList", {});
- let t2 = false;
- const { users: n2 } = e2;
- return n2.forEach((e3) => {
- e3.wxOpenId && e3.wxPublicId && (t2 = true);
- }), { users: n2, hasPrimaryUid: t2 };
- }
- setPrimaryUid(e2) {
- return this._request.send("auth.setPrimaryUid", { uid: e2 });
- }
- unlink(e2) {
- return this._request.send("auth.unlink", { platform: e2 });
- }
- async update(e2) {
- const { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 } = e2, { data: a2 } = await this._request.send("auth.updateUserInfo", { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 });
- this.setLocalUserInfo(a2);
- }
- async refresh() {
- const e2 = await this._request.oauth.getUserInfo();
- return this.setLocalUserInfo(e2), e2;
- }
- setUserInfo() {
- const { userInfoKey: e2 } = this._cache.keys, t2 = this._cache.getStore(e2);
- ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach((e3) => {
- this[e3] = t2[e3];
- }), this.location = { country: t2.country, province: t2.province, city: t2.city };
- }
- setLocalUserInfo(e2) {
- const { userInfoKey: t2 } = this._cache.keys;
- this._cache.setStore(t2, e2), this.setUserInfo();
- }
- }
- class at {
- constructor(e2) {
- if (!e2)
- throw new se({ code: "PARAM_ERROR", message: "envId is not defined" });
- this._cache = Me(e2);
- const { refreshTokenKey: t2, accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys, r2 = this._cache.getStore(t2), i2 = this._cache.getStore(n2), o2 = this._cache.getStore(s2);
- this.credential = { refreshToken: r2, accessToken: i2, accessTokenExpire: o2 }, this.user = new ot(e2);
- }
- get isAnonymousAuth() {
- return this.loginType === Ge.ANONYMOUS;
- }
- get isCustomAuth() {
- return this.loginType === Ge.CUSTOM;
- }
- get isWeixinAuth() {
- return this.loginType === Ge.WECHAT || this.loginType === Ge.WECHAT_OPEN || this.loginType === Ge.WECHAT_PUBLIC;
- }
- get loginType() {
- return this._cache.getStore(this._cache.keys.loginTypeKey);
- }
- }
- class ct extends it {
- async signIn() {
- this._cache.updatePersistence("local"), await this._request.oauth.getAccessToken(), $e(We), $e(Je, { env: this.config.env, loginType: Ge.ANONYMOUS, persistence: "local" });
- const e2 = new at(this.config.env);
- return await e2.user.refresh(), e2;
- }
- async linkAndRetrieveDataWithTicket(e2) {
- const { anonymousUuidKey: t2, refreshTokenKey: n2 } = this._cache.keys, s2 = this._cache.getStore(t2), r2 = this._cache.getStore(n2), i2 = await this._request.send("auth.linkAndRetrieveDataWithTicket", { anonymous_uuid: s2, refresh_token: r2, ticket: e2 });
- if (i2.refresh_token)
- return this._clearAnonymousUUID(), this.setRefreshToken(i2.refresh_token), await this._request.refreshAccessToken(), $e(ze, { env: this.config.env }), $e(Je, { loginType: Ge.CUSTOM, persistence: "local" }), { credential: { refreshToken: i2.refresh_token } };
- throw new se({ message: "匿名转化失败" });
- }
- _setAnonymousUUID(e2) {
- const { anonymousUuidKey: t2, loginTypeKey: n2 } = this._cache.keys;
- this._cache.removeStore(t2), this._cache.setStore(t2, e2), this._cache.setStore(n2, Ge.ANONYMOUS);
- }
- _clearAnonymousUUID() {
- this._cache.removeStore(this._cache.keys.anonymousUuidKey);
- }
- }
- class ut extends it {
- async signIn(e2) {
- if ("string" != typeof e2)
- throw new se({ code: "PARAM_ERROR", message: "ticket must be a string" });
- const { refreshTokenKey: t2 } = this._cache.keys, n2 = await this._request.send("auth.signInWithTicket", { ticket: e2, refresh_token: this._cache.getStore(t2) || "" });
- if (n2.refresh_token)
- return this.setRefreshToken(n2.refresh_token), await this._request.refreshAccessToken(), $e(We), $e(Je, { env: this.config.env, loginType: Ge.CUSTOM, persistence: this.config.persistence }), await this.refreshUserInfo(), new at(this.config.env);
- throw new se({ message: "自定义登录失败" });
- }
- }
- class ht extends it {
- async signIn(e2, t2) {
- if ("string" != typeof e2)
- throw new se({ code: "PARAM_ERROR", message: "email must be a string" });
- const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: "EMAIL", email: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token: i2, access_token_expire: o2 } = s2;
- if (r2)
- return this.setRefreshToken(r2), i2 && o2 ? this.setAccessToken(i2, o2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), $e(We), $e(Je, { env: this.config.env, loginType: Ge.EMAIL, persistence: this.config.persistence }), new at(this.config.env);
- throw s2.code ? new se({ code: s2.code, message: `邮箱登录失败: ${s2.message}` }) : new se({ message: "邮箱登录失败" });
- }
- async activate(e2) {
- return this._request.send("auth.activateEndUserMail", { token: e2 });
- }
- async resetPasswordWithToken(e2, t2) {
- return this._request.send("auth.resetPasswordWithToken", { token: e2, newPassword: t2 });
- }
- }
- class lt extends it {
- async signIn(e2, t2) {
- if ("string" != typeof e2)
- throw new se({ code: "PARAM_ERROR", message: "username must be a string" });
- "string" != typeof t2 && (t2 = "", console.warn("password is empty"));
- const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: Ge.USERNAME, username: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token_expire: i2, access_token: o2 } = s2;
- if (r2)
- return this.setRefreshToken(r2), o2 && i2 ? this.setAccessToken(o2, i2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), $e(We), $e(Je, { env: this.config.env, loginType: Ge.USERNAME, persistence: this.config.persistence }), new at(this.config.env);
- throw s2.code ? new se({ code: s2.code, message: `用户名密码登录失败: ${s2.message}` }) : new se({ message: "用户名密码登录失败" });
- }
- }
- class dt {
- constructor(e2) {
- this.config = e2, this._cache = Me(e2.env), this._request = rt(e2.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), je(Je, this._onLoginTypeChanged);
- }
- get currentUser() {
- const e2 = this.hasLoginState();
- return e2 && e2.user || null;
- }
- get loginType() {
- return this._cache.getStore(this._cache.keys.loginTypeKey);
- }
- anonymousAuthProvider() {
- return new ct(this.config);
- }
- customAuthProvider() {
- return new ut(this.config);
- }
- emailAuthProvider() {
- return new ht(this.config);
- }
- usernameAuthProvider() {
- return new lt(this.config);
- }
- async signInAnonymously() {
- return new ct(this.config).signIn();
- }
- async signInWithEmailAndPassword(e2, t2) {
- return new ht(this.config).signIn(e2, t2);
- }
- signInWithUsernameAndPassword(e2, t2) {
- return new lt(this.config).signIn(e2, t2);
- }
- async linkAndRetrieveDataWithTicket(e2) {
- this._anonymousAuthProvider || (this._anonymousAuthProvider = new ct(this.config)), je(ze, this._onAnonymousConverted);
- return await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e2);
- }
- async signOut() {
- if (this.loginType === Ge.ANONYMOUS)
- throw new se({ message: "匿名用户不支持登出操作" });
- const { refreshTokenKey: e2, accessTokenKey: t2, accessTokenExpireKey: n2 } = this._cache.keys, s2 = this._cache.getStore(e2);
- if (!s2)
- return;
- const r2 = await this._request.send("auth.logout", { refresh_token: s2 });
- return this._cache.removeStore(e2), this._cache.removeStore(t2), this._cache.removeStore(n2), $e(We), $e(Je, { env: this.config.env, loginType: Ge.NULL, persistence: this.config.persistence }), r2;
- }
- async signUpWithEmailAndPassword(e2, t2) {
- return this._request.send("auth.signUpWithEmailAndPassword", { email: e2, password: t2 });
- }
- async sendPasswordResetEmail(e2) {
- return this._request.send("auth.sendPasswordResetEmail", { email: e2 });
- }
- onLoginStateChanged(e2) {
- je(We, () => {
- const t3 = this.hasLoginState();
- e2.call(this, t3);
- });
- const t2 = this.hasLoginState();
- e2.call(this, t2);
- }
- onLoginStateExpired(e2) {
- je(He, e2.bind(this));
- }
- onAccessTokenRefreshed(e2) {
- je(Ve, e2.bind(this));
- }
- onAnonymousConverted(e2) {
- je(ze, e2.bind(this));
- }
- onLoginTypeChanged(e2) {
- je(Je, () => {
- const t2 = this.hasLoginState();
- e2.call(this, t2);
- });
- }
- async getAccessToken() {
- return { accessToken: (await this._request.getAccessToken()).accessToken, env: this.config.env };
- }
- hasLoginState() {
- const { accessTokenKey: e2, accessTokenExpireKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2), s2 = this._cache.getStore(t2);
- return this._request.oauth.isAccessTokenExpired(n2, s2) ? null : new at(this.config.env);
- }
- async isUsernameRegistered(e2) {
- if ("string" != typeof e2)
- throw new se({ code: "PARAM_ERROR", message: "username must be a string" });
- const { data: t2 } = await this._request.send("auth.isUsernameRegistered", { username: e2 });
- return t2 && t2.isRegistered;
- }
- getLoginState() {
- return Promise.resolve(this.hasLoginState());
- }
- async signInWithTicket(e2) {
- return new ut(this.config).signIn(e2);
- }
- shouldRefreshAccessToken(e2) {
- this._request._shouldRefreshAccessTokenHook = e2.bind(this);
- }
- getUserInfo() {
- return this._request.send("auth.getUserInfo", {}).then((e2) => e2.code ? e2 : { ...e2.data, requestId: e2.seqId });
- }
- getAuthHeader() {
- const { refreshTokenKey: e2, accessTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2);
- return { "x-cloudbase-credentials": this._cache.getStore(t2) + "/@@/" + n2 };
- }
- _onAnonymousConverted(e2) {
- const { env: t2 } = e2.data;
- t2 === this.config.env && this._cache.updatePersistence(this.config.persistence);
- }
- _onLoginTypeChanged(e2) {
- const { loginType: t2, persistence: n2, env: s2 } = e2.data;
- s2 === this.config.env && (this._cache.updatePersistence(n2), this._cache.setStore(this._cache.keys.loginTypeKey, t2));
- }
- }
- const pt = function(e2, t2) {
- t2 = t2 || be();
- const n2 = rt(this.config.env), { cloudPath: s2, filePath: r2, onUploadProgress: i2, fileType: o2 = "image" } = e2;
- return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => {
- const { data: { url: a2, authorization: c2, token: u2, fileId: h2, cosFileId: l2 }, requestId: d2 } = e3, p2 = { key: s2, signature: c2, "x-cos-meta-fileid": l2, success_action_status: "201", "x-cos-security-token": u2 };
- n2.upload({ url: a2, data: p2, file: r2, name: s2, fileType: o2, onUploadProgress: i2 }).then((e4) => {
- 201 === e4.statusCode ? t2(null, { fileID: h2, requestId: d2 }) : t2(new se({ code: "STORAGE_REQUEST_FAIL", message: `STORAGE_REQUEST_FAIL: ${e4.data}` }));
- }).catch((e4) => {
- t2(e4);
- });
- }).catch((e3) => {
- t2(e3);
- }), t2.promise;
- }, ft = function(e2, t2) {
- t2 = t2 || be();
- const n2 = rt(this.config.env), { cloudPath: s2 } = e2;
- return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => {
- t2(null, e3);
- }).catch((e3) => {
- t2(e3);
- }), t2.promise;
- }, gt = function({ fileList: e2 }, t2) {
- if (t2 = t2 || be(), !e2 || !Array.isArray(e2))
- return { code: "INVALID_PARAM", message: "fileList必须是非空的数组" };
- for (let t3 of e2)
- if (!t3 || "string" != typeof t3)
- return { code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" };
- const n2 = { fileid_list: e2 };
- return rt(this.config.env).send("storage.batchDeleteFile", n2).then((e3) => {
- e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.delete_list, requestId: e3.requestId });
- }).catch((e3) => {
- t2(e3);
- }), t2.promise;
- }, mt = function({ fileList: e2 }, t2) {
- t2 = t2 || be(), e2 && Array.isArray(e2) || t2(null, { code: "INVALID_PARAM", message: "fileList必须是非空的数组" });
- let n2 = [];
- for (let s3 of e2)
- "object" == typeof s3 ? (s3.hasOwnProperty("fileID") && s3.hasOwnProperty("maxAge") || t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是包含fileID和maxAge的对象" }), n2.push({ fileid: s3.fileID, max_age: s3.maxAge })) : "string" == typeof s3 ? n2.push({ fileid: s3 }) : t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是字符串" });
- const s2 = { file_list: n2 };
- return rt(this.config.env).send("storage.batchGetDownloadUrl", s2).then((e3) => {
- e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.download_list, requestId: e3.requestId });
- }).catch((e3) => {
- t2(e3);
- }), t2.promise;
- }, yt = async function({ fileID: e2 }, t2) {
- const n2 = (await mt.call(this, { fileList: [{ fileID: e2, maxAge: 600 }] })).fileList[0];
- if ("SUCCESS" !== n2.code)
- return t2 ? t2(n2) : new Promise((e3) => {
- e3(n2);
- });
- const s2 = rt(this.config.env);
- let r2 = n2.download_url;
- if (r2 = encodeURI(r2), !t2)
- return s2.download({ url: r2 });
- t2(await s2.download({ url: r2 }));
- }, _t = function({ name: e2, data: t2, query: n2, parse: s2, search: r2, timeout: i2 }, o2) {
- const a2 = o2 || be();
- let c2;
- try {
- c2 = t2 ? JSON.stringify(t2) : "";
- } catch (e3) {
- return Promise.reject(e3);
- }
- if (!e2)
- return Promise.reject(new se({ code: "PARAM_ERROR", message: "函数名不能为空" }));
- const u2 = { inQuery: n2, parse: s2, search: r2, function_name: e2, request_data: c2 };
- return rt(this.config.env).send("functions.invokeFunction", u2, { timeout: i2 }).then((e3) => {
- if (e3.code)
- a2(null, e3);
- else {
- let t3 = e3.data.response_data;
- if (s2)
- a2(null, { result: t3, requestId: e3.requestId });
- else
- try {
- t3 = JSON.parse(e3.data.response_data), a2(null, { result: t3, requestId: e3.requestId });
- } catch (e4) {
- a2(new se({ message: "response data must be json" }));
- }
- }
- return a2.promise;
- }).catch((e3) => {
- a2(e3);
- }), a2.promise;
- }, wt = { timeout: 15e3, persistence: "session" }, vt = {};
- class It {
- constructor(e2) {
- this.config = e2 || this.config, this.authObj = void 0;
- }
- init(e2) {
- switch (Oe.adapter || (this.requestClient = new Oe.adapter.reqClass({ timeout: e2.timeout || 5e3, timeoutMsg: `请求在${(e2.timeout || 5e3) / 1e3}s内未完成,已中断` })), this.config = { ...wt, ...e2 }, true) {
- case this.config.timeout > 6e5:
- console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
- break;
- case this.config.timeout < 100:
- console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
- }
- return new It(this.config);
- }
- auth({ persistence: e2 } = {}) {
- if (this.authObj)
- return this.authObj;
- const t2 = e2 || Oe.adapter.primaryStorage || wt.persistence;
- var n2;
- return t2 !== this.config.persistence && (this.config.persistence = t2), function(e3) {
- const { env: t3 } = e3;
- Ne[t3] = new Ue(e3), De[t3] = new Ue({ ...e3, persistence: "local" });
- }(this.config), n2 = this.config, st[n2.env] = new nt(n2), this.authObj = new dt(this.config), this.authObj;
- }
- on(e2, t2) {
- return je.apply(this, [e2, t2]);
- }
- off(e2, t2) {
- return Be.apply(this, [e2, t2]);
- }
- callFunction(e2, t2) {
- return _t.apply(this, [e2, t2]);
- }
- deleteFile(e2, t2) {
- return gt.apply(this, [e2, t2]);
- }
- getTempFileURL(e2, t2) {
- return mt.apply(this, [e2, t2]);
- }
- downloadFile(e2, t2) {
- return yt.apply(this, [e2, t2]);
- }
- uploadFile(e2, t2) {
- return pt.apply(this, [e2, t2]);
- }
- getUploadMetadata(e2, t2) {
- return ft.apply(this, [e2, t2]);
- }
- registerExtension(e2) {
- vt[e2.name] = e2;
- }
- async invokeExtension(e2, t2) {
- const n2 = vt[e2];
- if (!n2)
- throw new se({ message: `扩展${e2} 必须先注册` });
- return await n2.invoke(t2, this);
- }
- useAdapters(e2) {
- const { adapter: t2, runtime: n2 } = xe(e2) || {};
- t2 && (Oe.adapter = t2), n2 && (Oe.runtime = n2);
- }
- }
- var St = new It();
- function bt(e2, t2, n2) {
- void 0 === n2 && (n2 = {});
- var s2 = /\?/.test(t2), r2 = "";
- for (var i2 in n2)
- "" === r2 ? !s2 && (t2 += "?") : r2 += "&", r2 += i2 + "=" + encodeURIComponent(n2[i2]);
- return /^http(s)?:\/\//.test(t2 += r2) ? t2 : "" + e2 + t2;
- }
- class kt {
- get(e2) {
- const { url: t2, data: n2, headers: s2, timeout: r2 } = e2;
- return new Promise((e3, i2) => {
- re.request({ url: bt("https:", t2), data: n2, method: "GET", header: s2, timeout: r2, success(t3) {
- e3(t3);
- }, fail(e4) {
- i2(e4);
- } });
- });
- }
- post(e2) {
- const { url: t2, data: n2, headers: s2, timeout: r2 } = e2;
- return new Promise((e3, i2) => {
- re.request({ url: bt("https:", t2), data: n2, method: "POST", header: s2, timeout: r2, success(t3) {
- e3(t3);
- }, fail(e4) {
- i2(e4);
- } });
- });
- }
- upload(e2) {
- return new Promise((t2, n2) => {
- const { url: s2, file: r2, data: i2, headers: o2, fileType: a2 } = e2, c2 = re.uploadFile({ url: bt("https:", s2), name: "file", formData: Object.assign({}, i2), filePath: r2, fileType: a2, header: o2, success(e3) {
- const n3 = { statusCode: e3.statusCode, data: e3.data || {} };
- 200 === e3.statusCode && i2.success_action_status && (n3.statusCode = parseInt(i2.success_action_status, 10)), t2(n3);
- }, fail(e3) {
- n2(new Error(e3.errMsg || "uploadFile:fail"));
- } });
- "function" == typeof e2.onUploadProgress && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((t3) => {
- e2.onUploadProgress({ loaded: t3.totalBytesSent, total: t3.totalBytesExpectedToSend });
- });
- });
- }
- }
- const Tt = { setItem(e2, t2) {
- re.setStorageSync(e2, t2);
- }, getItem: (e2) => re.getStorageSync(e2), removeItem(e2) {
- re.removeStorageSync(e2);
- }, clear() {
- re.clearStorageSync();
- } };
- var At = { genAdapter: function() {
- return { root: {}, reqClass: kt, localStorage: Tt, primaryStorage: "local" };
- }, isMatch: function() {
- return true;
- }, runtime: "uni_app" };
- St.useAdapters(At);
- const Pt = St, Ct = Pt.init;
- Pt.init = function(e2) {
- e2.env = e2.spaceId;
- const t2 = Ct.call(this, e2);
- t2.config.provider = "tencent", t2.config.spaceId = e2.spaceId;
- const n2 = t2.auth;
- return t2.auth = function(e3) {
- const t3 = n2.call(this, e3);
- return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach((e4) => {
- var n3;
- t3[e4] = (n3 = t3[e4], function(e5) {
- e5 = e5 || {};
- const { success: t4, fail: s2, complete: r2 } = ne(e5);
- if (!(t4 || s2 || r2))
- return n3.call(this, e5);
- n3.call(this, e5).then((e6) => {
- t4 && t4(e6), r2 && r2(e6);
- }, (e6) => {
- s2 && s2(e6), r2 && r2(e6);
- });
- }).bind(t3);
- }), t3;
- }, t2.customAuth = t2.auth, t2;
- };
- var xt = Pt;
- async function Ot(e2, t2) {
- const n2 = `http://${e2}:${t2}/system/ping`;
- try {
- const e3 = await (s2 = { url: n2, timeout: 500 }, new Promise((e4, t3) => {
- re.request({ ...s2, success(t4) {
- e4(t4);
- }, fail(e5) {
- t3(e5);
- } });
- }));
- return !(!e3.data || 0 !== e3.data.code);
- } catch (e3) {
- return false;
- }
- var s2;
- }
- async function Et(e2, t2) {
- let n2;
- for (let s2 = 0; s2 < e2.length; s2++) {
- const r2 = e2[s2];
- if (await Ot(r2, t2)) {
- n2 = r2;
- break;
- }
- }
- return { address: n2, port: t2 };
- }
- const Lt = { "serverless.file.resource.generateProximalSign": "storage/generate-proximal-sign", "serverless.file.resource.report": "storage/report", "serverless.file.resource.delete": "storage/delete", "serverless.file.resource.getTempFileURL": "storage/get-temp-file-url" };
- var Rt = class {
- constructor(e2) {
- if (["spaceId", "clientSecret"].forEach((t2) => {
- if (!Object.prototype.hasOwnProperty.call(e2, t2))
- throw new Error(`${t2} required`);
- }), !e2.endpoint)
- throw new Error("集群空间未配置ApiEndpoint,配置后需要重新关联服务空间后生效");
- this.config = Object.assign({}, e2), this.config.provider = "dcloud", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.adapter = re;
- }
- async request(e2, t2 = true) {
- const n2 = t2;
- return e2 = n2 ? await this.setupLocalRequest(e2) : this.setupRequest(e2), Promise.resolve().then(() => n2 ? this.requestLocal(e2) : fe.wrappedRequest(e2, this.adapter.request));
- }
- requestLocal(e2) {
- return new Promise((t2, n2) => {
- this.adapter.request(Object.assign(e2, { complete(e3) {
- if (e3 || (e3 = {}), !e3.statusCode || e3.statusCode >= 400) {
- const t3 = e3.data && e3.data.code || "SYS_ERR", s2 = e3.data && e3.data.message || "request:fail";
- return n2(new se({ code: t3, message: s2 }));
- }
- t2({ success: true, result: e3.data });
- } }));
- });
- }
- setupRequest(e2) {
- const t2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), n2 = { "Content-Type": "application/json" };
- n2["x-serverless-sign"] = fe.sign(t2, this.config.clientSecret);
- const s2 = pe();
- n2["x-client-info"] = encodeURIComponent(JSON.stringify(s2));
- const { token: r2 } = oe();
- return n2["x-client-token"] = r2, { url: this.config.requestUrl, method: "POST", data: t2, dataType: "json", header: JSON.parse(JSON.stringify(n2)) };
- }
- async setupLocalRequest(e2) {
- const t2 = pe(), { token: n2 } = oe(), s2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now(), clientInfo: t2, token: n2 }), { address: r2, servePort: i2 } = this.__dev__ && this.__dev__.debugInfo || {}, { address: o2 } = await Et(r2, i2);
- return { url: `http://${o2}:${i2}/${Lt[e2.method]}`, method: "POST", data: s2, dataType: "json", header: JSON.parse(JSON.stringify({ "Content-Type": "application/json" })) };
- }
- callFunction(e2) {
- const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e2.name, functionArgs: e2.data || {} }) };
- return this.request(t2, false);
- }
- getUploadFileOptions(e2) {
- const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e2) };
- return this.request(t2);
- }
- reportUploadFile(e2) {
- const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e2) };
- return this.request(t2);
- }
- uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2 }) {
- if (!t2)
- throw new se({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" });
- let r2;
- return this.getUploadFileOptions({ cloudPath: t2 }).then((t3) => {
- const { url: i2, formData: o2, name: a2 } = t3.result;
- return r2 = t3.result.fileUrl, new Promise((t4, r3) => {
- const c2 = this.adapter.uploadFile({ url: i2, formData: o2, name: a2, filePath: e2, fileType: n2, success(e3) {
- e3 && e3.statusCode < 400 ? t4(e3) : r3(new se({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
- }, fail(e3) {
- r3(new se({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
- } });
- "function" == typeof s2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => {
- s2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
- });
- });
- }).then(() => this.reportUploadFile({ cloudPath: t2 })).then((t3) => new Promise((n3, s3) => {
- t3.success ? n3({ success: true, filePath: e2, fileID: r2 }) : s3(new se({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
- }));
- }
- deleteFile({ fileList: e2 }) {
- const t2 = { method: "serverless.file.resource.delete", params: JSON.stringify({ fileList: e2 }) };
- return this.request(t2).then((e3) => {
- if (e3.success)
- return e3.result;
- throw new se({ code: "DELETE_FILE_FAILED", message: "删除文件失败" });
- });
- }
- getTempFileURL({ fileList: e2, maxAge: t2 } = {}) {
- if (!Array.isArray(e2) || 0 === e2.length)
- throw new se({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
- const n2 = { method: "serverless.file.resource.getTempFileURL", params: JSON.stringify({ fileList: e2, maxAge: t2 }) };
- return this.request(n2).then((e3) => {
- if (e3.success)
- return { fileList: e3.result.fileList.map((e4) => ({ fileID: e4.fileID, tempFileURL: e4.tempFileURL })) };
- throw new se({ code: "GET_TEMP_FILE_URL_FAILED", message: "获取临时文件链接失败" });
- });
- }
- };
- var Ut = { init(e2) {
- const t2 = new Rt(e2), n2 = { signInAnonymously: function() {
- return Promise.resolve();
- }, getLoginState: function() {
- return Promise.resolve(false);
- } };
- return t2.auth = function() {
- return n2;
- }, t2.customAuth = t2.auth, t2;
- } }, Nt = n(function(e2, t2) {
- e2.exports = r.enc.Hex;
- });
- function Dt() {
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e2) {
- var t2 = 16 * Math.random() | 0;
- return ("x" === e2 ? t2 : 3 & t2 | 8).toString(16);
- });
- }
- function Mt(e2 = "", t2 = {}) {
- const { data: n2, functionName: s2, method: r2, headers: i2, signHeaderKeys: o2 = [], config: a2 } = t2, c2 = String(Date.now()), u2 = Dt(), h2 = Object.assign({}, i2, { "x-from-app-id": a2.spaceAppId, "x-from-env-id": a2.spaceId, "x-to-env-id": a2.spaceId, "x-from-instance-id": c2, "x-from-function-name": s2, "x-client-timestamp": c2, "x-alipay-source": "client", "x-request-id": u2, "x-alipay-callid": u2, "x-trace-id": u2 }), l2 = ["x-from-app-id", "x-from-env-id", "x-to-env-id", "x-from-instance-id", "x-from-function-name", "x-client-timestamp"].concat(o2), [d2 = "", p2 = ""] = e2.split("?") || [], f2 = function(e3) {
- const t3 = e3.signedHeaders.join(";"), n3 = e3.signedHeaders.map((t4) => `${t4.toLowerCase()}:${e3.headers[t4]}
- `).join(""), s3 = Ie(e3.body).toString(Nt), r3 = `${e3.method.toUpperCase()}
- ${e3.path}
- ${e3.query}
- ${n3}
- ${t3}
- ${s3}
- `, i3 = Ie(r3).toString(Nt), o3 = `HMAC-SHA256
- ${e3.timestamp}
- ${i3}
- `, a3 = Se(o3, e3.secretKey).toString(Nt);
- return `HMAC-SHA256 Credential=${e3.secretId}, SignedHeaders=${t3}, Signature=${a3}`;
- }({ path: d2, query: p2, method: r2, headers: h2, timestamp: c2, body: JSON.stringify(n2), secretId: a2.accessKey, secretKey: a2.secretKey, signedHeaders: l2.sort() });
- return { url: `${a2.endpoint}${e2}`, headers: Object.assign({}, h2, { Authorization: f2 }) };
- }
- function qt({ url: e2, data: t2, method: n2 = "POST", headers: s2 = {}, timeout: r2 }) {
- return new Promise((i2, o2) => {
- re.request({ url: e2, method: n2, data: "object" == typeof t2 ? JSON.stringify(t2) : t2, header: s2, dataType: "json", timeout: r2, complete: (e3 = {}) => {
- const t3 = s2["x-trace-id"] || "";
- if (!e3.statusCode || e3.statusCode >= 400) {
- const { message: n3, errMsg: s3, trace_id: r3 } = e3.data || {};
- return o2(new se({ code: "SYS_ERR", message: n3 || s3 || "request:fail", requestId: r3 || t3 }));
- }
- i2({ status: e3.statusCode, data: e3.data, headers: e3.header, requestId: t3 });
- } });
- });
- }
- function Kt(e2, t2) {
- const { path: n2, data: s2, method: r2 = "GET" } = e2, { url: i2, headers: o2 } = Mt(n2, { functionName: "", data: s2, method: r2, headers: { "x-alipay-cloud-mode": "oss", "x-data-api-type": "oss", "x-expire-timestamp": Date.now() + 6e4 }, signHeaderKeys: ["x-data-api-type", "x-expire-timestamp"], config: t2 });
- return qt({ url: i2, data: s2, method: r2, headers: o2 }).then((e3) => {
- const t3 = e3.data || {};
- if (!t3.success)
- throw new se({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId });
- return t3.data || {};
- }).catch((e3) => {
- throw new se({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId });
- });
- }
- function Ft(e2 = "") {
- const t2 = e2.trim().replace(/^cloud:\/\//, ""), n2 = t2.indexOf("/");
- if (n2 <= 0)
- throw new se({ code: "INVALID_PARAM", message: "fileID不合法" });
- const s2 = t2.substring(0, n2), r2 = t2.substring(n2 + 1);
- return s2 !== this.config.spaceId && console.warn("file ".concat(e2, " does not belong to env ").concat(this.config.spaceId)), r2;
- }
- function jt(e2 = "") {
- return "cloud://".concat(this.config.spaceId, "/").concat(e2.replace(/^\/+/, ""));
- }
- class $t {
- constructor(e2) {
- this.config = e2;
- }
- signedURL(e2, t2 = {}) {
- const n2 = `/ws/function/${e2}`, s2 = this.config.wsEndpoint.replace(/^ws(s)?:\/\//, ""), r2 = Object.assign({}, t2, { accessKeyId: this.config.accessKey, signatureNonce: Dt(), timestamp: "" + Date.now() }), i2 = [n2, ["accessKeyId", "authorization", "signatureNonce", "timestamp"].sort().map(function(e3) {
- return r2[e3] ? "".concat(e3, "=").concat(r2[e3]) : null;
- }).filter(Boolean).join("&"), `host:${s2}`].join("\n"), o2 = ["HMAC-SHA256", Ie(i2).toString(Nt)].join("\n"), a2 = Se(o2, this.config.secretKey).toString(Nt), c2 = Object.keys(r2).map((e3) => `${e3}=${encodeURIComponent(r2[e3])}`).join("&");
- return `${this.config.wsEndpoint}${n2}?${c2}&signature=${a2}`;
- }
- }
- var Bt = class {
- constructor(e2) {
- if (["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach((t2) => {
- if (!Object.prototype.hasOwnProperty.call(e2, t2))
- throw new Error(`${t2} required`);
- }), e2.endpoint) {
- if ("string" != typeof e2.endpoint)
- throw new Error("endpoint must be string");
- if (!/^https:\/\//.test(e2.endpoint))
- throw new Error("endpoint must start with https://");
- e2.endpoint = e2.endpoint.replace(/\/$/, "");
- }
- this.config = Object.assign({}, e2, { endpoint: e2.endpoint || `https://${e2.spaceId}.api-hz.cloudbasefunction.cn`, wsEndpoint: e2.wsEndpoint || `wss://${e2.spaceId}.api-hz.cloudbasefunction.cn` }), this._websocket = new $t(this.config);
- }
- callFunction(e2) {
- return function(e3, t2) {
- const { name: n2, data: s2, async: r2 = false, timeout: i2 } = e3, o2 = "POST", a2 = { "x-to-function-name": n2 };
- r2 && (a2["x-function-invoke-type"] = "async");
- const { url: c2, headers: u2 } = Mt("/functions/invokeFunction", { functionName: n2, data: s2, method: o2, headers: a2, signHeaderKeys: ["x-to-function-name"], config: t2 });
- return qt({ url: c2, data: s2, method: o2, headers: u2, timeout: i2 }).then((e4) => {
- let t3 = 0;
- if (r2) {
- const n3 = e4.data || {};
- t3 = "200" === n3.errCode ? 0 : n3.errCode, e4.data = n3.data || {}, e4.errMsg = n3.errMsg;
- }
- if (0 !== t3)
- throw new se({ code: t3, message: e4.errMsg, requestId: e4.requestId });
- return { errCode: t3, success: 0 === t3, requestId: e4.requestId, result: e4.data };
- }).catch((e4) => {
- throw new se({ code: e4.errCode, message: e4.errMsg, requestId: e4.requestId });
- });
- }(e2, this.config);
- }
- uploadFileToOSS({ url: e2, filePath: t2, fileType: n2, formData: s2, onUploadProgress: r2 }) {
- return new Promise((i2, o2) => {
- const a2 = re.uploadFile({ url: e2, filePath: t2, fileType: n2, formData: s2, name: "file", success(e3) {
- e3 && e3.statusCode < 400 ? i2(e3) : o2(new se({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
- }, fail(e3) {
- o2(new se({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
- } });
- "function" == typeof r2 && a2 && "function" == typeof a2.onProgressUpdate && a2.onProgressUpdate((e3) => {
- r2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
- });
- });
- }
- async uploadFile({ filePath: e2, cloudPath: t2 = "", fileType: n2 = "image", onUploadProgress: s2 }) {
- if ("string" !== f(t2))
- throw new se({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });
- if (!(t2 = t2.trim()))
- throw new se({ code: "INVALID_PARAM", message: "cloudPath不可为空" });
- if (/:\/\//.test(t2))
- throw new se({ code: "INVALID_PARAM", message: "cloudPath不合法" });
- const r2 = await Kt({ path: "/".concat(t2.replace(/^\//, ""), "?post_url") }, this.config), { file_id: i2, upload_url: o2, form_data: a2 } = r2, c2 = a2 && a2.reduce((e3, t3) => (e3[t3.key] = t3.value, e3), {});
- return this.uploadFileToOSS({ url: o2, filePath: e2, fileType: n2, formData: c2, onUploadProgress: s2 }).then(() => ({ fileID: i2 }));
- }
- async getTempFileURL({ fileList: e2 }) {
- return new Promise((t2, n2) => {
- (!e2 || e2.length < 0) && t2({ code: "INVALID_PARAM", message: "fileList不能为空数组" }), e2.length > 50 && t2({ code: "INVALID_PARAM", message: "fileList数组长度不能超过50" });
- const s2 = [];
- for (const n3 of e2) {
- let e3;
- "string" !== f(n3) && t2({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
- try {
- e3 = Ft.call(this, n3);
- } catch (t3) {
- console.warn(t3.errCode, t3.errMsg), e3 = n3;
- }
- s2.push({ file_id: e3, expire: 600 });
- }
- Kt({ path: "/?download_url", data: { file_list: s2 }, method: "POST" }, this.config).then((e3) => {
- const { file_list: n3 = [] } = e3;
- t2({ fileList: n3.map((e4) => ({ fileID: jt.call(this, e4.file_id), tempFileURL: e4.download_url })) });
- }).catch((e3) => n2(e3));
- });
- }
- async connectWebSocket(e2) {
- const { name: t2, query: n2 } = e2;
- return re.connectSocket({ url: this._websocket.signedURL(t2, n2), complete: () => {
- } });
- }
- };
- var Wt = { init: (e2) => {
- e2.provider = "alipay";
- const t2 = new Bt(e2);
- return t2.auth = function() {
- return { signInAnonymously: function() {
- return Promise.resolve();
- }, getLoginState: function() {
- return Promise.resolve(true);
- } };
- }, t2;
- } };
- function Ht({ data: e2 }) {
- let t2;
- t2 = pe();
- const n2 = JSON.parse(JSON.stringify(e2 || {}));
- if (Object.assign(n2, { clientInfo: t2 }), !n2.uniIdToken) {
- const { token: e3 } = oe();
- e3 && (n2.uniIdToken = e3);
- }
- return n2;
- }
- async function Jt(e2 = {}) {
- await this.__dev__.initLocalNetwork();
- const { localAddress: t2, localPort: n2 } = this.__dev__, s2 = { aliyun: "aliyun", tencent: "tcb", alipay: "alipay", dcloud: "dcloud" }[this.config.provider], r2 = this.config.spaceId, i2 = `http://${t2}:${n2}/system/check-function`, o2 = `http://${t2}:${n2}/cloudfunctions/${e2.name}`;
- return new Promise((t3, n3) => {
- re.request({ method: "POST", url: i2, data: { name: e2.name, platform: A, provider: s2, spaceId: r2 }, timeout: 3e3, success(e3) {
- t3(e3);
- }, fail() {
- t3({ data: { code: "NETWORK_ERROR", message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。" } });
- } });
- }).then(({ data: e3 } = {}) => {
- const { code: t3, message: n3 } = e3 || {};
- return { code: 0 === t3 ? 0 : t3 || "SYS_ERR", message: n3 || "SYS_ERR" };
- }).then(({ code: t3, message: n3 }) => {
- if (0 !== t3) {
- switch (t3) {
- case "MODULE_ENCRYPTED":
- console.error(`此云函数(${e2.name})依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数`);
- break;
- case "FUNCTION_ENCRYPTED":
- console.error(`此云函数(${e2.name})已加密不可本地调试,自动切换为云端已部署的云函数`);
- break;
- case "ACTION_ENCRYPTED":
- console.error(n3 || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
- break;
- case "NETWORK_ERROR":
- console.error(n3 || "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下");
- break;
- case "SWITCH_TO_CLOUD":
- break;
- default: {
- const e3 = `检测本地调试服务出现错误:${n3},请检查网络环境或重启客户端再试`;
- throw console.error(e3), new Error(e3);
- }
- }
- return this._callCloudFunction(e2);
- }
- return new Promise((t4, n4) => {
- const r3 = Ht.call(this, { data: e2.data });
- re.request({ method: "POST", url: o2, data: { provider: s2, platform: A, param: r3 }, timeout: e2.timeout, success: ({ statusCode: e3, data: s3 } = {}) => !e3 || e3 >= 400 ? n4(new se({ code: s3.code || "SYS_ERR", message: s3.message || "request:fail" })) : t4({ result: s3 }), fail(e3) {
- n4(new se({ code: e3.code || e3.errCode || "SYS_ERR", message: e3.message || e3.errMsg || "request:fail" }));
- } });
- });
- });
- }
- const zt = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间", mode: "append" }];
- var Vt = /[\\^$.*+?()[\]{}|]/g, Gt = RegExp(Vt.source);
- function Yt(e2, t2, n2) {
- return e2.replace(new RegExp((s2 = t2) && Gt.test(s2) ? s2.replace(Vt, "\\$&") : s2, "g"), n2);
- var s2;
- }
- const Xt = "request", Zt = "response", en$3 = "both";
- const Mn = { code: 2e4, message: "System error" }, qn = { code: 20101, message: "Invalid client" };
- function jn(e2) {
- const { errSubject: t2, subject: n2, errCode: s2, errMsg: r2, code: i2, message: o2, cause: a2 } = e2 || {};
- return new se({ subject: t2 || n2 || "uni-secure-network", code: s2 || i2 || Mn.code, message: r2 || o2, cause: a2 });
- }
- let Bn;
- function Vn({ secretType: e2 } = {}) {
- return e2 === Xt || e2 === Zt || e2 === en$3;
- }
- function Gn({ name: e2, data: t2 = {} } = {}) {
- return "DCloud-clientDB" === e2 && "encryption" === t2.redirectTo && "getAppClientKey" === t2.action;
- }
- function Yn({ provider: e2, spaceId: t2, functionName: n2 } = {}) {
- const { appId: s2, uniPlatform: r2, osName: i2 } = he();
- let o2 = r2;
- "app" === r2 && (o2 = i2);
- const a2 = function({ provider: e3, spaceId: t3 } = {}) {
- const n3 = T;
- if (!n3)
- return {};
- e3 = /* @__PURE__ */ function(e4) {
- return "tencent" === e4 ? "tcb" : e4;
- }(e3);
- const s3 = n3.find((n4) => n4.provider === e3 && n4.spaceId === t3);
- return s3 && s3.config;
- }({ provider: e2, spaceId: t2 });
- if (!a2 || !a2.accessControl || !a2.accessControl.enable)
- return false;
- const c2 = a2.accessControl.function || {}, u2 = Object.keys(c2);
- if (0 === u2.length)
- return true;
- const h2 = function(e3, t3) {
- let n3, s3, r3;
- for (let i3 = 0; i3 < e3.length; i3++) {
- const o3 = e3[i3];
- o3 !== t3 ? "*" !== o3 ? o3.split(",").map((e4) => e4.trim()).indexOf(t3) > -1 && (s3 = o3) : r3 = o3 : n3 = o3;
- }
- return n3 || s3 || r3;
- }(u2, n2);
- if (!h2)
- return false;
- if ((c2[h2] || []).find((e3 = {}) => e3.appId === s2 && (e3.platform || "").toLowerCase() === o2.toLowerCase()))
- return true;
- throw console.error(`此应用[appId: ${s2}, platform: ${o2}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`), jn(qn);
- }
- function Qn({ functionName: e2, result: t2, logPvd: n2 }) {
- if (this.__dev__.debugLog && t2 && t2.requestId) {
- const s2 = JSON.stringify({ spaceId: this.config.spaceId, functionName: e2, requestId: t2.requestId });
- console.log(`[${n2}-request]${s2}[/${n2}-request]`);
- }
- }
- function Xn(e2) {
- const t2 = e2.callFunction, n2 = function(n3) {
- const s2 = n3.name;
- n3.data = Ht.call(e2, { data: n3.data });
- const r2 = { aliyun: "aliyun", tencent: "tcb", tcb: "tcb", alipay: "alipay", dcloud: "dcloud" }[this.config.provider], i2 = Vn(n3), o2 = Gn(n3), a2 = i2 || o2;
- return t2.call(this, n3).then((e3) => (e3.errCode = 0, !a2 && Qn.call(this, { functionName: s2, result: e3, logPvd: r2 }), Promise.resolve(e3)), (e3) => (!a2 && Qn.call(this, { functionName: s2, result: e3, logPvd: r2 }), e3 && e3.message && (e3.message = function({ message: e4 = "", extraInfo: t3 = {}, formatter: n4 = [] } = {}) {
- for (let s3 = 0; s3 < n4.length; s3++) {
- const { rule: r3, content: i3, mode: o3 } = n4[s3], a3 = e4.match(r3);
- if (!a3)
- continue;
- let c2 = i3;
- for (let e5 = 1; e5 < a3.length; e5++)
- c2 = Yt(c2, `{$${e5}}`, a3[e5]);
- for (const e5 in t3)
- c2 = Yt(c2, `{${e5}}`, t3[e5]);
- return "replace" === o3 ? c2 : e4 + c2;
- }
- return e4;
- }({ message: `[${n3.name}]: ${e3.message}`, formatter: zt, extraInfo: { functionName: s2 } })), Promise.reject(e3)));
- };
- e2.callFunction = function(t3) {
- const { provider: s2, spaceId: r2 } = e2.config, i2 = t3.name;
- let o2, a2;
- if (t3.data = t3.data || {}, e2.__dev__.debugInfo && !e2.__dev__.debugInfo.forceRemote && C ? (e2._callCloudFunction || (e2._callCloudFunction = n2, e2._callLocalFunction = Jt), o2 = Jt) : o2 = n2, o2 = o2.bind(e2), Gn(t3))
- a2 = n2.call(e2, t3);
- else if (Vn(t3)) {
- a2 = new Bn({ secretType: t3.secretType, uniCloudIns: e2 }).wrapEncryptDataCallFunction(n2.bind(e2))(t3);
- } else if (Yn({ provider: s2, spaceId: r2, functionName: i2 })) {
- a2 = new Bn({ secretType: t3.secretType, uniCloudIns: e2 }).wrapVerifyClientCallFunction(n2.bind(e2))(t3);
- } else
- a2 = o2(t3);
- return Object.defineProperty(a2, "result", { get: () => (console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {}) }), a2.then((e3) => ("undefined" != typeof UTSJSONObject && "undefined" != typeof UTS && (e3.result = UTS.JSON.parse(JSON.stringify(e3.result))), e3));
- };
- }
- Bn = class {
- constructor() {
- throw jn({ message: `Platform ${A} is not enabled, please check whether secure network module is enabled in your manifest.json` });
- }
- };
- const Zn = Symbol("CLIENT_DB_INTERNAL");
- function es$1(e2, t2) {
- return e2.then = "DoNotReturnProxyWithAFunctionNamedThen", e2._internalType = Zn, e2.inspect = null, e2.__v_raw = void 0, new Proxy(e2, { get(e3, n2, s2) {
- if ("_uniClient" === n2)
- return null;
- if ("symbol" == typeof n2)
- return e3[n2];
- if (n2 in e3 || "string" != typeof n2) {
- const t3 = e3[n2];
- return "function" == typeof t3 ? t3.bind(e3) : t3;
- }
- return t2.get(e3, n2, s2);
- } });
- }
- function ts(e2) {
- return { on: (t2, n2) => {
- e2[t2] = e2[t2] || [], e2[t2].indexOf(n2) > -1 || e2[t2].push(n2);
- }, off: (t2, n2) => {
- e2[t2] = e2[t2] || [];
- const s2 = e2[t2].indexOf(n2);
- -1 !== s2 && e2[t2].splice(s2, 1);
- } };
- }
- const ns = ["db.Geo", "db.command", "command.aggregate"];
- function ss(e2, t2) {
- return ns.indexOf(`${e2}.${t2}`) > -1;
- }
- function rs(e2) {
- switch (f(e2 = ie(e2))) {
- case "array":
- return e2.map((e3) => rs(e3));
- case "object":
- return e2._internalType === Zn || Object.keys(e2).forEach((t2) => {
- e2[t2] = rs(e2[t2]);
- }), e2;
- case "regexp":
- return { $regexp: { source: e2.source, flags: e2.flags } };
- case "date":
- return { $date: e2.toISOString() };
- default:
- return e2;
- }
- }
- function is(e2) {
- return e2 && e2.content && e2.content.$method;
- }
- class os {
- constructor(e2, t2, n2) {
- this.content = e2, this.prevStage = t2 || null, this.udb = null, this._database = n2;
- }
- toJSON() {
- let e2 = this;
- const t2 = [e2.content];
- for (; e2.prevStage; )
- e2 = e2.prevStage, t2.push(e2.content);
- return { $db: t2.reverse().map((e3) => ({ $method: e3.$method, $param: rs(e3.$param) })) };
- }
- toString() {
- return JSON.stringify(this.toJSON());
- }
- getAction() {
- const e2 = this.toJSON().$db.find((e3) => "action" === e3.$method);
- return e2 && e2.$param && e2.$param[0];
- }
- getCommand() {
- return { $db: this.toJSON().$db.filter((e2) => "action" !== e2.$method) };
- }
- get isAggregate() {
- let e2 = this;
- for (; e2; ) {
- const t2 = is(e2), n2 = is(e2.prevStage);
- if ("aggregate" === t2 && "collection" === n2 || "pipeline" === t2)
- return true;
- e2 = e2.prevStage;
- }
- return false;
- }
- get isCommand() {
- let e2 = this;
- for (; e2; ) {
- if ("command" === is(e2))
- return true;
- e2 = e2.prevStage;
- }
- return false;
- }
- get isAggregateCommand() {
- let e2 = this;
- for (; e2; ) {
- const t2 = is(e2), n2 = is(e2.prevStage);
- if ("aggregate" === t2 && "command" === n2)
- return true;
- e2 = e2.prevStage;
- }
- return false;
- }
- getNextStageFn(e2) {
- const t2 = this;
- return function() {
- return as({ $method: e2, $param: rs(Array.from(arguments)) }, t2, t2._database);
- };
- }
- get count() {
- return this.isAggregate ? this.getNextStageFn("count") : function() {
- return this._send("count", Array.from(arguments));
- };
- }
- get remove() {
- return this.isCommand ? this.getNextStageFn("remove") : function() {
- return this._send("remove", Array.from(arguments));
- };
- }
- get() {
- return this._send("get", Array.from(arguments));
- }
- get add() {
- return this.isCommand ? this.getNextStageFn("add") : function() {
- return this._send("add", Array.from(arguments));
- };
- }
- update() {
- return this._send("update", Array.from(arguments));
- }
- end() {
- return this._send("end", Array.from(arguments));
- }
- get set() {
- return this.isCommand ? this.getNextStageFn("set") : function() {
- throw new Error("JQL禁止使用set方法");
- };
- }
- _send(e2, t2) {
- const n2 = this.getAction(), s2 = this.getCommand();
- if (s2.$db.push({ $method: e2, $param: rs(t2) }), S) {
- const e3 = s2.$db.find((e4) => "collection" === e4.$method), t3 = e3 && e3.$param;
- t3 && 1 === t3.length && "string" == typeof e3.$param[0] && e3.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
- }
- return this._database._callCloudFunction({ action: n2, command: s2 });
- }
- }
- function as(e2, t2, n2) {
- return es$1(new os(e2, t2, n2), { get(e3, t3) {
- let s2 = "db";
- return e3 && e3.content && (s2 = e3.content.$method), ss(s2, t3) ? as({ $method: t3 }, e3, n2) : function() {
- return as({ $method: t3, $param: rs(Array.from(arguments)) }, e3, n2);
- };
- } });
- }
- function cs({ path: e2, method: t2 }) {
- return class {
- constructor() {
- this.param = Array.from(arguments);
- }
- toJSON() {
- return { $newDb: [...e2.map((e3) => ({ $method: e3 })), { $method: t2, $param: this.param }] };
- }
- toString() {
- return JSON.stringify(this.toJSON());
- }
- };
- }
- function us(e2, t2 = {}) {
- return es$1(new e2(t2), { get: (e3, t3) => ss("db", t3) ? as({ $method: t3 }, null, e3) : function() {
- return as({ $method: t3, $param: rs(Array.from(arguments)) }, null, e3);
- } });
- }
- class hs extends class {
- constructor({ uniClient: e2 = {}, isJQL: t2 = false } = {}) {
- this._uniClient = e2, this._authCallBacks = {}, this._dbCallBacks = {}, e2._isDefault && (this._dbCallBacks = R("_globalUniCloudDatabaseCallback")), t2 || (this.auth = ts(this._authCallBacks)), this._isJQL = t2, Object.assign(this, ts(this._dbCallBacks)), this.env = es$1({}, { get: (e3, t3) => ({ $env: t3 }) }), this.Geo = es$1({}, { get: (e3, t3) => cs({ path: ["Geo"], method: t3 }) }), this.serverDate = cs({ path: [], method: "serverDate" }), this.RegExp = cs({ path: [], method: "RegExp" });
- }
- getCloudEnv(e2) {
- if ("string" != typeof e2 || !e2.trim())
- throw new Error("getCloudEnv参数错误");
- return { $env: e2.replace("$cloudEnv_", "") };
- }
- _callback(e2, t2) {
- const n2 = this._dbCallBacks;
- n2[e2] && n2[e2].forEach((e3) => {
- e3(...t2);
- });
- }
- _callbackAuth(e2, t2) {
- const n2 = this._authCallBacks;
- n2[e2] && n2[e2].forEach((e3) => {
- e3(...t2);
- });
- }
- multiSend() {
- const e2 = Array.from(arguments), t2 = e2.map((e3) => {
- const t3 = e3.getAction(), n2 = e3.getCommand();
- if ("getTemp" !== n2.$db[n2.$db.length - 1].$method)
- throw new Error("multiSend只支持子命令内使用getTemp");
- return { action: t3, command: n2 };
- });
- return this._callCloudFunction({ multiCommand: t2, queryList: e2 });
- }
- } {
- _parseResult(e2) {
- return this._isJQL ? e2.result : e2;
- }
- _callCloudFunction({ action: e2, command: t2, multiCommand: n2, queryList: s2 }) {
- function r2(e3, t3) {
- if (n2 && s2)
- for (let n3 = 0; n3 < s2.length; n3++) {
- const r3 = s2[n3];
- r3.udb && "function" == typeof r3.udb.setResult && (t3 ? r3.udb.setResult(t3) : r3.udb.setResult(e3.result.dataList[n3]));
- }
- }
- const i2 = this, o2 = this._isJQL ? "databaseForJQL" : "database";
- function a2(e3) {
- return i2._callback("error", [e3]), K(F(o2, "fail"), e3).then(() => K(F(o2, "complete"), e3)).then(() => (r2(null, e3), X(B, { type: J, content: e3 }), Promise.reject(e3)));
- }
- const c2 = K(F(o2, "invoke")), u2 = this._uniClient;
- return c2.then(() => u2.callFunction({ name: "DCloud-clientDB", type: h, data: { action: e2, command: t2, multiCommand: n2 } })).then((e3) => {
- const { code: t3, message: n3, token: s3, tokenExpired: c3, systemInfo: u3 = [] } = e3.result;
- if (u3)
- for (let e4 = 0; e4 < u3.length; e4++) {
- const { level: t4, message: n4, detail: s4 } = u3[e4], r3 = console["warn" === t4 ? "error" : t4] || console.log;
- let i3 = "[System Info]" + n4;
- s4 && (i3 = `${i3}
- 详细信息:${s4}`), r3(i3);
- }
- if (t3) {
- return a2(new se({ code: t3, message: n3, requestId: e3.requestId }));
- }
- e3.result.errCode = e3.result.errCode || e3.result.code, e3.result.errMsg = e3.result.errMsg || e3.result.message, s3 && c3 && (ae({ token: s3, tokenExpired: c3 }), this._callbackAuth("refreshToken", [{ token: s3, tokenExpired: c3 }]), this._callback("refreshToken", [{ token: s3, tokenExpired: c3 }]), X(H, { token: s3, tokenExpired: c3 }));
- const h2 = [{ prop: "affectedDocs", tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代" }, { prop: "code", tips: "code不再推荐使用,请使用errCode替代" }, { prop: "message", tips: "message不再推荐使用,请使用errMsg替代" }];
- for (let t4 = 0; t4 < h2.length; t4++) {
- const { prop: n4, tips: s4 } = h2[t4];
- if (n4 in e3.result) {
- const t5 = e3.result[n4];
- Object.defineProperty(e3.result, n4, { get: () => (console.warn(s4), t5) });
- }
- }
- return function(e4) {
- return K(F(o2, "success"), e4).then(() => K(F(o2, "complete"), e4)).then(() => {
- r2(e4, null);
- const t4 = i2._parseResult(e4);
- return X(B, { type: J, content: t4 }), Promise.resolve(t4);
- });
- }(e3);
- }, (e3) => {
- /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e3.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
- return a2(new se({ code: e3.code || "SYSTEM_ERROR", message: e3.message, requestId: e3.requestId }));
- });
- }
- }
- const ls = "token无效,跳转登录页面", ds = "token过期,跳转登录页面", ps = { TOKEN_INVALID_TOKEN_EXPIRED: ds, TOKEN_INVALID_INVALID_CLIENTID: ls, TOKEN_INVALID: ls, TOKEN_INVALID_WRONG_TOKEN: ls, TOKEN_INVALID_ANONYMOUS_USER: ls }, fs = { "uni-id-token-expired": ds, "uni-id-check-token-failed": ls, "uni-id-token-not-exist": ls, "uni-id-check-device-feature-failed": ls };
- function gs(e2, t2) {
- let n2 = "";
- return n2 = e2 ? `${e2}/${t2}` : t2, n2.replace(/^\//, "");
- }
- function ms(e2 = [], t2 = "") {
- const n2 = [], s2 = [];
- return e2.forEach((e3) => {
- true === e3.needLogin ? n2.push(gs(t2, e3.path)) : false === e3.needLogin && s2.push(gs(t2, e3.path));
- }), { needLoginPage: n2, notNeedLoginPage: s2 };
- }
- function ys(e2) {
- return e2.split("?")[0].replace(/^\//, "");
- }
- function _s() {
- return function(e2) {
- let t2 = e2 && e2.$page && e2.$page.fullPath || "";
- return t2 ? ("/" !== t2.charAt(0) && (t2 = "/" + t2), t2) : t2;
- }(function() {
- const e2 = getCurrentPages();
- return e2[e2.length - 1];
- }());
- }
- function ws() {
- return ys(_s());
- }
- function vs(e2 = "", t2 = {}) {
- if (!e2)
- return false;
- if (!(t2 && t2.list && t2.list.length))
- return false;
- const n2 = t2.list, s2 = ys(e2);
- return n2.some((e3) => e3.pagePath === s2);
- }
- const Is = !!e.uniIdRouter;
- const { loginPage: Ss, routerNeedLogin: bs, resToLogin: ks, needLoginPage: Ts, notNeedLoginPage: As, loginPageInTabBar: Ps } = function({ pages: t2 = [], subPackages: n2 = [], uniIdRouter: s2 = {}, tabBar: r2 = {} } = e) {
- const { loginPage: i2, needLogin: o2 = [], resToLogin: a2 = true } = s2, { needLoginPage: c2, notNeedLoginPage: u2 } = ms(t2), { needLoginPage: h2, notNeedLoginPage: l2 } = function(e2 = []) {
- const t3 = [], n3 = [];
- return e2.forEach((e3) => {
- const { root: s3, pages: r3 = [] } = e3, { needLoginPage: i3, notNeedLoginPage: o3 } = ms(r3, s3);
- t3.push(...i3), n3.push(...o3);
- }), { needLoginPage: t3, notNeedLoginPage: n3 };
- }(n2);
- return { loginPage: i2, routerNeedLogin: o2, resToLogin: a2, needLoginPage: [...c2, ...h2], notNeedLoginPage: [...u2, ...l2], loginPageInTabBar: vs(i2, r2) };
- }();
- if (Ts.indexOf(Ss) > -1)
- throw new Error(`Login page [${Ss}] should not be "needLogin", please check your pages.json`);
- function Cs(e2) {
- const t2 = ws();
- if ("/" === e2.charAt(0))
- return e2;
- const [n2, s2] = e2.split("?"), r2 = n2.replace(/^\//, "").split("/"), i2 = t2.split("/");
- i2.pop();
- for (let e3 = 0; e3 < r2.length; e3++) {
- const t3 = r2[e3];
- ".." === t3 ? i2.pop() : "." !== t3 && i2.push(t3);
- }
- return "" === i2[0] && i2.shift(), "/" + i2.join("/") + (s2 ? "?" + s2 : "");
- }
- function xs(e2) {
- const t2 = ys(Cs(e2));
- return !(As.indexOf(t2) > -1) && (Ts.indexOf(t2) > -1 || bs.some((t3) => function(e3, t4) {
- return new RegExp(t4).test(e3);
- }(e2, t3)));
- }
- function Os({ redirect: e2 }) {
- const t2 = ys(e2), n2 = ys(Ss);
- return ws() !== n2 && t2 !== n2;
- }
- function Es({ api: e2, redirect: t2 } = {}) {
- if (!t2 || !Os({ redirect: t2 }))
- return;
- const n2 = function(e3, t3) {
- return "/" !== e3.charAt(0) && (e3 = "/" + e3), t3 ? e3.indexOf("?") > -1 ? e3 + `&uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3 + `?uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3;
- }(Ss, t2);
- Ps ? "navigateTo" !== e2 && "redirectTo" !== e2 || (e2 = "switchTab") : "switchTab" === e2 && (e2 = "navigateTo");
- const s2 = { navigateTo: uni.navigateTo, redirectTo: uni.redirectTo, switchTab: uni.switchTab, reLaunch: uni.reLaunch };
- setTimeout(() => {
- s2[e2]({ url: n2 });
- }, 0);
- }
- function Ls({ url: e2 } = {}) {
- const t2 = { abortLoginPageJump: false, autoToLoginPage: false }, n2 = function() {
- const { token: e3, tokenExpired: t3 } = oe();
- let n3;
- if (e3) {
- if (t3 < Date.now()) {
- const e4 = "uni-id-token-expired";
- n3 = { errCode: e4, errMsg: fs[e4] };
- }
- } else {
- const e4 = "uni-id-check-token-failed";
- n3 = { errCode: e4, errMsg: fs[e4] };
- }
- return n3;
- }();
- if (xs(e2) && n2) {
- n2.uniIdRedirectUrl = e2;
- if (G(W).length > 0)
- return setTimeout(() => {
- X(W, n2);
- }, 0), t2.abortLoginPageJump = true, t2;
- t2.autoToLoginPage = true;
- }
- return t2;
- }
- function Rs() {
- !function() {
- const e3 = _s(), { abortLoginPageJump: t2, autoToLoginPage: n2 } = Ls({ url: e3 });
- t2 || n2 && Es({ api: "redirectTo", redirect: e3 });
- }();
- const e2 = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
- for (let t2 = 0; t2 < e2.length; t2++) {
- const n2 = e2[t2];
- uni.addInterceptor(n2, { invoke(e3) {
- const { abortLoginPageJump: t3, autoToLoginPage: s2 } = Ls({ url: e3.url });
- return t3 ? e3 : s2 ? (Es({ api: n2, redirect: Cs(e3.url) }), false) : e3;
- } });
- }
- }
- function Us() {
- this.onResponse((e2) => {
- const { type: t2, content: n2 } = e2;
- let s2 = false;
- switch (t2) {
- case "cloudobject":
- s2 = function(e3) {
- if ("object" != typeof e3)
- return false;
- const { errCode: t3 } = e3 || {};
- return t3 in fs;
- }(n2);
- break;
- case "clientdb":
- s2 = function(e3) {
- if ("object" != typeof e3)
- return false;
- const { errCode: t3 } = e3 || {};
- return t3 in ps;
- }(n2);
- }
- s2 && function(e3 = {}) {
- const t3 = G(W);
- te().then(() => {
- const n3 = _s();
- if (n3 && Os({ redirect: n3 }))
- return t3.length > 0 ? X(W, Object.assign({ uniIdRedirectUrl: n3 }, e3)) : void (Ss && Es({ api: "navigateTo", redirect: n3 }));
- });
- }(n2);
- });
- }
- function Ns(e2) {
- !function(e3) {
- e3.onResponse = function(e4) {
- Y(B, e4);
- }, e3.offResponse = function(e4) {
- Q(B, e4);
- };
- }(e2), function(e3) {
- e3.onNeedLogin = function(e4) {
- Y(W, e4);
- }, e3.offNeedLogin = function(e4) {
- Q(W, e4);
- }, Is && (R("_globalUniCloudStatus").needLoginInit || (R("_globalUniCloudStatus").needLoginInit = true, te().then(() => {
- Rs.call(e3);
- }), ks && Us.call(e3)));
- }(e2), function(e3) {
- e3.onRefreshToken = function(e4) {
- Y(H, e4);
- }, e3.offRefreshToken = function(e4) {
- Q(H, e4);
- };
- }(e2);
- }
- let Ds;
- const Ms = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", qs = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
- function Ks() {
- const e2 = oe().token || "", t2 = e2.split(".");
- if (!e2 || 3 !== t2.length)
- return { uid: null, role: [], permission: [], tokenExpired: 0 };
- let n2;
- try {
- n2 = JSON.parse((s2 = t2[1], decodeURIComponent(Ds(s2).split("").map(function(e3) {
- return "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2);
- }).join(""))));
- } catch (e3) {
- throw new Error("获取当前用户信息出错,详细错误信息为:" + e3.message);
- }
- var s2;
- return n2.tokenExpired = 1e3 * n2.exp, delete n2.exp, delete n2.iat, n2;
- }
- Ds = "function" != typeof atob ? function(e2) {
- if (e2 = String(e2).replace(/[\t\n\f\r ]+/g, ""), !qs.test(e2))
- throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
- var t2;
- e2 += "==".slice(2 - (3 & e2.length));
- for (var n2, s2, r2 = "", i2 = 0; i2 < e2.length; )
- t2 = Ms.indexOf(e2.charAt(i2++)) << 18 | Ms.indexOf(e2.charAt(i2++)) << 12 | (n2 = Ms.indexOf(e2.charAt(i2++))) << 6 | (s2 = Ms.indexOf(e2.charAt(i2++))), r2 += 64 === n2 ? String.fromCharCode(t2 >> 16 & 255) : 64 === s2 ? String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255) : String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255, 255 & t2);
- return r2;
- } : atob;
- var Fs = n(function(e2, t2) {
- Object.defineProperty(t2, "__esModule", { value: true });
- const n2 = "chooseAndUploadFile:ok", s2 = "chooseAndUploadFile:fail";
- function r2(e3, t3) {
- return e3.tempFiles.forEach((e4, n3) => {
- e4.name || (e4.name = e4.path.substring(e4.path.lastIndexOf("/") + 1)), t3 && (e4.fileType = t3), e4.cloudPath = Date.now() + "_" + n3 + e4.name.substring(e4.name.lastIndexOf("."));
- }), e3.tempFilePaths || (e3.tempFilePaths = e3.tempFiles.map((e4) => e4.path)), e3;
- }
- function i2(e3, t3, { onChooseFile: s3, onUploadProgress: r3 }) {
- return t3.then((e4) => {
- if (s3) {
- const t4 = s3(e4);
- if (void 0 !== t4)
- return Promise.resolve(t4).then((t5) => void 0 === t5 ? e4 : t5);
- }
- return e4;
- }).then((t4) => false === t4 ? { errMsg: n2, tempFilePaths: [], tempFiles: [] } : function(e4, t5, s4 = 5, r4) {
- (t5 = Object.assign({}, t5)).errMsg = n2;
- const i3 = t5.tempFiles, o2 = i3.length;
- let a2 = 0;
- return new Promise((n3) => {
- for (; a2 < s4; )
- c2();
- function c2() {
- const s5 = a2++;
- if (s5 >= o2)
- return void (!i3.find((e5) => !e5.url && !e5.errMsg) && n3(t5));
- const u2 = i3[s5];
- e4.uploadFile({ provider: u2.provider, filePath: u2.path, cloudPath: u2.cloudPath, fileType: u2.fileType, cloudPathAsRealPath: u2.cloudPathAsRealPath, onUploadProgress(e5) {
- e5.index = s5, e5.tempFile = u2, e5.tempFilePath = u2.path, r4 && r4(e5);
- } }).then((e5) => {
- u2.url = e5.fileID, s5 < o2 && c2();
- }).catch((e5) => {
- u2.errMsg = e5.errMsg || e5.message, s5 < o2 && c2();
- });
- }
- });
- }(e3, t4, 5, r3));
- }
- t2.initChooseAndUploadFile = function(e3) {
- return function(t3 = { type: "all" }) {
- return "image" === t3.type ? i2(e3, function(e4) {
- const { count: t4, sizeType: n3, sourceType: i3 = ["album", "camera"], extension: o2 } = e4;
- return new Promise((e5, a2) => {
- uni.chooseImage({ count: t4, sizeType: n3, sourceType: i3, extension: o2, success(t5) {
- e5(r2(t5, "image"));
- }, fail(e6) {
- a2({ errMsg: e6.errMsg.replace("chooseImage:fail", s2) });
- } });
- });
- }(t3), t3) : "video" === t3.type ? i2(e3, function(e4) {
- const { camera: t4, compressed: n3, maxDuration: i3, sourceType: o2 = ["album", "camera"], extension: a2 } = e4;
- return new Promise((e5, c2) => {
- uni.chooseVideo({ camera: t4, compressed: n3, maxDuration: i3, sourceType: o2, extension: a2, success(t5) {
- const { tempFilePath: n4, duration: s3, size: i4, height: o3, width: a3 } = t5;
- e5(r2({ errMsg: "chooseVideo:ok", tempFilePaths: [n4], tempFiles: [{ name: t5.tempFile && t5.tempFile.name || "", path: n4, size: i4, type: t5.tempFile && t5.tempFile.type || "", width: a3, height: o3, duration: s3, fileType: "video", cloudPath: "" }] }, "video"));
- }, fail(e6) {
- c2({ errMsg: e6.errMsg.replace("chooseVideo:fail", s2) });
- } });
- });
- }(t3), t3) : i2(e3, function(e4) {
- const { count: t4, extension: n3 } = e4;
- return new Promise((e5, i3) => {
- let o2 = uni.chooseFile;
- if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o2 = wx.chooseMessageFile), "function" != typeof o2)
- return i3({ errMsg: s2 + " 请指定 type 类型,该平台仅支持选择 image 或 video。" });
- o2({ type: "all", count: t4, extension: n3, success(t5) {
- e5(r2(t5));
- }, fail(e6) {
- i3({ errMsg: e6.errMsg.replace("chooseFile:fail", s2) });
- } });
- });
- }(t3), t3);
- };
- };
- }), js = t$2(Fs);
- const $s = "manual";
- function Bs(e2) {
- return { props: { localdata: { type: Array, default: () => [] }, options: { type: [Object, Array], default: () => ({}) }, spaceInfo: { type: Object, default: () => ({}) }, collection: { type: [String, Array], default: "" }, action: { type: String, default: "" }, field: { type: String, default: "" }, orderby: { type: String, default: "" }, where: { type: [String, Object], default: "" }, pageData: { type: String, default: "add" }, pageCurrent: { type: Number, default: 1 }, pageSize: { type: Number, default: 20 }, getcount: { type: [Boolean, String], default: false }, gettree: { type: [Boolean, String], default: false }, gettreepath: { type: [Boolean, String], default: false }, startwith: { type: String, default: "" }, limitlevel: { type: Number, default: 10 }, groupby: { type: String, default: "" }, groupField: { type: String, default: "" }, distinct: { type: [Boolean, String], default: false }, foreignKey: { type: String, default: "" }, loadtime: { type: String, default: "auto" }, manual: { type: Boolean, default: false } }, data: () => ({ mixinDatacomLoading: false, mixinDatacomHasMore: false, mixinDatacomResData: [], mixinDatacomErrorMessage: "", mixinDatacomPage: {}, mixinDatacomError: null }), created() {
- this.mixinDatacomPage = { current: this.pageCurrent, size: this.pageSize, count: 0 }, this.$watch(() => {
- var e3 = [];
- return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach((t2) => {
- e3.push(this[t2]);
- }), e3;
- }, (e3, t2) => {
- if (this.loadtime === $s)
- return;
- let n2 = false;
- const s2 = [];
- for (let r2 = 2; r2 < e3.length; r2++)
- e3[r2] !== t2[r2] && (s2.push(e3[r2]), n2 = true);
- e3[0] !== t2[0] && (this.mixinDatacomPage.current = this.pageCurrent), this.mixinDatacomPage.size = this.pageSize, this.onMixinDatacomPropsChange(n2, s2);
- });
- }, methods: { onMixinDatacomPropsChange(e3, t2) {
- }, mixinDatacomEasyGet({ getone: e3 = false, success: t2, fail: n2 } = {}) {
- this.mixinDatacomLoading || (this.mixinDatacomLoading = true, this.mixinDatacomErrorMessage = "", this.mixinDatacomError = null, this.mixinDatacomGet().then((n3) => {
- this.mixinDatacomLoading = false;
- const { data: s2, count: r2 } = n3.result;
- this.getcount && (this.mixinDatacomPage.count = r2), this.mixinDatacomHasMore = s2.length < this.pageSize;
- const i2 = e3 ? s2.length ? s2[0] : void 0 : s2;
- this.mixinDatacomResData = i2, t2 && t2(i2);
- }).catch((e4) => {
- this.mixinDatacomLoading = false, this.mixinDatacomErrorMessage = e4, this.mixinDatacomError = e4, n2 && n2(e4);
- }));
- }, mixinDatacomGet(t2 = {}) {
- let n2;
- t2 = t2 || {}, n2 = "undefined" != typeof __uniX && __uniX ? e2.databaseForJQL(this.spaceInfo) : e2.database(this.spaceInfo);
- const s2 = t2.action || this.action;
- s2 && (n2 = n2.action(s2));
- const r2 = t2.collection || this.collection;
- n2 = Array.isArray(r2) ? n2.collection(...r2) : n2.collection(r2);
- const i2 = t2.where || this.where;
- i2 && Object.keys(i2).length && (n2 = n2.where(i2));
- const o2 = t2.field || this.field;
- o2 && (n2 = n2.field(o2));
- const a2 = t2.foreignKey || this.foreignKey;
- a2 && (n2 = n2.foreignKey(a2));
- const c2 = t2.groupby || this.groupby;
- c2 && (n2 = n2.groupBy(c2));
- const u2 = t2.groupField || this.groupField;
- u2 && (n2 = n2.groupField(u2));
- true === (void 0 !== t2.distinct ? t2.distinct : this.distinct) && (n2 = n2.distinct());
- const h2 = t2.orderby || this.orderby;
- h2 && (n2 = n2.orderBy(h2));
- const l2 = void 0 !== t2.pageCurrent ? t2.pageCurrent : this.mixinDatacomPage.current, d2 = void 0 !== t2.pageSize ? t2.pageSize : this.mixinDatacomPage.size, p2 = void 0 !== t2.getcount ? t2.getcount : this.getcount, f2 = void 0 !== t2.gettree ? t2.gettree : this.gettree, g2 = void 0 !== t2.gettreepath ? t2.gettreepath : this.gettreepath, m2 = { getCount: p2 }, y2 = { limitLevel: void 0 !== t2.limitlevel ? t2.limitlevel : this.limitlevel, startWith: void 0 !== t2.startwith ? t2.startwith : this.startwith };
- return f2 && (m2.getTree = y2), g2 && (m2.getTreePath = y2), n2 = n2.skip(d2 * (l2 - 1)).limit(d2).get(m2), n2;
- } } };
- }
- function Ws(e2) {
- return function(t2, n2 = {}) {
- n2 = function(e3, t3 = {}) {
- return e3.customUI = t3.customUI || e3.customUI, e3.parseSystemError = t3.parseSystemError || e3.parseSystemError, Object.assign(e3.loadingOptions, t3.loadingOptions), Object.assign(e3.errorOptions, t3.errorOptions), "object" == typeof t3.secretMethods && (e3.secretMethods = t3.secretMethods), e3;
- }({ customUI: false, loadingOptions: { title: "加载中...", mask: true }, errorOptions: { type: "modal", retry: false } }, n2);
- const { customUI: s2, loadingOptions: r2, errorOptions: i2, parseSystemError: o2 } = n2, a2 = !s2;
- return new Proxy({}, { get(s3, c2) {
- switch (c2) {
- case "toString":
- return "[object UniCloudObject]";
- case "toJSON":
- return {};
- }
- return function({ fn: e3, interceptorName: t3, getCallbackArgs: n3 } = {}) {
- return async function(...s4) {
- const r3 = n3 ? n3({ params: s4 }) : {};
- let i3, o3;
- try {
- return await K(F(t3, "invoke"), { ...r3 }), i3 = await e3(...s4), await K(F(t3, "success"), { ...r3, result: i3 }), i3;
- } catch (e4) {
- throw o3 = e4, await K(F(t3, "fail"), { ...r3, error: o3 }), o3;
- } finally {
- await K(F(t3, "complete"), o3 ? { ...r3, error: o3 } : { ...r3, result: i3 });
- }
- };
- }({ fn: async function s4(...h2) {
- let l2;
- a2 && uni.showLoading({ title: r2.title, mask: r2.mask });
- const d2 = { name: t2, type: u, data: { method: c2, params: h2 } };
- "object" == typeof n2.secretMethods && function(e3, t3) {
- const n3 = t3.data.method, s5 = e3.secretMethods || {}, r3 = s5[n3] || s5["*"];
- r3 && (t3.secretType = r3);
- }(n2, d2);
- let p2 = false;
- try {
- l2 = await e2.callFunction(d2);
- } catch (e3) {
- p2 = true, l2 = { result: new se(e3) };
- }
- const { errSubject: f2, errCode: g2, errMsg: m2, newToken: y2 } = l2.result || {};
- if (a2 && uni.hideLoading(), y2 && y2.token && y2.tokenExpired && (ae(y2), X(H, { ...y2 })), g2) {
- let e3 = m2;
- if (p2 && o2) {
- e3 = (await o2({ objectName: t2, methodName: c2, params: h2, errSubject: f2, errCode: g2, errMsg: m2 })).errMsg || m2;
- }
- if (a2)
- if ("toast" === i2.type)
- uni.showToast({ title: e3, icon: "none" });
- else {
- if ("modal" !== i2.type)
- throw new Error(`Invalid errorOptions.type: ${i2.type}`);
- {
- const { confirm: t3 } = await async function({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3 } = {}) {
- return new Promise((i3, o3) => {
- uni.showModal({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3, success(e5) {
- i3(e5);
- }, fail() {
- i3({ confirm: false, cancel: true });
- } });
- });
- }({ title: "提示", content: e3, showCancel: i2.retry, cancelText: "取消", confirmText: i2.retry ? "重试" : "确定" });
- if (i2.retry && t3)
- return s4(...h2);
- }
- }
- const n3 = new se({ subject: f2, code: g2, message: m2, requestId: l2.requestId });
- throw n3.detail = l2.result, X(B, { type: V, content: n3 }), n3;
- }
- return X(B, { type: V, content: l2.result }), l2.result;
- }, interceptorName: "callObject", getCallbackArgs: function({ params: e3 } = {}) {
- return { objectName: t2, methodName: c2, params: e3 };
- } });
- } });
- };
- }
- function Hs(e2) {
- return R("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e2.config.spaceId));
- }
- async function Js({ openid: e2, callLoginByWeixin: t2 = false } = {}) {
- Hs(this);
- throw new Error(`[SecureNetwork] API \`initSecureNetworkByWeixin\` is not supported on platform \`${A}\``);
- }
- async function zs(e2) {
- const t2 = Hs(this);
- return t2.initPromise || (t2.initPromise = Js.call(this, e2).then((e3) => e3).catch((e3) => {
- throw delete t2.initPromise, e3;
- })), t2.initPromise;
- }
- function Vs(e2) {
- return function({ openid: t2, callLoginByWeixin: n2 = false } = {}) {
- return zs.call(e2, { openid: t2, callLoginByWeixin: n2 });
- };
- }
- function Gs(e2) {
- !function(e3) {
- de = e3;
- }(e2);
- }
- function Ys(e2) {
- const t2 = { getSystemInfo: uni.getSystemInfo, getPushClientId: uni.getPushClientId };
- return function(n2) {
- return new Promise((s2, r2) => {
- t2[e2]({ ...n2, success(e3) {
- s2(e3);
- }, fail(e3) {
- r2(e3);
- } });
- });
- };
- }
- class Qs extends class {
- constructor() {
- this._callback = {};
- }
- addListener(e2, t2) {
- this._callback[e2] || (this._callback[e2] = []), this._callback[e2].push(t2);
- }
- on(e2, t2) {
- return this.addListener(e2, t2);
- }
- removeListener(e2, t2) {
- if (!t2)
- throw new Error('The "listener" argument must be of type function. Received undefined');
- const n2 = this._callback[e2];
- if (!n2)
- return;
- const s2 = function(e3, t3) {
- for (let n3 = e3.length - 1; n3 >= 0; n3--)
- if (e3[n3] === t3)
- return n3;
- return -1;
- }(n2, t2);
- n2.splice(s2, 1);
- }
- off(e2, t2) {
- return this.removeListener(e2, t2);
- }
- removeAllListener(e2) {
- delete this._callback[e2];
- }
- emit(e2, ...t2) {
- const n2 = this._callback[e2];
- if (n2)
- for (let e3 = 0; e3 < n2.length; e3++)
- n2[e3](...t2);
- }
- } {
- constructor() {
- super(), this._uniPushMessageCallback = this._receivePushMessage.bind(this), this._currentMessageId = -1, this._payloadQueue = [];
- }
- init() {
- return Promise.all([Ys("getSystemInfo")(), Ys("getPushClientId")()]).then(([{ appId: e2 } = {}, { cid: t2 } = {}] = []) => {
- if (!e2)
- throw new Error("Invalid appId, please check the manifest.json file");
- if (!t2)
- throw new Error("Invalid push client id");
- this._appId = e2, this._pushClientId = t2, this._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), this.emit("open"), this._initMessageListener();
- }, (e2) => {
- throw this.emit("error", e2), this.close(), e2;
- });
- }
- async open() {
- return this.init();
- }
- _isUniCloudSSE(e2) {
- if ("receive" !== e2.type)
- return false;
- const t2 = e2 && e2.data && e2.data.payload;
- return !(!t2 || "UNI_CLOUD_SSE" !== t2.channel || t2.seqId !== this._seqId);
- }
- _receivePushMessage(e2) {
- if (!this._isUniCloudSSE(e2))
- return;
- const t2 = e2 && e2.data && e2.data.payload, { action: n2, messageId: s2, message: r2 } = t2;
- this._payloadQueue.push({ action: n2, messageId: s2, message: r2 }), this._consumMessage();
- }
- _consumMessage() {
- for (; ; ) {
- const e2 = this._payloadQueue.find((e3) => e3.messageId === this._currentMessageId + 1);
- if (!e2)
- break;
- this._currentMessageId++, this._parseMessagePayload(e2);
- }
- }
- _parseMessagePayload(e2) {
- const { action: t2, messageId: n2, message: s2 } = e2;
- "end" === t2 ? this._end({ messageId: n2, message: s2 }) : "message" === t2 && this._appendMessage({ messageId: n2, message: s2 });
- }
- _appendMessage({ messageId: e2, message: t2 } = {}) {
- this.emit("message", t2);
- }
- _end({ messageId: e2, message: t2 } = {}) {
- this.emit("end", t2), this.close();
- }
- _initMessageListener() {
- uni.onPushMessage(this._uniPushMessageCallback);
- }
- _destroy() {
- uni.offPushMessage(this._uniPushMessageCallback);
- }
- toJSON() {
- return { appId: this._appId, pushClientId: this._pushClientId, seqId: this._seqId };
- }
- close() {
- this._destroy(), this.emit("close");
- }
- }
- async function Xs(e2) {
- {
- const { osName: e3, osVersion: t3 } = he();
- "ios" === e3 && function(e4) {
- if (!e4 || "string" != typeof e4)
- return 0;
- const t4 = e4.match(/^(\d+)./);
- return t4 && t4[1] ? parseInt(t4[1]) : 0;
- }(t3) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发期间需要,发行后不需要)");
- }
- const t2 = e2.__dev__;
- if (!t2.debugInfo)
- return;
- const { address: n2, servePort: s2 } = t2.debugInfo, { address: r2 } = await Et(n2, s2);
- if (r2)
- return t2.localAddress = r2, void (t2.localPort = s2);
- const i2 = console["error"];
- let o2 = "";
- if ("remote" === t2.debugInfo.initialLaunchType ? (t2.debugInfo.forceRemote = true, o2 = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o2 = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o2 += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", 0 === A.indexOf("mp-") && (o2 += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t2.debugInfo.forceRemote)
- throw new Error(o2);
- i2(o2);
- }
- function Zs(e2) {
- e2._initPromiseHub || (e2._initPromiseHub = new v({ createPromise: function() {
- let t2 = Promise.resolve();
- var n2;
- n2 = 1, t2 = new Promise((e3) => {
- setTimeout(() => {
- e3();
- }, n2);
- });
- const s2 = e2.auth();
- return t2.then(() => s2.getLoginState()).then((e3) => e3 ? Promise.resolve() : s2.signInAnonymously());
- } }));
- }
- const er = { tcb: xt, tencent: xt, aliyun: me, private: Ut, dcloud: Ut, alipay: Wt };
- let tr = new class {
- init(e2) {
- let t2 = {};
- const n2 = er[e2.provider];
- if (!n2)
- throw new Error("未提供正确的provider参数");
- t2 = n2.init(e2), function(e3) {
- const t3 = {};
- e3.__dev__ = t3, t3.debugLog = "app" === A;
- const n3 = P;
- n3 && !n3.code && (t3.debugInfo = n3);
- const s2 = new v({ createPromise: function() {
- return Xs(e3);
- } });
- t3.initLocalNetwork = function() {
- return s2.exec();
- };
- }(t2), Zs(t2), Xn(t2), function(e3) {
- const t3 = e3.uploadFile;
- e3.uploadFile = function(e4) {
- return t3.call(this, e4);
- };
- }(t2), function(e3) {
- e3.database = function(t3) {
- if (t3 && Object.keys(t3).length > 0)
- return e3.init(t3).database();
- if (this._database)
- return this._database;
- const n3 = us(hs, { uniClient: e3 });
- return this._database = n3, n3;
- }, e3.databaseForJQL = function(t3) {
- if (t3 && Object.keys(t3).length > 0)
- return e3.init(t3).databaseForJQL();
- if (this._databaseForJQL)
- return this._databaseForJQL;
- const n3 = us(hs, { uniClient: e3, isJQL: true });
- return this._databaseForJQL = n3, n3;
- };
- }(t2), function(e3) {
- e3.getCurrentUserInfo = Ks, e3.chooseAndUploadFile = js.initChooseAndUploadFile(e3), Object.assign(e3, { get mixinDatacom() {
- return Bs(e3);
- } }), e3.SSEChannel = Qs, e3.initSecureNetworkByWeixin = Vs(e3), e3.setCustomClientInfo = Gs, e3.importObject = Ws(e3);
- }(t2);
- return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach((e3) => {
- if (!t2[e3])
- return;
- const n3 = t2[e3];
- t2[e3] = function() {
- return n3.apply(t2, Array.from(arguments));
- }, t2[e3] = (/* @__PURE__ */ function(e4, t3) {
- return function(n4) {
- let s2 = false;
- if ("callFunction" === t3) {
- const e5 = n4 && n4.type || c;
- s2 = e5 !== c;
- }
- const r2 = "callFunction" === t3 && !s2, i2 = this._initPromiseHub.exec();
- n4 = n4 || {};
- const { success: o2, fail: a2, complete: u2 } = ne(n4), h2 = i2.then(() => s2 ? Promise.resolve() : K(F(t3, "invoke"), n4)).then(() => e4.call(this, n4)).then((e5) => s2 ? Promise.resolve(e5) : K(F(t3, "success"), e5).then(() => K(F(t3, "complete"), e5)).then(() => (r2 && X(B, { type: z, content: e5 }), Promise.resolve(e5))), (e5) => s2 ? Promise.reject(e5) : K(F(t3, "fail"), e5).then(() => K(F(t3, "complete"), e5)).then(() => (X(B, { type: z, content: e5 }), Promise.reject(e5))));
- if (!(o2 || a2 || u2))
- return h2;
- h2.then((e5) => {
- o2 && o2(e5), u2 && u2(e5), r2 && X(B, { type: z, content: e5 });
- }, (e5) => {
- a2 && a2(e5), u2 && u2(e5), r2 && X(B, { type: z, content: e5 });
- });
- };
- }(t2[e3], e3)).bind(t2);
- }), t2.init = this.init, t2;
- }
- }();
- (() => {
- const e2 = C;
- let t2 = {};
- if (e2 && 1 === e2.length)
- t2 = e2[0], tr = tr.init(t2), tr._isDefault = true;
- else {
- const t3 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
- let n2;
- n2 = e2 && e2.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : "应用未关联服务空间,请在uniCloud目录右键关联服务空间", t3.forEach((e3) => {
- tr[e3] = function() {
- return console.error(n2), Promise.reject(new se({ code: "SYS_ERR", message: n2 }));
- };
- });
- }
- if (Object.assign(tr, { get mixinDatacom() {
- return Bs(tr);
- } }), Ns(tr), tr.addInterceptor = M, tr.removeInterceptor = q, tr.interceptObject = j, uni.__uniCloud = tr, "app" === A) {
- const e3 = U();
- e3.uniCloud = tr, e3.UniCloudError = se;
- }
- })();
- var nr = tr;
- const fontData = [
- {
- "font_class": "arrow-down",
- "unicode": ""
- },
- {
- "font_class": "arrow-left",
- "unicode": ""
- },
- {
- "font_class": "arrow-right",
- "unicode": ""
- },
- {
- "font_class": "arrow-up",
- "unicode": ""
- },
- {
- "font_class": "auth",
- "unicode": ""
- },
- {
- "font_class": "auth-filled",
- "unicode": ""
- },
- {
- "font_class": "back",
- "unicode": ""
- },
- {
- "font_class": "bars",
- "unicode": ""
- },
- {
- "font_class": "calendar",
- "unicode": ""
- },
- {
- "font_class": "calendar-filled",
- "unicode": ""
- },
- {
- "font_class": "camera",
- "unicode": ""
- },
- {
- "font_class": "camera-filled",
- "unicode": ""
- },
- {
- "font_class": "cart",
- "unicode": ""
- },
- {
- "font_class": "cart-filled",
- "unicode": ""
- },
- {
- "font_class": "chat",
- "unicode": ""
- },
- {
- "font_class": "chat-filled",
- "unicode": ""
- },
- {
- "font_class": "chatboxes",
- "unicode": ""
- },
- {
- "font_class": "chatboxes-filled",
- "unicode": ""
- },
- {
- "font_class": "chatbubble",
- "unicode": ""
- },
- {
- "font_class": "chatbubble-filled",
- "unicode": ""
- },
- {
- "font_class": "checkbox",
- "unicode": ""
- },
- {
- "font_class": "checkbox-filled",
- "unicode": ""
- },
- {
- "font_class": "checkmarkempty",
- "unicode": ""
- },
- {
- "font_class": "circle",
- "unicode": ""
- },
- {
- "font_class": "circle-filled",
- "unicode": ""
- },
- {
- "font_class": "clear",
- "unicode": ""
- },
- {
- "font_class": "close",
- "unicode": ""
- },
- {
- "font_class": "closeempty",
- "unicode": ""
- },
- {
- "font_class": "cloud-download",
- "unicode": ""
- },
- {
- "font_class": "cloud-download-filled",
- "unicode": ""
- },
- {
- "font_class": "cloud-upload",
- "unicode": ""
- },
- {
- "font_class": "cloud-upload-filled",
- "unicode": ""
- },
- {
- "font_class": "color",
- "unicode": ""
- },
- {
- "font_class": "color-filled",
- "unicode": ""
- },
- {
- "font_class": "compose",
- "unicode": ""
- },
- {
- "font_class": "contact",
- "unicode": ""
- },
- {
- "font_class": "contact-filled",
- "unicode": ""
- },
- {
- "font_class": "down",
- "unicode": ""
- },
- {
- "font_class": "bottom",
- "unicode": ""
- },
- {
- "font_class": "download",
- "unicode": ""
- },
- {
- "font_class": "download-filled",
- "unicode": ""
- },
- {
- "font_class": "email",
- "unicode": ""
- },
- {
- "font_class": "email-filled",
- "unicode": ""
- },
- {
- "font_class": "eye",
- "unicode": ""
- },
- {
- "font_class": "eye-filled",
- "unicode": ""
- },
- {
- "font_class": "eye-slash",
- "unicode": ""
- },
- {
- "font_class": "eye-slash-filled",
- "unicode": ""
- },
- {
- "font_class": "fire",
- "unicode": ""
- },
- {
- "font_class": "fire-filled",
- "unicode": ""
- },
- {
- "font_class": "flag",
- "unicode": ""
- },
- {
- "font_class": "flag-filled",
- "unicode": ""
- },
- {
- "font_class": "folder-add",
- "unicode": ""
- },
- {
- "font_class": "folder-add-filled",
- "unicode": ""
- },
- {
- "font_class": "font",
- "unicode": ""
- },
- {
- "font_class": "forward",
- "unicode": ""
- },
- {
- "font_class": "gear",
- "unicode": ""
- },
- {
- "font_class": "gear-filled",
- "unicode": ""
- },
- {
- "font_class": "gift",
- "unicode": ""
- },
- {
- "font_class": "gift-filled",
- "unicode": ""
- },
- {
- "font_class": "hand-down",
- "unicode": ""
- },
- {
- "font_class": "hand-down-filled",
- "unicode": ""
- },
- {
- "font_class": "hand-up",
- "unicode": ""
- },
- {
- "font_class": "hand-up-filled",
- "unicode": ""
- },
- {
- "font_class": "headphones",
- "unicode": ""
- },
- {
- "font_class": "heart",
- "unicode": ""
- },
- {
- "font_class": "heart-filled",
- "unicode": ""
- },
- {
- "font_class": "help",
- "unicode": ""
- },
- {
- "font_class": "help-filled",
- "unicode": ""
- },
- {
- "font_class": "home",
- "unicode": ""
- },
- {
- "font_class": "home-filled",
- "unicode": ""
- },
- {
- "font_class": "image",
- "unicode": ""
- },
- {
- "font_class": "image-filled",
- "unicode": ""
- },
- {
- "font_class": "images",
- "unicode": ""
- },
- {
- "font_class": "images-filled",
- "unicode": ""
- },
- {
- "font_class": "info",
- "unicode": ""
- },
- {
- "font_class": "info-filled",
- "unicode": ""
- },
- {
- "font_class": "left",
- "unicode": ""
- },
- {
- "font_class": "link",
- "unicode": ""
- },
- {
- "font_class": "list",
- "unicode": ""
- },
- {
- "font_class": "location",
- "unicode": ""
- },
- {
- "font_class": "location-filled",
- "unicode": ""
- },
- {
- "font_class": "locked",
- "unicode": ""
- },
- {
- "font_class": "locked-filled",
- "unicode": ""
- },
- {
- "font_class": "loop",
- "unicode": ""
- },
- {
- "font_class": "mail-open",
- "unicode": ""
- },
- {
- "font_class": "mail-open-filled",
- "unicode": ""
- },
- {
- "font_class": "map",
- "unicode": ""
- },
- {
- "font_class": "map-filled",
- "unicode": ""
- },
- {
- "font_class": "map-pin",
- "unicode": ""
- },
- {
- "font_class": "map-pin-ellipse",
- "unicode": ""
- },
- {
- "font_class": "medal",
- "unicode": ""
- },
- {
- "font_class": "medal-filled",
- "unicode": ""
- },
- {
- "font_class": "mic",
- "unicode": ""
- },
- {
- "font_class": "mic-filled",
- "unicode": ""
- },
- {
- "font_class": "micoff",
- "unicode": ""
- },
- {
- "font_class": "micoff-filled",
- "unicode": ""
- },
- {
- "font_class": "minus",
- "unicode": ""
- },
- {
- "font_class": "minus-filled",
- "unicode": ""
- },
- {
- "font_class": "more",
- "unicode": ""
- },
- {
- "font_class": "more-filled",
- "unicode": ""
- },
- {
- "font_class": "navigate",
- "unicode": ""
- },
- {
- "font_class": "navigate-filled",
- "unicode": ""
- },
- {
- "font_class": "notification",
- "unicode": ""
- },
- {
- "font_class": "notification-filled",
- "unicode": ""
- },
- {
- "font_class": "paperclip",
- "unicode": ""
- },
- {
- "font_class": "paperplane",
- "unicode": ""
- },
- {
- "font_class": "paperplane-filled",
- "unicode": ""
- },
- {
- "font_class": "person",
- "unicode": ""
- },
- {
- "font_class": "person-filled",
- "unicode": ""
- },
- {
- "font_class": "personadd",
- "unicode": ""
- },
- {
- "font_class": "personadd-filled",
- "unicode": ""
- },
- {
- "font_class": "personadd-filled-copy",
- "unicode": ""
- },
- {
- "font_class": "phone",
- "unicode": ""
- },
- {
- "font_class": "phone-filled",
- "unicode": ""
- },
- {
- "font_class": "plus",
- "unicode": ""
- },
- {
- "font_class": "plus-filled",
- "unicode": ""
- },
- {
- "font_class": "plusempty",
- "unicode": ""
- },
- {
- "font_class": "pulldown",
- "unicode": ""
- },
- {
- "font_class": "pyq",
- "unicode": ""
- },
- {
- "font_class": "qq",
- "unicode": ""
- },
- {
- "font_class": "redo",
- "unicode": ""
- },
- {
- "font_class": "redo-filled",
- "unicode": ""
- },
- {
- "font_class": "refresh",
- "unicode": ""
- },
- {
- "font_class": "refresh-filled",
- "unicode": ""
- },
- {
- "font_class": "refreshempty",
- "unicode": ""
- },
- {
- "font_class": "reload",
- "unicode": ""
- },
- {
- "font_class": "right",
- "unicode": ""
- },
- {
- "font_class": "scan",
- "unicode": ""
- },
- {
- "font_class": "search",
- "unicode": ""
- },
- {
- "font_class": "settings",
- "unicode": ""
- },
- {
- "font_class": "settings-filled",
- "unicode": ""
- },
- {
- "font_class": "shop",
- "unicode": ""
- },
- {
- "font_class": "shop-filled",
- "unicode": ""
- },
- {
- "font_class": "smallcircle",
- "unicode": ""
- },
- {
- "font_class": "smallcircle-filled",
- "unicode": ""
- },
- {
- "font_class": "sound",
- "unicode": ""
- },
- {
- "font_class": "sound-filled",
- "unicode": ""
- },
- {
- "font_class": "spinner-cycle",
- "unicode": ""
- },
- {
- "font_class": "staff",
- "unicode": ""
- },
- {
- "font_class": "staff-filled",
- "unicode": ""
- },
- {
- "font_class": "star",
- "unicode": ""
- },
- {
- "font_class": "star-filled",
- "unicode": ""
- },
- {
- "font_class": "starhalf",
- "unicode": ""
- },
- {
- "font_class": "trash",
- "unicode": ""
- },
- {
- "font_class": "trash-filled",
- "unicode": ""
- },
- {
- "font_class": "tune",
- "unicode": ""
- },
- {
- "font_class": "tune-filled",
- "unicode": ""
- },
- {
- "font_class": "undo",
- "unicode": ""
- },
- {
- "font_class": "undo-filled",
- "unicode": ""
- },
- {
- "font_class": "up",
- "unicode": ""
- },
- {
- "font_class": "top",
- "unicode": ""
- },
- {
- "font_class": "upload",
- "unicode": ""
- },
- {
- "font_class": "upload-filled",
- "unicode": ""
- },
- {
- "font_class": "videocam",
- "unicode": ""
- },
- {
- "font_class": "videocam-filled",
- "unicode": ""
- },
- {
- "font_class": "vip",
- "unicode": ""
- },
- {
- "font_class": "vip-filled",
- "unicode": ""
- },
- {
- "font_class": "wallet",
- "unicode": ""
- },
- {
- "font_class": "wallet-filled",
- "unicode": ""
- },
- {
- "font_class": "weibo",
- "unicode": ""
- },
- {
- "font_class": "weixin",
- "unicode": ""
- }
- ];
- const getVal = (val) => {
- const reg = /^[0-9]*$/g;
- return typeof val === "number" || reg.test(val) ? val + "px" : val;
- };
- const _sfc_main$e = {
- name: "UniIcons",
- emits: ["click"],
- props: {
- type: {
- type: String,
- default: ""
- },
- color: {
- type: String,
- default: "#333333"
- },
- size: {
- type: [Number, String],
- default: 16
- },
- customPrefix: {
- type: String,
- default: ""
- },
- fontFamily: {
- type: String,
- default: ""
- }
- },
- data() {
- return {
- icons: fontData
- };
- },
- computed: {
- unicode() {
- let code = this.icons.find((v2) => v2.font_class === this.type);
- if (code) {
- return code.unicode;
- }
- return "";
- },
- iconSize() {
- return getVal(this.size);
- },
- styleObj() {
- if (this.fontFamily !== "") {
- return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`;
- }
- return `color: ${this.color}; font-size: ${this.iconSize};`;
- }
- },
- methods: {
- _onClick() {
- this.$emit("click");
- }
- }
- };
- function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "text",
- {
- style: vue.normalizeStyle($options.styleObj),
- class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
- onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-d31e1c47"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
- const _sfc_main$d = {
- name: "uni-data-select",
- mixins: [nr.mixinDatacom || {}],
- props: {
- localdata: {
- type: Array,
- default() {
- return [];
- }
- },
- value: {
- type: [String, Number],
- default: ""
- },
- modelValue: {
- type: [String, Number],
- default: ""
- },
- label: {
- type: String,
- default: ""
- },
- placeholder: {
- type: String,
- default: "请选择"
- },
- emptyTips: {
- type: String,
- default: "无选项"
- },
- clear: {
- type: Boolean,
- default: true
- },
- defItem: {
- type: Number,
- default: 0
- },
- disabled: {
- type: Boolean,
- default: false
- },
- // 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
- format: {
- type: String,
- default: ""
- },
- placement: {
- type: String,
- default: "bottom"
- }
- },
- data() {
- return {
- showSelector: false,
- current: "",
- mixinDatacomResData: [],
- apps: [],
- channels: [],
- cacheKey: "uni-data-select-lastSelectedValue"
- };
- },
- created() {
- this.debounceGet = this.debounce(() => {
- this.query();
- }, 300);
- if (this.collection && !this.localdata.length) {
- this.debounceGet();
- }
- },
- computed: {
- typePlaceholder() {
- const text = {
- "opendb-stat-app-versions": "版本",
- "opendb-app-channels": "渠道",
- "opendb-app-list": "应用"
- };
- const common = this.placeholder;
- const placeholder = text[this.collection];
- return placeholder ? common + placeholder : common;
- },
- valueCom() {
- return this.modelValue;
- },
- textShow() {
- let text = this.current;
- if (text.length > 10) {
- return text.slice(0, 25) + "...";
- }
- return text;
- },
- getOffsetByPlacement() {
- switch (this.placement) {
- case "top":
- return "bottom:calc(100% + 12px);";
- case "bottom":
- return "top:calc(100% + 12px);";
- }
- }
- },
- watch: {
- localdata: {
- immediate: true,
- handler(val, old) {
- if (Array.isArray(val) && old !== val) {
- this.mixinDatacomResData = val;
- }
- }
- },
- valueCom(val, old) {
- this.initDefVal();
- },
- mixinDatacomResData: {
- immediate: true,
- handler(val) {
- if (val.length) {
- this.initDefVal();
- }
- }
- }
- },
- methods: {
- debounce(fn, time = 100) {
- let timer = null;
- return function(...args) {
- if (timer)
- clearTimeout(timer);
- timer = setTimeout(() => {
- fn.apply(this, args);
- }, time);
- };
- },
- // 执行数据库查询
- query() {
- this.mixinDatacomEasyGet();
- },
- // 监听查询条件变更事件
- onMixinDatacomPropsChange() {
- if (this.collection) {
- this.debounceGet();
- }
- },
- initDefVal() {
- let defValue = "";
- if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
- defValue = this.valueCom;
- } else {
- let strogeValue;
- if (this.collection) {
- strogeValue = this.getCache();
- }
- if (strogeValue || strogeValue === 0) {
- defValue = strogeValue;
- } else {
- let defItem = "";
- if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
- defItem = this.mixinDatacomResData[this.defItem - 1].value;
- }
- defValue = defItem;
- }
- if (defValue || defValue === 0) {
- this.emit(defValue);
- }
- }
- const def = this.mixinDatacomResData.find((item) => item.value === defValue);
- this.current = def ? this.formatItemName(def) : "";
- },
- /**
- * @param {[String, Number]} value
- * 判断用户给的 value 是否同时为禁用状态
- */
- isDisabled(value) {
- let isDisabled = false;
- this.mixinDatacomResData.forEach((item) => {
- if (item.value === value) {
- isDisabled = item.disable;
- }
- });
- return isDisabled;
- },
- clearVal() {
- this.emit("");
- if (this.collection) {
- this.removeCache();
- }
- },
- change(item) {
- if (!item.disable) {
- this.showSelector = false;
- this.current = this.formatItemName(item);
- this.emit(item.value);
- }
- },
- emit(val) {
- this.$emit("input", val);
- this.$emit("update:modelValue", val);
- this.$emit("change", val);
- if (this.collection) {
- this.setCache(val);
- }
- },
- toggleSelector() {
- if (this.disabled) {
- return;
- }
- this.showSelector = !this.showSelector;
- },
- formatItemName(item) {
- let {
- text,
- value,
- channel_code
- } = item;
- channel_code = channel_code ? `(${channel_code})` : "";
- if (this.format) {
- let str = "";
- str = this.format;
- for (let key in item) {
- str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);
- }
- return str;
- } else {
- return this.collection.indexOf("app-list") > 0 ? `${text}(${value})` : text ? text : `未命名${channel_code}`;
- }
- },
- // 获取当前加载的数据
- getLoadData() {
- return this.mixinDatacomResData;
- },
- // 获取当前缓存key
- getCurrentCacheKey() {
- return this.collection;
- },
- // 获取缓存
- getCache(name = this.getCurrentCacheKey()) {
- let cacheData = uni.getStorageSync(this.cacheKey) || {};
- return cacheData[name];
- },
- // 设置缓存
- setCache(value, name = this.getCurrentCacheKey()) {
- let cacheData = uni.getStorageSync(this.cacheKey) || {};
- cacheData[name] = value;
- uni.setStorageSync(this.cacheKey, cacheData);
- },
- // 删除缓存
- removeCache(name = this.getCurrentCacheKey()) {
- let cacheData = uni.getStorageSync(this.cacheKey) || {};
- delete cacheData[name];
- uni.setStorageSync(this.cacheKey, cacheData);
- }
- }
- };
- function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$2);
- return vue.openBlock(), vue.createElementBlock("view", { class: "uni-stat__select" }, [
- $props.label ? (vue.openBlock(), vue.createElementBlock(
- "span",
- {
- key: 0,
- class: "uni-label-text hide-on-phone"
- },
- vue.toDisplayString($props.label + ":"),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["uni-stat-box", { "uni-stat__actived": $data.current }])
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["uni-select", { "uni-select--disabled": $props.disabled }])
- },
- [
- vue.createElementVNode("view", {
- class: "uni-select__input-box",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.toggleSelector && $options.toggleSelector(...args))
- }, [
- $data.current ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "uni-select__input-text"
- },
- vue.toDisplayString($options.textShow),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "uni-select__input-text uni-select__input-placeholder"
- },
- vue.toDisplayString($options.typePlaceholder),
- 1
- /* TEXT */
- )),
- $data.current && $props.clear && !$props.disabled ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clearVal && $options.clearVal(...args), ["stop"]))
- }, [
- vue.createVNode(_component_uni_icons, {
- type: "clear",
- color: "#c0c4cc",
- size: "24"
- })
- ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 3 }, [
- vue.createVNode(_component_uni_icons, {
- type: $data.showSelector ? "top" : "bottom",
- size: "20",
- color: "#999"
- }, null, 8, ["type"])
- ]))
- ]),
- $data.showSelector ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "uni-select--mask",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.toggleSelector && $options.toggleSelector(...args))
- })) : vue.createCommentVNode("v-if", true),
- $data.showSelector ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "uni-select__selector",
- style: vue.normalizeStyle($options.getOffsetByPlacement)
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($props.placement == "bottom" ? "uni-popper__arrow_bottom" : "uni-popper__arrow_top")
- },
- null,
- 2
- /* CLASS */
- ),
- vue.createElementVNode("scroll-view", {
- "scroll-y": "true",
- class: "uni-select__selector-scroll"
- }, [
- $data.mixinDatacomResData.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "uni-select__selector-empty"
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($props.emptyTips),
- 1
- /* TEXT */
- )
- ])) : (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- vue.renderList($data.mixinDatacomResData, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "uni-select__selector-item",
- key: index,
- onClick: ($event) => $options.change(item)
- }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass($options.textShow == item.text ? "uni-select__selector__disabled" : "uni-select__selector__disabled1")
- },
- vue.toDisplayString($options.formatItemName(item)),
- 3
- /* TEXT, CLASS */
- )
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- )
- ],
- 2
- /* CLASS */
- )
- ]);
- }
- const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-ddf9e0a2"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue"]]);
- const control = async (data) => {
- try {
- const response2 = await uni.$http.post(`/api/v1/items/rt/${data.id}`, data, { "Content-Type": "application/json;charset=utf-8", "Authorization": `JWT ${uni.getStorageSync("token")}` });
- formatAppLog("log", "at api/api.js:5", response2);
- if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
- uni.removeStorageSync("token");
- login();
- return response2.data;
- }
- return response2.data;
- } catch (error) {
- formatAppLog("log", "at api/api.js:18", error);
- login();
- return response.data;
- }
- };
- const getuidatas = async (data) => {
- try {
- const response2 = await uni.$http.get("/api/v1/uidatas/rt/uis/3224a3eb-2375-4dfc-99ce-b182edd30996", data, { "Content-Type": "application/json;charset=utf-8", "Authorization": `JWT ${uni.getStorageSync("token")}` });
- formatAppLog("log", "at api/api.js:32", response2);
- if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
- uni.removeStorageSync("token");
- login();
- return response2.data;
- }
- return response2.data;
- } catch (error) {
- formatAppLog("log", "at api/api.js:48", error);
- login();
- return response.data;
- }
- };
- const getfaultsList = async (data) => {
- try {
- const response2 = await uni.$http.get("/api/v1/faults", data, { "Content-Type": "application/json;charset=utf-8", "Authorization": `JWT ${uni.getStorageSync("token")}` });
- formatAppLog("log", "at api/api.js:63", response2.data);
- if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
- uni.removeStorageSync("token");
- login();
- return response2.data;
- }
- return response2.data;
- } catch (error) {
- formatAppLog("error", "at api/api.js:76", "Network request failed:", error);
- formatAppLog("log", "at api/api.js:77", error);
- uni.removeStorageSync("token");
- login();
- return response.data;
- }
- };
- const login = async (start, count) => {
- try {
- formatAppLog("log", "at api/api.js:91", "login request");
- const response2 = await uni.$http.post(
- "/api/v1/login",
- { name: "dexnui", pwd: "dexn1001" },
- { "Content-Type": "application/json;charset=utf-8" }
- );
- formatAppLog("log", "at api/api.js:94", response2);
- if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
- return response2.data;
- }
- formatAppLog("log", "at api/api.js:103", response2.data);
- uni.setStorageSync("token", response2.data.data.token);
- return response2.data;
- } catch (error) {
- return response.data;
- }
- };
- const getTime = (format2 = "yyyy/MM/dd hh:mm:ss") => {
- const date = /* @__PURE__ */ new Date();
- const year = date.getFullYear();
- const month = ("0" + (date.getMonth() + 1)).slice(-2);
- const day = ("0" + date.getDate()).slice(-2);
- const hours = ("0" + date.getHours()).slice(-2);
- const minutes = ("0" + date.getMinutes()).slice(-2);
- const seconds = ("0" + date.getSeconds()).slice(-2);
- return format2.replace("yyyy", year).replace("MM", month).replace("dd", day).replace("hh", hours).replace("mm", minutes).replace("ss", seconds);
- };
- function getDevtoolsGlobalHook() {
- return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
- }
- function getTarget() {
- return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
- }
- const isProxyAvailable = typeof Proxy === "function";
- const HOOK_SETUP = "devtools-plugin:setup";
- const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
- class ApiProxy {
- constructor(plugin, hook) {
- this.target = null;
- this.targetQueue = [];
- this.onQueue = [];
- this.plugin = plugin;
- this.hook = hook;
- const defaultSettings = {};
- if (plugin.settings) {
- for (const id in plugin.settings) {
- const item = plugin.settings[id];
- defaultSettings[id] = item.defaultValue;
- }
- }
- const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
- let currentSettings = { ...defaultSettings };
- try {
- const raw = localStorage.getItem(localSettingsSaveId);
- const data = JSON.parse(raw);
- Object.assign(currentSettings, data);
- } catch (e2) {
- }
- this.fallbacks = {
- getSettings() {
- return currentSettings;
- },
- setSettings(value) {
- try {
- localStorage.setItem(localSettingsSaveId, JSON.stringify(value));
- } catch (e2) {
- }
- currentSettings = value;
- }
- };
- hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {
- if (pluginId === this.plugin.id) {
- this.fallbacks.setSettings(value);
- }
- });
- this.proxiedOn = new Proxy({}, {
- get: (_target, prop) => {
- if (this.target) {
- return this.target.on[prop];
- } else {
- return (...args) => {
- this.onQueue.push({
- method: prop,
- args
- });
- };
- }
- }
- });
- this.proxiedTarget = new Proxy({}, {
- get: (_target, prop) => {
- if (this.target) {
- return this.target[prop];
- } else if (prop === "on") {
- return this.proxiedOn;
- } else if (Object.keys(this.fallbacks).includes(prop)) {
- return (...args) => {
- this.targetQueue.push({
- method: prop,
- args,
- resolve: () => {
- }
- });
- return this.fallbacks[prop](...args);
- };
- } else {
- return (...args) => {
- return new Promise((resolve) => {
- this.targetQueue.push({
- method: prop,
- args,
- resolve
- });
- });
- };
- }
- }
- });
- }
- async setRealTarget(target) {
- this.target = target;
- for (const item of this.onQueue) {
- this.target.on[item.method](...item.args);
- }
- for (const item of this.targetQueue) {
- item.resolve(await this.target[item.method](...item.args));
- }
- }
- }
- function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
- const target = getTarget();
- const hook = getDevtoolsGlobalHook();
- const enableProxy = isProxyAvailable && pluginDescriptor.enableEarlyProxy;
- if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
- hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
- } else {
- const proxy = enableProxy ? new ApiProxy(pluginDescriptor, hook) : null;
- const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
- list.push({
- pluginDescriptor,
- setupFn,
- proxy
- });
- if (proxy)
- setupFn(proxy.proxiedTarget);
- }
- }
- /*!
- * vuex v4.1.0
- * (c) 2022 Evan You
- * @license MIT
- */
- var storeKey = "store";
- function forEachValue(obj, fn) {
- Object.keys(obj).forEach(function(key) {
- return fn(obj[key], key);
- });
- }
- function isObject$3(obj) {
- return obj !== null && typeof obj === "object";
- }
- function isPromise(val) {
- return val && typeof val.then === "function";
- }
- function assert(condition, msg) {
- if (!condition) {
- throw new Error("[vuex] " + msg);
- }
- }
- function partial(fn, arg) {
- return function() {
- return fn(arg);
- };
- }
- function genericSubscribe(fn, subs, options) {
- if (subs.indexOf(fn) < 0) {
- options && options.prepend ? subs.unshift(fn) : subs.push(fn);
- }
- return function() {
- var i2 = subs.indexOf(fn);
- if (i2 > -1) {
- subs.splice(i2, 1);
- }
- };
- }
- function resetStore(store, hot) {
- store._actions = /* @__PURE__ */ Object.create(null);
- store._mutations = /* @__PURE__ */ Object.create(null);
- store._wrappedGetters = /* @__PURE__ */ Object.create(null);
- store._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
- var state2 = store.state;
- installModule(store, state2, [], store._modules.root, true);
- resetStoreState(store, state2, hot);
- }
- function resetStoreState(store, state2, hot) {
- var oldState = store._state;
- var oldScope = store._scope;
- store.getters = {};
- store._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
- var wrappedGetters = store._wrappedGetters;
- var computedObj = {};
- var computedCache = {};
- var scope = vue.effectScope(true);
- scope.run(function() {
- forEachValue(wrappedGetters, function(fn, key) {
- computedObj[key] = partial(fn, store);
- computedCache[key] = vue.computed(function() {
- return computedObj[key]();
- });
- Object.defineProperty(store.getters, key, {
- get: function() {
- return computedCache[key].value;
- },
- enumerable: true
- // for local getters
- });
- });
- });
- store._state = vue.reactive({
- data: state2
- });
- store._scope = scope;
- if (store.strict) {
- enableStrictMode(store);
- }
- if (oldState) {
- if (hot) {
- store._withCommit(function() {
- oldState.data = null;
- });
- }
- }
- if (oldScope) {
- oldScope.stop();
- }
- }
- function installModule(store, rootState, path, module, hot) {
- var isRoot = !path.length;
- var namespace = store._modules.getNamespace(path);
- if (module.namespaced) {
- if (store._modulesNamespaceMap[namespace] && true) {
- console.error("[vuex] duplicate namespace " + namespace + " for the namespaced module " + path.join("/"));
- }
- store._modulesNamespaceMap[namespace] = module;
- }
- if (!isRoot && !hot) {
- var parentState = getNestedState(rootState, path.slice(0, -1));
- var moduleName = path[path.length - 1];
- store._withCommit(function() {
- {
- if (moduleName in parentState) {
- console.warn(
- '[vuex] state field "' + moduleName + '" was overridden by a module with the same name at "' + path.join(".") + '"'
- );
- }
- }
- parentState[moduleName] = module.state;
- });
- }
- var local = module.context = makeLocalContext(store, namespace, path);
- module.forEachMutation(function(mutation, key) {
- var namespacedType = namespace + key;
- registerMutation(store, namespacedType, mutation, local);
- });
- module.forEachAction(function(action, key) {
- var type = action.root ? key : namespace + key;
- var handler = action.handler || action;
- registerAction(store, type, handler, local);
- });
- module.forEachGetter(function(getter, key) {
- var namespacedType = namespace + key;
- registerGetter(store, namespacedType, getter, local);
- });
- module.forEachChild(function(child, key) {
- installModule(store, rootState, path.concat(key), child, hot);
- });
- }
- function makeLocalContext(store, namespace, path) {
- var noNamespace = namespace === "";
- var local = {
- dispatch: noNamespace ? store.dispatch : function(_type, _payload, _options) {
- var args = unifyObjectStyle(_type, _payload, _options);
- var payload = args.payload;
- var options = args.options;
- var type = args.type;
- if (!options || !options.root) {
- type = namespace + type;
- if (!store._actions[type]) {
- console.error("[vuex] unknown local action type: " + args.type + ", global type: " + type);
- return;
- }
- }
- return store.dispatch(type, payload);
- },
- commit: noNamespace ? store.commit : function(_type, _payload, _options) {
- var args = unifyObjectStyle(_type, _payload, _options);
- var payload = args.payload;
- var options = args.options;
- var type = args.type;
- if (!options || !options.root) {
- type = namespace + type;
- if (!store._mutations[type]) {
- console.error("[vuex] unknown local mutation type: " + args.type + ", global type: " + type);
- return;
- }
- }
- store.commit(type, payload, options);
- }
- };
- Object.defineProperties(local, {
- getters: {
- get: noNamespace ? function() {
- return store.getters;
- } : function() {
- return makeLocalGetters(store, namespace);
- }
- },
- state: {
- get: function() {
- return getNestedState(store.state, path);
- }
- }
- });
- return local;
- }
- function makeLocalGetters(store, namespace) {
- if (!store._makeLocalGettersCache[namespace]) {
- var gettersProxy = {};
- var splitPos = namespace.length;
- Object.keys(store.getters).forEach(function(type) {
- if (type.slice(0, splitPos) !== namespace) {
- return;
- }
- var localType = type.slice(splitPos);
- Object.defineProperty(gettersProxy, localType, {
- get: function() {
- return store.getters[type];
- },
- enumerable: true
- });
- });
- store._makeLocalGettersCache[namespace] = gettersProxy;
- }
- return store._makeLocalGettersCache[namespace];
- }
- function registerMutation(store, type, handler, local) {
- var entry = store._mutations[type] || (store._mutations[type] = []);
- entry.push(function wrappedMutationHandler(payload) {
- handler.call(store, local.state, payload);
- });
- }
- function registerAction(store, type, handler, local) {
- var entry = store._actions[type] || (store._actions[type] = []);
- entry.push(function wrappedActionHandler(payload) {
- var res = handler.call(store, {
- dispatch: local.dispatch,
- commit: local.commit,
- getters: local.getters,
- state: local.state,
- rootGetters: store.getters,
- rootState: store.state
- }, payload);
- if (!isPromise(res)) {
- res = Promise.resolve(res);
- }
- if (store._devtoolHook) {
- return res.catch(function(err) {
- store._devtoolHook.emit("vuex:error", err);
- throw err;
- });
- } else {
- return res;
- }
- });
- }
- function registerGetter(store, type, rawGetter, local) {
- if (store._wrappedGetters[type]) {
- {
- console.error("[vuex] duplicate getter key: " + type);
- }
- return;
- }
- store._wrappedGetters[type] = function wrappedGetter(store2) {
- return rawGetter(
- local.state,
- // local state
- local.getters,
- // local getters
- store2.state,
- // root state
- store2.getters
- // root getters
- );
- };
- }
- function enableStrictMode(store) {
- vue.watch(function() {
- return store._state.data;
- }, function() {
- {
- assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
- }
- }, { deep: true, flush: "sync" });
- }
- function getNestedState(state2, path) {
- return path.reduce(function(state22, key) {
- return state22[key];
- }, state2);
- }
- function unifyObjectStyle(type, payload, options) {
- if (isObject$3(type) && type.type) {
- options = payload;
- payload = type;
- type = type.type;
- }
- {
- assert(typeof type === "string", "expects string as the type, but found " + typeof type + ".");
- }
- return { type, payload, options };
- }
- var LABEL_VUEX_BINDINGS = "vuex bindings";
- var MUTATIONS_LAYER_ID = "vuex:mutations";
- var ACTIONS_LAYER_ID = "vuex:actions";
- var INSPECTOR_ID = "vuex";
- var actionId = 0;
- function addDevtools(app, store) {
- setupDevtoolsPlugin(
- {
- id: "org.vuejs.vuex",
- app,
- label: "Vuex",
- homepage: "https://next.vuex.vuejs.org/",
- logo: "https://vuejs.org/images/icons/favicon-96x96.png",
- packageName: "vuex",
- componentStateTypes: [LABEL_VUEX_BINDINGS]
- },
- function(api) {
- api.addTimelineLayer({
- id: MUTATIONS_LAYER_ID,
- label: "Vuex Mutations",
- color: COLOR_LIME_500
- });
- api.addTimelineLayer({
- id: ACTIONS_LAYER_ID,
- label: "Vuex Actions",
- color: COLOR_LIME_500
- });
- api.addInspector({
- id: INSPECTOR_ID,
- label: "Vuex",
- icon: "storage",
- treeFilterPlaceholder: "Filter stores..."
- });
- api.on.getInspectorTree(function(payload) {
- if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
- if (payload.filter) {
- var nodes = [];
- flattenStoreForInspectorTree(nodes, store._modules.root, payload.filter, "");
- payload.rootNodes = nodes;
- } else {
- payload.rootNodes = [
- formatStoreForInspectorTree(store._modules.root, "")
- ];
- }
- }
- });
- api.on.getInspectorState(function(payload) {
- if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
- var modulePath = payload.nodeId;
- makeLocalGetters(store, modulePath);
- payload.state = formatStoreForInspectorState(
- getStoreModule(store._modules, modulePath),
- modulePath === "root" ? store.getters : store._makeLocalGettersCache,
- modulePath
- );
- }
- });
- api.on.editInspectorState(function(payload) {
- if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
- var modulePath = payload.nodeId;
- var path = payload.path;
- if (modulePath !== "root") {
- path = modulePath.split("/").filter(Boolean).concat(path);
- }
- store._withCommit(function() {
- payload.set(store._state.data, path, payload.state.value);
- });
- }
- });
- store.subscribe(function(mutation, state2) {
- var data = {};
- if (mutation.payload) {
- data.payload = mutation.payload;
- }
- data.state = state2;
- api.notifyComponentUpdate();
- api.sendInspectorTree(INSPECTOR_ID);
- api.sendInspectorState(INSPECTOR_ID);
- api.addTimelineEvent({
- layerId: MUTATIONS_LAYER_ID,
- event: {
- time: Date.now(),
- title: mutation.type,
- data
- }
- });
- });
- store.subscribeAction({
- before: function(action, state2) {
- var data = {};
- if (action.payload) {
- data.payload = action.payload;
- }
- action._id = actionId++;
- action._time = Date.now();
- data.state = state2;
- api.addTimelineEvent({
- layerId: ACTIONS_LAYER_ID,
- event: {
- time: action._time,
- title: action.type,
- groupId: action._id,
- subtitle: "start",
- data
- }
- });
- },
- after: function(action, state2) {
- var data = {};
- var duration = Date.now() - action._time;
- data.duration = {
- _custom: {
- type: "duration",
- display: duration + "ms",
- tooltip: "Action duration",
- value: duration
- }
- };
- if (action.payload) {
- data.payload = action.payload;
- }
- data.state = state2;
- api.addTimelineEvent({
- layerId: ACTIONS_LAYER_ID,
- event: {
- time: Date.now(),
- title: action.type,
- groupId: action._id,
- subtitle: "end",
- data
- }
- });
- }
- });
- }
- );
- }
- var COLOR_LIME_500 = 8702998;
- var COLOR_DARK = 6710886;
- var COLOR_WHITE = 16777215;
- var TAG_NAMESPACED = {
- label: "namespaced",
- textColor: COLOR_WHITE,
- backgroundColor: COLOR_DARK
- };
- function extractNameFromPath(path) {
- return path && path !== "root" ? path.split("/").slice(-2, -1)[0] : "Root";
- }
- function formatStoreForInspectorTree(module, path) {
- return {
- id: path || "root",
- // all modules end with a `/`, we want the last segment only
- // cart/ -> cart
- // nested/cart/ -> cart
- label: extractNameFromPath(path),
- tags: module.namespaced ? [TAG_NAMESPACED] : [],
- children: Object.keys(module._children).map(
- function(moduleName) {
- return formatStoreForInspectorTree(
- module._children[moduleName],
- path + moduleName + "/"
- );
- }
- )
- };
- }
- function flattenStoreForInspectorTree(result, module, filter, path) {
- if (path.includes(filter)) {
- result.push({
- id: path || "root",
- label: path.endsWith("/") ? path.slice(0, path.length - 1) : path || "Root",
- tags: module.namespaced ? [TAG_NAMESPACED] : []
- });
- }
- Object.keys(module._children).forEach(function(moduleName) {
- flattenStoreForInspectorTree(result, module._children[moduleName], filter, path + moduleName + "/");
- });
- }
- function formatStoreForInspectorState(module, getters, path) {
- getters = path === "root" ? getters : getters[path];
- var gettersKeys = Object.keys(getters);
- var storeState = {
- state: Object.keys(module.state).map(function(key) {
- return {
- key,
- editable: true,
- value: module.state[key]
- };
- })
- };
- if (gettersKeys.length) {
- var tree = transformPathsToObjectTree(getters);
- storeState.getters = Object.keys(tree).map(function(key) {
- return {
- key: key.endsWith("/") ? extractNameFromPath(key) : key,
- editable: false,
- value: canThrow(function() {
- return tree[key];
- })
- };
- });
- }
- return storeState;
- }
- function transformPathsToObjectTree(getters) {
- var result = {};
- Object.keys(getters).forEach(function(key) {
- var path = key.split("/");
- if (path.length > 1) {
- var target = result;
- var leafKey = path.pop();
- path.forEach(function(p2) {
- if (!target[p2]) {
- target[p2] = {
- _custom: {
- value: {},
- display: p2,
- tooltip: "Module",
- abstract: true
- }
- };
- }
- target = target[p2]._custom.value;
- });
- target[leafKey] = canThrow(function() {
- return getters[key];
- });
- } else {
- result[key] = canThrow(function() {
- return getters[key];
- });
- }
- });
- return result;
- }
- function getStoreModule(moduleMap, path) {
- var names = path.split("/").filter(function(n2) {
- return n2;
- });
- return names.reduce(
- function(module, moduleName, i2) {
- var child = module[moduleName];
- if (!child) {
- throw new Error('Missing module "' + moduleName + '" for path "' + path + '".');
- }
- return i2 === names.length - 1 ? child : child._children;
- },
- path === "root" ? moduleMap : moduleMap.root._children
- );
- }
- function canThrow(cb) {
- try {
- return cb();
- } catch (e2) {
- return e2;
- }
- }
- var Module = function Module2(rawModule, runtime) {
- this.runtime = runtime;
- this._children = /* @__PURE__ */ Object.create(null);
- this._rawModule = rawModule;
- var rawState = rawModule.state;
- this.state = (typeof rawState === "function" ? rawState() : rawState) || {};
- };
- var prototypeAccessors$1 = { namespaced: { configurable: true } };
- prototypeAccessors$1.namespaced.get = function() {
- return !!this._rawModule.namespaced;
- };
- Module.prototype.addChild = function addChild(key, module) {
- this._children[key] = module;
- };
- Module.prototype.removeChild = function removeChild(key) {
- delete this._children[key];
- };
- Module.prototype.getChild = function getChild(key) {
- return this._children[key];
- };
- Module.prototype.hasChild = function hasChild(key) {
- return key in this._children;
- };
- Module.prototype.update = function update(rawModule) {
- this._rawModule.namespaced = rawModule.namespaced;
- if (rawModule.actions) {
- this._rawModule.actions = rawModule.actions;
- }
- if (rawModule.mutations) {
- this._rawModule.mutations = rawModule.mutations;
- }
- if (rawModule.getters) {
- this._rawModule.getters = rawModule.getters;
- }
- };
- Module.prototype.forEachChild = function forEachChild(fn) {
- forEachValue(this._children, fn);
- };
- Module.prototype.forEachGetter = function forEachGetter(fn) {
- if (this._rawModule.getters) {
- forEachValue(this._rawModule.getters, fn);
- }
- };
- Module.prototype.forEachAction = function forEachAction(fn) {
- if (this._rawModule.actions) {
- forEachValue(this._rawModule.actions, fn);
- }
- };
- Module.prototype.forEachMutation = function forEachMutation(fn) {
- if (this._rawModule.mutations) {
- forEachValue(this._rawModule.mutations, fn);
- }
- };
- Object.defineProperties(Module.prototype, prototypeAccessors$1);
- var ModuleCollection = function ModuleCollection2(rawRootModule) {
- this.register([], rawRootModule, false);
- };
- ModuleCollection.prototype.get = function get(path) {
- return path.reduce(function(module, key) {
- return module.getChild(key);
- }, this.root);
- };
- ModuleCollection.prototype.getNamespace = function getNamespace(path) {
- var module = this.root;
- return path.reduce(function(namespace, key) {
- module = module.getChild(key);
- return namespace + (module.namespaced ? key + "/" : "");
- }, "");
- };
- ModuleCollection.prototype.update = function update$1(rawRootModule) {
- update2([], this.root, rawRootModule);
- };
- ModuleCollection.prototype.register = function register(path, rawModule, runtime) {
- var this$1$1 = this;
- if (runtime === void 0)
- runtime = true;
- {
- assertRawModule(path, rawModule);
- }
- var newModule = new Module(rawModule, runtime);
- if (path.length === 0) {
- this.root = newModule;
- } else {
- var parent = this.get(path.slice(0, -1));
- parent.addChild(path[path.length - 1], newModule);
- }
- if (rawModule.modules) {
- forEachValue(rawModule.modules, function(rawChildModule, key) {
- this$1$1.register(path.concat(key), rawChildModule, runtime);
- });
- }
- };
- ModuleCollection.prototype.unregister = function unregister(path) {
- var parent = this.get(path.slice(0, -1));
- var key = path[path.length - 1];
- var child = parent.getChild(key);
- if (!child) {
- {
- console.warn(
- "[vuex] trying to unregister module '" + key + "', which is not registered"
- );
- }
- return;
- }
- if (!child.runtime) {
- return;
- }
- parent.removeChild(key);
- };
- ModuleCollection.prototype.isRegistered = function isRegistered(path) {
- var parent = this.get(path.slice(0, -1));
- var key = path[path.length - 1];
- if (parent) {
- return parent.hasChild(key);
- }
- return false;
- };
- function update2(path, targetModule, newModule) {
- {
- assertRawModule(path, newModule);
- }
- targetModule.update(newModule);
- if (newModule.modules) {
- for (var key in newModule.modules) {
- if (!targetModule.getChild(key)) {
- {
- console.warn(
- "[vuex] trying to add a new module '" + key + "' on hot reloading, manual reload is needed"
- );
- }
- return;
- }
- update2(
- path.concat(key),
- targetModule.getChild(key),
- newModule.modules[key]
- );
- }
- }
- }
- var functionAssert = {
- assert: function(value) {
- return typeof value === "function";
- },
- expected: "function"
- };
- var objectAssert = {
- assert: function(value) {
- return typeof value === "function" || typeof value === "object" && typeof value.handler === "function";
- },
- expected: 'function or object with "handler" function'
- };
- var assertTypes = {
- getters: functionAssert,
- mutations: functionAssert,
- actions: objectAssert
- };
- function assertRawModule(path, rawModule) {
- Object.keys(assertTypes).forEach(function(key) {
- if (!rawModule[key]) {
- return;
- }
- var assertOptions = assertTypes[key];
- forEachValue(rawModule[key], function(value, type) {
- assert(
- assertOptions.assert(value),
- makeAssertionMessage(path, key, type, value, assertOptions.expected)
- );
- });
- });
- }
- function makeAssertionMessage(path, key, type, value, expected) {
- var buf = key + " should be " + expected + ' but "' + key + "." + type + '"';
- if (path.length > 0) {
- buf += ' in module "' + path.join(".") + '"';
- }
- buf += " is " + JSON.stringify(value) + ".";
- return buf;
- }
- function createStore(options) {
- return new Store$1(options);
- }
- var Store$1 = function Store2(options) {
- var this$1$1 = this;
- if (options === void 0)
- options = {};
- {
- assert(typeof Promise !== "undefined", "vuex requires a Promise polyfill in this browser.");
- assert(this instanceof Store2, "store must be called with the new operator.");
- }
- var plugins = options.plugins;
- if (plugins === void 0)
- plugins = [];
- var strict = options.strict;
- if (strict === void 0)
- strict = false;
- var devtools2 = options.devtools;
- this._committing = false;
- this._actions = /* @__PURE__ */ Object.create(null);
- this._actionSubscribers = [];
- this._mutations = /* @__PURE__ */ Object.create(null);
- this._wrappedGetters = /* @__PURE__ */ Object.create(null);
- this._modules = new ModuleCollection(options);
- this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
- this._subscribers = [];
- this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
- this._scope = null;
- this._devtools = devtools2;
- var store = this;
- var ref = this;
- var dispatch2 = ref.dispatch;
- var commit2 = ref.commit;
- this.dispatch = function boundDispatch(type, payload) {
- return dispatch2.call(store, type, payload);
- };
- this.commit = function boundCommit(type, payload, options2) {
- return commit2.call(store, type, payload, options2);
- };
- this.strict = strict;
- var state2 = this._modules.root.state;
- installModule(this, state2, [], this._modules.root);
- resetStoreState(this, state2);
- plugins.forEach(function(plugin) {
- return plugin(this$1$1);
- });
- };
- var prototypeAccessors = { state: { configurable: true } };
- Store$1.prototype.install = function install(app, injectKey) {
- app.provide(injectKey || storeKey, this);
- app.config.globalProperties.$store = this;
- var useDevtools = this._devtools !== void 0 ? this._devtools : true;
- if (useDevtools) {
- addDevtools(app, this);
- }
- };
- prototypeAccessors.state.get = function() {
- return this._state.data;
- };
- prototypeAccessors.state.set = function(v2) {
- {
- assert(false, "use store.replaceState() to explicit replace store state.");
- }
- };
- Store$1.prototype.commit = function commit(_type, _payload, _options) {
- var this$1$1 = this;
- var ref = unifyObjectStyle(_type, _payload, _options);
- var type = ref.type;
- var payload = ref.payload;
- var options = ref.options;
- var mutation = { type, payload };
- var entry = this._mutations[type];
- if (!entry) {
- {
- console.error("[vuex] unknown mutation type: " + type);
- }
- return;
- }
- this._withCommit(function() {
- entry.forEach(function commitIterator(handler) {
- handler(payload);
- });
- });
- this._subscribers.slice().forEach(function(sub) {
- return sub(mutation, this$1$1.state);
- });
- if (options && options.silent) {
- console.warn(
- "[vuex] mutation type: " + type + ". Silent option has been removed. Use the filter functionality in the vue-devtools"
- );
- }
- };
- Store$1.prototype.dispatch = function dispatch(_type, _payload) {
- var this$1$1 = this;
- var ref = unifyObjectStyle(_type, _payload);
- var type = ref.type;
- var payload = ref.payload;
- var action = { type, payload };
- var entry = this._actions[type];
- if (!entry) {
- {
- console.error("[vuex] unknown action type: " + type);
- }
- return;
- }
- try {
- this._actionSubscribers.slice().filter(function(sub) {
- return sub.before;
- }).forEach(function(sub) {
- return sub.before(action, this$1$1.state);
- });
- } catch (e2) {
- {
- console.warn("[vuex] error in before action subscribers: ");
- console.error(e2);
- }
- }
- var result = entry.length > 1 ? Promise.all(entry.map(function(handler) {
- return handler(payload);
- })) : entry[0](payload);
- return new Promise(function(resolve, reject) {
- result.then(function(res) {
- try {
- this$1$1._actionSubscribers.filter(function(sub) {
- return sub.after;
- }).forEach(function(sub) {
- return sub.after(action, this$1$1.state);
- });
- } catch (e2) {
- {
- console.warn("[vuex] error in after action subscribers: ");
- console.error(e2);
- }
- }
- resolve(res);
- }, function(error) {
- try {
- this$1$1._actionSubscribers.filter(function(sub) {
- return sub.error;
- }).forEach(function(sub) {
- return sub.error(action, this$1$1.state, error);
- });
- } catch (e2) {
- {
- console.warn("[vuex] error in error action subscribers: ");
- console.error(e2);
- }
- }
- reject(error);
- });
- });
- };
- Store$1.prototype.subscribe = function subscribe(fn, options) {
- return genericSubscribe(fn, this._subscribers, options);
- };
- Store$1.prototype.subscribeAction = function subscribeAction(fn, options) {
- var subs = typeof fn === "function" ? { before: fn } : fn;
- return genericSubscribe(subs, this._actionSubscribers, options);
- };
- Store$1.prototype.watch = function watch$1(getter, cb, options) {
- var this$1$1 = this;
- {
- assert(typeof getter === "function", "store.watch only accepts a function.");
- }
- return vue.watch(function() {
- return getter(this$1$1.state, this$1$1.getters);
- }, cb, Object.assign({}, options));
- };
- Store$1.prototype.replaceState = function replaceState(state2) {
- var this$1$1 = this;
- this._withCommit(function() {
- this$1$1._state.data = state2;
- });
- };
- Store$1.prototype.registerModule = function registerModule(path, rawModule, options) {
- if (options === void 0)
- options = {};
- if (typeof path === "string") {
- path = [path];
- }
- {
- assert(Array.isArray(path), "module path must be a string or an Array.");
- assert(path.length > 0, "cannot register the root module by using registerModule.");
- }
- this._modules.register(path, rawModule);
- installModule(this, this.state, path, this._modules.get(path), options.preserveState);
- resetStoreState(this, this.state);
- };
- Store$1.prototype.unregisterModule = function unregisterModule(path) {
- var this$1$1 = this;
- if (typeof path === "string") {
- path = [path];
- }
- {
- assert(Array.isArray(path), "module path must be a string or an Array.");
- }
- this._modules.unregister(path);
- this._withCommit(function() {
- var parentState = getNestedState(this$1$1.state, path.slice(0, -1));
- delete parentState[path[path.length - 1]];
- });
- resetStore(this);
- };
- Store$1.prototype.hasModule = function hasModule(path) {
- if (typeof path === "string") {
- path = [path];
- }
- {
- assert(Array.isArray(path), "module path must be a string or an Array.");
- }
- return this._modules.isRegistered(path);
- };
- Store$1.prototype.hotUpdate = function hotUpdate(newOptions) {
- this._modules.update(newOptions);
- resetStore(this, true);
- };
- Store$1.prototype._withCommit = function _withCommit(fn) {
- var committing = this._committing;
- this._committing = true;
- fn();
- this._committing = committing;
- };
- Object.defineProperties(Store$1.prototype, prototypeAccessors);
- var mapState = normalizeNamespace(function(namespace, states) {
- var res = {};
- if (!isValidMap(states)) {
- console.error("[vuex] mapState: mapper parameter must be either an Array or an Object");
- }
- normalizeMap(states).forEach(function(ref) {
- var key = ref.key;
- var val = ref.val;
- res[key] = function mappedState() {
- var state2 = this.$store.state;
- var getters = this.$store.getters;
- if (namespace) {
- var module = getModuleByNamespace(this.$store, "mapState", namespace);
- if (!module) {
- return;
- }
- state2 = module.context.state;
- getters = module.context.getters;
- }
- return typeof val === "function" ? val.call(this, state2, getters) : state2[val];
- };
- res[key].vuex = true;
- });
- return res;
- });
- function normalizeMap(map) {
- if (!isValidMap(map)) {
- return [];
- }
- return Array.isArray(map) ? map.map(function(key) {
- return { key, val: key };
- }) : Object.keys(map).map(function(key) {
- return { key, val: map[key] };
- });
- }
- function isValidMap(map) {
- return Array.isArray(map) || isObject$3(map);
- }
- function normalizeNamespace(fn) {
- return function(namespace, map) {
- if (typeof namespace !== "string") {
- map = namespace;
- namespace = "";
- } else if (namespace.charAt(namespace.length - 1) !== "/") {
- namespace += "/";
- }
- return fn(namespace, map);
- };
- }
- function getModuleByNamespace(store, helper, namespace) {
- var module = store._modulesNamespaceMap[namespace];
- if (!module) {
- console.error("[vuex] module namespace not found in " + helper + "(): " + namespace);
- }
- return module;
- }
- const _imports_0 = "/static/logo/logo31.png";
- const _imports_1$5 = "/static/img/energy1.png";
- const _imports_2$3 = "/static/img/Energybrightness1.png";
- const _imports_3$4 = "/static/img/energy2.png";
- const _imports_4$2 = "/static/img/Energybrightness2.png";
- const _imports_5$1 = "/static/img/energy3.png";
- const _imports_6$1 = "/static/img/Energybrightness3.png";
- const _imports_7$1 = "/static/img/energy4.png";
- const _imports_8$1 = "/static/img/Energybrightness4.png";
- const _imports_9$1 = "/static/img/setup.png";
- const _imports_10$2 = "/static/!.png";
- const _sfc_main$c = {
- data() {
- return {
- title: "",
- uidatas: "",
- formatTimeid: "",
- messageText: "",
- appVersion: "",
- // 用于存储应用版本号
- appLanguage: "zh-Hans",
- range: [
- { value: "zh-Hans", text: "中文" },
- { value: "en", text: "English" }
- ]
- };
- },
- created() {
- },
- mounted() {
- this.appLanguage = uni.getStorageSync("userLanguage") || "zh-Hans";
- },
- computed: {
- // 使用 mapState 映射多个状态到组件的计算属性
- ...mapState(["formattedTime", "status", "selectorid", "selectorindex"]),
- ...mapState({
- uidatasdata: (state2) => state2.uidatasdata
- })
- },
- onLoad() {
- uni.getSystemInfo({
- success: (res) => {
- formatAppLog("log", "at pages/index/index.vue:239", res);
- this.appVersion = res.appWgtVersion;
- },
- fail: (err) => {
- formatAppLog("error", "at pages/index/index.vue:243", "获取系统信息失败:", err);
- }
- });
- },
- beforeUnmount() {
- clearInterval(this.uidatas);
- },
- methods: {
- changeLanguage(locale) {
- formatAppLog("log", "at pages/index/index.vue:253", locale);
- this.$i18n.locale = locale;
- uni.setStorageSync("userLanguage", locale);
- },
- onclick(e2) {
- this.pattern(e2);
- },
- pattern(unm) {
- let data = {
- id: "c32e6a80-9159-4f6e-9acc-8525cf177808",
- issaveinitvalue: true,
- value: unm + ""
- // 直流供电=1,直流补电=4,交流供电=2,交流补电=3
- };
- control(data).then((data2) => {
- formatAppLog("log", "at pages/index/index.vue:267", data2);
- if (data2.status == "ok") {
- if (unm == 3) {
- uni.redirectTo({
- url: "/pages/home/index"
- });
- } else if (unm == 2) {
- uni.redirectTo({
- url: "/pages/electricity/index"
- });
- } else if (unm == 4) {
- uni.redirectTo({
- url: "/pages/supply/supply"
- });
- } else if (unm == 1) {
- uni.redirectTo({
- url: "/pages/supplyss/supplyss"
- });
- }
- } else {
- this.messageText = "选择模式失败请重新选择";
- this.$refs.message.open();
- return;
- }
- });
- },
- onget(unm) {
- if (unm == 3) {
- uni.redirectTo({
- url: "/pages/home/index"
- });
- } else if (unm == 2) {
- uni.redirectTo({
- url: "/pages/electricity/index"
- });
- } else if (unm == 4) {
- uni.redirectTo({
- url: "/pages/supply/supply"
- });
- } else if (unm == 1) {
- uni.redirectTo({
- url: "/pages/supplyss/supplyss"
- });
- }
- },
- system() {
- uni.redirectTo({
- url: "/pages/faultlist/index"
- });
- }
- }
- };
- function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3);
- const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
- const _component_uni_data_select = resolveEasycom(vue.resolveDynamicComponent("uni-data-select"), __easycom_2);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- class: "top_logo",
- src: _imports_0,
- mode: ""
- }),
- vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
- vue.createElementVNode(
- "view",
- { class: "tite" },
- vue.toDisplayString(_ctx.$t("MainTitle")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time" }, [
- vue.createElementVNode(
- "view",
- { class: "time_top" },
- vue.toDisplayString(_ctx.formattedTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time_bottom" }, [
- vue.createElementVNode("view"),
- vue.createElementVNode("view", { class: "time_bottom1" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.$t("status")) + " ",
- 1
- /* TEXT */
- ),
- _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "time_state"
- },
- vue.toDisplayString(_ctx.$t("online")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "time_state1"
- },
- vue.toDisplayString(_ctx.$t("offline")),
- 1
- /* TEXT */
- ))
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "tap" }, [
- vue.createElementVNode("view", { class: "tap_1" }, " AC "),
- vue.createElementVNode("view", { class: "tap_2" }, " DC "),
- vue.createElementVNode("view", { class: "tap_3" }, " SYS ")
- ]),
- _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "power"
- }, [
- vue.createCommentVNode(' <view class="power_1">\r\n <image v-if="selectorid!=3&&selectorindex==1" src="../../static/choice1.png" mode=""></image>\r\n <image v-else src="../../static/electricity.png" mode="" @click="onclick(3)"></image>\r\n </view>\r\n <view class="power_1">\r\n <image v-if="selectorid!=2&&selectorindex==1" src="../../static/choice2.png" mode=""></image>\r\n <image v-else src="../../static/power1.png" mode="" @click="onclick(2)"></image>\r\n </view>\r\n <view class="power_1">\r\n <image v-if="selectorid!=4&&selectorindex==1" src="../../static/choice3.png" mode=""></image>\r\n <image v-else src="../../static/direct1.png" mode="" @click="onclick(4)"></image>\r\n </view>\r\n <view class="power_1">\r\n <image v-if="selectorid!=1&&selectorindex==1" src="../../static/choice4.png" mode=""></image>\r\n <image v-else src="../../static/DCpower1.png" mode="" @click="onclick(1)"></image>\r\n </view> '),
- _ctx.selectorid != 3 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createElementVNode("view", { class: "power_bj" }, [
- vue.createElementVNode("image", {
- src: _imports_1$5,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title" },
- vue.toDisplayString(_ctx.$t("CommunicationRecharge")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- onClick: _cache[0] || (_cache[0] = ($event) => $options.onclick(3))
- }, [
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createElementVNode("view", { class: "power_bright" }, [
- vue.createElementVNode("image", {
- src: _imports_2$3,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title_bright" },
- vue.toDisplayString(_ctx.$t("CommunicationRecharge")),
- 1
- /* TEXT */
- )
- ])
- ])),
- _ctx.selectorid != 2 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, [
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createElementVNode("view", { class: "power_bj" }, [
- vue.createElementVNode("image", {
- src: _imports_3$4,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title" },
- vue.toDisplayString(_ctx.$t("CommunicationSupply")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- onClick: _cache[1] || (_cache[1] = ($event) => $options.onclick(2))
- }, [
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createElementVNode("view", { class: "power_bright" }, [
- vue.createElementVNode("image", {
- src: _imports_4$2,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title_bright" },
- vue.toDisplayString(_ctx.$t("CommunicationSupply")),
- 1
- /* TEXT */
- )
- ])
- ])),
- _ctx.selectorid != 4 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, [
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createElementVNode("view", { class: "power_bj" }, [
- vue.createElementVNode("image", {
- src: _imports_5$1,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title" },
- vue.toDisplayString(_ctx.$t("DirectRecharge")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- onClick: _cache[2] || (_cache[2] = ($event) => $options.onclick(4))
- }, [
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createElementVNode("view", { class: "power_bright" }, [
- vue.createElementVNode("image", {
- src: _imports_6$1,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title_bright" },
- vue.toDisplayString(_ctx.$t("DirectRecharge")),
- 1
- /* TEXT */
- )
- ])
- ])),
- _ctx.selectorid != 1 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, [
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createElementVNode("view", { class: "power_bj" }, [
- vue.createElementVNode("image", {
- src: _imports_7$1,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title" },
- vue.toDisplayString(_ctx.$t("DirectSupply")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 7,
- onClick: _cache[3] || (_cache[3] = ($event) => $options.onclick(1))
- }, [
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createElementVNode("view", { class: "power_bright" }, [
- vue.createElementVNode("image", {
- src: _imports_8$1,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title_bright" },
- vue.toDisplayString(_ctx.$t("DirectSupply")),
- 1
- /* TEXT */
- )
- ])
- ])),
- vue.createElementVNode("view", {
- class: "power_5",
- onClick: _cache[4] || (_cache[4] = (...args) => $options.system && $options.system(...args))
- }, [
- vue.createElementVNode("view", { class: "power_bj" }, [
- vue.createElementVNode("image", {
- src: _imports_9$1,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title" },
- vue.toDisplayString(_ctx.$t("SystemInformation")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "power"
- }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createCommentVNode(' <view class="power_bj" @click="onget(3)"> '),
- vue.createElementVNode("view", { class: "power_bj" }, [
- vue.createElementVNode("image", {
- src: _imports_1$5,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title" },
- vue.toDisplayString(_ctx.$t("CommunicationRecharge")),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createCommentVNode(' <view class="power_bj" @click="onget(2)"> '),
- vue.createElementVNode("view", { class: "power_bj" }, [
- vue.createElementVNode("image", {
- src: _imports_3$4,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title" },
- vue.toDisplayString(_ctx.$t("CommunicationSupply")),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createCommentVNode(' <view class="power_bj" @click="onget(4)"> '),
- vue.createElementVNode("view", { class: "power_bj" }, [
- vue.createElementVNode("image", {
- src: _imports_5$1,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title" },
- vue.toDisplayString(_ctx.$t("DirectRecharge")),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createCommentVNode(' <view class="power_1" @click="onget(1)"> '),
- vue.createElementVNode("view", { class: "power_1" }, [
- vue.createElementVNode("view", { class: "power_bj" }, [
- vue.createElementVNode("image", {
- src: _imports_7$1,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title" },
- vue.toDisplayString(_ctx.$t("DirectSupply")),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", {
- class: "power_5",
- onClick: _cache[5] || (_cache[5] = (...args) => $options.system && $options.system(...args))
- }, [
- vue.createElementVNode("view", { class: "power_bj" }, [
- vue.createElementVNode("image", {
- src: _imports_9$1,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "power_title" },
- vue.toDisplayString(_ctx.$t("SystemInformation")),
- 1
- /* TEXT */
- )
- ])
- ])),
- _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "power_6"
- }, [
- vue.createElementVNode("image", {
- src: _imports_10$2,
- mode: ""
- }),
- vue.createTextVNode(
- vue.toDisplayString(_ctx.$t("Tipswarning")),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- vue.createVNode(
- _component_uni_popup,
- {
- ref: "message",
- type: "message"
- },
- {
- default: vue.withCtx(() => [
- vue.createVNode(_component_uni_popup_message, {
- type: "error",
- message: $data.messageText,
- duration: 2500
- }, null, 8, ["message"])
- ]),
- _: 1
- /* STABLE */
- },
- 512
- /* NEED_PATCH */
- ),
- vue.createElementVNode("view", { class: "switch-container" }, [
- vue.createVNode(_component_uni_data_select, {
- modelValue: $data.appLanguage,
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.appLanguage = $event),
- localdata: $data.range,
- clear: false,
- onChange: $options.changeLanguage
- }, null, 8, ["modelValue", "localdata", "onChange"])
- ]),
- vue.createElementVNode(
- "view",
- { class: "appVersioncss" },
- vue.toDisplayString(_ctx.$t("version")) + vue.toDisplayString($data.appVersion),
- 1
- /* TEXT */
- )
- ]);
- }
- const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-1cf27b2a"], ["__file", "D:/project/esswisdom_ipad_V2/pages/index/index.vue"]]);
- const _sfc_main$b = {
- name: "cmd-progress",
- props: {
- /**
- * 类型默认:line,可选 line circle dashboard
- */
- type: {
- validator: (val) => {
- return ["line", "circle", "dashboard"].includes(val);
- },
- default: "line"
- },
- /**
- * 百分比
- */
- percent: {
- type: Number,
- default: 0
- },
- /**
- * 已完成的分段百分,仅支持类型line
- */
- successPercent: {
- type: Number,
- default: 0
- },
- /**
- * 是否显示进度数值或状态图标
- */
- showInfo: {
- type: Boolean,
- default: true
- },
- /**
- * 进度状态,可选:normal success exception (active仅支持类型line
- */
- status: {
- validator: (val) => {
- return ["normal", "success", "exception", "active"].includes(val);
- },
- default: "normal"
- },
- /**
- * 条线的宽度1-50,与width有关
- */
- strokeWidth: {
- type: Number,
- default: 6
- },
- /**
- * 条线的颜色,渐变色仅支持类型line
- */
- strokeColor: {
- type: String,
- default: ""
- },
- /**
- * 条线两端的形状 可选:'round', 'square'
- */
- strokeShape: {
- validator: (val) => {
- return ["round", "square"].includes(val);
- },
- default: "round"
- },
- /**
- * 圆形进度条画布宽度,支持类型circle dashboard
- */
- width: {
- type: Number,
- default: 80
- },
- /**
- * 圆形进度条缺口角度,可取值 0 ~ 360,支持类型circle dashboard
- */
- gapDegree: {
- type: Number,
- default: 120
- },
- /**
- * 圆形进度条缺口位置,可取值'top', 'bottom', 'left', 'right' ,支持类型circle dashboard
- */
- gapPosition: {
- validator: (val) => {
- return ["top", "bottom", "left", "right"].includes(val);
- },
- default: "top"
- }
- },
- computed: {
- /**
- * 如果需要自定义格式就在这改
- */
- setFormat() {
- return `${this.setProgress}%`;
- },
- /**
- * 设置显示进度值,禁止小于0和超过100
- */
- setProgress() {
- let percent = this.percent;
- if (!this.percent || this.percent < 0) {
- percent = 0;
- } else if (this.percent >= 100) {
- percent = 100;
- }
- return percent;
- },
- /**
- * 进度圈svg大小
- */
- setCircleStyle() {
- return `width: ${this.width}px;
- height: ${this.width}px;
- fontSize: ${this.width * 0.15 + 6}px;`;
- },
- /**
- * 圈底色
- */
- setCircleTrailStyle() {
- const radius = 50 - this.strokeWidth / 2;
- const len = Math.PI * 2 * radius;
- const gapDeg = this.gapDegree || this.type === "dashboard" && 75;
- return `stroke-dasharray: ${len - (gapDeg || 0)}px, ${len}px;
- stroke-dashoffset: -${(gapDeg || 0) / 2}px;
- transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s;`;
- },
- /**
- * 圈进度
- */
- setCirclePathStyle() {
- const radius = 50 - this.strokeWidth / 2;
- const len = Math.PI * 2 * radius;
- const gapDeg = this.gapDegree || this.type === "dashboard" && 75;
- return `stroke: ${this.strokeColor};
- stroke-dasharray: ${this.setProgress / 100 * (len - (gapDeg || 0))}px, ${len}px;
- stroke-dashoffset: -${(gapDeg || 0) / 2}px;
- transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s, stroke-width 0.06s ease 0.3s;`;
- },
- /**
- * 绘制圈
- */
- setCirclePath() {
- const radius = 50 - this.strokeWidth / 2;
- let beginPositionX = 0;
- let beginPositionY = -radius;
- let endPositionX = 0;
- let endPositionY = -2 * radius;
- const gapPos = this.type === "dashboard" && "bottom" || this.gapPosition || "top";
- switch (gapPos) {
- case "left":
- beginPositionX = -radius;
- beginPositionY = 0;
- endPositionX = 2 * radius;
- endPositionY = 0;
- break;
- case "right":
- beginPositionX = radius;
- beginPositionY = 0;
- endPositionX = -2 * radius;
- endPositionY = 0;
- break;
- case "bottom":
- beginPositionY = radius;
- endPositionY = 2 * radius;
- break;
- }
- return `M 50,50 m ${beginPositionX},${beginPositionY} a ${radius},${radius} 0 1 1 ${endPositionX},${-endPositionY} a ${radius},${radius} 0 1 1 ${-endPositionX},${endPositionY}`;
- },
- /**
- * 非H5端,绘制进度圈svg转base URL
- */
- setCircle() {
- const radius = 50 - this.strokeWidth / 2;
- const len = Math.PI * 2 * radius;
- const gapDeg = this.gapDegree || this.type === "dashboard" && 75;
- let currentColor = "#108ee9";
- if (this.status == "exception") {
- currentColor = "#f5222d";
- }
- if (this.status == "success" || this.setProgress >= 100 || this.strokeColor) {
- currentColor = this.strokeColor || "#52c41a";
- }
- let svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' class='cmd-progress-circle'%3E%3Cpath d='${this.setCirclePath}' stroke='%23f3f3f3' stroke-linecap='${this.strokeShape}' stroke-width='${this.strokeWidth}' fill-opacity='0' class='cmd-progress-circle-trail' style='stroke-dasharray: ${len - (gapDeg || 0)}px, ${len}px;stroke-dashoffset: -${(gapDeg || 0) / 2}px;transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s;'%3E%3C/path%3E%3Cpath d='${this.setCirclePath}' stroke-linecap='${this.strokeShape}' stroke-width='${this.strokeWidth}' fill-opacity='0' class='cmd-progress-circle-path' style='stroke: ${escape(currentColor)};stroke-dasharray: ${this.setProgress / 100 * (len - (gapDeg || 0))}px, ${len}px;stroke-dashoffset: -${(gapDeg || 0) / 2}px;transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s, stroke-width 0.06s ease 0.3s;'%3E%3C/path%3E%3C/svg%3E`;
- return `background-image: url("${svgToBase}");
- background-size: cover;
- display: inline-block;
- ${this.setCircleStyle}`;
- },
- /**
- * 设置进度圈状态图标
- */
- setCircleIcon() {
- let currentColor = "#108ee9";
- let svgToBase = "";
- if (this.status == "exception") {
- currentColor = "#f5222d";
- svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='close' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z'%3E%3C/path%3E %3C/svg%3E`;
- }
- if (this.status == "success" || this.setProgress >= 100) {
- currentColor = this.strokeColor || "#52c41a";
- svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='check' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z'%3E%3C/path%3E %3C/svg%3E`;
- }
- return `background-image: url("${svgToBase}");
- background-size: cover;
- display: inline-block;
- width: 1em;
- height: 1em;`;
- },
- /**
- * 设置进度条样式
- */
- setLineStyle() {
- return `width: ${this.setProgress}%;
- height: ${this.strokeWidth}px;
- background: ${this.strokeColor};
- border-radius: ${this.strokeShape === "square" ? 0 : "100px"};`;
- },
- /**
- * 设置已完成分段进度
- */
- setLineSuccessStyle() {
- let successPercent = this.successPercent;
- if (!this.successPercent || this.successPercent < 0 || this.setProgress < this.successPercent) {
- successPercent = 0;
- } else if (this.successPercent >= 100) {
- successPercent = 100;
- }
- return `width: ${successPercent}%;
- height: ${this.strokeWidth}px;
- border-radius: ${this.strokeShape === "square" ? 0 : "100px"};`;
- },
- /**
- * 设置进度条状态图标
- */
- setLineStatusIcon() {
- let currentColor = "#108ee9";
- let svgToBase = "";
- if (this.status == "exception") {
- currentColor = "#f5222d";
- svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='close-circle' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z'%3E%3C/path%3E %3C/svg%3E`;
- }
- if (this.status == "success" || this.setProgress >= 100) {
- currentColor = this.strokeColor || "#52c41a";
- svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='check-circle' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z'%3E%3C/path%3E %3C/svg%3E`;
- }
- return `background-image: url("${svgToBase}");
- background-size: cover;
- display: inline-block;
- width: 1em;
- height: 1em;`;
- },
- /**
- * 状态样式
- */
- setStatusClass() {
- let statusClass = [];
- if (this.status == "exception") {
- statusClass.push("cmd-progress-status-exception");
- }
- if (this.status == "success" || this.setProgress >= 100) {
- statusClass.push("cmd-progress-status-success");
- }
- if (this.status == "active") {
- statusClass.push("cmd-progress-status-active");
- }
- if (this.showInfo) {
- statusClass.push("cmd-progress-show-info");
- }
- if (this.type === "line") {
- statusClass.push("cmd-progress-line");
- }
- if (this.type === "circle" || this.type === "dashboard") {
- statusClass.push("cmd-progress-circle");
- }
- statusClass.push("cmd-progress-status-normal");
- return statusClass;
- }
- }
- };
- function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["cmd-progress cmd-progress-default", $options.setStatusClass])
- },
- [
- $props.type == "circle" || $props.type == "dashboard" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["cmd-progress cmd-progress-default", $options.setStatusClass])
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: "cmd-progress-inner",
- style: vue.normalizeStyle($options.setCircleStyle)
- },
- [
- vue.createCommentVNode(" 绘制圈 start "),
- vue.createElementVNode(
- "text",
- {
- style: vue.normalizeStyle($options.setCircle)
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createCommentVNode(" 绘制圈 end "),
- vue.createCommentVNode(" 状态文本 start "),
- $props.showInfo ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "cmd-progress-text",
- title: $options.setFormat
- }, [
- $props.status != "success" && $props.status != "exception" && $options.setProgress < 100 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createTextVNode(
- vue.toDisplayString($options.setFormat),
- 1
- /* TEXT */
- )
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- $props.status == "exception" || $props.status == "success" || $options.setProgress == 100 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- style: vue.normalizeStyle($options.setCircleIcon)
- },
- null,
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ], 8, ["title"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 状态文本 end ")
- ],
- 4
- /* STYLE */
- )
- ],
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true),
- $props.type == "line" ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createCommentVNode(" 进度条 start "),
- vue.createElementVNode("view", { class: "cmd-progress-outer" }, [
- vue.createElementVNode(
- "view",
- {
- class: "cmd-progress-inner",
- style: vue.normalizeStyle({ "border-radius": $props.strokeShape == "square" ? 0 : "100px" })
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: "cmd-progress-bg",
- style: vue.normalizeStyle($options.setLineStyle)
- },
- null,
- 4
- /* STYLE */
- ),
- $props.successPercent ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "cmd-progress-success-bg",
- style: vue.normalizeStyle($options.setLineSuccessStyle)
- },
- null,
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )
- ]),
- vue.createCommentVNode(" 进度条 end "),
- vue.createCommentVNode(" 进度条是否显示信息 start "),
- $props.showInfo ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "cmd-progress-text",
- title: $options.setFormat
- }, [
- $props.status != "success" && $props.status != "exception" && $options.setProgress < 100 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createTextVNode(
- vue.toDisplayString($options.setFormat),
- 1
- /* TEXT */
- )
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- $props.status == "exception" || $props.status == "success" || $options.setProgress == 100 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- style: vue.normalizeStyle($options.setLineStatusIcon)
- },
- null,
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ], 8, ["title"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 进度条是否显示信息 end ")
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- );
- }
- const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-06762d5e"], ["__file", "D:/project/esswisdom_ipad_V2/components/cmd-progress/cmd-progress.vue"]]);
- const isObject$2 = (val) => val !== null && typeof val === "object";
- const defaultDelimiters = ["{", "}"];
- class BaseFormatter {
- constructor() {
- this._caches = /* @__PURE__ */ Object.create(null);
- }
- interpolate(message, values, delimiters = defaultDelimiters) {
- if (!values) {
- return [message];
- }
- let tokens = this._caches[message];
- if (!tokens) {
- tokens = parse$1(message, delimiters);
- this._caches[message] = tokens;
- }
- return compile(tokens, values);
- }
- }
- const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
- const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
- function parse$1(format2, [startDelimiter, endDelimiter]) {
- const tokens = [];
- let position = 0;
- let text = "";
- while (position < format2.length) {
- let char = format2[position++];
- if (char === startDelimiter) {
- if (text) {
- tokens.push({ type: "text", value: text });
- }
- text = "";
- let sub = "";
- char = format2[position++];
- while (char !== void 0 && char !== endDelimiter) {
- sub += char;
- char = format2[position++];
- }
- const isClosed = char === endDelimiter;
- const type = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
- tokens.push({ value: sub, type });
- } else {
- text += char;
- }
- }
- text && tokens.push({ type: "text", value: text });
- return tokens;
- }
- function compile(tokens, values) {
- const compiled = [];
- let index = 0;
- const mode = Array.isArray(values) ? "list" : isObject$2(values) ? "named" : "unknown";
- if (mode === "unknown") {
- return compiled;
- }
- while (index < tokens.length) {
- const token = tokens[index];
- switch (token.type) {
- case "text":
- compiled.push(token.value);
- break;
- case "list":
- compiled.push(values[parseInt(token.value, 10)]);
- break;
- case "named":
- if (mode === "named") {
- compiled.push(values[token.value]);
- } else {
- {
- console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
- }
- }
- break;
- case "unknown":
- {
- console.warn(`Detect 'unknown' type of token!`);
- }
- break;
- }
- index++;
- }
- return compiled;
- }
- const LOCALE_ZH_HANS = "zh-Hans";
- const LOCALE_ZH_HANT = "zh-Hant";
- const LOCALE_EN = "en";
- const LOCALE_FR = "fr";
- const LOCALE_ES = "es";
- const hasOwnProperty$2 = Object.prototype.hasOwnProperty;
- const hasOwn$2 = (val, key) => hasOwnProperty$2.call(val, key);
- const defaultFormatter = new BaseFormatter();
- function include(str, parts) {
- return !!parts.find((part) => str.indexOf(part) !== -1);
- }
- function startsWith(str, parts) {
- return parts.find((part) => str.indexOf(part) === 0);
- }
- function normalizeLocale(locale, messages2) {
- if (!locale) {
- return;
- }
- locale = locale.trim().replace(/_/g, "-");
- if (messages2 && messages2[locale]) {
- return locale;
- }
- locale = locale.toLowerCase();
- if (locale === "chinese") {
- return LOCALE_ZH_HANS;
- }
- if (locale.indexOf("zh") === 0) {
- if (locale.indexOf("-hans") > -1) {
- return LOCALE_ZH_HANS;
- }
- if (locale.indexOf("-hant") > -1) {
- return LOCALE_ZH_HANT;
- }
- if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
- return LOCALE_ZH_HANT;
- }
- return LOCALE_ZH_HANS;
- }
- let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
- if (messages2 && Object.keys(messages2).length > 0) {
- locales = Object.keys(messages2);
- }
- const lang = startsWith(locale, locales);
- if (lang) {
- return lang;
- }
- }
- class I18n {
- constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
- this.locale = LOCALE_EN;
- this.fallbackLocale = LOCALE_EN;
- this.message = {};
- this.messages = {};
- this.watchers = [];
- if (fallbackLocale) {
- this.fallbackLocale = fallbackLocale;
- }
- this.formater = formater2 || defaultFormatter;
- this.messages = messages2 || {};
- this.setLocale(locale || LOCALE_EN);
- if (watcher) {
- this.watchLocale(watcher);
- }
- }
- setLocale(locale) {
- const oldLocale = this.locale;
- this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
- if (!this.messages[this.locale]) {
- this.messages[this.locale] = {};
- }
- this.message = this.messages[this.locale];
- if (oldLocale !== this.locale) {
- this.watchers.forEach((watcher) => {
- watcher(this.locale, oldLocale);
- });
- }
- }
- getLocale() {
- return this.locale;
- }
- watchLocale(fn) {
- const index = this.watchers.push(fn) - 1;
- return () => {
- this.watchers.splice(index, 1);
- };
- }
- add(locale, message, override = true) {
- const curMessages = this.messages[locale];
- if (curMessages) {
- if (override) {
- Object.assign(curMessages, message);
- } else {
- Object.keys(message).forEach((key) => {
- if (!hasOwn$2(curMessages, key)) {
- curMessages[key] = message[key];
- }
- });
- }
- } else {
- this.messages[locale] = message;
- }
- }
- f(message, values, delimiters) {
- return this.formater.interpolate(message, values, delimiters).join("");
- }
- t(key, locale, values) {
- let message = this.message;
- if (typeof locale === "string") {
- locale = normalizeLocale(locale, this.messages);
- locale && (message = this.messages[locale]);
- } else {
- values = locale;
- }
- if (!hasOwn$2(message, key)) {
- console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
- return key;
- }
- return this.formater.interpolate(message[key], values).join("");
- }
- }
- function watchAppLocale(appVm, i18n2) {
- if (appVm.$watchLocale) {
- appVm.$watchLocale((newLocale) => {
- i18n2.setLocale(newLocale);
- });
- } else {
- appVm.$watch(() => appVm.$locale, (newLocale) => {
- i18n2.setLocale(newLocale);
- });
- }
- }
- function getDefaultLocale() {
- if (typeof uni !== "undefined" && uni.getLocale) {
- return uni.getLocale();
- }
- if (typeof global !== "undefined" && global.getLocale) {
- return global.getLocale();
- }
- return LOCALE_EN;
- }
- function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
- if (typeof locale !== "string") {
- const options = [
- messages2,
- locale
- ];
- locale = options[0];
- messages2 = options[1];
- }
- if (typeof locale !== "string") {
- locale = getDefaultLocale();
- }
- if (typeof fallbackLocale !== "string") {
- fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
- }
- const i18n2 = new I18n({
- locale,
- fallbackLocale,
- messages: messages2,
- watcher
- });
- let t2 = (key, values) => {
- if (typeof getApp !== "function") {
- t2 = function(key2, values2) {
- return i18n2.t(key2, values2);
- };
- } else {
- let isWatchedAppLocale = false;
- t2 = function(key2, values2) {
- const appVm = getApp().$vm;
- if (appVm) {
- appVm.$locale;
- if (!isWatchedAppLocale) {
- isWatchedAppLocale = true;
- watchAppLocale(appVm, i18n2);
- }
- }
- return i18n2.t(key2, values2);
- };
- }
- return t2(key, values);
- };
- return {
- i18n: i18n2,
- f(message, values, delimiters) {
- return i18n2.f(message, values, delimiters);
- },
- t(key, values) {
- return t2(key, values);
- },
- add(locale2, message, override = true) {
- return i18n2.add(locale2, message, override);
- },
- watch(fn) {
- return i18n2.watchLocale(fn);
- },
- getLocale() {
- return i18n2.getLocale();
- },
- setLocale(newLocale) {
- return i18n2.setLocale(newLocale);
- }
- };
- }
- const en$2 = {
- "uni-popup.cancel": "cancel",
- "uni-popup.ok": "ok",
- "uni-popup.placeholder": "pleace enter",
- "uni-popup.title": "Hint",
- "uni-popup.shareTitle": "Share to"
- };
- const zhHans$2 = {
- "uni-popup.cancel": "取消",
- "uni-popup.ok": "确定",
- "uni-popup.placeholder": "请输入",
- "uni-popup.title": "提示",
- "uni-popup.shareTitle": "分享到"
- };
- const zhHant$2 = {
- "uni-popup.cancel": "取消",
- "uni-popup.ok": "確定",
- "uni-popup.placeholder": "請輸入",
- "uni-popup.title": "提示",
- "uni-popup.shareTitle": "分享到"
- };
- const messages$2 = {
- en: en$2,
- "zh-Hans": zhHans$2,
- "zh-Hant": zhHant$2
- };
- const {
- t: t$1
- } = initVueI18n(messages$2);
- const _sfc_main$a = {
- name: "uniPopupDialog",
- mixins: [popup],
- emits: ["confirm", "close", "update:modelValue", "input"],
- props: {
- inputType: {
- type: String,
- default: "text"
- },
- showClose: {
- type: Boolean,
- default: true
- },
- modelValue: {
- type: [Number, String],
- default: ""
- },
- placeholder: {
- type: [String, Number],
- default: ""
- },
- type: {
- type: String,
- default: "error"
- },
- mode: {
- type: String,
- default: "base"
- },
- title: {
- type: String,
- default: ""
- },
- content: {
- type: String,
- default: ""
- },
- beforeClose: {
- type: Boolean,
- default: false
- },
- cancelText: {
- type: String,
- default: ""
- },
- confirmText: {
- type: String,
- default: ""
- },
- maxlength: {
- type: Number,
- default: -1
- },
- focus: {
- type: Boolean,
- default: true
- }
- },
- data() {
- return {
- dialogType: "error",
- val: ""
- };
- },
- computed: {
- okText() {
- return this.confirmText || t$1("uni-popup.ok");
- },
- closeText() {
- return this.cancelText || t$1("uni-popup.cancel");
- },
- placeholderText() {
- return this.placeholder || t$1("uni-popup.placeholder");
- },
- titleText() {
- return this.title || t$1("uni-popup.title");
- }
- },
- watch: {
- type(val) {
- this.dialogType = val;
- },
- mode(val) {
- if (val === "input") {
- this.dialogType = "info";
- }
- },
- value(val) {
- if (this.maxlength != -1 && this.mode === "input") {
- this.val = val.slice(0, this.maxlength);
- } else {
- this.val = val;
- }
- },
- val(val) {
- this.$emit("update:modelValue", val);
- }
- },
- created() {
- this.popup.disableMask();
- if (this.mode === "input") {
- this.dialogType = "info";
- this.val = this.value;
- this.val = this.modelValue;
- } else {
- this.dialogType = this.type;
- }
- },
- methods: {
- /**
- * 点击确认按钮
- */
- onOk() {
- if (this.mode === "input") {
- this.$emit("confirm", this.val);
- } else {
- this.$emit("confirm");
- }
- if (this.beforeClose)
- return;
- this.popup.close();
- },
- /**
- * 点击取消按钮
- */
- closeDialog() {
- this.$emit("close");
- if (this.beforeClose)
- return;
- this.popup.close();
- },
- close() {
- this.popup.close();
- }
- }
- };
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "uni-popup-dialog" }, [
- vue.createElementVNode("view", { class: "uni-dialog-title" }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["uni-dialog-title-text", ["uni-popup__" + $data.dialogType]])
- },
- vue.toDisplayString($options.titleText),
- 3
- /* TEXT, CLASS */
- )
- ]),
- $props.mode === "base" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "uni-dialog-content"
- }, [
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
- vue.createElementVNode(
- "text",
- { class: "uni-dialog-content-text" },
- vue.toDisplayString($props.content),
- 1
- /* TEXT */
- )
- ], true)
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "uni-dialog-content"
- }, [
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
- vue.withDirectives(vue.createElementVNode("input", {
- class: "uni-dialog-input",
- maxlength: $props.maxlength,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.val = $event),
- type: $props.inputType,
- placeholder: $options.placeholderText,
- focus: $props.focus
- }, null, 8, ["maxlength", "type", "placeholder", "focus"]), [
- [vue.vModelDynamic, $data.val]
- ])
- ], true)
- ])),
- vue.createElementVNode("view", { class: "uni-dialog-button-group" }, [
- $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "uni-dialog-button",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.closeDialog && $options.closeDialog(...args))
- }, [
- vue.createElementVNode(
- "text",
- { class: "uni-dialog-button-text" },
- vue.toDisplayString($options.closeText),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["uni-dialog-button", $props.showClose ? "uni-border-left" : ""]),
- onClick: _cache[2] || (_cache[2] = (...args) => $options.onOk && $options.onOk(...args))
- },
- [
- vue.createElementVNode(
- "text",
- { class: "uni-dialog-button-text uni-button-color" },
- vue.toDisplayString($options.okText),
- 1
- /* TEXT */
- )
- ],
- 2
- /* CLASS */
- )
- ])
- ]);
- }
- const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-d78c88b7"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue"]]);
- const _imports_1$4 = "/static/dian1.png";
- const _imports_2$2 = "/static/dian2.png";
- const _imports_3$3 = "/static/che.png";
- const _imports_6 = "/static/SOC.png";
- const _imports_7 = "/static/Battery.png";
- const _imports_8 = "/static/setup.png";
- const _imports_1$3 = "/static/home.png";
- const _imports_10$1 = "/static/home1.png";
- const _imports_9 = "/static/Icons2X.png";
- const _imports_10 = "/static/ACin.png";
- const _imports_11 = "/static/20kw1l.png";
- const _imports_12 = "/static/20kw1.png";
- const _imports_13 = "/static/40kw1l.png";
- const _imports_14 = "/static/40kw1.png";
- const _imports_15 = "/static/60kwl.png";
- const _imports_16 = "/static/60kw.png";
- const _imports_17 = "/static/80kwl.png";
- const _imports_18 = "/static/80kw.png";
- const _sfc_main$9 = {
- components: {
- cmdProgress: __easycom_0$1
- },
- data() {
- return {
- successtype: "success",
- confirmText: "确认启动",
- title: "你确定要开启该设备吗?",
- content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
- value: "",
- modeinput: "",
- segmented: 1,
- uidatas: "",
- formatTimeid: "",
- faultsdata: [],
- SysFaultState: true,
- currentDate: "",
- ACcurrentoutputchoice: 0
- };
- },
- onLoad() {
- this.confirmText = this.$t("ConfirmStart");
- this.title = this.$t("popUpTitle");
- this.content = this.$t("popUpContent");
- },
- computed: {
- // 使用 mapState 映射多个状态到组件的计算属性
- ...mapState(["formattedTime", "status"]),
- ...mapState({
- uidatasdata: (state2) => state2.uidatasdata
- })
- },
- mounted() {
- },
- beforeUnmount() {
- if (this.scrollInterval) {
- clearInterval(this.scrollInterval);
- }
- },
- watch: {
- uidatasdata: {
- handler(newVal, oldVal) {
- formatAppLog("log", "at pages/home/index.vue:739", "uidatasdata 发生变化:", newVal);
- if (newVal.SysState_SysFaultState == 1 && this.SysFaultState) {
- this.SysFaultState = false;
- setTimeout(() => {
- this.onfaultsdata();
- }, 1e3);
- } else if (newVal.SysState_SysFaultState == 0) {
- this.SysFaultState = true;
- }
- },
- deep: true
- // 监听深层次的变化
- }
- },
- methods: {
- handleDataChange(newData) {
- formatAppLog("log", "at pages/home/index.vue:759", "数据变化处理:", newData);
- },
- onfaultsdata() {
- let data = {
- page: 1,
- rows: 10,
- device: "",
- starttime: "",
- endtime: "",
- rt: 1,
- type: "故障"
- };
- getfaultsList(data).then((res) => {
- formatAppLog("log", "at pages/home/index.vue:773", res);
- if (res.status == "ok") {
- this.faultsdata = [];
- for (var i2 = 0; i2 < res.data.list.length; i2++) {
- if (this.$store.state.formattedTime.substring(0, 10) == res.data.list[i2].FAULTTIME.substring(0, 10)) {
- this.faultsdata.push(res.data.list[i2]);
- }
- }
- }
- });
- },
- // 返回首页
- onreturn() {
- uni.redirectTo({
- url: "/pages/index/index"
- });
- },
- // 启动设备弹窗
- dialogToggle() {
- this.modeinput = "base";
- this.successtype = "success";
- this.confirmText = this.$t("ConfirmStart");
- this.title = this.$t("popUpTitle");
- this.content = this.$t("popUpContent");
- this.$refs.alertDialog.open();
- },
- // 关闭设备弹窗
- onstopit() {
- this.modeinput = "base";
- this.successtype = "error";
- this.confirmText = this.$t("ConfirmStop");
- this.title = this.$t("popUpTitleStop");
- this.content = this.$t("popUpContentStop");
- this.$refs.alertDialog.open();
- },
- // AC补电功率取消按钮
- unipopupclose() {
- this.ACcurrentoutputchoice = 0;
- this.$refs.alertDialog1.close();
- },
- onunipopup() {
- let data = {
- id: "e612195b-cf9e-418b-9e2d-0fbae9b03ffa",
- issaveinitvalue: false,
- value: this.ACcurrentoutputchoice + ""
- };
- formatAppLog("log", "at pages/home/index.vue:824", data);
- control(data).then((res) => {
- formatAppLog("log", "at pages/home/index.vue:826", res);
- if (res.status == "ok") {
- this.ACcurrentoutputchoice = 0;
- this.$refs.alertDialog1.close();
- uni.showToast({
- title: this.$t("OperationSuccessful"),
- icon: "none",
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- } else {
- this.ACcurrentoutputchoice = 0;
- this.$refs.alertDialog1.close();
- uni.showToast({
- title: this.$t("operationFailed"),
- icon: "none",
- // 使用 'none' 图标来表示失败
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- }
- });
- },
- onpower() {
- this.$refs.alertDialog1.open();
- },
- // 确定
- // dialogConfirm() {
- // let data = {
- // id: "c35c4db0-113f-442a-9e26-728489265fdb",
- // issaveinitvalue: false,
- // value: this.content == this.$t('popUpContent') ? '1' : '0'
- // }
- // control(data).then(data => {
- // __f__('log','at pages/home/index.vue:866',data);
- // if (data.status == 'ok') {
- // this.$refs.alertDialog.close()
- // uni.showToast({
- // title: this.$t('OperationSuccessful'),
- // icon: 'none',
- // duration: 2000, // 显示时长,单位为毫秒
- // });
- // if (this.content == this.$t('popUpContent')) {
- // this.ACcurrentoutputchoice = 0,
- // onunipopup()
- // }
- // } else {
- // this.$refs.alertDialog.close()
- // uni.showToast({
- // title: this.$t('operationFailed'),
- // icon: 'none', // 使用 'none' 图标来表示失败
- // duration: 2000, // 显示时长,单位为毫秒
- // });
- // }
- // });
- // },
- // 确定
- dialogConfirm() {
- formatAppLog("log", "at pages/home/index.vue:893", this.content);
- formatAppLog("log", "at pages/home/index.vue:894", this.$t("popUpContent"));
- if (this.content == this.$t("popUpContent") && this.title != this.$t("ACinputpowergiven")) {
- let data = {
- id: "c35c4db0-113f-442a-9e26-728489265fdb",
- issaveinitvalue: false,
- value: "1"
- };
- control(data).then((data2) => {
- formatAppLog("log", "at pages/home/index.vue:904", data2);
- if (data2.status == "ok") {
- this.$refs.alertDialog.close();
- uni.showToast({
- title: this.$t("OperationSuccessful"),
- icon: "none",
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- this.ACcurrentoutputchoice = "0", onunipopup();
- } else {
- this.$refs.alertDialog.close();
- uni.showToast({
- title: this.$t("operationFailed"),
- icon: "none",
- // 使用 'none' 图标来表示失败
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- }
- });
- } else {
- let data = {
- id: "e612195b-cf9e-418b-9e2d-0fbae9b03ffa",
- issaveinitvalue: false,
- value: "0"
- };
- formatAppLog("log", "at pages/home/index.vue:933", data);
- control(data).then((res) => {
- formatAppLog("log", "at pages/home/index.vue:935", res);
- if (res.status == "ok") {
- let info = {
- id: "c35c4db0-113f-442a-9e26-728489265fdb",
- issaveinitvalue: false,
- value: "0"
- };
- control(info).then((ress) => {
- formatAppLog("log", "at pages/home/index.vue:943", ress);
- if (ress.status == "ok") {
- this.$refs.alertDialog.close();
- uni.showToast({
- title: this.$t("OperationSuccessful"),
- icon: "none",
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- } else {
- this.$refs.alertDialog.close();
- uni.showToast({
- title: this.$t("operationFailed"),
- icon: "none",
- // 使用 'none' 图标来表示失败
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- }
- });
- } else {
- this.$refs.alertDialog.close();
- uni.showToast({
- title: this.$t("operationFailed"),
- icon: "none",
- // 使用 'none' 图标来表示失败
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- }
- });
- }
- },
- dialogClose() {
- this.$refs.alertDialog.close();
- if (this.title == this.$t("ACinputpowergiven")) {
- plus.navigator.hideSystemNavigation();
- }
- },
- ontap(e2) {
- formatAppLog("log", "at pages/home/index.vue:997", e2);
- this.segmented = e2;
- },
- // AC补点弹窗
- clickACcurrentoutput(value) {
- this.ACcurrentoutputchoice = value;
- }
- }
- };
- function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
- const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
- const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
- const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- class: "top_logo",
- src: _imports_0,
- mode: ""
- }),
- vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
- vue.createElementVNode(
- "view",
- { class: "tite" },
- vue.toDisplayString(_ctx.$t("MainTitle")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time" }, [
- vue.createElementVNode(
- "view",
- { class: "time_top" },
- vue.toDisplayString(_ctx.formattedTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time_bottom" }, [
- vue.createElementVNode("view"),
- vue.createElementVNode("view", { class: "time_bottom1" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.$t("status")) + " ",
- 1
- /* TEXT */
- ),
- _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "time_state"
- },
- vue.toDisplayString(_ctx.$t("online")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "time_state1"
- },
- vue.toDisplayString(_ctx.$t("offline")),
- 1
- /* TEXT */
- ))
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter" }, [
- vue.createElementVNode("view", { class: "parameter_left" }, [
- vue.createElementVNode("view", { class: "parameter_left1" }, [
- vue.createCommentVNode(" <jerry-gauge></jerry-gauge> "),
- vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
- vue.createVNode(_component_cmd_progress, {
- type: "dashboard",
- percent: _ctx.uidatasdata.SOC ?? 0,
- "stroke-color": "#B0D0FF",
- "stroke-width": 6,
- width: 180,
- "stroke-shape": "square",
- showInfo: false
- }, null, 8, ["percent"]),
- vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
- vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
- ]),
- vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
- ]),
- vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
- vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
- vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
- vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
- ])
- ])
- ]),
- vue.createCommentVNode(' <view class="parameter_canvas">\r\n <view class="parameter_canvas1">\r\n 0\r\n </view>\r\n <view class="parameter_canvas2">\r\n 100%\r\n </view>\r\n </view> ')
- ]),
- vue.createElementVNode("image", {
- class: "parameter_leftdian1",
- src: _imports_1$4,
- alt: ""
- }),
- vue.createElementVNode("view", { class: "parameter_lef2" }, [
- vue.createElementVNode("image", {
- src: _imports_2$2,
- mode: ""
- })
- ]),
- vue.createElementVNode("image", {
- class: "parameter_leftche",
- src: _imports_3$3,
- mode: ""
- }),
- vue.createCommentVNode(' <image class="parameter_leftche1" src="../../static/fang.png" mode=""></image> '),
- vue.createCommentVNode(' <image class="parameter_leftche" src="../../static/che.png" mode=""></image> '),
- vue.createCommentVNode(' <image class="parameter_leftche2" src="../../static/che1.png" mode=""></image> '),
- vue.createElementVNode(
- "view",
- { class: "parameter_leftview" },
- vue.toDisplayString(_ctx.$t("CommunicationRechargeInput")),
- 1
- /* TEXT */
- ),
- vue.createCommentVNode(' <view class="parameter_leftview">交流供电</view> '),
- vue.createCommentVNode(' <view class="parameter_leftview">直流补电</view> '),
- vue.createCommentVNode(' <view class="parameter_leftview">直流供电</view> ')
- ]),
- vue.createElementVNode("view", { class: "parameter_right" }, [
- vue.createElementVNode("view", { class: "parameter_righttop" }, [
- vue.createElementVNode("view", { class: "parameter_1" }, [
- vue.createCommentVNode(` <view class="parameter_2">\r
- <view class="parameter_3">\r
- <view class="parameter_4">\r
- <image src="../../static/y8.png" mode=""\r
- v-if="uidatasdata.AC_In_380V_63A1_Status==0.00"></image>\r
- <image src="../../static/y6.png" mode="" v-else></image>\r
- {{$t('state163A')}} \r
- </view>\r
- <view class="parameter_51" v-if="uidatasdata.AC_In_380V_63A1_Status==0.00">\r
- {{$t('connect')}}\r
- </view>\r
- <view class="parameter_5" v-else>\r
- {{$t('breakoff')}}\r
- </view>\r
- \r
- </view>\r
- \r
- <view class="parameter_3">\r
- <view class="parameter_4">\r
- <image src="../../static/y8.png" mode=""\r
- v-if="uidatasdata.AC_In_380V_63A2_Status==0.00"></image>\r
- <image src="../../static/y6.png" mode="" v-else></image>\r
- {{$t('state63A2')}}\r
- </view>\r
- <view class="parameter_51" v-if="uidatasdata.AC_In_380V_63A2_Status==0.00">\r
- {{$t('connect')}}\r
- </view>\r
- <view class="parameter_5" v-else>\r
- {{$t('breakoff')}}\r
- </view>\r
- \r
- </view>\r
- \r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_SOC" }, [
- vue.createElementVNode("image", {
- src: _imports_6,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "text",
- { class: "parameter_SOCright2" },
- vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
- 1
- /* TEXT */
- ),
- vue.createTextVNode(),
- vue.createElementVNode("text", null, "%")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_Battery" }, [
- vue.createElementVNode("image", {
- src: _imports_7,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_SOCright1" },
- vue.toDisplayString(_ctx.$t("BatteryStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("fault")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==0">\r
- {{$t('ChuShiHua')}}\r
- </view> `),
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
- 1
- /* TEXT */
- )
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 2 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==2">\r
- {{$t('HighVoltageMedium')}}\r
- </view> `),
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("voltagehasbeen")),
- 1
- /* TEXT */
- )
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 3 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==4">\r
- {{$t('Underhighpressure')}}\r
- </view> `),
- vue.createElementVNode("view", null, " — ")
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )),
- vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} ")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_state" }, [
- vue.createElementVNode("image", {
- src: _imports_8,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_SOCright1" },
- vue.toDisplayString(_ctx.$t("SystemStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("uncharged")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("Chargingprogress")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("full")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 4 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_==4">\r
- {{$t('Chargingstopped')}}\r
- </view> `),
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_>3&&uidatasdata.bms_BatSysWorkMode_<8">\r
- {{$t('retain')}}\r
- </view> `),
- vue.createElementVNode("view", null, " — ")
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- ))
- ])
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_tap" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
- },
- vue.toDisplayString(_ctx.$t("exchangeinformation")),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2))
- },
- vue.toDisplayString(_ctx.$t("Batteryinformation")),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3))
- },
- vue.toDisplayString(_ctx.$t("statisticalinformation")),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(4))
- },
- vue.toDisplayString(_ctx.$t("coolinginformation")),
- 3
- /* TEXT, CLASS */
- )
- ]),
- vue.createElementVNode("view", {
- class: "parameter_zheng",
- key: "index"
- }, [
- $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("PhaseVoltageAV")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.PCSPortAPhaseVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("PhaseVoltageBV")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.PCSPortBPhaseVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("PhaseVoltageCV")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.PCSPortCPhaseVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("Supplementarypower")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.PCSTotalOutputPower ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode("view", { class: "parameter_zheng12" }, [
- vue.createCommentVNode(" A{{$t('PhaseCurrent')}} "),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$t("PhaseVoltageAA")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata["PCSOutputA-phaseCurrent"] ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("PhaseVoltageBA")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata["PCSOutputB-phaseCurrent"] ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("PhaseVoltageCA")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata["PCSOutputC-phaseCurrent"] ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createElementVNode("view", {
- class: "parameter_zheng11",
- style: { "height": "30px" }
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng12" }, [
- vue.createCommentVNode(" {{$t('powerSupply')}} ")
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng13">\r
- {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text>\r
- </view> `)
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createCommentVNode(` <view class="parameter_zheng11">\r
- <view class="parameter_zheng12">\r
- {{$t('Batterypower')}}\r
- </view>\r
- <view class="parameter_zheng13">\r
- {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">kW</text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("TotalPressure")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("AllowChargingPower")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxChargePowerLimit ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MaximumVoltage")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MaximumTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("BatteryCurrent")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng11">\r
- <view class="parameter_zheng12">\r
- {{$t('TotalExternalPressure')}}\r
- </view>\r
- <view class="parameter_zheng13">\r
- {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("AllowChargingCurrent")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingInformation_Chg_Max_Cur ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng10" }, [
- vue.createCommentVNode(` <view class="parameter_zhengbox">\r
- <view class="parameter_zheng12">\r
- {{$t('AccumulatedChargingCapacityCommunication')}}\r
- </view>\r
- <view class="parameter_zhengbox13">\r
- {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
- </view>\r
- </view>\r
- <view class="parameter_zhengbox parameter_zheng101">\r
- <view class="parameter_zheng12">\r
- {{$t('AccumulatedDCChargingCapacity')}}\r
- </view>\r
- <view class="parameter_zhengbox13">\r
- {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zhengbox" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("RunningTimes")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CommunicationRecharge),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "parameter_zheng14" },
- vue.toDisplayString(_ctx.$t("RunningTimesmin")),
- 1
- /* TEXT */
- ),
- vue.createTextVNode(),
- vue.createElementVNode("text")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("InputCapacity")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CommunicationElectricity) + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
- vue.createTextVNode(),
- vue.createElementVNode("text")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("AccumulateInput")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
- vue.createCommentVNode(` {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text> `),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.uidatasdata.PCSACChargeEnergy ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
- vue.createTextVNode(),
- vue.createElementVNode("text")
- ])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("WorkingMode")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
- vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
- _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("OffMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("CoolingMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("HeatingMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("CirculatingMode")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("OutletTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode("view", {
- class: "parameter_zheng12",
- style: { "height": "30px" }
- }, [
- vue.createCommentVNode(" {{$t('PowerDemand')}} ")
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng13">\r
- {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text class="parameter_zheng14">kW</text>\r
- </view> `)
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("DisconnectedState")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("ClosedState")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("waterTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode("view", {
- class: "parameter_zheng12",
- style: { "height": "30px" }
- }, [
- vue.createCommentVNode(" {{$t('FaultLevel')}} ")
- ]),
- vue.createCommentVNode(` <view class="parameter_Batterystate">\r
- \r
- <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
- {{$t('NoMalfunction')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
- 1{{$t('LevelLault')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
- 2{{$t('LevelLault')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
- 3{{$t('LevelLault')}}\r
- </view>\r
- <view v-else>\r
- —\r
- </view>\r
- </view> `)
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "parameter_zheng3" }, [
- _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_zheng31111",
- onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32" },
- vue.toDisplayString(_ctx.$t("open")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_zheng31111"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32ccc" },
- vue.toDisplayString(_ctx.$t("open")),
- 1
- /* TEXT */
- )
- ])
- ])),
- _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "parameter_zheng31111",
- onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args))
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng33" },
- vue.toDisplayString(_ctx.$t("stopIt")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "parameter_zheng31111"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32ccc" },
- vue.toDisplayString(_ctx.$t("stopIt")),
- 1
- /* TEXT */
- )
- ])
- ])),
- vue.createCommentVNode(' <view class="parameter_zheng31111" @click="onpower"> '),
- vue.createElementVNode("view", { class: "parameter_zheng31111" }, [
- _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_zheng31",
- onClick: _cache[6] || (_cache[6] = (...args) => $options.onpower && $options.onpower(...args))
- }, [
- _ctx.$t("power") == "功率" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_zheng34"
- }, [
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("power")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("given")),
- 1
- /* TEXT */
- )
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_zheng34"
- }, [
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("power")) + " " + vue.toDisplayString(_ctx.$t("given")),
- 1
- /* TEXT */
- )
- ]))
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_zheng31"
- }, [
- _ctx.$t("power") == "功率" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_zheng34ccc"
- }, [
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("power")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("given")),
- 1
- /* TEXT */
- )
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_zheng34ccc"
- }, [
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("power")) + " " + vue.toDisplayString(_ctx.$t("given")),
- 1
- /* TEXT */
- )
- ]))
- ]))
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_home" }, [
- vue.createElementVNode("view", {
- class: "parameter_home1",
- onClick: _cache[7] || (_cache[7] = (...args) => $options.onreturn && $options.onreturn(...args))
- }, [
- vue.createElementVNode("image", {
- src: _imports_1$3,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_hometext" },
- vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
- 1
- /* TEXT */
- )
- ]),
- $data.faultsdata.length > 0 && !$data.SysFaultState ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_home2"
- }, [
- vue.createElementVNode("image", {
- src: _imports_10$1,
- mode: ""
- }),
- vue.createElementVNode("swiper", {
- class: "swiper",
- circular: "",
- autoplay: true,
- interval: 2e3,
- duration: 500,
- vertical: true
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.faultsdata, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_home3" },
- vue.toDisplayString(item["CONTENT"]),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]),
- vue.createVNode(
- _component_uni_popup,
- { ref: "alertDialog" },
- {
- default: vue.withCtx(() => [
- vue.createVNode(_component_uni_popup_dialog, {
- mode: $data.modeinput,
- placeholder: _ctx.$t("powergiven") + "(0~80kW)",
- modelValue: $data.value,
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.value = $event),
- focus: false,
- type: $data.successtype,
- cancelText: _ctx.$t("CancelReturn"),
- confirmText: $data.confirmText,
- beforeClose: true,
- title: $data.title,
- content: $data.content,
- onConfirm: $options.dialogConfirm,
- onClose: $options.dialogClose
- }, null, 8, ["mode", "placeholder", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
- ]),
- _: 1
- /* STABLE */
- },
- 512
- /* NEED_PATCH */
- ),
- vue.createVNode(
- _component_uni_popup,
- { ref: "alertDialog1" },
- {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "unipopup" }, [
- vue.createElementVNode("view", { class: "unipopup1" }, [
- vue.createElementVNode("view"),
- vue.createElementVNode("image", {
- onClick: _cache[9] || (_cache[9] = (...args) => $options.unipopupclose && $options.unipopupclose(...args)),
- class: "unipopup1image",
- src: _imports_9,
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "unipopup2" }, [
- vue.createElementVNode("image", {
- class: "unipopup2image1",
- src: _imports_10,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "unipopup21" }, [
- vue.createElementVNode("view", { class: "unipopup21image" }, [
- $data.ACcurrentoutputchoice == 20 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "unipopup2image41",
- src: _imports_11,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- class: "unipopup2image41",
- src: _imports_12,
- mode: "",
- onClick: _cache[10] || (_cache[10] = ($event) => $options.clickACcurrentoutput(20))
- })),
- $data.ACcurrentoutputchoice == 40 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 2,
- class: "unipopup2image4",
- src: _imports_13,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 3,
- class: "unipopup2image4",
- src: _imports_14,
- mode: "",
- onClick: _cache[11] || (_cache[11] = ($event) => $options.clickACcurrentoutput(40))
- }))
- ]),
- vue.createElementVNode("view", { class: "unipopup22image" }, [
- $data.ACcurrentoutputchoice == 60 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "unipopup2image41",
- src: _imports_15,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- class: "unipopup2image41",
- src: _imports_16,
- mode: "",
- onClick: _cache[12] || (_cache[12] = ($event) => $options.clickACcurrentoutput(60))
- })),
- $data.ACcurrentoutputchoice == 80 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 2,
- class: "unipopup2image4",
- src: _imports_17,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 3,
- class: "unipopup2image4",
- src: _imports_18,
- mode: "",
- onClick: _cache[13] || (_cache[13] = ($event) => $options.clickACcurrentoutput(80))
- }))
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "unipopup3" }, [
- vue.createElementVNode("view", {
- class: "unipopup311",
- onClick: _cache[14] || (_cache[14] = (...args) => $options.unipopupclose && $options.unipopupclose(...args))
- }, [
- _ctx.$t("qx") == "../../static/qx.png" ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "unipopup31",
- src: _ctx.$t("qx"),
- mode: ""
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- class: "unipopup312",
- src: _ctx.$t("qx"),
- mode: ""
- }, null, 8, ["src"]))
- ]),
- vue.createElementVNode("view", {
- class: "unipopup311",
- onClick: _cache[15] || (_cache[15] = (...args) => $options.onunipopup && $options.onunipopup(...args))
- }, [
- _ctx.$t("qd") == "../../static/qd.png" ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "unipopup32",
- src: _ctx.$t("qd"),
- mode: ""
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- class: "unipopup312",
- src: _ctx.$t("qd"),
- mode: ""
- }, null, 8, ["src"]))
- ])
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- },
- 512
- /* NEED_PATCH */
- ),
- vue.createVNode(
- _component_uni_popup,
- {
- ref: "message",
- type: "message"
- },
- {
- default: vue.withCtx(() => [
- vue.createVNode(_component_uni_popup_message, {
- type: "error",
- message: _ctx.messageText,
- duration: 3e3
- }, null, 8, ["message"])
- ]),
- _: 1
- /* STABLE */
- },
- 512
- /* NEED_PATCH */
- )
- ]);
- }
- const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-4978fed5"], ["__file", "D:/project/esswisdom_ipad_V2/pages/home/index.vue"]]);
- const _sfc_main$8 = {
- props: {
- visible: Boolean,
- color: {
- type: String,
- default: "#303133"
- },
- placement: {
- type: String,
- default: "top"
- },
- content: {
- type: String,
- default: ""
- },
- show: {
- type: Boolean,
- default: false
- }
- },
- data() {
- return {
- isShow: this.visible,
- title: "Hello",
- arrowLeft: 0,
- query: null,
- style: {},
- arrowStyle: {}
- };
- },
- onLoad() {
- },
- watch: {
- isShow: {
- handler(val) {
- this.$emit("update:visible", val);
- },
- immediate: true
- },
- visible: {
- handler(val) {
- if (val) {
- this.$nextTick(() => {
- this.getPosition();
- });
- }
- this.isShow = val;
- },
- immediate: true
- }
- },
- mounted() {
- this.getPosition();
- },
- methods: {
- close() {
- this.isShow = false;
- },
- fixedWrap() {
- this.isShow = false;
- },
- async handleClick() {
- if (this.isShow) {
- return this.isShow = false;
- }
- await this.getPosition();
- this.isShow = true;
- },
- getPosition() {
- return new Promise((resolve) => {
- uni.createSelectorQuery().in(this).selectAll(".zb_tooltip_content,.zb_tooltip__popper").boundingClientRect(async (data) => {
- let { left, bottom, right, top, width, height } = data[0];
- let obj1 = data[1];
- let objStyle = {};
- let objStyle1 = {};
- switch (this.placement) {
- case "top":
- if (obj1.width > width) {
- objStyle.left = `-${(obj1.width - width) / 2}px`;
- } else {
- objStyle.left = `${Math.abs(obj1.width - width) / 2}px`;
- }
- objStyle.bottom = `${height + 8}px`;
- objStyle1.left = obj1.width / 2 - 6 + "px";
- break;
- case "top-start":
- objStyle.left = `0px`;
- objStyle.bottom = `${height + 8}px`;
- break;
- case "top-end":
- objStyle.right = `0px`;
- objStyle.bottom = `${height + 8}px`;
- objStyle1.right = `8px`;
- break;
- case "bottom":
- if (obj1.width > width) {
- objStyle.left = `-${(obj1.width - width) / 2}px`;
- } else {
- objStyle.left = `${Math.abs(obj1.width - width) / 2}px`;
- }
- objStyle.top = `${height + 8}px`;
- objStyle1.left = obj1.width / 2 - 6 + "px";
- break;
- case "bottom-start":
- objStyle.left = `0px`;
- objStyle.top = `${height + 8}px`;
- objStyle1.left = `8px`;
- break;
- case "bottom-end":
- objStyle.right = `0px`;
- objStyle.top = `${height + 8}px`;
- objStyle1.right = `8px`;
- break;
- case "right":
- objStyle.left = `${width + 8}px`;
- if (obj1.height > height) {
- objStyle.top = `-${(obj1.height - height) / 2}px`;
- } else {
- objStyle.top = `${Math.abs((obj1.height - height) / 2)}px`;
- }
- objStyle1.top = `${obj1.height / 2 - 6}px`;
- break;
- case "right-start":
- objStyle.left = `${width + 8}px`;
- objStyle.top = `0px`;
- objStyle1.top = `8px`;
- break;
- case "right-end":
- objStyle.left = `${width + 8}px`;
- objStyle.bottom = `0px`;
- objStyle1.bottom = `8px`;
- break;
- case "left":
- objStyle.right = `${width + 8}px`;
- if (obj1.height > height) {
- objStyle.top = `-${(obj1.height - height) / 2}px`;
- } else {
- objStyle.top = `${Math.abs((obj1.height - height) / 2)}px`;
- }
- objStyle1.top = `${obj1.height / 2 - 6}px`;
- break;
- case "left-start":
- objStyle.right = `${width + 8}px`;
- objStyle.top = `0px`;
- objStyle1.top = `8px`;
- break;
- case "left-end":
- objStyle.right = `${width + 8}px`;
- objStyle.bottom = `0px`;
- objStyle1.bottom = `8px`;
- break;
- }
- this.style = objStyle;
- this.arrowStyle = objStyle1;
- resolve();
- }).exec();
- });
- }
- }
- };
- function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "zb-tooltip",
- style: vue.normalizeStyle({
- "--theme-bg-color": $props.color
- })
- },
- [
- vue.createElementVNode("view", {
- class: "zb_tooltip_content",
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.handleClick && $options.handleClick(...args), ["stop"]))
- }, [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
- vue.createElementVNode(
- "view",
- {
- class: "zb_tooltip__popper",
- onClick: vue.withModifiers(() => {
- }, ["stop"]),
- style: vue.normalizeStyle([$data.style, {
- visibility: $data.isShow ? "visible" : "hidden",
- color: $props.color === "white" ? "" : "#fff",
- boxShadow: $props.color === "white" ? "0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d" : ""
- }])
- },
- [
- vue.renderSlot(_ctx.$slots, "content", {}, () => [
- vue.createTextVNode(
- vue.toDisplayString($props.content),
- 1
- /* TEXT */
- )
- ], true),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["zb_popper__icon", [{
- "zb_popper__up": $props.placement.indexOf("bottom") === 0,
- "zb_popper__arrow": $props.placement.indexOf("top") === 0,
- "zb_popper__right": $props.placement.indexOf("right") === 0,
- "zb_popper__left": $props.placement.indexOf("left") === 0
- }]]),
- style: vue.normalizeStyle([$data.arrowStyle])
- },
- null,
- 6
- /* CLASS, STYLE */
- )
- ],
- 4
- /* STYLE */
- )
- ])
- ],
- 4
- /* STYLE */
- );
- }
- const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-13dad3a2"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue"]]);
- const en$1 = {
- "uni-pagination.prevText": "prev",
- "uni-pagination.nextText": "next",
- "uni-pagination.piecePerPage": "piece/page"
- };
- const es = {
- "uni-pagination.prevText": "anterior",
- "uni-pagination.nextText": "prxima",
- "uni-pagination.piecePerPage": "Art��culo/P��gina"
- };
- const fr = {
- "uni-pagination.prevText": "précédente",
- "uni-pagination.nextText": "suivante",
- "uni-pagination.piecePerPage": "Articles/Pages"
- };
- const zhHans$1 = {
- "uni-pagination.prevText": "上一页",
- "uni-pagination.nextText": "下一页",
- "uni-pagination.piecePerPage": "条/页"
- };
- const zhHant$1 = {
- "uni-pagination.prevText": "上一頁",
- "uni-pagination.nextText": "下一頁",
- "uni-pagination.piecePerPage": "條/頁"
- };
- const messages$1 = {
- en: en$1,
- es,
- fr,
- "zh-Hans": zhHans$1,
- "zh-Hant": zhHant$1
- };
- const {
- t
- } = initVueI18n(messages$1);
- const _sfc_main$7 = {
- name: "UniPagination",
- emits: ["update:modelValue", "input", "change", "pageSizeChange"],
- props: {
- value: {
- type: [Number, String],
- default: 1
- },
- modelValue: {
- type: [Number, String],
- default: 1
- },
- prevText: {
- type: String
- },
- nextText: {
- type: String
- },
- piecePerPageText: {
- type: String
- },
- current: {
- type: [Number, String],
- default: 1
- },
- total: {
- // 数据总量
- type: [Number, String],
- default: 0
- },
- pageSize: {
- // 每页数据量
- type: [Number, String],
- default: 10
- },
- showIcon: {
- // 是否以 icon 形式展示按钮
- type: [Boolean, String],
- default: false
- },
- showPageSize: {
- // 是否以 icon 形式展示按钮
- type: [Boolean, String],
- default: false
- },
- pagerCount: {
- type: Number,
- default: 5
- },
- pageSizeRange: {
- type: Array,
- default: () => [20, 50, 100, 500]
- }
- },
- data() {
- return {
- pageSizeIndex: 0,
- currentIndex: 1,
- paperData: [],
- pickerShow: false
- };
- },
- computed: {
- piecePerPage() {
- return this.piecePerPageText || t("uni-pagination.piecePerPage");
- },
- prevPageText() {
- return this.prevText || t("uni-pagination.prevText");
- },
- nextPageText() {
- return this.nextText || t("uni-pagination.nextText");
- },
- maxPage() {
- let maxPage = 1;
- let total = Number(this.total);
- let pageSize = Number(this.pageSize);
- if (total && pageSize) {
- maxPage = Math.ceil(total / pageSize);
- }
- return maxPage;
- },
- paper() {
- const num = this.currentIndex;
- const pagerCount = this.pagerCount;
- const total = this.total;
- const pageSize = this.pageSize;
- let totalArr = [];
- let showPagerArr = [];
- let pagerNum = Math.ceil(total / pageSize);
- for (let i2 = 0; i2 < pagerNum; i2++) {
- totalArr.push(i2 + 1);
- }
- showPagerArr.push(1);
- const totalNum = totalArr[totalArr.length - (pagerCount + 1) / 2];
- totalArr.forEach((item, index) => {
- if ((pagerCount + 1) / 2 >= num) {
- if (item < pagerCount + 1 && item > 1) {
- showPagerArr.push(item);
- }
- } else if (num + 2 <= totalNum) {
- if (item > num - (pagerCount + 1) / 2 && item < num + (pagerCount + 1) / 2) {
- showPagerArr.push(item);
- }
- } else {
- if ((item > num - (pagerCount + 1) / 2 || pagerNum - pagerCount < item) && item < totalArr[totalArr.length - 1]) {
- showPagerArr.push(item);
- }
- }
- });
- if (pagerNum > pagerCount) {
- if ((pagerCount + 1) / 2 >= num) {
- showPagerArr[showPagerArr.length - 1] = "...";
- } else if (num + 2 <= totalNum) {
- showPagerArr[1] = "...";
- showPagerArr[showPagerArr.length - 1] = "...";
- } else {
- showPagerArr[1] = "...";
- }
- showPagerArr.push(totalArr[totalArr.length - 1]);
- } else {
- if ((pagerCount + 1) / 2 >= num)
- ;
- else if (num + 2 <= totalNum)
- ;
- else {
- showPagerArr.shift();
- showPagerArr.push(totalArr[totalArr.length - 1]);
- }
- }
- return showPagerArr;
- }
- },
- watch: {
- current: {
- immediate: true,
- handler(val, old) {
- if (val < 1) {
- this.currentIndex = 1;
- } else {
- this.currentIndex = val;
- }
- }
- },
- value: {
- immediate: true,
- handler(val) {
- if (Number(this.current) !== 1)
- return;
- if (val < 1) {
- this.currentIndex = 1;
- } else {
- this.currentIndex = val;
- }
- }
- },
- pageSizeIndex(val) {
- this.$emit("pageSizeChange", this.pageSizeRange[val]);
- }
- },
- methods: {
- pickerChange(e2) {
- this.pageSizeIndex = e2.detail.value;
- this.pickerClick();
- },
- pickerClick() {
- },
- // 选择标签
- selectPage(e2, index) {
- if (parseInt(e2)) {
- this.currentIndex = e2;
- this.change("current");
- } else {
- let pagerNum = Math.ceil(this.total / this.pageSize);
- if (index <= 1) {
- if (this.currentIndex - 5 > 1) {
- this.currentIndex -= 5;
- } else {
- this.currentIndex = 1;
- }
- return;
- }
- if (index >= 6) {
- if (this.currentIndex + 5 > pagerNum) {
- this.currentIndex = pagerNum;
- } else {
- this.currentIndex += 5;
- }
- return;
- }
- }
- },
- clickLeft() {
- if (Number(this.currentIndex) === 1) {
- return;
- }
- this.currentIndex -= 1;
- this.change("prev");
- },
- clickRight() {
- if (Number(this.currentIndex) >= this.maxPage) {
- return;
- }
- this.currentIndex += 1;
- this.change("next");
- },
- change(e2) {
- this.$emit("input", this.currentIndex);
- this.$emit("update:modelValue", this.currentIndex);
- this.$emit("change", {
- type: e2,
- current: this.currentIndex
- });
- }
- }
- };
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$2);
- return vue.openBlock(), vue.createElementBlock("view", { class: "box" }, [
- vue.createElementVNode("view"),
- vue.createElementVNode("view", { class: "uni-pagination" }, [
- $props.showPageSize === true || $props.showPageSize === "true" ? (vue.openBlock(), vue.createElementBlock("picker", {
- key: 0,
- class: "select-picker",
- mode: "selector",
- value: $data.pageSizeIndex,
- range: $props.pageSizeRange,
- onChange: _cache[0] || (_cache[0] = (...args) => $options.pickerChange && $options.pickerChange(...args)),
- onCancel: _cache[1] || (_cache[1] = (...args) => $options.pickerClick && $options.pickerClick(...args)),
- onClick: _cache[2] || (_cache[2] = (...args) => $options.pickerClick && $options.pickerClick(...args))
- }, [
- vue.createElementVNode("button", {
- type: "default",
- size: "mini",
- plain: true
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString($props.pageSizeRange[$data.pageSizeIndex]) + " " + vue.toDisplayString($options.piecePerPage),
- 1
- /* TEXT */
- ),
- vue.createVNode(_component_uni_icons, {
- class: "select-picker-icon",
- type: "arrowdown",
- size: "12",
- color: "#999"
- })
- ])
- ], 40, ["value", "range"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(' <view class="uni-pagination__total is-phone-hide">共 {{ total }} 条</view> '),
- vue.createElementVNode("view", {
- class: vue.normalizeClass(["uni-pagination__btn", $data.currentIndex === 1 ? "uni-pagination--disabled" : "uni-pagination--enabled"]),
- "hover-class": $data.currentIndex === 1 ? "" : "uni-pagination--hover",
- "hover-start-time": 20,
- "hover-stay-time": 70,
- onClick: _cache[3] || (_cache[3] = (...args) => $options.clickLeft && $options.clickLeft(...args))
- }, [
- $props.showIcon === true || $props.showIcon === "true" ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createVNode(_component_uni_icons, {
- color: "#666",
- size: "24",
- type: "left"
- }),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$t("LastPage")),
- 1
- /* TEXT */
- )
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "uni-pagination__child-btn"
- },
- vue.toDisplayString($options.prevPageText),
- 1
- /* TEXT */
- ))
- ], 10, ["hover-class"]),
- vue.createElementVNode("view", { class: "uni-pagination__num uni-pagination__num-flex-none" }, [
- vue.createElementVNode("view", { class: "uni-pagination__num-current" }, [
- vue.createElementVNode(
- "text",
- { class: "uni-pagination__num-current-text is-pc-hide current-index-text" },
- vue.toDisplayString($data.currentIndex),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "uni-pagination__num-current-text is-pc-hide" },
- "/" + vue.toDisplayString($options.maxPage || 0),
- 1
- /* TEXT */
- ),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.paper, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index,
- class: vue.normalizeClass([{ "page--active": item === $data.currentIndex }, "uni-pagination__num-tag tag--active is-phone-hide"]),
- onClick: ($event) => $options.selectPage(item, index)
- }, [
- vue.createElementVNode(
- "view",
- { class: "uni-pagination__num-tagwight" },
- vue.toDisplayString(item),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("view", {
- class: vue.normalizeClass(["uni-pagination__btn", $data.currentIndex >= $options.maxPage ? "uni-pagination--disabled" : "uni-pagination--enabled"]),
- "hover-class": $data.currentIndex === $options.maxPage ? "" : "uni-pagination--hover",
- "hover-start-time": 20,
- "hover-stay-time": 70,
- onClick: _cache[4] || (_cache[4] = (...args) => $options.clickRight && $options.clickRight(...args))
- }, [
- $props.showIcon === true || $props.showIcon === "true" ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.$t("NextPage")) + " ",
- 1
- /* TEXT */
- ),
- vue.createVNode(_component_uni_icons, {
- color: "#666",
- size: "24",
- type: "right"
- })
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "uni-pagination__child-btn"
- },
- vue.toDisplayString($options.nextPageText),
- 1
- /* TEXT */
- ))
- ], 10, ["hover-class"])
- ])
- ]);
- }
- const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-88b7506d"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue"]]);
- const _imports_2$1 = "/static/Return.png";
- const _sfc_main$6 = {
- data() {
- return {
- current: 1,
- total: 0,
- pageSize: 10,
- faulttaps: "故障",
- faultsList: []
- };
- },
- onLoad() {
- this.faulttaps = this.$store.state.event;
- this.onfaultsList();
- },
- computed: {
- // 使用 mapState 映射多个状态到组件的计算属性
- ...mapState(["formattedTime", "status", "event"])
- },
- beforeUnmount() {
- },
- methods: {
- onfaultsList() {
- let data = {
- page: this.current,
- rows: this.pageSize,
- device: "",
- starttime: "",
- endtime: "",
- rt: 0,
- type: this.faulttaps
- };
- getfaultsList(data).then((res) => {
- formatAppLog("log", "at pages/details/index.vue:197", res);
- if (res.status == "ok") {
- this.faultsList = res.data.list;
- this.total = res.data.pagination.total;
- }
- });
- },
- onclick() {
- uni.redirectTo({
- url: "/pages/index/index"
- });
- },
- onReturn() {
- uni.redirectTo({
- url: "/pages/faultlist/index"
- });
- },
- change(e2) {
- formatAppLog("log", "at pages/details/index.vue:221", e2);
- this.current = e2.current;
- this.onfaultsList();
- },
- // taps(e) {
- // this.faulttaps = e
- // this.current = 1
- // __f__('log','at pages/details/index.vue:228',e);
- // this.onfaultsList()
- // },
- // 文字提示
- closedevice() {
- for (let i2 = 1; i2 < this.total; i2++) {
- this.$refs["device" + i2].close();
- }
- },
- onFaultclearing() {
- let data = {
- id: "201c23d5-f460-44d5-8dde-8adb46cd00f7",
- issaveinitvalue: false,
- value: "1"
- };
- formatAppLog("log", "at pages/details/index.vue:244", data);
- control(data).then((res) => {
- formatAppLog("log", "at pages/details/index.vue:246", res);
- if (res.status == "ok") {
- setTimeout(() => {
- let info = {
- id: "201c23d5-f460-44d5-8dde-8adb46cd00f7",
- issaveinitvalue: false,
- value: "0"
- };
- control(info).then((ress) => {
- formatAppLog("log", "at pages/details/index.vue:255", ress);
- if (ress.status == "ok") {
- uni.showToast({
- title: this.$t("OperationSuccessful"),
- icon: "none",
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- } else {
- uni.showToast({
- title: this.$t("operationFailed"),
- icon: "none",
- // 使用 'none' 图标来表示失败
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- }
- });
- }, 1e3);
- } else {
- uni.showToast({
- title: this.$t("operationFailed"),
- icon: "none",
- // 使用 'none' 图标来表示失败
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- }
- });
- }
- // close() {
- // for (let i = 1; i < this.total; i++) {
- // this.$refs[('tooltip' + i)].close()
- // }
- // }
- }
- };
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_zb_tooltip = resolveEasycom(vue.resolveDynamicComponent("zb-tooltip"), __easycom_0);
- const _component_uni_pagination = resolveEasycom(vue.resolveDynamicComponent("uni-pagination"), __easycom_1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- class: "top_logo",
- src: _imports_0,
- mode: ""
- }),
- vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
- vue.createElementVNode(
- "view",
- { class: "tite" },
- vue.toDisplayString(_ctx.$t("MainTitle")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time" }, [
- vue.createElementVNode(
- "view",
- { class: "time_top" },
- vue.toDisplayString(_ctx.formattedTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time_bottom" }, [
- vue.createElementVNode("view"),
- vue.createElementVNode("view", { class: "time_bottom1" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.$t("status")) + " ",
- 1
- /* TEXT */
- ),
- _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "time_state"
- },
- vue.toDisplayString(_ctx.$t("online")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "time_state1"
- },
- vue.toDisplayString(_ctx.$t("offline")),
- 1
- /* TEXT */
- ))
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter" }, [
- vue.createElementVNode("view", { class: "parameter_xian" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_xian1" },
- vue.toDisplayString(_ctx.$t("formNO")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_xian2" },
- vue.toDisplayString(_ctx.$t("formUnit")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_xian3" },
- vue.toDisplayString(_ctx.$t("formDescription")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_xian4" },
- vue.toDisplayString(_ctx.$t("formFailure")),
- 1
- /* TEXT */
- ),
- vue.createCommentVNode(' <view class="parameter_xian5">\r\n 发生时间\r\n </view> '),
- _ctx.event != "事件" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "parameter_xian6"
- },
- vue.toDisplayString(_ctx.$t("formRecover")),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "parameter_box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.faultsList, (item, index) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(item.RESETTIME == "" && _ctx.event != "事件" ? "parameter_divred" : "parameter_div"),
- key: index
- },
- [
- vue.createElementVNode(
- "view",
- { class: "parameter_xian1" },
- vue.toDisplayString(item.ID),
- 1
- /* TEXT */
- ),
- vue.createCommentVNode(' <view class="parameter_xian2">\r\n {{item.TYPE}}\r\n </view> '),
- vue.createCommentVNode(` <zb-tooltip @click.top="close" :content="item.DEVICE" placement="top" :ref="'tooltip'+index"> `),
- item.DEVICE == "亿能BMS-1" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_xian2"
- }, " BMS ")) : vue.createCommentVNode("v-if", true),
- item.DEVICE == "英博电气pcs-1" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_xian2"
- }, " PCS ")) : vue.createCommentVNode("v-if", true),
- item.DEVICE == "virtual" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "parameter_xian2"
- }, " MCS ")) : vue.createCommentVNode("v-if", true),
- item.DEVICE == "充电桩ccu-1-1" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "parameter_xian2"
- }, " CCU ")) : vue.createCommentVNode("v-if", true),
- item.DEVICE == "innerIO-1" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "parameter_xian2"
- }, " IO ")) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" </zb-tooltip> "),
- vue.createVNode(_component_zb_tooltip, {
- onClick: $options.closedevice,
- content: item.CONTENT,
- placement: "top",
- ref_for: true,
- ref: "device" + index
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode(
- "view",
- { class: "parameter_xian3" },
- vue.toDisplayString(item.CONTENT),
- 1
- /* TEXT */
- )
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["onClick", "content"]),
- vue.createElementVNode(
- "view",
- { class: "parameter_xian4" },
- vue.toDisplayString(item.FAULTTIME.substring(0, 19)),
- 1
- /* TEXT */
- ),
- _ctx.event != "事件" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 5,
- class: "parameter_xian6"
- },
- vue.toDisplayString(item.RESETTIME.substring(0, 19)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { class: "parameter_bottom" }, [
- vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [
- vue.createElementVNode("view", {
- class: "parameter_bottom1",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.onclick && $options.onclick(...args))
- }, [
- vue.createElementVNode("image", {
- src: _imports_1$3,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_bottom2" },
- vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "parameter_bottom11",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.onReturn && $options.onReturn(...args))
- }, [
- vue.createElementVNode("image", {
- src: _imports_2$1,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_bottom2" },
- vue.toDisplayString(_ctx.$t("Return")),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createCommentVNode(` <view class="parameter_bottom3">\r
- <view :class="faulttaps=='实时'?'parameter_bottom31':'parameter_bottom32'" @click="taps('实时')">\r
- 实时\r
- </view>\r
- \r
- <view v-if="event=='故障'" :class="faulttaps=='故障'?'parameter_bottom31':'parameter_bottom32'" @click="taps('故障')">\r
- 故障\r
- </view>\r
- <view v-if="event=='告警'" :class="faulttaps=='告警'?'parameter_bottom31':'parameter_bottom32'" @click="taps('告警')">\r
- 告警\r
- </view>\r
- <view v-if="event=='事件'" :class="faulttaps=='事件'?'parameter_bottom31':'parameter_bottom32'" @click="taps('事件')">\r
- 事件\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_bottom4" }, [
- vue.createElementVNode(
- "view",
- {
- class: "eliminate",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.onFaultclearing && $options.onFaultclearing(...args))
- },
- vue.toDisplayString(_ctx.$t("FaultClearing")),
- 1
- /* TEXT */
- ),
- vue.createVNode(_component_uni_pagination, {
- total: $data.total,
- current: $data.current,
- title: "标题文字",
- "show-icon": true,
- onChange: $options.change
- }, null, 8, ["total", "current", "onChange"])
- ])
- ])
- ])
- ]);
- }
- const PagesDetailsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-a45dfdea"], ["__file", "D:/project/esswisdom_ipad_V2/pages/details/index.vue"]]);
- const _imports_1$2 = "/static/img/AC2.png";
- const _imports_3$2 = "/static/fang.png";
- const _sfc_main$5 = {
- components: {
- cmdProgress: __easycom_0$1
- },
- data() {
- return {
- successtype: "success",
- confirmText: "确认启动",
- title: "你确定要开启该设备吗?",
- content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
- value: "",
- modeinput: "",
- segmented: 1,
- uidatas: "",
- formatTimeid: "",
- faultsdata: [],
- messageText: "",
- SysFaultState: true,
- currentDate: ""
- };
- },
- onLoad() {
- this.confirmText = this.$t("ConfirmStart");
- this.title = this.$t("popUpTitle");
- this.content = this.$t("popUpContent");
- },
- computed: {
- // 使用 mapState 映射多个状态到组件的计算属性
- ...mapState(["formattedTime", "status"]),
- ...mapState({
- uidatasdata: (state2) => state2.uidatasdata
- })
- },
- mounted() {
- },
- beforeUnmount() {
- },
- watch: {
- uidatasdata: {
- handler(newVal, oldVal) {
- formatAppLog("log", "at pages/electricity/index.vue:631", "uidatasdata 发生变化:", newVal);
- if (newVal.SysState_SysFaultState == 1 && this.SysFaultState) {
- this.SysFaultState = false;
- setTimeout(() => {
- this.onfaultsdata();
- }, 1e3);
- } else if (newVal.SysState_SysFaultState == 0) {
- this.SysFaultState = true;
- }
- },
- deep: true
- // 监听深层次的变化
- }
- },
- methods: {
- onfaultsdata() {
- let data = {
- page: 1,
- rows: 10,
- device: "",
- starttime: "",
- endtime: "",
- rt: 1,
- type: "故障"
- };
- getfaultsList(data).then((res) => {
- formatAppLog("log", "at pages/electricity/index.vue:658", res);
- if (res.status == "ok") {
- this.faultsdata = [];
- for (var i2 = 0; i2 < res.data.list.length; i2++) {
- if (this.$store.state.formattedTime.substring(0, 10) == res.data.list[i2].FAULTTIME.substring(0, 10)) {
- this.faultsdata.push(res.data.list[i2]);
- }
- }
- }
- });
- },
- // 返回首页
- onreturn() {
- uni.redirectTo({
- url: "/pages/index/index"
- });
- },
- // 启动设备弹窗
- dialogToggle() {
- this.modeinput = "base";
- this.successtype = "success";
- this.confirmText = this.$t("ConfirmStart");
- this.title = this.$t("popUpTitle");
- this.content = this.$t("popUpContent");
- this.$refs.alertDialog.open();
- },
- onstopit() {
- this.modeinput = "base";
- this.successtype = "error";
- this.confirmText = this.$t("ConfirmStop");
- this.title = this.$t("popUpTitleStop");
- this.content = this.$t("popUpContentStop");
- this.$refs.alertDialog.open();
- },
- // 确认弹窗
- dialogConfirm() {
- this.$store.state.uidatasdata;
- let data = {
- id: "c35c4db0-113f-442a-9e26-728489265fdb",
- issaveinitvalue: false,
- value: this.content == this.$t("popUpContent") ? "1" : "0"
- };
- control(data).then((data2) => {
- if (data2.status == "ok") {
- this.$refs.alertDialog.close();
- uni.showToast({
- title: this.$t("OperationSuccessful"),
- icon: "none",
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- } else {
- this.$refs.alertDialog.close();
- uni.showToast({
- title: this.$t("operationFailed"),
- icon: "none",
- // 使用 'none' 图标来表示失败
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- }
- });
- },
- dialogClose() {
- formatAppLog("log", "at pages/electricity/index.vue:735", this.value);
- this.$refs.alertDialog.close();
- },
- ontap(e2) {
- formatAppLog("log", "at pages/electricity/index.vue:739", e2);
- this.segmented = e2;
- }
- }
- };
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
- const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
- const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
- const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- class: "top_logo",
- src: _imports_0,
- mode: ""
- }),
- vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
- vue.createElementVNode(
- "view",
- { class: "tite" },
- vue.toDisplayString(_ctx.$t("MainTitle")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time" }, [
- vue.createElementVNode(
- "view",
- { class: "time_top" },
- vue.toDisplayString(_ctx.formattedTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time_bottom" }, [
- vue.createElementVNode("view"),
- vue.createElementVNode("view", { class: "time_bottom1" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.$t("status")) + " ",
- 1
- /* TEXT */
- ),
- _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "time_state"
- },
- vue.toDisplayString(_ctx.$t("online")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "time_state1"
- },
- vue.toDisplayString(_ctx.$t("offline")),
- 1
- /* TEXT */
- ))
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter" }, [
- vue.createElementVNode("view", { class: "parameter_left" }, [
- vue.createElementVNode("view", { class: "parameter_left1" }, [
- vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
- vue.createVNode(_component_cmd_progress, {
- type: "dashboard",
- percent: _ctx.uidatasdata.SOC ?? 0,
- "stroke-color": "#B0D0FF",
- "stroke-width": 6,
- width: 180,
- "stroke-shape": "square",
- showInfo: false
- }, null, 8, ["percent"]),
- vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
- vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
- ]),
- vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
- ]),
- vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
- vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
- vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
- vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
- ])
- ])
- ]),
- vue.createCommentVNode(' <jerry-gauge></jerry-gauge>\r\n <view class="parameter_canvas">\r\n <view class="parameter_canvas1">\r\n 0\r\n </view>\r\n <view class="parameter_canvas2">\r\n 100%\r\n </view>\r\n </view> ')
- ]),
- vue.createElementVNode("image", {
- class: "parameter_leftdian1",
- src: _imports_1$2,
- alt: ""
- }),
- vue.createElementVNode("view", { class: "parameter_lef2" }, [
- vue.createElementVNode("image", {
- src: _imports_2$2,
- mode: ""
- })
- ]),
- vue.createElementVNode("image", {
- class: "parameter_leftche1",
- src: _imports_3$2,
- mode: ""
- }),
- vue.createElementVNode(
- "view",
- { class: "parameter_leftview" },
- vue.toDisplayString(_ctx.$t("CommunicationSupplyOutput")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_right" }, [
- vue.createElementVNode("view", { class: "parameter_righttop" }, [
- vue.createElementVNode("view", { class: "parameter_1" }, [
- vue.createCommentVNode(` <view class="parameter_2">\r
- <view class="parameter_31">\r
- <view class="parameter_4">\r
- <image src="../../static/y8.png" mode="" v-if="uidatasdata.AC_Out_380V_125A_Status==0.00"></image>\r
- <image src="../../static/y6.png" mode="" v-else></image>\r
- {{$t('state125A')}}\r
- </view>\r
- <view class="parameter_51" v-if="uidatasdata.AC_Out_380V_125A_Status==0.00">\r
- {{$t('connect')}}\r
- </view>\r
- <view class="parameter_5" v-else>\r
- {{$t('breakoff')}}\r
- </view>\r
- </view>\r
- <view class="parameter_31">\r
- <view class="parameter_4">\r
- <image src="../../static/y8.png" mode="" v-if="uidatasdata.AC_Out_380V_63A_Status==0.00"></image>\r
- <image src="../../static/y6.png" mode="" v-else></image>\r
- {{$t('state63A')}}\r
- </view>\r
- <view class="parameter_51" v-if="uidatasdata.AC_Out_380V_63A_Status==0.00">\r
- {{$t('connect')}}\r
- </view>\r
- <view class="parameter_5" v-else>\r
- {{$t('breakoff')}}\r
- </view>\r
- </view>\r
- <view class="parameter_31">\r
- <view class="parameter_4">\r
- <image src="../../static/y8.png" mode="" v-if="uidatasdata.AC_Out_220V_16A_Status==0.00"></image>\r
- <image src="../../static/y6.png" mode="" v-else></image>\r
- {{$t('state16A')}}\r
- </view>\r
- <view class="parameter_51" v-if="uidatasdata.AC_Out_220V_16A_Status==0.00">\r
- {{$t('connect')}}\r
- </view>\r
- <view class="parameter_5" v-else>\r
- {{$t('breakoff')}}\r
- </view>\r
- </view>\r
- \r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_SOC" }, [
- vue.createElementVNode("image", {
- src: _imports_6,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "text",
- { class: "parameter_SOCright2" },
- vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", null, " %")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_Battery" }, [
- vue.createElementVNode("image", {
- src: _imports_7,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_SOCright1" },
- vue.toDisplayString(_ctx.$t("BatteryStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("fault")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==0">\r
- {{$t('ChuShiHua')}}\r
- </view> `),
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
- 1
- /* TEXT */
- )
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 2 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==2">\r
- {{$t('HighVoltageMedium')}}\r
- </view> `),
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("voltagehasbeen")),
- 1
- /* TEXT */
- )
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 3 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==4">\r
- {{$t('Underhighpressure')}}\r
- </view> `),
- vue.createElementVNode("view", null, " — ")
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )),
- vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} ")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_state" }, [
- vue.createElementVNode("image", {
- src: _imports_8,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_SOCright1" },
- vue.toDisplayString(_ctx.$t("SystemStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("uncharged")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("Chargingprogress")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("full")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 4 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_==4">\r
- {{$t('Chargingstopped')}}\r
- </view> `),
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_>3&&uidatasdata.bms_BatSysWorkMode_<8">\r
- {{$t('retain')}}\r
- </view> `),
- vue.createElementVNode("view", null, " — ")
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- ))
- ])
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_tap" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
- },
- vue.toDisplayString(_ctx.$t("exchangeinformation")),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2))
- },
- vue.toDisplayString(_ctx.$t("Batteryinformation")),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3))
- },
- vue.toDisplayString(_ctx.$t("statisticalinformation")),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(4))
- },
- vue.toDisplayString(_ctx.$t("coolinginformation")),
- 3
- /* TEXT, CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng" }, [
- $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("PhaseVoltageAV")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.PCSPortAPhaseVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("PhaseVoltageBV")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.PCSPortBPhaseVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("PhaseVoltageCV")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.PCSPortCPhaseVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("DischargePower")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.PCSTotalOutputPower ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("PhaseVoltageAA")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata["PCSOutputA-phaseCurrent"] ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("PhaseVoltageBA")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata["PCSOutputB-phaseCurrent"] ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("PhaseVoltageCA")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata["PCSOutputC-phaseCurrent"] ?? "—"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createElementVNode("view", {
- class: "parameter_zheng11",
- style: { "height": "30px" }
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng12" }, [
- vue.createCommentVNode(" {{$t('DischargeCapacity')}} ")
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng13">\r
- {{uidatasdata.PCSACDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text>\r
- </view> `)
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createCommentVNode(` <view class="parameter_zheng11">\r
- <view class="parameter_zheng12">\r
- {{$t('Batterypower')}}\r
- </view>\r
- <view class="parameter_zheng13">\r
- {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">kW</text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("TotalPressure")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("AllowableDischargepower")),
- 1
- /* TEXT */
- ),
- vue.createCommentVNode(" DchChgCurPowLimit_MaxDischargeCurrentLimit "),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargePowerLimit ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MaximumVoltage")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MaximumTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("BatteryCurrent")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng11">\r
- <view class="parameter_zheng12">\r
- {{$t('TotalExternalPressure')}}\r
- </view>\r
- <view class="parameter_zheng13">\r
- {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("AllowDischargeCurrent")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createCommentVNode(" {{uidatasdata.ChargingInformation_Chg_Max_Cur??'—'}} <text "),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargeCurrentLimit ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng10" }, [
- vue.createCommentVNode(` <view class="parameter_zhengbox">\r
- <view class="parameter_zheng12">\r
- {{$t('AccumulatedChargingCapacityCommunication')}}\r
- </view>\r
- <view class="parameter_zhengbox13">\r
- {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kW</text> <text></text>\r
- </view>\r
- </view>\r
- <view class="parameter_zhengbox parameter_zheng101">\r
- <view class="parameter_zheng12">\r
- {{$t('AccumulatedDCChargingCapacity')}}\r
- </view>\r
- <view class="parameter_zhengbox13">\r
- {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">V</text> <text></text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zhengbox" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("RunningTimesdischarge")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CommunicationDuration) + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "parameter_zheng14" },
- vue.toDisplayString(_ctx.$t("RunningTimesmin")),
- 1
- /* TEXT */
- ),
- vue.createTextVNode(),
- vue.createElementVNode("text")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("InputCapacitydischarge")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CommunicationDischarge) + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
- vue.createTextVNode(),
- vue.createElementVNode("text")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("AccumulateInputdischarge")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
- vue.createCommentVNode(` {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text> `),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.uidatasdata.PCSACDisChargeEnergy ?? "—"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
- vue.createTextVNode(),
- vue.createElementVNode("text")
- ])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("WorkingMode")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
- vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
- _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("OffMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("CoolingMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("HeatingMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("CirculatingMode")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("OutletTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode("view", {
- class: "parameter_zheng12",
- style: { "height": "30px" }
- }, [
- vue.createCommentVNode(" {{$t('PowerDemand')}} ")
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng13">\r
- {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text class="parameter_zheng14">kW</text>\r
- </view> `)
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("DisconnectedState")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("ClosedState")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("waterTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode("view", {
- class: "parameter_zheng12",
- style: { "height": "30px" }
- }, [
- vue.createCommentVNode(" {{$t('FaultLevel')}} ")
- ]),
- vue.createCommentVNode(` <view class="parameter_Batterystate">\r
- <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
- \r
- {{$t('NoMalfunction')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
- 1{{$t('LevelLault')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
- 2{{$t('LevelLault')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
- 3{{$t('LevelLault')}}\r
- </view>\r
- <view v-else>\r
- —\r
- </view>\r
- </view> `)
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "parameter_zheng3" }, [
- _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_zheng31111",
- onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32" },
- vue.toDisplayString(_ctx.$t("open")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_zheng31111"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32ccc" },
- vue.toDisplayString(_ctx.$t("open")),
- 1
- /* TEXT */
- )
- ])
- ])),
- _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "parameter_zheng31111",
- onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args))
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng33" },
- vue.toDisplayString(_ctx.$t("stopIt")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "parameter_zheng31111"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32ccc" },
- vue.toDisplayString(_ctx.$t("stopIt")),
- 1
- /* TEXT */
- )
- ])
- ]))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_home" }, [
- vue.createElementVNode("view", {
- class: "parameter_home1",
- onClick: _cache[6] || (_cache[6] = (...args) => $options.onreturn && $options.onreturn(...args))
- }, [
- vue.createElementVNode("image", {
- src: _imports_1$3,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_hometext" },
- vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
- 1
- /* TEXT */
- )
- ]),
- $data.faultsdata.length > 0 && !$data.SysFaultState ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_home2"
- }, [
- vue.createElementVNode("image", {
- src: _imports_10$1,
- mode: ""
- }),
- vue.createElementVNode("swiper", {
- class: "swiper",
- circular: "",
- autoplay: true,
- interval: 2e3,
- duration: 500,
- vertical: true
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.faultsdata, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_home3" },
- vue.toDisplayString(item["CONTENT"]),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]),
- vue.createVNode(
- _component_uni_popup,
- { ref: "alertDialog" },
- {
- default: vue.withCtx(() => [
- vue.createVNode(_component_uni_popup_dialog, {
- mode: $data.modeinput,
- placeholder: "请输入内容",
- modelValue: $data.value,
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.value = $event),
- type: $data.successtype,
- cancelText: _ctx.$t("CancelReturn"),
- confirmText: $data.confirmText,
- title: $data.title,
- content: $data.content,
- beforeClose: true,
- onConfirm: $options.dialogConfirm,
- onClose: $options.dialogClose
- }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
- ]),
- _: 1
- /* STABLE */
- },
- 512
- /* NEED_PATCH */
- ),
- vue.createVNode(
- _component_uni_popup,
- {
- ref: "message",
- type: "message"
- },
- {
- default: vue.withCtx(() => [
- vue.createVNode(_component_uni_popup_message, {
- type: "error",
- message: $data.messageText,
- duration: 3e3
- }, null, 8, ["message"])
- ]),
- _: 1
- /* STABLE */
- },
- 512
- /* NEED_PATCH */
- )
- ]);
- }
- const PagesElectricityIndex = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-a9482145"], ["__file", "D:/project/esswisdom_ipad_V2/pages/electricity/index.vue"]]);
- const _imports_1$1 = "/static/img/DC3.png";
- const _imports_4$1 = "/static/shan.png";
- const _sfc_main$4 = {
- components: {
- cmdProgress: __easycom_0$1
- },
- data() {
- return {
- successtype: "success",
- confirmText: "确认启动",
- title: "你确定要开启该设备吗?",
- content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
- value: "",
- modeinput: "",
- segmented: 1,
- uidatas: "",
- formatTimeid: "",
- faultsdata: [],
- SysFaultState: true,
- currentDate: ""
- };
- },
- onLoad() {
- this.confirmText = this.$t("ConfirmStart");
- this.title = this.$t("popUpTitle");
- this.content = this.$t("popUpContent");
- },
- computed: {
- // 使用 mapState 映射多个状态到组件的计算属性
- ...mapState(["formattedTime", "status"]),
- ...mapState({
- uidatasdata: (state2) => state2.uidatasdata
- })
- },
- mounted() {
- },
- beforeUnmount() {
- },
- watch: {
- uidatasdata: {
- handler(newVal, oldVal) {
- formatAppLog("log", "at pages/supply/supply.vue:636", "uidatasdata 发生变化:", newVal);
- if (newVal.SysState_SysFaultState == 1 && this.SysFaultState) {
- this.SysFaultState = false;
- setTimeout(() => {
- this.onfaultsdata();
- }, 1e3);
- } else if (newVal.SysState_SysFaultState == 0) {
- this.SysFaultState = true;
- }
- },
- deep: true
- // 监听深层次的变化
- }
- },
- methods: {
- onfaultsdata() {
- let data = {
- page: 1,
- rows: 10,
- device: "",
- starttime: "",
- endtime: "",
- rt: 1,
- type: "故障"
- };
- getfaultsList(data).then((res) => {
- formatAppLog("log", "at pages/supply/supply.vue:663", res);
- if (res.status == "ok") {
- this.faultsdata = [];
- for (var i2 = 0; i2 < res.data.list.length; i2++) {
- if (this.$store.state.formattedTime.substring(0, 10) == res.data.list[i2].FAULTTIME.substring(0, 10)) {
- this.faultsdata.push(res.data.list[i2]);
- }
- }
- }
- });
- },
- // 返回首页
- onreturn() {
- uni.redirectTo({
- url: "/pages/index/index"
- });
- },
- // 启动设备弹窗
- dialogToggle() {
- this.modeinput = "base";
- this.successtype = "success";
- this.confirmText = this.$t("ConfirmStart");
- this.title = this.$t("popUpTitle");
- this.content = this.$t("popUpContent");
- this.$refs.alertDialog.open();
- },
- onstopit() {
- this.modeinput = "base";
- this.successtype = "error";
- this.confirmText = this.$t("ConfirmStop");
- this.title = this.$t("popUpTitleStop");
- this.content = this.$t("popUpContentStop");
- this.$refs.alertDialog.open();
- },
- // 确认弹窗
- dialogConfirm() {
- let data = {
- id: "c35c4db0-113f-442a-9e26-728489265fdb",
- issaveinitvalue: false,
- value: this.content == this.$t("popUpContent") ? "1" : "0"
- };
- control(data).then((data2) => {
- if (data2.status == "ok") {
- uni.showToast({
- title: this.$t("OperationSuccessful"),
- icon: "none",
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- } else {
- uni.showToast({
- title: this.$t("operationFailed"),
- icon: "none",
- // 使用 'none' 图标来表示失败
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- }
- });
- },
- dialogClose() {
- formatAppLog("log", "at pages/supply/supply.vue:729", this.value);
- this.$refs.alertDialog.close();
- },
- ontap(e2) {
- formatAppLog("log", "at pages/supply/supply.vue:733", e2);
- this.segmented = e2;
- }
- }
- };
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
- const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
- const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- class: "top_logo",
- src: _imports_0,
- mode: ""
- }),
- vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
- vue.createElementVNode(
- "view",
- { class: "tite" },
- vue.toDisplayString(_ctx.$t("MainTitle")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time" }, [
- vue.createElementVNode(
- "view",
- { class: "time_top" },
- vue.toDisplayString(_ctx.formattedTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time_bottom" }, [
- vue.createElementVNode("view"),
- vue.createElementVNode("view", { class: "time_bottom1" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.$t("status")) + " ",
- 1
- /* TEXT */
- ),
- _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "time_state"
- },
- vue.toDisplayString(_ctx.$t("online")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "time_state1"
- },
- vue.toDisplayString(_ctx.$t("offline")),
- 1
- /* TEXT */
- ))
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter" }, [
- vue.createElementVNode("view", { class: "parameter_left" }, [
- vue.createElementVNode("view", { class: "parameter_left1" }, [
- vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
- vue.createVNode(_component_cmd_progress, {
- type: "dashboard",
- percent: _ctx.uidatasdata.SOC ?? 0,
- "stroke-color": "#B0D0FF",
- "stroke-width": 6,
- width: 180,
- "stroke-shape": "square",
- showInfo: false
- }, null, 8, ["percent"]),
- vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
- vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
- ]),
- vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
- ]),
- vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
- vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
- vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
- vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
- ])
- ])
- ]),
- vue.createCommentVNode(' <jerry-gauge></jerry-gauge>\r\n <view class="parameter_canvas">\r\n <view class="parameter_canvas1">\r\n 0\r\n </view>\r\n <view class="parameter_canvas2">\r\n 100%\r\n </view>\r\n </view> ')
- ]),
- vue.createElementVNode("image", {
- class: "parameter_leftdian1",
- src: _imports_1$1,
- alt: ""
- }),
- vue.createElementVNode("view", { class: "parameter_lef2" }, [
- vue.createElementVNode("image", {
- src: _imports_2$2,
- mode: ""
- })
- ]),
- vue.createElementVNode("image", {
- class: "parameter_leftche",
- src: _imports_3$3,
- mode: ""
- }),
- vue.createElementVNode(
- "view",
- { class: "parameter_leftview" },
- vue.toDisplayString(_ctx.$t("DirectRechargeInput")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_right" }, [
- vue.createElementVNode("view", { class: "parameter_righttop" }, [
- vue.createElementVNode("view", { class: "parameter_1" }, [
- vue.createElementVNode("view", { class: "parameter_shan" }, [
- vue.createElementVNode("image", {
- src: _imports_4$1,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_SOCright1" },
- vue.toDisplayString(_ctx.$t("ChargingPower")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createElementVNode(
- "text",
- { class: "parameter_SOCright2" },
- vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatPower ?? "—"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", null, " kW")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_SOC" }, [
- vue.createElementVNode("image", {
- src: _imports_6,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "text",
- { class: "parameter_SOCright2" },
- vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", null, " %")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_Battery" }, [
- vue.createElementVNode("image", {
- src: _imports_7,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_SOCright1" },
- vue.toDisplayString(_ctx.$t("BatteryStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("fault")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==0">\r
- {{$t('ChuShiHua')}}\r
- </view> `),
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
- 1
- /* TEXT */
- )
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 2 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==2">\r
- {{$t('HighVoltageMedium')}}\r
- </view> `),
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("voltagehasbeen")),
- 1
- /* TEXT */
- )
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 3 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==4">\r
- {{$t('Underhighpressure')}}\r
- </view> `),
- vue.createElementVNode("view", null, " — ")
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )),
- vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} ")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_state" }, [
- vue.createElementVNode("image", {
- src: _imports_8,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_SOCright1" },
- vue.toDisplayString(_ctx.$t("SystemStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("uncharged")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("Chargingprogress")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("full")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 4 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_==4">\r
- {{$t('Chargingstopped')}}\r
- </view> `),
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_>3&&uidatasdata.bms_BatSysWorkMode_<8">\r
- {{$t('retain')}}\r
- </view> `),
- vue.createElementVNode("view", null, " — ")
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- ))
- ])
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_tap" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
- },
- vue.toDisplayString(_ctx.$t("Batteryinformation")),
- 3
- /* TEXT, CLASS */
- ),
- vue.createCommentVNode(` <view :class="segmented==2?'parameter_tap1':'parameter_tap2'" @click="ontap(2)">\r
- {{$t('ConnectionInformation')}}\r
- </view> `),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(3))
- },
- vue.toDisplayString(_ctx.$t("statisticalinformation")),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(4))
- },
- vue.toDisplayString(_ctx.$t("coolinginformation")),
- 3
- /* TEXT, CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng" }, [
- $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createCommentVNode(` <view class="parameter_zheng11">\r
- <view class="parameter_zheng12">\r
- {{$t('Batterypower')}}\r
- </view>\r
- <view class="parameter_zheng13">\r
- {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">KW</text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("TotalPressure")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("AllowChargingPower")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxChargePowerLimit ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MaximumVoltage")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MaximumTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("BatteryCurrent")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng11">\r
- <view class="parameter_zheng12">\r
- {{$t('TotalExternalPressure')}}\r
- </view>\r
- <view class="parameter_zheng13">\r
- {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("AllowChargingCurrent")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingInformation_Chg_Max_Cur ?? "—"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, " A")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, " ℃")
- ])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("WorkingModeBatterySystem")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("invalid")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("DischargeMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("pcsChargingMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("EuropeanStandardChargingMode")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("BatterySystemStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("initialization")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("voltagehasbeen")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 4 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 4 },
- vue.toDisplayString(_ctx.$t("Underhighpressure")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 5 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 5 },
- vue.toDisplayString(_ctx.$t("fault")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.bms_ChargeStatus==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("uncharged")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("Chargingprogress")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("full")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 4 },
- vue.toDisplayString(_ctx.$t("retain")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — "))
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingConnectionStatus")),
- 1
- /* TEXT */
- ),
- _ctx.uidatasdata.bms_ChgLinkSt == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "parameter_Batterystate1"
- },
- vue.toDisplayString(_ctx.$t("FastChargingConnection")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "parameter_Batterystate1"
- },
- vue.toDisplayString(_ctx.$t("NoConnection")),
- 1
- /* TEXT */
- ))
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- {
- class: "parameter_zheng12",
- style: { "height": "30px" }
- },
- vue.toDisplayString(_ctx.$t("BatteryFaultLevel")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate1" }, [
- _ctx.uidatasdata.bms_BatteryFaultLevl == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("NoMalfunction")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- " 1" + vue.toDisplayString(_ctx.$t("LevelLault")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- " 2" + vue.toDisplayString(_ctx.$t("LevelLault")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- " 3" + vue.toDisplayString(_ctx.$t("LevelLault")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng10" }, [
- vue.createCommentVNode(` <view class="parameter_zhengbox">\r
- <view class="parameter_zheng12">\r
- {{$t('AccumulatedChargingCapacityCommunication')}}\r
- </view>\r
- <view class="parameter_zhengbox13">\r
- {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
- </view>\r
- </view>\r
- <view class="parameter_zhengbox parameter_zheng101">\r
- <view class="parameter_zheng12">\r
- {{$t('AccumulatedDCChargingCapacity')}}\r
- </view>\r
- <view class="parameter_zhengbox13">\r
- {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zhengbox" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("RunningTimes")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.DirectRecharge ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "parameter_zheng14" },
- vue.toDisplayString(_ctx.$t("RunningTimesmin")),
- 1
- /* TEXT */
- ),
- vue.createTextVNode(),
- vue.createElementVNode("text")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("InputCapacity")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.DirectElectricity ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
- vue.createTextVNode(),
- vue.createElementVNode("text")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("AccumulateInput")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
- vue.createTextVNode(
- vue.toDisplayString((_ctx.uidatasdata.BatteryInformation4_Acc_Chg_Ah - _ctx.uidatasdata.PCSDCChargeEnergy).toFixed(1) != "NaN" ? (_ctx.uidatasdata.BatteryInformation4_Acc_Chg_Ah - _ctx.uidatasdata.PCSDCChargeEnergy).toFixed(1) : "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
- vue.createTextVNode(),
- vue.createElementVNode("text")
- ])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("WorkingMode")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
- vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
- _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("OffMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("CoolingMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("HeatingMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("CirculatingMode")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("OutletTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode("view", {
- class: "parameter_zheng12",
- style: { "height": "30px" }
- }, [
- vue.createCommentVNode(" {{$t('PowerDemand')}} ")
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng13">\r
- {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text class="parameter_zheng14">kW</text>\r
- </view> `)
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("DisconnectedState")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("ClosedState")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("waterTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode("view", {
- class: "parameter_zheng12",
- style: { "height": "30px" }
- }, [
- vue.createCommentVNode(" {{$t('FaultLevel')}} ")
- ]),
- vue.createCommentVNode(` <view class="parameter_Batterystate">\r
- <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
- {{$t('NoMalfunction')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
- 1{{$t('LevelLault')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
- 2{{$t('LevelLault')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
- 3{{$t('LevelLault')}}\r
- </view>\r
- <view v-else>\r
- —\r
- </view>\r
- </view> `)
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "parameter_zheng3" }, [
- _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_zheng31111",
- onClick: _cache[3] || (_cache[3] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32" },
- vue.toDisplayString(_ctx.$t("open")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_zheng31111"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32ccc" },
- vue.toDisplayString(_ctx.$t("open")),
- 1
- /* TEXT */
- )
- ])
- ])),
- _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "parameter_zheng31111",
- onClick: _cache[4] || (_cache[4] = (...args) => $options.onstopit && $options.onstopit(...args))
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng33" },
- vue.toDisplayString(_ctx.$t("stopIt")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "parameter_zheng31111"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32ccc" },
- vue.toDisplayString(_ctx.$t("stopIt")),
- 1
- /* TEXT */
- )
- ])
- ]))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_home" }, [
- vue.createElementVNode("view", {
- class: "parameter_home1",
- onClick: _cache[5] || (_cache[5] = (...args) => $options.onreturn && $options.onreturn(...args))
- }, [
- vue.createElementVNode("image", {
- src: _imports_1$3,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_hometext" },
- vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
- 1
- /* TEXT */
- )
- ]),
- $data.faultsdata.length > 0 && !$data.SysFaultState ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_home2"
- }, [
- vue.createElementVNode("image", {
- src: _imports_10$1,
- mode: ""
- }),
- vue.createElementVNode("swiper", {
- class: "swiper",
- circular: "",
- autoplay: true,
- interval: 2e3,
- duration: 500,
- vertical: true
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.faultsdata, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_home3" },
- vue.toDisplayString(item["CONTENT"]),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]),
- vue.createVNode(
- _component_uni_popup,
- { ref: "alertDialog" },
- {
- default: vue.withCtx(() => [
- vue.createVNode(_component_uni_popup_dialog, {
- mode: $data.modeinput,
- placeholder: "请输入内容",
- modelValue: $data.value,
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.value = $event),
- type: $data.successtype,
- cancelText: _ctx.$t("CancelReturn"),
- confirmText: $data.confirmText,
- title: $data.title,
- content: $data.content,
- onConfirm: $options.dialogConfirm,
- onClose: $options.dialogClose
- }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
- ]),
- _: 1
- /* STABLE */
- },
- 512
- /* NEED_PATCH */
- )
- ]);
- }
- const PagesSupplySupply = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-80112fae"], ["__file", "D:/project/esswisdom_ipad_V2/pages/supply/supply.vue"]]);
- const _imports_3$1 = "/static/che1.png";
- const _imports_4 = "/static/y8.png";
- const _imports_5 = "/static/y6.png";
- const _sfc_main$3 = {
- components: {
- cmdProgress: __easycom_0$1
- },
- data() {
- return {
- successtype: "success",
- confirmText: "确认启动",
- title: "你确定要开启该设备吗?",
- content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
- value: "",
- modeinput: "",
- segmented: 1,
- ChargingStation: 1,
- faultsdata: [],
- SysFaultState: true,
- currentDate: ""
- };
- },
- onLoad() {
- this.confirmText = this.$t("ConfirmStart");
- this.title = this.$t("popUpTitle");
- this.content = this.$t("popUpContent");
- },
- computed: {
- // 使用 mapState 映射多个状态到组件的计算属性
- ...mapState(["formattedTime", "status"]),
- ...mapState({
- uidatasdata: (state2) => state2.uidatasdata
- })
- },
- mounted() {
- },
- beforeUnmount() {
- },
- watch: {
- uidatasdata: {
- handler(newVal, oldVal) {
- formatAppLog("log", "at pages/supplyss/supplyss.vue:895", "uidatasdata 发生变化:", newVal);
- if (newVal.SysState_SysFaultState == 1 && this.SysFaultState) {
- this.SysFaultState = false;
- setTimeout(() => {
- this.onfaultsdata();
- }, 1e3);
- } else if (newVal.SysState_SysFaultState == 0) {
- this.SysFaultState = true;
- }
- },
- deep: true
- // 监听深层次的变化
- }
- },
- methods: {
- onfaultsdata() {
- let data = {
- page: 1,
- rows: 10,
- device: "",
- starttime: "",
- endtime: "",
- rt: 1,
- type: "故障"
- };
- getfaultsList(data).then((res) => {
- formatAppLog("log", "at pages/supplyss/supplyss.vue:922", res);
- if (res.status == "ok") {
- this.faultsdata = [];
- for (var i2 = 0; i2 < res.data.list.length; i2++) {
- if (this.$store.state.formattedTime.substring(0, 10) == res.data.list[i2].FAULTTIME.substring(0, 10)) {
- this.faultsdata.push(res.data.list[i2]);
- }
- }
- }
- });
- },
- // 返回首页
- onreturn() {
- uni.redirectTo({
- url: "/pages/index/index"
- });
- },
- // 启动设备弹窗
- dialogToggle() {
- this.modeinput = "base";
- this.successtype = "success";
- this.confirmText = this.$t("ConfirmStart");
- this.title = this.$t("popUpTitle");
- this.content = this.$t("popUpContent");
- this.$refs.alertDialog.open();
- },
- // 关闭设备弹窗
- onstopit() {
- this.modeinput = "base";
- this.successtype = "error";
- this.confirmText = this.$t("ConfirmStop");
- this.title = this.$t("popUpTitleStop");
- this.content = this.$t("popUpContentStop");
- this.$refs.alertDialog.open();
- },
- // 确定
- dialogConfirm() {
- let data = {};
- if (this.segmented == 1) {
- data = {
- id: "3b26469f-ad5b-43bf-b715-4213921321d0",
- issaveinitvalue: false,
- value: this.content == this.$t("popUpContent") ? "1" : "0"
- };
- } else if (this.segmented == 2) {
- data = {
- id: "78f59493-65f3-4860-8296-7f07bb0ca55b",
- issaveinitvalue: false,
- value: this.content == this.$t("popUpContent") ? "1" : "0"
- };
- } else {
- data = {
- id: "c35c4db0-113f-442a-9e26-728489265fdb",
- issaveinitvalue: false,
- value: this.content == this.$t("popUpContent") ? "1" : "0"
- };
- }
- control(data).then((data2) => {
- formatAppLog("log", "at pages/supplyss/supplyss.vue:985", data2);
- if (data2.status == "ok") {
- uni.showToast({
- title: this.$t("OperationSuccessful"),
- icon: "none",
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- } else {
- uni.showToast({
- title: this.$t("operationFailed"),
- icon: "none",
- // 使用 'none' 图标来表示失败
- duration: 2e3
- // 显示时长,单位为毫秒
- });
- }
- });
- },
- // 取消
- dialogClose() {
- formatAppLog("log", "at pages/supplyss/supplyss.vue:1004", this.value);
- this.$refs.alertDialog.close();
- },
- // 切换标签
- ontap(e2) {
- formatAppLog("log", "at pages/supplyss/supplyss.vue:1009", e2);
- this.segmented = e2;
- if (this.segmented == 1) {
- this.ChargingStation = 1;
- } else if (this.segmented == 2) {
- this.ChargingStation = 2;
- }
- }
- }
- };
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
- const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
- const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- class: "top_logo",
- src: _imports_0,
- mode: ""
- }),
- vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
- vue.createElementVNode(
- "view",
- { class: "tite" },
- vue.toDisplayString(_ctx.$t("MainTitle")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time" }, [
- vue.createElementVNode(
- "view",
- { class: "time_top" },
- vue.toDisplayString(_ctx.formattedTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time_bottom" }, [
- vue.createElementVNode("view"),
- vue.createElementVNode("view", { class: "time_bottom1" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.$t("status")) + " ",
- 1
- /* TEXT */
- ),
- _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "time_state"
- },
- vue.toDisplayString(_ctx.$t("online")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "time_state1"
- },
- vue.toDisplayString(_ctx.$t("offline")),
- 1
- /* TEXT */
- ))
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter" }, [
- vue.createElementVNode("view", { class: "parameter_left" }, [
- vue.createElementVNode("view", { class: "parameter_left1" }, [
- vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
- vue.createVNode(_component_cmd_progress, {
- type: "dashboard",
- percent: _ctx.uidatasdata.SOC ?? 0,
- "stroke-color": "#B0D0FF",
- "stroke-width": 6,
- width: 180,
- "stroke-shape": "square",
- showInfo: false
- }, null, 8, ["percent"]),
- vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
- vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
- ]),
- vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
- ]),
- vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
- vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
- vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
- vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
- ])
- ])
- ]),
- vue.createCommentVNode(' <jerry-gauge></jerry-gauge>\r\n <view class="parameter_canvas">\r\n <view class="parameter_canvas1">\r\n 0\r\n </view>\r\n <view class="parameter_canvas2">\r\n 100% \r\n </view>\r\n </view> ')
- ]),
- vue.createElementVNode("image", {
- class: "parameter_leftdian1",
- src: _imports_1$2,
- alt: ""
- }),
- vue.createElementVNode("view", { class: "parameter_lef2" }, [
- vue.createElementVNode("image", {
- src: _imports_2$2,
- mode: ""
- })
- ]),
- vue.createElementVNode("image", {
- class: "parameter_leftche2",
- src: _imports_3$1,
- mode: ""
- }),
- vue.createElementVNode(
- "view",
- { class: "parameter_leftview" },
- vue.toDisplayString(_ctx.$t("DirectSupplyOutput")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_right" }, [
- vue.createElementVNode("view", { class: "parameter_righttop" }, [
- vue.createElementVNode("view", { class: "parameter_1" }, [
- vue.createElementVNode("view", { class: "parameter_2" }, [
- $data.ChargingStation == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_3"
- }, [
- vue.createElementVNode("view", { class: "parameter_4" }, [
- _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _imports_4,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: _imports_5,
- mode: ""
- })),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$t("ConnectionStatus")),
- 1
- /* TEXT */
- )
- ]),
- _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "parameter_51"
- },
- vue.toDisplayString(_ctx.$t("connect")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "parameter_5"
- },
- vue.toDisplayString(_ctx.$t("breakoff")),
- 1
- /* TEXT */
- ))
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_3"
- }, [
- vue.createElementVNode("view", { class: "parameter_4" }, [
- _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _imports_4,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: _imports_5,
- mode: ""
- })),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$t("ConnectionStatus")),
- 1
- /* TEXT */
- )
- ]),
- _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "parameter_51"
- },
- vue.toDisplayString(_ctx.$t("connect")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "parameter_5"
- },
- vue.toDisplayString(_ctx.$t("breakoff")),
- 1
- /* TEXT */
- ))
- ])),
- $data.ChargingStation == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "parameter_3"
- }, [
- vue.createElementVNode("view", { class: "parameter_4" }, [
- _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _imports_4,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: _imports_5,
- mode: ""
- })),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$t("workingCondition")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("StandbyMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("work")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("ChargingCompleted")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("ChargingPause")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.ChargingStation == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "parameter_3"
- }, [
- vue.createElementVNode("view", { class: "parameter_4" }, [
- _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _imports_4,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: _imports_5,
- mode: ""
- })),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$t("workingCondition")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("StandbyMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("work")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("ChargingCompleted")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("ChargingPause")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
- ]),
- vue.createCommentVNode(' <view class="parameter_5" v-else>\r\n 断开\r\n </view> ')
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "parameter_SOC" }, [
- vue.createElementVNode("image", {
- src: _imports_6,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "text",
- { class: "parameter_SOCright2" },
- vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", null, "%")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_Battery" }, [
- vue.createElementVNode("image", {
- src: _imports_7,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_SOCright1" },
- vue.toDisplayString(_ctx.$t("BatteryStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("fault")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("ChuShiHua")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 4 },
- vue.toDisplayString(_ctx.$t("voltagehasbeen")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 5 },
- vue.toDisplayString(_ctx.$t("Underhighpressure")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")),
- vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} ")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_state" }, [
- vue.createElementVNode("image", {
- src: _imports_8,
- mode: ""
- }),
- vue.createElementVNode("view", { class: "parameter_SOCright" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_SOCright1" },
- vue.toDisplayString(_ctx.$t("SystemStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("uncharged")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("Chargingprogress")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("full")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 4 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_==4">\r
- {{$t('Chargingstopped')}}\r
- </view> `),
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_>3&&uidatasdata.bms_BatSysWorkMode_<8">\r
- {{$t('retain')}}\r
- </view> `),
- vue.createElementVNode("view", null, " — ")
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- ))
- ])
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_tap" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
- },
- vue.toDisplayString(_ctx.$t("GunAinformation")),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2))
- },
- vue.toDisplayString(_ctx.$t("GunBinformation")),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3))
- },
- vue.toDisplayString(_ctx.$t("Batteryinformation")),
- 3
- /* TEXT, CLASS */
- ),
- vue.createCommentVNode(` <view :class="segmented==4?'parameter_tap1':'parameter_tap2'" @click="ontap(4)">\r
- {{$t('ConnectionInformation')}}\r
- </view> `),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.segmented == 5 ? "parameter_tap1" : "parameter_tap2"),
- onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(5))
- },
- vue.toDisplayString(_ctx.$t("coolinginformation")),
- 3
- /* TEXT, CLASS */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng" }, [
- $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingVoltage")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingCurrent")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_chargeOutputCurrent ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("VehicleSOC")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_soc ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "%")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("CharingPower")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage ? (_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage * _ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_chargeOutputCurrent / 1e3).toFixed(2) : "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingCapacity")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_ThisChargePower ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh")
- ])
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng11">\r
- <view class="parameter_zheng12">\r
- {{$t('ChargingFee')}}\r
- </view>\r
- <view class="parameter_zheng13">\r
- {{uidatasdata.ChargingStation_1_telemetryFrameccu_AccumulatedChargingElectricityCost??'—'}}\r
- <text class="parameter_zheng14">{{$t('USD')}}</text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingTime")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_EstimateTheRemainingChargingTime ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "min")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
- vue.createElementVNode("view", { class: "parameter_zheng12" }),
- vue.createElementVNode("view", { class: "parameter_zheng13" })
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
- vue.createElementVNode("view", { class: "parameter_zheng12" }),
- vue.createElementVNode("view", { class: "parameter_zheng13" })
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingVoltage")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingCurrent")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_chargeOutputCurrent ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("VehicleSOC")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_soc ?? "—"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, " %")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("CharingPower")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage ? (_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage * _ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_chargeOutputCurrent / 1e3).toFixed(2) : "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingCapacity")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_ThisChargePower ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh")
- ])
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng11">\r
- <view class="parameter_zheng12">\r
- {{$t('ChargingFee')}}\r
- </view>\r
- <view class="parameter_zheng13">\r
- \r
- {{uidatasdata.ChargingStation_2_telemetryFrameccu_AccumulatedChargingElectricityCost??'—'}}\r
- <text class="parameter_zheng14">{{$t('USD')}}</text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingTime")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_EstimateTheRemainingChargingTime ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "min")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
- vue.createElementVNode("view", { class: "parameter_zheng12" }),
- vue.createElementVNode("view", { class: "parameter_zheng13" })
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
- vue.createElementVNode("view", { class: "parameter_zheng12" }),
- vue.createElementVNode("view", { class: "parameter_zheng13" })
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createCommentVNode(` <view class="parameter_zheng11">\r
- <view class="parameter_zheng12">\r
- {{$t('Batterypower')}}\r
- </view>\r
- <view class="parameter_zheng13">\r
- {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">kW</text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("TotalPressure")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("AllowableDischargepower")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargePowerLimit ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MaximumVoltage")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MaximumTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("BatteryCurrent")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng11">\r
- <view class="parameter_zheng12">\r
- {{$t('TotalExternalPressure')}}\r
- \r
- </view>\r
- <view class="parameter_zheng13">\r
- {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("AllowDischargeCurrent")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargeCurrentLimit ?? "—"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("WorkingModeBatterySystem")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("invalid")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("DischargeMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("pcsChargingMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("EuropeanStandardChargingMode")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("BatterySystemStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("initialization")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("voltagehasbeen")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 4 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 4 },
- vue.toDisplayString(_ctx.$t("Underhighpressure")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 5 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 5 },
- vue.toDisplayString(_ctx.$t("fault")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("uncharged")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("Chargingprogress")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("full")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 4 },
- [
- vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_ChargeStatus==4">\r
- {{$t('Chargingstopped')}}\r
- </view> `),
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.$t("retain")),
- 1
- /* TEXT */
- )
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — "))
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng22" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("ChargingConnectionStatus")),
- 1
- /* TEXT */
- ),
- _ctx.uidatasdata.bms_ChgLinkSt == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "parameter_Batterystate1"
- },
- vue.toDisplayString(_ctx.$t("FastChargingConnection")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "parameter_Batterystate1"
- },
- vue.toDisplayString(_ctx.$t("NoConnection")),
- 1
- /* TEXT */
- ))
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("BatteryFaultLevel")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate1" }, [
- vue.createCommentVNode(" {{uidatasdata.bms_BatteryFaultLevl==0.00?'无故障':'有效'}} "),
- _ctx.uidatasdata.bms_BatteryFaultLevl == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("NoMalfunction")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- " 1" + vue.toDisplayString(_ctx.$t("LevelLault")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- " 2" + vue.toDisplayString(_ctx.$t("LevelLault")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- " 3" + vue.toDisplayString(_ctx.$t("LevelLault")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.segmented == 5 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "parameter_box"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng1" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("WorkingMode")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
- vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
- _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("OffMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("CoolingMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("HeatingMode")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("CirculatingMode")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("OutletTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode("view", {
- class: "parameter_zheng12",
- style: { "height": "30px" }
- }, [
- vue.createCommentVNode(" {{$t('PowerDemand')}} ")
- ]),
- vue.createCommentVNode(` <view class="parameter_zheng13">\r
- {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text\r
- class="parameter_zheng14">kW</text>\r
- </view> `)
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng2" }, [
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
- vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("DisconnectedState")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("ClosedState")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng12" },
- vue.toDisplayString(_ctx.$t("waterTemperature")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "parameter_zheng13" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_zheng11" }, [
- vue.createElementVNode("view", {
- class: "parameter_zheng12",
- style: { "height": "30px" }
- }, [
- vue.createCommentVNode(" {{$t('FaultLevel')}} ")
- ]),
- vue.createCommentVNode(` \r
- <view class="parameter_Batterystate">\r
- <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
- {{$t('NoMalfunction')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
- 1{{$t('LevelLault')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
- 2{{$t('LevelLault')}}\r
- </view>\r
- <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
- 3{{$t('LevelLault')}}\r
- </view>\r
- <view v-else>\r
- —\r
- </view>\r
- </view> `)
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- this.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "parameter_zheng3"
- }, [
- _ctx.uidatasdata.SysControl_Gun1RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_zheng31111",
- onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32" },
- vue.toDisplayString(_ctx.$t("open")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_zheng31111"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32ccc" },
- vue.toDisplayString(_ctx.$t("open")),
- 1
- /* TEXT */
- )
- ])
- ])),
- _ctx.uidatasdata.SysControl_Gun1RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "parameter_zheng31111",
- onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args))
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng33" },
- vue.toDisplayString(_ctx.$t("stopIt")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "parameter_zheng31111"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32ccc" },
- vue.toDisplayString(_ctx.$t("stopIt")),
- 1
- /* TEXT */
- )
- ])
- ]))
- ])) : vue.createCommentVNode("v-if", true),
- this.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 6,
- class: "parameter_zheng3"
- }, [
- _ctx.uidatasdata.SysControl_Gun2RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_zheng31111",
- onClick: _cache[6] || (_cache[6] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32" },
- vue.toDisplayString(_ctx.$t("open")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "parameter_zheng31111"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32ccc" },
- vue.toDisplayString(_ctx.$t("open")),
- 1
- /* TEXT */
- )
- ])
- ])),
- _ctx.uidatasdata.SysControl_Gun2RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "parameter_zheng31111",
- onClick: _cache[7] || (_cache[7] = (...args) => $options.onstopit && $options.onstopit(...args))
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng33" },
- vue.toDisplayString(_ctx.$t("stopIt")),
- 1
- /* TEXT */
- )
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "parameter_zheng31111"
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_zheng32ccc" },
- vue.toDisplayString(_ctx.$t("stopIt")),
- 1
- /* TEXT */
- )
- ])
- ]))
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "parameter_home" }, [
- vue.createElementVNode("view", {
- class: "parameter_home1",
- onClick: _cache[8] || (_cache[8] = (...args) => $options.onreturn && $options.onreturn(...args))
- }, [
- vue.createElementVNode("image", {
- src: _imports_1$3,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_hometext" },
- vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
- 1
- /* TEXT */
- )
- ]),
- $data.faultsdata.length > 0 && !$data.SysFaultState ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "parameter_home2"
- }, [
- vue.createElementVNode("image", {
- src: _imports_10$1,
- mode: ""
- }),
- vue.createElementVNode("swiper", {
- class: "swiper",
- circular: "",
- autoplay: true,
- interval: 2e3,
- duration: 500,
- vertical: true
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.faultsdata, (item, index) => {
- return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_home3" },
- vue.toDisplayString(item["CONTENT"]),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]),
- vue.createVNode(
- _component_uni_popup,
- { ref: "alertDialog" },
- {
- default: vue.withCtx(() => [
- vue.createVNode(_component_uni_popup_dialog, {
- mode: $data.modeinput,
- placeholder: "请输入内容",
- modelValue: $data.value,
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.value = $event),
- type: $data.successtype,
- cancelText: _ctx.$t("CancelReturn"),
- confirmText: $data.confirmText,
- title: $data.title,
- content: $data.content,
- onConfirm: $options.dialogConfirm,
- onClose: $options.dialogClose
- }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
- ]),
- _: 1
- /* STABLE */
- },
- 512
- /* NEED_PATCH */
- )
- ]);
- }
- const PagesSupplyssSupplyss = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-0d60935b"], ["__file", "D:/project/esswisdom_ipad_V2/pages/supplyss/supplyss.vue"]]);
- const _imports_1 = "/static/faultlist.png";
- const _imports_2 = "/static/event.png";
- const _imports_3 = "/static/Basics.png";
- const _sfc_main$2 = {
- data() {
- return {};
- },
- onLoad() {
- },
- computed: {
- // 使用 mapState 映射多个状态到组件的计算属性
- ...mapState(["formattedTime", "status"])
- },
- beforeUnmount() {
- },
- methods: {
- // 返回首页
- onreturn(e2) {
- formatAppLog("log", "at pages/faultlist/index.vue:109", e2);
- this.$store.commit("getevent", e2);
- if (e2 == "基础") {
- uni.redirectTo({
- url: "/pages/SYSifo/index"
- });
- } else {
- uni.redirectTo({
- url: "/pages/details/index"
- });
- }
- },
- onclick() {
- uni.redirectTo({
- url: "/pages/index/index"
- });
- }
- }
- };
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- class: "top_logo",
- src: _imports_0,
- mode: ""
- }),
- vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
- vue.createElementVNode(
- "view",
- { class: "tite" },
- vue.toDisplayString(_ctx.$t("MainTitle")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time" }, [
- vue.createElementVNode(
- "view",
- { class: "time_top" },
- vue.toDisplayString(_ctx.formattedTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time_bottom" }, [
- vue.createElementVNode("view"),
- vue.createElementVNode("view", { class: "time_bottom1" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.$t("status")) + " ",
- 1
- /* TEXT */
- ),
- _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "time_state"
- },
- vue.toDisplayString(_ctx.$t("online")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "time_state1"
- },
- vue.toDisplayString(_ctx.$t("offline")),
- 1
- /* TEXT */
- ))
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter" }, [
- vue.createElementVNode("view", { class: "parameter_list" }, [
- vue.createElementVNode("view", {
- class: "parameter_box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.onreturn("故障"))
- }, [
- vue.createElementVNode("view", { class: "parameter_list1" }, [
- vue.createElementVNode("image", {
- src: _imports_1,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "fault_txt" },
- vue.toDisplayString(_ctx.$t("FaultRec")),
- 1
- /* TEXT */
- )
- ]),
- vue.createCommentVNode(` <view class="parameter_box" @click="onreturn('告警')">\r
- <view class="parameter_list1">\r
- <image src="../../static/fault.png" mode=""></image>\r
- </view>\r
- <view class="fault_txt">\r
- {{$t('WarningRec')}}\r
- </view>\r
- </view> `),
- vue.createElementVNode("view", {
- class: "parameter_box",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.onreturn("事件"))
- }, [
- vue.createElementVNode("view", { class: "parameter_list1" }, [
- vue.createElementVNode("image", {
- src: _imports_2,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "fault_txt" },
- vue.toDisplayString(_ctx.$t("RunningRec")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "parameter_box",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.onreturn("基础"))
- }, [
- vue.createElementVNode("view", { class: "parameter_list1" }, [
- vue.createElementVNode("image", {
- src: _imports_3,
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "fault_txt" },
- vue.toDisplayString(_ctx.$t("SYSIfo")),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_bottom" }, [
- vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [
- vue.createElementVNode("view", {
- class: "parameter_bottom1",
- onClick: _cache[3] || (_cache[3] = (...args) => $options.onclick && $options.onclick(...args))
- }, [
- vue.createElementVNode("image", {
- src: _imports_1$3,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_bottom2" },
- vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]);
- }
- const PagesFaultlistIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-108f6e37"], ["__file", "D:/project/esswisdom_ipad_V2/pages/faultlist/index.vue"]]);
- const _sfc_main$1 = {
- data() {
- return {};
- },
- onLoad() {
- },
- computed: {
- // 使用 mapState 映射多个状态到组件的计算属性
- ...mapState(["formattedTime", "status"]),
- ...mapState({
- uidatasdata: (state2) => state2.uidatasdata
- }),
- backgroundStyle() {
- return {
- backgroundImage: `url(${this.$t("offline")})`,
- backgroundSize: "100% 100%"
- };
- }
- },
- beforeUnmount() {
- },
- methods: {
- onclick() {
- uni.redirectTo({
- url: "/pages/index/index"
- });
- },
- onReturn() {
- uni.redirectTo({
- url: "/pages/faultlist/index"
- });
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- class: "top_logo",
- src: _imports_0,
- mode: ""
- }),
- vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
- vue.createElementVNode(
- "view",
- { class: "tite" },
- vue.toDisplayString(_ctx.$t("MainTitle")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time" }, [
- vue.createElementVNode(
- "view",
- { class: "time_top" },
- vue.toDisplayString(_ctx.formattedTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "time_bottom" }, [
- vue.createElementVNode("view"),
- vue.createElementVNode("view", { class: "time_bottom1" }, [
- vue.createTextVNode(
- vue.toDisplayString(_ctx.$t("status")) + " ",
- 1
- /* TEXT */
- ),
- _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "time_state"
- },
- vue.toDisplayString(_ctx.$t("online")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "time_state1"
- },
- vue.toDisplayString(_ctx.$t("offline")),
- 1
- /* TEXT */
- ))
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter" }, [
- vue.createCommentVNode(` <image class="parameter_list" :src="$t('sysifoURL')" mode=""></image> `),
- vue.createCommentVNode(' <image class="parameter_list" src="../../static/z16.png" mode=""></image> '),
- vue.createElementVNode("view", { class: "parameter_list" }, [
- vue.createElementVNode("view", { class: "parameter_list1" }, [
- vue.createElementVNode("view", { class: "parameter_list1a" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a1" },
- vue.toDisplayString(_ctx.$t("configuration")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a1" },
- vue.toDisplayString(_ctx.$t("Batterycapacity")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a1" },
- vue.toDisplayString(_ctx.$t("Batterytype")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a1" },
- vue.toDisplayString(_ctx.$t("Communicationpower")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a1" },
- vue.toDisplayString(_ctx.$t("DCpower")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_list1b" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a2" },
- vue.toDisplayString(_ctx.$t("configurationz")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a2" },
- vue.toDisplayString(_ctx.$t("Batterycapacityz")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a2" },
- vue.toDisplayString(_ctx.$t("Batterytypez")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a2" },
- vue.toDisplayString(_ctx.$t("Communicationpowerz")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a2" },
- vue.toDisplayString(_ctx.$t("DCpowerz")),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_list11" }),
- vue.createElementVNode("view", { class: "parameter_list1" }, [
- vue.createElementVNode("view", { class: "parameter_list1ab" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a1" },
- vue.toDisplayString(_ctx.$t("Systemversion")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a1" },
- vue.toDisplayString(_ctx.$t("MCSVer")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a1" },
- vue.toDisplayString(_ctx.$t("CCUVer")),
- 1
- /* TEXT */
- ),
- vue.createCommentVNode(` <view class="parameter_list1a1">\r
- {{$t('SN')}}\r
- </view> `)
- ]),
- vue.createElementVNode("view", { class: "parameter_list1b" }, [
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a2" },
- vue.toDisplayString(_ctx.$t("Systemversionz")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a2" },
- vue.toDisplayString(_ctx.$t("MCSVerz")),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "parameter_list1a2" },
- vue.toDisplayString(_ctx.$t("CCUVerz")),
- 1
- /* TEXT */
- ),
- vue.createCommentVNode(` <view class="parameter_list1a2">\r
- {{uidatasdata.DeviceID??'LYBETr1980601'}}\r
- </view> `)
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "parameter_bottom" }, [
- vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [
- vue.createElementVNode("view", {
- class: "parameter_bottom1",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.onclick && $options.onclick(...args))
- }, [
- vue.createElementVNode("image", {
- src: _imports_1$3,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_bottom2" },
- vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "parameter_bottom11",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.onReturn && $options.onReturn(...args))
- }, [
- vue.createElementVNode("image", {
- src: _imports_2$1,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_bottom2" },
- vue.toDisplayString(_ctx.$t("Return")),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]);
- }
- const PagesSYSifoIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-b487f3c0"], ["__file", "D:/project/esswisdom_ipad_V2/pages/SYSifo/index.vue"]]);
- __definePage("pages/index/index", PagesIndexIndex);
- __definePage("pages/home/index", PagesHomeIndex);
- __definePage("pages/details/index", PagesDetailsIndex);
- __definePage("pages/electricity/index", PagesElectricityIndex);
- __definePage("pages/supply/supply", PagesSupplySupply);
- __definePage("pages/supplyss/supplyss", PagesSupplyssSupplyss);
- __definePage("pages/faultlist/index", PagesFaultlistIndex);
- __definePage("pages/SYSifo/index", PagesSYSifoIndex);
- const _sfc_main = {
- data() {
- return {
- // uidatas:''
- };
- },
- computed: {},
- onLaunch: function() {
- plus.navigator.setFullscreen(true);
- plus.navigator.hideSystemNavigation();
- },
- mounted() {
- this.$store.dispatch("startClock");
- this.$store.dispatch("fetchFaultsList");
- },
- beforeUnmount() {
- },
- methods: {},
- onShow: function() {
- formatAppLog("log", "at App.vue:37", "App Show");
- },
- onHide: function() {
- formatAppLog("log", "at App.vue:40", "App Hide");
- }
- };
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/project/esswisdom_ipad_V2/App.vue"]]);
- const Store = createStore({
- state: {
- formattedTime: getTime("yyyy-MM-dd hh:mm:ss"),
- uidatasdata: {},
- selectorid: null,
- selectorindex: null,
- status: null,
- num: 0,
- event: "故障"
- },
- mutations: {
- increment(state2, n2) {
- if (n2 == 1) {
- state2.num++;
- } else {
- state2.num = 0;
- }
- },
- getevent(state2, event) {
- state2.event = event;
- },
- setFormattedTime(state2, time) {
- state2.formattedTime = time;
- },
- setUidatasData(state2, data) {
- state2.uidatasdata = data;
- },
- setstatus(state2, status2) {
- state2.status = status2;
- },
- setSelectorId(state2, id) {
- state2.selectorid = id;
- },
- setSelectorIndex(state2, index) {
- state2.selectorindex = index;
- }
- },
- actions: {
- startClock({
- commit
- }) {
- setInterval(() => {
- const customFormat = "yyyy-MM-dd hh:mm:ss";
- const formattedTime = getTime(customFormat);
- commit("setFormattedTime", formattedTime);
- }, 1e3);
- },
- async fetchFaultsList({
- commit,
- state: state2
- }) {
- try {
- let data = {
- id: "3224a3eb-2375-4dfc-99ce-b182edd30996",
- page: 1,
- rows: 1e4
- };
- const response2 = await getuidatas(data);
- if (response2.status == "ok") {
- if (response2.data != null && response2.data != []) {
- const uidatasdata = response2.data.reduce((obj, item) => {
- let a2 = item.module;
- let b2 = item[a2];
- let numericValue = parseFloat(b2);
- let roundedValue = "";
- if (item.id == "BatCellVPeak_ValMaxCellVoltage" || item.id == "BatCellVPeak_ValMinCellVoltage" || item.id == "PCSTotalOutputPower") {
- roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(3);
- } else {
- if (item.id == "CellTemperatureLimitsStatus_MaxTemp" || item.id == "CellTemperatureLimitsStatus_MinTemp" || item.id == "TMS_Status_TMS_WATEROUT_TEMP" || item.id == "TMS_Status_TMS_WATERIN_TEMP") {
- roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(1);
- } else {
- if (item.id == "SOC" || item.id == "ChargingStation_1_telemetryFrameccu_EstimateTheRemainingChargingTime" || item.id == "ChargingStation_2_telemetryFrameccu_EstimateTheRemainingChargingTime") {
- roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(0);
- } else {
- if (item.id == "PCSPortAPhaseVoltage" || item.id == "PCSPortBPhaseVoltage" || item.id == "PCSPortCPhaseVoltage" || item.id == "PCSOutputA-phaseCurrent" || item.id == "PCSOutputB-phaseCurrent" || item.id == "PCSOutputC-phaseCurrent") {
- roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(2);
- } else {
- roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(1);
- }
- }
- }
- }
- if (!isNaN(numericValue) && numericValue < 0) {
- roundedValue = Math.abs(numericValue);
- }
- return {
- ...obj,
- [item.id]: roundedValue
- };
- }, {});
- commit("setUidatasData", uidatasdata);
- if (uidatasdata.SysControl_RunCmd == 1 || uidatasdata.SysControl_Gun1RunCmd == 1 || uidatasdata.SysControl_Gun2RunCmd == 1) {
- commit("setSelectorId", uidatasdata.SysInstall_EssRunModeManual);
- commit("setSelectorIndex", 1);
- } else {
- commit("setSelectorId", null);
- commit("setSelectorIndex", null);
- }
- if (state2.num >= 3) {
- commit("increment", 0);
- commit("setstatus", response2.status);
- }
- commit("increment", 1);
- } else {
- if (state2.num >= 3) {
- commit("increment", 0);
- commit("setstatus", "NO");
- }
- commit("increment", 1);
- }
- } else {
- }
- } catch (error) {
- formatAppLog("log", "at store/index.js:151", error);
- commit("setstatus", "NO");
- } finally {
- setTimeout(() => {
- this.dispatch("fetchFaultsList");
- }, 2e3);
- }
- }
- }
- });
- const MainTitle$1 = "Nano Pod T";
- const status$1 = "SYS Status:";
- const version$1 = "version";
- const CommunicationRecharge$2 = "AC IN";
- const CommunicationRechargeInput$1 = "AC Input";
- const CommunicationSupply$2 = "AC OUT";
- const CommunicationSupplyOutput$1 = "AC Output";
- const DirectRecharge$2 = "DC IN";
- const DirectRechargeInput$1 = "DC Input";
- const DirectSupply$2 = "DC OUT";
- const DirectSupplyOutput$1 = "DC Output";
- const SystemInformation$1 = "SYS Info";
- const state$1 = "Breaker";
- const state163A$1 = "Breaker1 63A";
- const state63A2$1 = "Breaker2 63A";
- const state125A$1 = "Breaker1 125A";
- const state63A$1 = "Breaker2 63A";
- const state16A$1 = "Breaker3 16A";
- const online$1 = "ON Line";
- const offline$1 = "Off Line";
- const connect$1 = "ON";
- const breakoff$1 = "OFF";
- const workingCondition$1 = "Running Status";
- const StandbyMode$1 = "Standby";
- const work$1 = "Running";
- const ChargingCompleted$1 = "Finished";
- const ChargingPause$1 = "Pause";
- const BatteryStatus$1 = "BAT Status";
- const fault$1 = "Fault";
- const ChuShiHua$1 = "Available";
- const SystemStatus$1 = "SYS Status";
- const NotupyetVoltage$1 = "Ready";
- const HighVoltageMedium$1 = "Unknown";
- const voltagehasbeen$1 = "Connected";
- const Underhighpressure$1 = "Unknown";
- const uncharged$1 = "Unavailable";
- const Chargingprogress$1 = "Discharge";
- const Chargingmalfunction$1 = "AC Charge";
- const full$1 = "DC Charge";
- const retain$1 = "Retain";
- const GunAinformation$1 = "A Gun";
- const GunBinformation$1 = "B Gun";
- const exchangeinformation$1 = "AC Info";
- const Batteryinformation$1 = "BAT Info";
- const statisticalinformation$1 = "Running Info";
- const coolinginformation$1 = "TMS Info";
- const PhaseVoltage = "Phase";
- const PhaseVoltageAV$1 = "Phase A";
- const PhaseVoltageBV$1 = "Phase B";
- const PhaseVoltageCV$1 = "Phase C";
- const PhaseVoltageAA$1 = "Phase A";
- const PhaseVoltageBA$1 = "Phase B";
- const PhaseVoltageCA$1 = "Phase C";
- const powerSupply$1 = "Power Input";
- const DischargeCapacity$1 = "Power Output";
- const PhaseCurrent$1 = "Phase";
- const DischargePower$1 = "Power Output";
- const Supplementarypower$1 = "Power Input";
- const TotalPressure$1 = "BAT Voltage";
- const AllowChargingPower$1 = "Max Power";
- const MaximumVoltage$1 = "Max Cell";
- const MaximumTemperature$1 = "Max Temp";
- const BatteryCurrent$1 = "BAT Current";
- const AllowChargingCurrent$1 = "Max Current";
- const MinimumIndividualVoltage$1 = "Mini Cell";
- const MinimumMonomerTemperature$1 = "Mini Temp";
- const invalid$1 = "Unavailable";
- const DischargeMode$1 = "Discharge";
- const pcsChargingMode$1 = "AC Charge";
- const EuropeanStandardChargingMode$1 = "DC Charge";
- const WorkingMode$1 = "Running Mode";
- const OffMode$1 = "Standby";
- const CoolingMode$1 = "Cooling";
- const HeatingMode$1 = "Heating";
- const CirculatingMode$1 = "Self Loop";
- const NO$1 = "NO";
- const OutletTemperature$1 = "Outlets";
- const HighVoltageRelayStatus$1 = "TMS Relay";
- const DisconnectedState$1 = "OFF";
- const ClosedState$1 = "ON";
- const waterTemperature$1 = "Inlets";
- const open$1 = "Start";
- const stopIt$1 = "Stop";
- const power$1 = "AC";
- const given$1 = "IN";
- const powergiven$1 = "Power";
- const ACinputpowergiven$1 = "AC input Power";
- const confirm$1 = "ok";
- const ReturnModeSelection$1 = "Back to Home";
- const Return$1 = "Return";
- const CancelReturn$1 = "Back";
- const ConfirmStart$1 = "ok";
- const ConfirmStop$1 = "ok";
- const popUpTitle$1 = "Tips";
- const popUpTitleStop$1 = "Tips";
- const popUpContent$1 = "Are you sure to START the iTrailer?";
- const popUpContentStop$1 = "Are you sure to STOP the iTrailer?";
- const ACRechargeelectricitytext$1 = "When AC power is replenished, all AC output terminals should be disconnected";
- const ACpowerSupplytext$1 = "When AC power is supplied, all AC input terminals should be disconnected";
- const OperationSuccessful$1 = "Operation successful";
- const operationFailed$1 = "operation failed";
- const ChargingPower$1 = "Input Power";
- const ChargingVoltage$1 = "Charging Voltage";
- const ChargingCurrent$1 = "Charging Current";
- const VehicleSOC$1 = "EV SOC";
- const ChargingCapacity$1 = "Charging Capacity";
- const CharingPower$1 = "Charging Power";
- const ChargingFee$1 = "Charging Fee";
- const USD$1 = "USD";
- const ChargingTime$1 = "Charging Time";
- const AllowableDischargepower$1 = "Max Power";
- const AllowDischargeCurrent$1 = "Max Current";
- const ConnectionStatus$1 = "Link Status";
- const formNO$1 = "NO";
- const formFailure$1 = "Failure";
- const formUnit$1 = "Unit";
- const formDescription$1 = "Description";
- const formRecover$1 = "Recover";
- const FaultRec$1 = "Fault Rec";
- const WarningRec$1 = "Warning Rec";
- const RunningRec$1 = "Running Rec";
- const SYSIfo$1 = "SYS Ifo";
- const FaultClearing$1 = "Recover";
- const LastPage$1 = "Last page";
- const NextPage$1 = "Next page";
- const RunningTimes$1 = "Running Times";
- const InputCapacity$1 = "Input Capacity";
- const AccumulateInput$1 = "Accumulate Input";
- const RunningTimesdischarge$1 = "Running Times";
- const InputCapacitydischarge$1 = "Output Capacity";
- const AccumulateInputdischarge$1 = "Accumulate Output";
- const RunningTimesmin$1 = "min";
- const Tipswarning$1 = "Only one mode can be used at the same time";
- const configuration$1 = "BAT Configuration";
- const Batterycapacity$1 = "BAT Energy";
- const Batterytype$1 = "BAT Type";
- const Communicationpower$1 = "AC Power";
- const DCpower$1 = "DC Power";
- const configurationz$1 = "1P216S";
- const Batterycapacityz$1 = "200kWh";
- const Batterytypez$1 = "lithium ion LFP";
- const Communicationpowerz$1 = "100kW";
- const DCpowerz$1 = "180kW";
- const Systemversion$1 = "SYS Ver.";
- const MCSVer$1 = "MCS Ver.";
- const CCUVer$1 = "CCU Ver.";
- const SN$1 = "S/N";
- const Systemversionz$1 = "V2.0";
- const MCSVerz$1 = "V2.0";
- const CCUVerz$1 = "V2.0";
- const SN1$1 = "S/N";
- const qx$1 = "../../static/qxen.png";
- const qd$1 = "../../static/qden.png";
- const en = {
- MainTitle: MainTitle$1,
- status: status$1,
- version: version$1,
- CommunicationRecharge: CommunicationRecharge$2,
- CommunicationRechargeInput: CommunicationRechargeInput$1,
- CommunicationSupply: CommunicationSupply$2,
- CommunicationSupplyOutput: CommunicationSupplyOutput$1,
- DirectRecharge: DirectRecharge$2,
- DirectRechargeInput: DirectRechargeInput$1,
- DirectSupply: DirectSupply$2,
- DirectSupplyOutput: DirectSupplyOutput$1,
- SystemInformation: SystemInformation$1,
- state: state$1,
- state163A: state163A$1,
- state63A2: state63A2$1,
- state125A: state125A$1,
- state63A: state63A$1,
- state16A: state16A$1,
- online: online$1,
- offline: offline$1,
- connect: connect$1,
- breakoff: breakoff$1,
- workingCondition: workingCondition$1,
- StandbyMode: StandbyMode$1,
- work: work$1,
- ChargingCompleted: ChargingCompleted$1,
- ChargingPause: ChargingPause$1,
- BatteryStatus: BatteryStatus$1,
- fault: fault$1,
- ChuShiHua: ChuShiHua$1,
- SystemStatus: SystemStatus$1,
- NotupyetVoltage: NotupyetVoltage$1,
- HighVoltageMedium: HighVoltageMedium$1,
- voltagehasbeen: voltagehasbeen$1,
- Underhighpressure: Underhighpressure$1,
- uncharged: uncharged$1,
- Chargingprogress: Chargingprogress$1,
- Chargingmalfunction: Chargingmalfunction$1,
- full: full$1,
- retain: retain$1,
- GunAinformation: GunAinformation$1,
- GunBinformation: GunBinformation$1,
- exchangeinformation: exchangeinformation$1,
- Batteryinformation: Batteryinformation$1,
- statisticalinformation: statisticalinformation$1,
- coolinginformation: coolinginformation$1,
- PhaseVoltage,
- PhaseVoltageAV: PhaseVoltageAV$1,
- PhaseVoltageBV: PhaseVoltageBV$1,
- PhaseVoltageCV: PhaseVoltageCV$1,
- PhaseVoltageAA: PhaseVoltageAA$1,
- PhaseVoltageBA: PhaseVoltageBA$1,
- PhaseVoltageCA: PhaseVoltageCA$1,
- powerSupply: powerSupply$1,
- DischargeCapacity: DischargeCapacity$1,
- PhaseCurrent: PhaseCurrent$1,
- DischargePower: DischargePower$1,
- Supplementarypower: Supplementarypower$1,
- TotalPressure: TotalPressure$1,
- AllowChargingPower: AllowChargingPower$1,
- MaximumVoltage: MaximumVoltage$1,
- MaximumTemperature: MaximumTemperature$1,
- BatteryCurrent: BatteryCurrent$1,
- AllowChargingCurrent: AllowChargingCurrent$1,
- MinimumIndividualVoltage: MinimumIndividualVoltage$1,
- MinimumMonomerTemperature: MinimumMonomerTemperature$1,
- invalid: invalid$1,
- DischargeMode: DischargeMode$1,
- pcsChargingMode: pcsChargingMode$1,
- EuropeanStandardChargingMode: EuropeanStandardChargingMode$1,
- WorkingMode: WorkingMode$1,
- OffMode: OffMode$1,
- CoolingMode: CoolingMode$1,
- HeatingMode: HeatingMode$1,
- CirculatingMode: CirculatingMode$1,
- NO: NO$1,
- OutletTemperature: OutletTemperature$1,
- HighVoltageRelayStatus: HighVoltageRelayStatus$1,
- DisconnectedState: DisconnectedState$1,
- ClosedState: ClosedState$1,
- waterTemperature: waterTemperature$1,
- open: open$1,
- stopIt: stopIt$1,
- power: power$1,
- given: given$1,
- powergiven: powergiven$1,
- ACinputpowergiven: ACinputpowergiven$1,
- confirm: confirm$1,
- ReturnModeSelection: ReturnModeSelection$1,
- Return: Return$1,
- CancelReturn: CancelReturn$1,
- ConfirmStart: ConfirmStart$1,
- ConfirmStop: ConfirmStop$1,
- popUpTitle: popUpTitle$1,
- popUpTitleStop: popUpTitleStop$1,
- popUpContent: popUpContent$1,
- popUpContentStop: popUpContentStop$1,
- ACRechargeelectricitytext: ACRechargeelectricitytext$1,
- ACpowerSupplytext: ACpowerSupplytext$1,
- OperationSuccessful: OperationSuccessful$1,
- operationFailed: operationFailed$1,
- ChargingPower: ChargingPower$1,
- ChargingVoltage: ChargingVoltage$1,
- ChargingCurrent: ChargingCurrent$1,
- VehicleSOC: VehicleSOC$1,
- ChargingCapacity: ChargingCapacity$1,
- CharingPower: CharingPower$1,
- ChargingFee: ChargingFee$1,
- USD: USD$1,
- ChargingTime: ChargingTime$1,
- AllowableDischargepower: AllowableDischargepower$1,
- AllowDischargeCurrent: AllowDischargeCurrent$1,
- ConnectionStatus: ConnectionStatus$1,
- formNO: formNO$1,
- formFailure: formFailure$1,
- formUnit: formUnit$1,
- formDescription: formDescription$1,
- formRecover: formRecover$1,
- FaultRec: FaultRec$1,
- WarningRec: WarningRec$1,
- RunningRec: RunningRec$1,
- SYSIfo: SYSIfo$1,
- FaultClearing: FaultClearing$1,
- LastPage: LastPage$1,
- NextPage: NextPage$1,
- RunningTimes: RunningTimes$1,
- InputCapacity: InputCapacity$1,
- AccumulateInput: AccumulateInput$1,
- RunningTimesdischarge: RunningTimesdischarge$1,
- InputCapacitydischarge: InputCapacitydischarge$1,
- AccumulateInputdischarge: AccumulateInputdischarge$1,
- RunningTimesmin: RunningTimesmin$1,
- Tipswarning: Tipswarning$1,
- configuration: configuration$1,
- Batterycapacity: Batterycapacity$1,
- Batterytype: Batterytype$1,
- Communicationpower: Communicationpower$1,
- DCpower: DCpower$1,
- configurationz: configurationz$1,
- Batterycapacityz: Batterycapacityz$1,
- Batterytypez: Batterytypez$1,
- Communicationpowerz: Communicationpowerz$1,
- DCpowerz: DCpowerz$1,
- Systemversion: Systemversion$1,
- MCSVer: MCSVer$1,
- CCUVer: CCUVer$1,
- SN: SN$1,
- Systemversionz: Systemversionz$1,
- MCSVerz: MCSVerz$1,
- CCUVerz: CCUVerz$1,
- SN1: SN1$1,
- qx: qx$1,
- qd: qd$1
- };
- const MainTitle = "Nano Pod T";
- const status = "连接状态:";
- const version = "应用版本";
- const CommunicationRecharge$1 = "交流补电";
- const CommunicationRechargeInput = "交流补电";
- const CommunicationSupply$1 = "交流供电";
- const CommunicationSupplyOutput = "交流供电";
- const DirectRecharge$1 = "直流补电";
- const DirectRechargeInput = "直流补电";
- const DirectSupply$1 = "直流供电";
- const DirectSupplyOutput = "直流供电";
- const SystemInformation = "系统信息";
- const state = "状态";
- const state163A = "63A1状态";
- const state63A2 = "63A2状态";
- const state125A = "125A状态";
- const state63A = "63A状态";
- const state16A = "16A状态";
- const online = "在线";
- const offline = "离线";
- const connect = "连接";
- const breakoff = "断开";
- const workingCondition = "工作状态";
- const StandbyMode = "待机";
- const work = "工作";
- const ChargingCompleted = "充电完成";
- const ChargingPause = "充电暂停";
- const BatteryStatus = "电池状态";
- const fault = "故障";
- const ChuShiHua = "出始化";
- const SystemStatus = "系统状态";
- const NotupyetVoltage = "未上高压";
- const HighVoltageMedium = "上高压中";
- const voltagehasbeen = "已上高压";
- const Underhighpressure = "下高压中";
- const ChargingStatus = "充电状态";
- const uncharged = "无效";
- const Chargingprogress = "未充电";
- const Chargingmalfunction = "PCS充电";
- const full = "欧标充电";
- const retain = "保留";
- const ChargingConnectionStatus = "充电连接状态";
- const FastChargingConnection = "快充连接";
- const NoConnection = "无连接";
- const GunAinformation = "枪A信息";
- const GunBinformation = "枪B信息";
- const exchangeinformation = "交流信息";
- const Batteryinformation = "电池信息";
- const statisticalinformation = "统计信息";
- const coolinginformation = "液冷信息";
- const PhaseVoltageAV = "A相电压";
- const PhaseVoltageBV = "B相电压";
- const PhaseVoltageCV = "C相电压";
- const PhaseVoltageAA = "A相电流";
- const PhaseVoltageBA = "B相电流";
- const PhaseVoltageCA = "C相电流";
- const powerSupply = "补电电量";
- const DischargeCapacity = "放电电量";
- const PhaseCurrent = "相电流";
- const DischargePower = "放电功率";
- const Supplementarypower = "补电功率";
- const TotalPressure = "电池内总压";
- const AllowChargingPower = "最大允许充电功率";
- const MaximumVoltage = "最大单体电压";
- const MaximumTemperature = "最大单体温度";
- const BatteryCurrent = "电池总电流";
- const AllowChargingCurrent = "最大允许充电电流";
- const MinimumIndividualVoltage = "最小单体电压";
- const MinimumMonomerTemperature = "最小单体温度";
- const WorkingModeBatterySystem = "电池系统工作模式";
- const invalid = "无效";
- const DischargeMode = "放电模式";
- const pcsChargingMode = "pcs充电模式";
- const EuropeanStandardChargingMode = "欧标充电模式";
- const BatterySystemStatus = "电池系统状态";
- const initialization = "初始化";
- const AccumulatedChargingCapacityCommunication = "交流累计充电电量";
- const WorkingMode = "工作模式";
- const OffMode = "待机模式";
- const CoolingMode = "制冷模式";
- const HeatingMode = "自热模式";
- const CirculatingMode = "自循环模式";
- const NO = "NO";
- const OutletTemperature = "出水温度";
- const PowerDemand = "需求功率";
- const HighVoltageRelayStatus = "高压继电器状态";
- const DisconnectedState = "断开";
- const ClosedState = "闭合";
- const waterTemperature = "入水温度";
- const BatteryFaultLevel = "电池故障等级";
- const NoMalfunction = "无故障";
- const LevelLault = "级故障";
- const open = "开启";
- const stopIt = "停止";
- const power = "功率";
- const given = "给定";
- const powergiven = "功率给定";
- const ACinputpowergiven = "功率给定";
- const confirm = "确认";
- const ReturnModeSelection = "返回模式选择";
- const Return = "返回上页";
- const CancelReturn = "取消返回";
- const ConfirmStart = "确认启动";
- const ConfirmStop = "确认停止";
- const popUpTitle = "你确定要开启该设备吗?";
- const popUpTitleStop = "你确定要停止该设备吗?";
- const popUpContent = "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!";
- const popUpContentStop = "设备完全停止后,方能进行后续操作,否则可能危及生命安全!";
- const ACRechargeelectricitytext = "AC补电时AC输出端应全部断开";
- const ACpowerSupplytext = "AC供电时AC输入端应全部断开";
- const OperationSuccessful = "操作成功";
- const operationFailed = "操作失败";
- const ChargingPower = "充电功率";
- const ChargingVoltage = "充电电压";
- const ChargingCurrent = "充电电流";
- const VehicleSOC = "车辆SOC";
- const ChargingCapacity = "充电电量";
- const CharingPower = "充电功率";
- const ChargingFee = "充电费用";
- const USD = "元";
- const ChargingTime = "充电时间";
- const AllowableDischargepower = "最大允许放电功率";
- const AllowDischargeCurrent = "最大允许放电电流";
- const ConnectionStatus = "连接状态";
- const formNO = "序号";
- const formUnit = "设备";
- const formDescription = "内容";
- const formFailure = "发生时间";
- const formRecover = "恢复时间";
- const FaultRec = "故障记录";
- const WarningRec = "告警记录";
- const RunningRec = "运行记录";
- const SYSIfo = "系统信息";
- const FaultClearing = "故障清除";
- const LastPage = "上一页";
- const NextPage = "下一页";
- const RunningTimes = "本次补电时长";
- const InputCapacity = "本次补电电量";
- const AccumulateInput = "累计补电电量";
- const RunningTimesdischarge = "本次放电时长";
- const InputCapacitydischarge = "本次放电电量";
- const AccumulateInputdischarge = "累计放电电量";
- const RunningTimesmin = "分钟";
- const Tipswarning = "若想重新选择模式,请返回之前模式停止以后再重新选择!";
- const configuration = "电池配置";
- const Batterycapacity = "电池容量";
- const Batterytype = "电池类型";
- const Communicationpower = "交流功率";
- const DCpower = "直流功率";
- const configurationz = "1P204S";
- const Batterycapacityz = "200kWh";
- const Batterytypez = "lithium ion LFP";
- const Communicationpowerz = "100kW";
- const DCpowerz = "180kW";
- const Systemversion = "系统版本";
- const MCSVer = "MCS Ver.";
- const CCUVer = "CCU Ver.";
- const SN = "S/N";
- const Systemversionz = "V2.0";
- const MCSVerz = "V2.0";
- const CCUVerz = "V2.0";
- const SN1 = "S/N";
- const DeviceID = "20240310002";
- const qx = "../../static/qx.png";
- const qd = "../../static/qd.png";
- const zhHans = {
- MainTitle,
- status,
- version,
- CommunicationRecharge: CommunicationRecharge$1,
- CommunicationRechargeInput,
- CommunicationSupply: CommunicationSupply$1,
- CommunicationSupplyOutput,
- DirectRecharge: DirectRecharge$1,
- DirectRechargeInput,
- DirectSupply: DirectSupply$1,
- DirectSupplyOutput,
- SystemInformation,
- state,
- state163A,
- state63A2,
- state125A,
- state63A,
- state16A,
- online,
- offline,
- connect,
- breakoff,
- workingCondition,
- StandbyMode,
- work,
- ChargingCompleted,
- ChargingPause,
- BatteryStatus,
- fault,
- ChuShiHua,
- SystemStatus,
- NotupyetVoltage,
- HighVoltageMedium,
- voltagehasbeen,
- Underhighpressure,
- ChargingStatus,
- uncharged,
- Chargingprogress,
- Chargingmalfunction,
- full,
- retain,
- ChargingConnectionStatus,
- FastChargingConnection,
- NoConnection,
- GunAinformation,
- GunBinformation,
- exchangeinformation,
- Batteryinformation,
- statisticalinformation,
- coolinginformation,
- PhaseVoltageAV,
- PhaseVoltageBV,
- PhaseVoltageCV,
- PhaseVoltageAA,
- PhaseVoltageBA,
- PhaseVoltageCA,
- powerSupply,
- DischargeCapacity,
- PhaseCurrent,
- DischargePower,
- Supplementarypower,
- TotalPressure,
- AllowChargingPower,
- MaximumVoltage,
- MaximumTemperature,
- BatteryCurrent,
- AllowChargingCurrent,
- MinimumIndividualVoltage,
- MinimumMonomerTemperature,
- WorkingModeBatterySystem,
- invalid,
- DischargeMode,
- pcsChargingMode,
- EuropeanStandardChargingMode,
- BatterySystemStatus,
- initialization,
- AccumulatedChargingCapacityCommunication,
- WorkingMode,
- OffMode,
- CoolingMode,
- HeatingMode,
- CirculatingMode,
- NO,
- OutletTemperature,
- PowerDemand,
- HighVoltageRelayStatus,
- DisconnectedState,
- ClosedState,
- waterTemperature,
- BatteryFaultLevel,
- NoMalfunction,
- LevelLault,
- open,
- stopIt,
- power,
- given,
- powergiven,
- ACinputpowergiven,
- confirm,
- ReturnModeSelection,
- Return,
- CancelReturn,
- ConfirmStart,
- ConfirmStop,
- popUpTitle,
- popUpTitleStop,
- popUpContent,
- popUpContentStop,
- ACRechargeelectricitytext,
- ACpowerSupplytext,
- OperationSuccessful,
- operationFailed,
- ChargingPower,
- ChargingVoltage,
- ChargingCurrent,
- VehicleSOC,
- ChargingCapacity,
- CharingPower,
- ChargingFee,
- USD,
- ChargingTime,
- AllowableDischargepower,
- AllowDischargeCurrent,
- ConnectionStatus,
- formNO,
- formUnit,
- formDescription,
- formFailure,
- formRecover,
- FaultRec,
- WarningRec,
- RunningRec,
- SYSIfo,
- FaultClearing,
- LastPage,
- NextPage,
- RunningTimes,
- InputCapacity,
- AccumulateInput,
- RunningTimesdischarge,
- InputCapacitydischarge,
- AccumulateInputdischarge,
- RunningTimesmin,
- Tipswarning,
- configuration,
- Batterycapacity,
- Batterytype,
- Communicationpower,
- DCpower,
- configurationz,
- Batterycapacityz,
- Batterytypez,
- Communicationpowerz,
- DCpowerz,
- Systemversion,
- MCSVer,
- CCUVer,
- SN,
- Systemversionz,
- MCSVerz,
- CCUVerz,
- SN1,
- DeviceID,
- qx,
- qd
- };
- const CommunicationRecharge = "交流补电";
- const CommunicationSupply = "交流供电";
- const DirectRecharge = "交流补电";
- const DirectSupply = "交流补电";
- const zhHant = {
- CommunicationRecharge,
- CommunicationSupply,
- DirectRecharge,
- DirectSupply
- };
- /*!
- * @intlify/shared v9.1.9
- * (c) 2021 kazuya kawaguchi
- * Released under the MIT License.
- */
- const inBrowser = typeof window !== "undefined";
- let mark;
- let measure;
- {
- const perf = inBrowser && window.performance;
- if (perf && perf.mark && perf.measure && perf.clearMarks && perf.clearMeasures) {
- mark = (tag) => perf.mark(tag);
- measure = (name, startTag, endTag) => {
- perf.measure(name, startTag, endTag);
- perf.clearMarks(startTag);
- perf.clearMarks(endTag);
- };
- }
- }
- const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
- function format(message, ...args) {
- if (args.length === 1 && isObject$1(args[0])) {
- args = args[0];
- }
- if (!args || !args.hasOwnProperty) {
- args = {};
- }
- return message.replace(RE_ARGS, (match, identifier) => {
- return args.hasOwnProperty(identifier) ? args[identifier] : "";
- });
- }
- const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
- const makeSymbol = (name) => hasSymbol ? Symbol(name) : name;
- const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
- const friendlyJSONstringify = (json) => JSON.stringify(json).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027");
- const isNumber = (val) => typeof val === "number" && isFinite(val);
- const isDate = (val) => toTypeString(val) === "[object Date]";
- const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
- const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
- function warn(msg, err) {
- if (typeof console !== "undefined") {
- console.warn(`[intlify] ` + msg);
- if (err) {
- console.warn(err.stack);
- }
- }
- }
- const assign = Object.assign;
- let _globalThis;
- const getGlobalThis = () => {
- return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
- };
- function escapeHtml(rawText) {
- return rawText.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
- }
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
- function hasOwn$1(obj, key) {
- return hasOwnProperty$1.call(obj, key);
- }
- const isArray = Array.isArray;
- const isFunction = (val) => typeof val === "function";
- const isString = (val) => typeof val === "string";
- const isBoolean = (val) => typeof val === "boolean";
- const isObject$1 = (val) => (
- // eslint-disable-line
- val !== null && typeof val === "object"
- );
- const objectToString = Object.prototype.toString;
- const toTypeString = (value) => objectToString.call(value);
- const isPlainObject = (val) => toTypeString(val) === "[object Object]";
- const toDisplayString = (val) => {
- return val == null ? "" : isArray(val) || isPlainObject(val) && val.toString === objectToString ? JSON.stringify(val, null, 2) : String(val);
- };
- const RANGE = 2;
- function generateCodeFrame(source, start = 0, end = source.length) {
- const lines = source.split(/\r?\n/);
- let count = 0;
- const res = [];
- for (let i2 = 0; i2 < lines.length; i2++) {
- count += lines[i2].length + 1;
- if (count >= start) {
- for (let j2 = i2 - RANGE; j2 <= i2 + RANGE || end > count; j2++) {
- if (j2 < 0 || j2 >= lines.length)
- continue;
- const line = j2 + 1;
- res.push(`${line}${" ".repeat(3 - String(line).length)}| ${lines[j2]}`);
- const lineLength = lines[j2].length;
- if (j2 === i2) {
- const pad = start - (count - lineLength) + 1;
- const length = Math.max(1, end > count ? lineLength - pad : end - start);
- res.push(` | ` + " ".repeat(pad) + "^".repeat(length));
- } else if (j2 > i2) {
- if (end > count) {
- const length = Math.max(Math.min(end - count, lineLength), 1);
- res.push(` | ` + "^".repeat(length));
- }
- count += lineLength + 1;
- }
- }
- break;
- }
- }
- return res.join("\n");
- }
- function createEmitter() {
- const events = /* @__PURE__ */ new Map();
- const emitter = {
- events,
- on(event, handler) {
- const handlers = events.get(event);
- const added = handlers && handlers.push(handler);
- if (!added) {
- events.set(event, [handler]);
- }
- },
- off(event, handler) {
- const handlers = events.get(event);
- if (handlers) {
- handlers.splice(handlers.indexOf(handler) >>> 0, 1);
- }
- },
- emit(event, payload) {
- (events.get(event) || []).slice().map((handler) => handler(payload));
- (events.get("*") || []).slice().map((handler) => handler(event, payload));
- }
- };
- return emitter;
- }
- /*!
- * @intlify/message-resolver v9.1.9
- * (c) 2021 kazuya kawaguchi
- * Released under the MIT License.
- */
- const hasOwnProperty = Object.prototype.hasOwnProperty;
- function hasOwn(obj, key) {
- return hasOwnProperty.call(obj, key);
- }
- const isObject = (val) => (
- // eslint-disable-line
- val !== null && typeof val === "object"
- );
- const pathStateMachine = [];
- pathStateMachine[
- 0
- /* BEFORE_PATH */
- ] = {
- [
- "w"
- /* WORKSPACE */
- ]: [
- 0
- /* BEFORE_PATH */
- ],
- [
- "i"
- /* IDENT */
- ]: [
- 3,
- 0
- /* APPEND */
- ],
- [
- "["
- /* LEFT_BRACKET */
- ]: [
- 4
- /* IN_SUB_PATH */
- ],
- [
- "o"
- /* END_OF_FAIL */
- ]: [
- 7
- /* AFTER_PATH */
- ]
- };
- pathStateMachine[
- 1
- /* IN_PATH */
- ] = {
- [
- "w"
- /* WORKSPACE */
- ]: [
- 1
- /* IN_PATH */
- ],
- [
- "."
- /* DOT */
- ]: [
- 2
- /* BEFORE_IDENT */
- ],
- [
- "["
- /* LEFT_BRACKET */
- ]: [
- 4
- /* IN_SUB_PATH */
- ],
- [
- "o"
- /* END_OF_FAIL */
- ]: [
- 7
- /* AFTER_PATH */
- ]
- };
- pathStateMachine[
- 2
- /* BEFORE_IDENT */
- ] = {
- [
- "w"
- /* WORKSPACE */
- ]: [
- 2
- /* BEFORE_IDENT */
- ],
- [
- "i"
- /* IDENT */
- ]: [
- 3,
- 0
- /* APPEND */
- ],
- [
- "0"
- /* ZERO */
- ]: [
- 3,
- 0
- /* APPEND */
- ]
- };
- pathStateMachine[
- 3
- /* IN_IDENT */
- ] = {
- [
- "i"
- /* IDENT */
- ]: [
- 3,
- 0
- /* APPEND */
- ],
- [
- "0"
- /* ZERO */
- ]: [
- 3,
- 0
- /* APPEND */
- ],
- [
- "w"
- /* WORKSPACE */
- ]: [
- 1,
- 1
- /* PUSH */
- ],
- [
- "."
- /* DOT */
- ]: [
- 2,
- 1
- /* PUSH */
- ],
- [
- "["
- /* LEFT_BRACKET */
- ]: [
- 4,
- 1
- /* PUSH */
- ],
- [
- "o"
- /* END_OF_FAIL */
- ]: [
- 7,
- 1
- /* PUSH */
- ]
- };
- pathStateMachine[
- 4
- /* IN_SUB_PATH */
- ] = {
- [
- "'"
- /* SINGLE_QUOTE */
- ]: [
- 5,
- 0
- /* APPEND */
- ],
- [
- '"'
- /* DOUBLE_QUOTE */
- ]: [
- 6,
- 0
- /* APPEND */
- ],
- [
- "["
- /* LEFT_BRACKET */
- ]: [
- 4,
- 2
- /* INC_SUB_PATH_DEPTH */
- ],
- [
- "]"
- /* RIGHT_BRACKET */
- ]: [
- 1,
- 3
- /* PUSH_SUB_PATH */
- ],
- [
- "o"
- /* END_OF_FAIL */
- ]: 8,
- [
- "l"
- /* ELSE */
- ]: [
- 4,
- 0
- /* APPEND */
- ]
- };
- pathStateMachine[
- 5
- /* IN_SINGLE_QUOTE */
- ] = {
- [
- "'"
- /* SINGLE_QUOTE */
- ]: [
- 4,
- 0
- /* APPEND */
- ],
- [
- "o"
- /* END_OF_FAIL */
- ]: 8,
- [
- "l"
- /* ELSE */
- ]: [
- 5,
- 0
- /* APPEND */
- ]
- };
- pathStateMachine[
- 6
- /* IN_DOUBLE_QUOTE */
- ] = {
- [
- '"'
- /* DOUBLE_QUOTE */
- ]: [
- 4,
- 0
- /* APPEND */
- ],
- [
- "o"
- /* END_OF_FAIL */
- ]: 8,
- [
- "l"
- /* ELSE */
- ]: [
- 6,
- 0
- /* APPEND */
- ]
- };
- const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
- function isLiteral(exp) {
- return literalValueRE.test(exp);
- }
- function stripQuotes(str) {
- const a2 = str.charCodeAt(0);
- const b2 = str.charCodeAt(str.length - 1);
- return a2 === b2 && (a2 === 34 || a2 === 39) ? str.slice(1, -1) : str;
- }
- function getPathCharType(ch) {
- if (ch === void 0 || ch === null) {
- return "o";
- }
- const code = ch.charCodeAt(0);
- switch (code) {
- case 91:
- case 93:
- case 46:
- case 34:
- case 39:
- return ch;
- case 95:
- case 36:
- case 45:
- return "i";
- case 9:
- case 10:
- case 13:
- case 160:
- case 65279:
- case 8232:
- case 8233:
- return "w";
- }
- return "i";
- }
- function formatSubPath(path) {
- const trimmed = path.trim();
- if (path.charAt(0) === "0" && isNaN(parseInt(path))) {
- return false;
- }
- return isLiteral(trimmed) ? stripQuotes(trimmed) : "*" + trimmed;
- }
- function parse(path) {
- const keys = [];
- let index = -1;
- let mode = 0;
- let subPathDepth = 0;
- let c2;
- let key;
- let newChar;
- let type;
- let transition;
- let action;
- let typeMap;
- const actions = [];
- actions[
- 0
- /* APPEND */
- ] = () => {
- if (key === void 0) {
- key = newChar;
- } else {
- key += newChar;
- }
- };
- actions[
- 1
- /* PUSH */
- ] = () => {
- if (key !== void 0) {
- keys.push(key);
- key = void 0;
- }
- };
- actions[
- 2
- /* INC_SUB_PATH_DEPTH */
- ] = () => {
- actions[
- 0
- /* APPEND */
- ]();
- subPathDepth++;
- };
- actions[
- 3
- /* PUSH_SUB_PATH */
- ] = () => {
- if (subPathDepth > 0) {
- subPathDepth--;
- mode = 4;
- actions[
- 0
- /* APPEND */
- ]();
- } else {
- subPathDepth = 0;
- if (key === void 0) {
- return false;
- }
- key = formatSubPath(key);
- if (key === false) {
- return false;
- } else {
- actions[
- 1
- /* PUSH */
- ]();
- }
- }
- };
- function maybeUnescapeQuote() {
- const nextChar = path[index + 1];
- if (mode === 5 && nextChar === "'" || mode === 6 && nextChar === '"') {
- index++;
- newChar = "\\" + nextChar;
- actions[
- 0
- /* APPEND */
- ]();
- return true;
- }
- }
- while (mode !== null) {
- index++;
- c2 = path[index];
- if (c2 === "\\" && maybeUnescapeQuote()) {
- continue;
- }
- type = getPathCharType(c2);
- typeMap = pathStateMachine[mode];
- transition = typeMap[type] || typeMap[
- "l"
- /* ELSE */
- ] || 8;
- if (transition === 8) {
- return;
- }
- mode = transition[0];
- if (transition[1] !== void 0) {
- action = actions[transition[1]];
- if (action) {
- newChar = c2;
- if (action() === false) {
- return;
- }
- }
- }
- if (mode === 7) {
- return keys;
- }
- }
- }
- const cache = /* @__PURE__ */ new Map();
- function resolveValue(obj, path) {
- if (!isObject(obj)) {
- return null;
- }
- let hit = cache.get(path);
- if (!hit) {
- hit = parse(path);
- if (hit) {
- cache.set(path, hit);
- }
- }
- if (!hit) {
- return null;
- }
- const len = hit.length;
- let last = obj;
- let i2 = 0;
- while (i2 < len) {
- const val = last[hit[i2]];
- if (val === void 0) {
- return null;
- }
- last = val;
- i2++;
- }
- return last;
- }
- function handleFlatJson(obj) {
- if (!isObject(obj)) {
- return obj;
- }
- for (const key in obj) {
- if (!hasOwn(obj, key)) {
- continue;
- }
- if (!key.includes(
- "."
- /* DOT */
- )) {
- if (isObject(obj[key])) {
- handleFlatJson(obj[key]);
- }
- } else {
- const subKeys = key.split(
- "."
- /* DOT */
- );
- const lastIndex = subKeys.length - 1;
- let currentObj = obj;
- for (let i2 = 0; i2 < lastIndex; i2++) {
- if (!(subKeys[i2] in currentObj)) {
- currentObj[subKeys[i2]] = {};
- }
- currentObj = currentObj[subKeys[i2]];
- }
- currentObj[subKeys[lastIndex]] = obj[key];
- delete obj[key];
- if (isObject(currentObj[subKeys[lastIndex]])) {
- handleFlatJson(currentObj[subKeys[lastIndex]]);
- }
- }
- }
- return obj;
- }
- /*!
- * @intlify/runtime v9.1.9
- * (c) 2021 kazuya kawaguchi
- * Released under the MIT License.
- */
- const DEFAULT_MODIFIER = (str) => str;
- const DEFAULT_MESSAGE = (ctx) => "";
- const DEFAULT_MESSAGE_DATA_TYPE = "text";
- const DEFAULT_NORMALIZE = (values) => values.length === 0 ? "" : values.join("");
- const DEFAULT_INTERPOLATE = toDisplayString;
- function pluralDefault(choice, choicesLength) {
- choice = Math.abs(choice);
- if (choicesLength === 2) {
- return choice ? choice > 1 ? 1 : 0 : 1;
- }
- return choice ? Math.min(choice, 2) : 0;
- }
- function getPluralIndex(options) {
- const index = isNumber(options.pluralIndex) ? options.pluralIndex : -1;
- return options.named && (isNumber(options.named.count) || isNumber(options.named.n)) ? isNumber(options.named.count) ? options.named.count : isNumber(options.named.n) ? options.named.n : index : index;
- }
- function normalizeNamed(pluralIndex, props) {
- if (!props.count) {
- props.count = pluralIndex;
- }
- if (!props.n) {
- props.n = pluralIndex;
- }
- }
- function createMessageContext(options = {}) {
- const locale = options.locale;
- const pluralIndex = getPluralIndex(options);
- const pluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? options.pluralRules[locale] : pluralDefault;
- const orgPluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? pluralDefault : void 0;
- const plural = (messages2) => messages2[pluralRule(pluralIndex, messages2.length, orgPluralRule)];
- const _list = options.list || [];
- const list = (index) => _list[index];
- const _named = options.named || {};
- isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
- const named = (key) => _named[key];
- function message(key) {
- const msg = isFunction(options.messages) ? options.messages(key) : isObject$1(options.messages) ? options.messages[key] : false;
- return !msg ? options.parent ? options.parent.message(key) : DEFAULT_MESSAGE : msg;
- }
- const _modifier = (name) => options.modifiers ? options.modifiers[name] : DEFAULT_MODIFIER;
- const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE;
- const interpolate = isPlainObject(options.processor) && isFunction(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE;
- const type = isPlainObject(options.processor) && isString(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE;
- const ctx = {
- [
- "list"
- /* LIST */
- ]: list,
- [
- "named"
- /* NAMED */
- ]: named,
- [
- "plural"
- /* PLURAL */
- ]: plural,
- [
- "linked"
- /* LINKED */
- ]: (key, modifier) => {
- const msg = message(key)(ctx);
- return isString(modifier) ? _modifier(modifier)(msg) : msg;
- },
- [
- "message"
- /* MESSAGE */
- ]: message,
- [
- "type"
- /* TYPE */
- ]: type,
- [
- "interpolate"
- /* INTERPOLATE */
- ]: interpolate,
- [
- "normalize"
- /* NORMALIZE */
- ]: normalize
- };
- return ctx;
- }
- /*!
- * @intlify/message-compiler v9.1.9
- * (c) 2021 kazuya kawaguchi
- * Released under the MIT License.
- */
- const errorMessages$2 = {
- // tokenizer error messages
- [
- 0
- /* EXPECTED_TOKEN */
- ]: `Expected token: '{0}'`,
- [
- 1
- /* INVALID_TOKEN_IN_PLACEHOLDER */
- ]: `Invalid token in placeholder: '{0}'`,
- [
- 2
- /* UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER */
- ]: `Unterminated single quote in placeholder`,
- [
- 3
- /* UNKNOWN_ESCAPE_SEQUENCE */
- ]: `Unknown escape sequence: \\{0}`,
- [
- 4
- /* INVALID_UNICODE_ESCAPE_SEQUENCE */
- ]: `Invalid unicode escape sequence: {0}`,
- [
- 5
- /* UNBALANCED_CLOSING_BRACE */
- ]: `Unbalanced closing brace`,
- [
- 6
- /* UNTERMINATED_CLOSING_BRACE */
- ]: `Unterminated closing brace`,
- [
- 7
- /* EMPTY_PLACEHOLDER */
- ]: `Empty placeholder`,
- [
- 8
- /* NOT_ALLOW_NEST_PLACEHOLDER */
- ]: `Not allowed nest placeholder`,
- [
- 9
- /* INVALID_LINKED_FORMAT */
- ]: `Invalid linked format`,
- // parser error messages
- [
- 10
- /* MUST_HAVE_MESSAGES_IN_PLURAL */
- ]: `Plural must have messages`,
- [
- 11
- /* UNEXPECTED_EMPTY_LINKED_MODIFIER */
- ]: `Unexpected empty linked modifier`,
- [
- 12
- /* UNEXPECTED_EMPTY_LINKED_KEY */
- ]: `Unexpected empty linked key`,
- [
- 13
- /* UNEXPECTED_LEXICAL_ANALYSIS */
- ]: `Unexpected lexical analysis in token: '{0}'`
- };
- function createCompileError(code, loc, options = {}) {
- const { domain, messages: messages2, args } = options;
- const msg = format((messages2 || errorMessages$2)[code] || "", ...args || []);
- const error = new SyntaxError(String(msg));
- error.code = code;
- if (loc) {
- error.location = loc;
- }
- error.domain = domain;
- return error;
- }
- /*!
- * @intlify/devtools-if v9.1.9
- * (c) 2021 kazuya kawaguchi
- * Released under the MIT License.
- */
- const IntlifyDevToolsHooks = {
- I18nInit: "i18n:init",
- FunctionTranslate: "function:translate"
- };
- /*!
- * @intlify/core-base v9.1.9
- * (c) 2021 kazuya kawaguchi
- * Released under the MIT License.
- */
- let devtools = null;
- function setDevToolsHook(hook) {
- devtools = hook;
- }
- function initI18nDevTools(i18n2, version2, meta) {
- devtools && devtools.emit(IntlifyDevToolsHooks.I18nInit, {
- timestamp: Date.now(),
- i18n: i18n2,
- version: version2,
- meta
- });
- }
- const translateDevTools = /* @__PURE__ */ createDevToolsHook(IntlifyDevToolsHooks.FunctionTranslate);
- function createDevToolsHook(hook) {
- return (payloads) => devtools && devtools.emit(hook, payloads);
- }
- const warnMessages$1 = {
- [
- 0
- /* NOT_FOUND_KEY */
- ]: `Not found '{key}' key in '{locale}' locale messages.`,
- [
- 1
- /* FALLBACK_TO_TRANSLATE */
- ]: `Fall back to translate '{key}' key with '{target}' locale.`,
- [
- 2
- /* CANNOT_FORMAT_NUMBER */
- ]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
- [
- 3
- /* FALLBACK_TO_NUMBER_FORMAT */
- ]: `Fall back to number format '{key}' key with '{target}' locale.`,
- [
- 4
- /* CANNOT_FORMAT_DATE */
- ]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
- [
- 5
- /* FALLBACK_TO_DATE_FORMAT */
- ]: `Fall back to datetime format '{key}' key with '{target}' locale.`
- };
- function getWarnMessage$1(code, ...args) {
- return format(warnMessages$1[code], ...args);
- }
- const VERSION$1 = "9.1.9";
- const NOT_REOSLVED = -1;
- const MISSING_RESOLVE_VALUE = "";
- function getDefaultLinkedModifiers() {
- return {
- upper: (val) => isString(val) ? val.toUpperCase() : val,
- lower: (val) => isString(val) ? val.toLowerCase() : val,
- // prettier-ignore
- capitalize: (val) => isString(val) ? `${val.charAt(0).toLocaleUpperCase()}${val.substr(1)}` : val
- };
- }
- let _compiler;
- let _additionalMeta = null;
- const setAdditionalMeta = (meta) => {
- _additionalMeta = meta;
- };
- const getAdditionalMeta = () => _additionalMeta;
- let _cid = 0;
- function createCoreContext(options = {}) {
- const version2 = isString(options.version) ? options.version : VERSION$1;
- const locale = isString(options.locale) ? options.locale : "en-US";
- const fallbackLocale = isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || isString(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale;
- const messages2 = isPlainObject(options.messages) ? options.messages : { [locale]: {} };
- const datetimeFormats = isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [locale]: {} };
- const numberFormats = isPlainObject(options.numberFormats) ? options.numberFormats : { [locale]: {} };
- const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
- const pluralRules = options.pluralRules || {};
- const missing = isFunction(options.missing) ? options.missing : null;
- const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true;
- const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
- const fallbackFormat = !!options.fallbackFormat;
- const unresolving = !!options.unresolving;
- const postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null;
- const processor = isPlainObject(options.processor) ? options.processor : null;
- const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
- const escapeParameter = !!options.escapeParameter;
- const messageCompiler = isFunction(options.messageCompiler) ? options.messageCompiler : _compiler;
- const onWarn = isFunction(options.onWarn) ? options.onWarn : warn;
- const internalOptions = options;
- const __datetimeFormatters = isObject$1(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map();
- const __numberFormatters = isObject$1(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map();
- const __meta = isObject$1(internalOptions.__meta) ? internalOptions.__meta : {};
- _cid++;
- const context = {
- version: version2,
- cid: _cid,
- locale,
- fallbackLocale,
- messages: messages2,
- datetimeFormats,
- numberFormats,
- modifiers,
- pluralRules,
- missing,
- missingWarn,
- fallbackWarn,
- fallbackFormat,
- unresolving,
- postTranslation,
- processor,
- warnHtmlMessage,
- escapeParameter,
- messageCompiler,
- onWarn,
- __datetimeFormatters,
- __numberFormatters,
- __meta
- };
- {
- context.__v_emitter = internalOptions.__v_emitter != null ? internalOptions.__v_emitter : void 0;
- }
- {
- initI18nDevTools(context, version2, __meta);
- }
- return context;
- }
- function isTranslateFallbackWarn(fallback, key) {
- return fallback instanceof RegExp ? fallback.test(key) : fallback;
- }
- function isTranslateMissingWarn(missing, key) {
- return missing instanceof RegExp ? missing.test(key) : missing;
- }
- function handleMissing(context, key, locale, missingWarn, type) {
- const { missing, onWarn } = context;
- {
- const emitter = context.__v_emitter;
- if (emitter) {
- emitter.emit("missing", {
- locale,
- key,
- type,
- groupId: `${type}:${key}`
- });
- }
- }
- if (missing !== null) {
- const ret = missing(context, locale, key, type);
- return isString(ret) ? ret : key;
- } else {
- if (isTranslateMissingWarn(missingWarn, key)) {
- onWarn(getWarnMessage$1(0, { key, locale }));
- }
- return key;
- }
- }
- function getLocaleChain(ctx, fallback, start) {
- const context = ctx;
- if (!context.__localeChainCache) {
- context.__localeChainCache = /* @__PURE__ */ new Map();
- }
- let chain = context.__localeChainCache.get(start);
- if (!chain) {
- chain = [];
- let block = [start];
- while (isArray(block)) {
- block = appendBlockToChain(chain, block, fallback);
- }
- const defaults = isArray(fallback) ? fallback : isPlainObject(fallback) ? fallback["default"] ? fallback["default"] : null : fallback;
- block = isString(defaults) ? [defaults] : defaults;
- if (isArray(block)) {
- appendBlockToChain(chain, block, false);
- }
- context.__localeChainCache.set(start, chain);
- }
- return chain;
- }
- function appendBlockToChain(chain, block, blocks) {
- let follow = true;
- for (let i2 = 0; i2 < block.length && isBoolean(follow); i2++) {
- const locale = block[i2];
- if (isString(locale)) {
- follow = appendLocaleToChain(chain, block[i2], blocks);
- }
- }
- return follow;
- }
- function appendLocaleToChain(chain, locale, blocks) {
- let follow;
- const tokens = locale.split("-");
- do {
- const target = tokens.join("-");
- follow = appendItemToChain(chain, target, blocks);
- tokens.splice(-1, 1);
- } while (tokens.length && follow === true);
- return follow;
- }
- function appendItemToChain(chain, target, blocks) {
- let follow = false;
- if (!chain.includes(target)) {
- follow = true;
- if (target) {
- follow = target[target.length - 1] !== "!";
- const locale = target.replace(/!/g, "");
- chain.push(locale);
- if ((isArray(blocks) || isPlainObject(blocks)) && blocks[locale]) {
- follow = blocks[locale];
- }
- }
- }
- return follow;
- }
- function updateFallbackLocale(ctx, locale, fallback) {
- const context = ctx;
- context.__localeChainCache = /* @__PURE__ */ new Map();
- getLocaleChain(ctx, fallback, locale);
- }
- function createCoreError(code) {
- return createCompileError(code, null, { messages: errorMessages$1 });
- }
- const errorMessages$1 = {
- [
- 14
- /* INVALID_ARGUMENT */
- ]: "Invalid arguments",
- [
- 15
- /* INVALID_DATE_ARGUMENT */
- ]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
- [
- 16
- /* INVALID_ISO_DATE_ARGUMENT */
- ]: "The argument provided is not a valid ISO date string"
- };
- const NOOP_MESSAGE_FUNCTION = () => "";
- const isMessageFunction = (val) => isFunction(val);
- function translate(context, ...args) {
- const { fallbackFormat, postTranslation, unresolving, fallbackLocale, messages: messages2 } = context;
- const [key, options] = parseTranslateArgs(...args);
- const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
- const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
- const escapeParameter = isBoolean(options.escapeParameter) ? options.escapeParameter : context.escapeParameter;
- const resolvedMessage = !!options.resolvedMessage;
- const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) ? !isBoolean(options.default) ? options.default : key : fallbackFormat ? key : "";
- const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== "";
- const locale = isString(options.locale) ? options.locale : context.locale;
- escapeParameter && escapeParams(options);
- let [format2, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) : [
- key,
- locale,
- messages2[locale] || {}
- ];
- let cacheBaseKey = key;
- if (!resolvedMessage && !(isString(format2) || isMessageFunction(format2))) {
- if (enableDefaultMsg) {
- format2 = defaultMsgOrKey;
- cacheBaseKey = format2;
- }
- }
- if (!resolvedMessage && (!(isString(format2) || isMessageFunction(format2)) || !isString(targetLocale))) {
- return unresolving ? NOT_REOSLVED : key;
- }
- if (isString(format2) && context.messageCompiler == null) {
- warn(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${key}'.`);
- return key;
- }
- let occurred = false;
- const errorDetector = () => {
- occurred = true;
- };
- const msg = !isMessageFunction(format2) ? compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) : format2;
- if (occurred) {
- return format2;
- }
- const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);
- const msgContext = createMessageContext(ctxOptions);
- const messaged = evaluateMessage(context, msg, msgContext);
- const ret = postTranslation ? postTranslation(messaged) : messaged;
- {
- const payloads = {
- timestamp: Date.now(),
- key: isString(key) ? key : isMessageFunction(format2) ? format2.key : "",
- locale: targetLocale || (isMessageFunction(format2) ? format2.locale : ""),
- format: isString(format2) ? format2 : isMessageFunction(format2) ? format2.source : "",
- message: ret
- };
- payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});
- translateDevTools(payloads);
- }
- return ret;
- }
- function escapeParams(options) {
- if (isArray(options.list)) {
- options.list = options.list.map((item) => isString(item) ? escapeHtml(item) : item);
- } else if (isObject$1(options.named)) {
- Object.keys(options.named).forEach((key) => {
- if (isString(options.named[key])) {
- options.named[key] = escapeHtml(options.named[key]);
- }
- });
- }
- }
- function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {
- const { messages: messages2, onWarn } = context;
- const locales = getLocaleChain(context, fallbackLocale, locale);
- let message = {};
- let targetLocale;
- let format2 = null;
- let from = locale;
- let to = null;
- const type = "translate";
- for (let i2 = 0; i2 < locales.length; i2++) {
- targetLocale = to = locales[i2];
- if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
- onWarn(getWarnMessage$1(1, {
- key,
- target: targetLocale
- }));
- }
- if (locale !== targetLocale) {
- const emitter = context.__v_emitter;
- if (emitter) {
- emitter.emit("fallback", {
- type,
- key,
- from,
- to,
- groupId: `${type}:${key}`
- });
- }
- }
- message = messages2[targetLocale] || {};
- let start = null;
- let startTag;
- let endTag;
- if (inBrowser) {
- start = window.performance.now();
- startTag = "intlify-message-resolve-start";
- endTag = "intlify-message-resolve-end";
- mark && mark(startTag);
- }
- if ((format2 = resolveValue(message, key)) === null) {
- format2 = message[key];
- }
- if (inBrowser) {
- const end = window.performance.now();
- const emitter = context.__v_emitter;
- if (emitter && start && format2) {
- emitter.emit("message-resolve", {
- type: "message-resolve",
- key,
- message: format2,
- time: end - start,
- groupId: `${type}:${key}`
- });
- }
- if (startTag && endTag && mark && measure) {
- mark(endTag);
- measure("intlify message resolve", startTag, endTag);
- }
- }
- if (isString(format2) || isFunction(format2))
- break;
- const missingRet = handleMissing(context, key, targetLocale, missingWarn, type);
- if (missingRet !== key) {
- format2 = missingRet;
- }
- from = to;
- }
- return [format2, targetLocale, message];
- }
- function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) {
- const { messageCompiler, warnHtmlMessage } = context;
- if (isMessageFunction(format2)) {
- const msg2 = format2;
- msg2.locale = msg2.locale || targetLocale;
- msg2.key = msg2.key || key;
- return msg2;
- }
- let start = null;
- let startTag;
- let endTag;
- if (inBrowser) {
- start = window.performance.now();
- startTag = "intlify-message-compilation-start";
- endTag = "intlify-message-compilation-end";
- mark && mark(startTag);
- }
- const msg = messageCompiler(format2, getCompileOptions(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, errorDetector));
- if (inBrowser) {
- const end = window.performance.now();
- const emitter = context.__v_emitter;
- if (emitter && start) {
- emitter.emit("message-compilation", {
- type: "message-compilation",
- message: format2,
- time: end - start,
- groupId: `${"translate"}:${key}`
- });
- }
- if (startTag && endTag && mark && measure) {
- mark(endTag);
- measure("intlify message compilation", startTag, endTag);
- }
- }
- msg.locale = targetLocale;
- msg.key = key;
- msg.source = format2;
- return msg;
- }
- function evaluateMessage(context, msg, msgCtx) {
- let start = null;
- let startTag;
- let endTag;
- if (inBrowser) {
- start = window.performance.now();
- startTag = "intlify-message-evaluation-start";
- endTag = "intlify-message-evaluation-end";
- mark && mark(startTag);
- }
- const messaged = msg(msgCtx);
- if (inBrowser) {
- const end = window.performance.now();
- const emitter = context.__v_emitter;
- if (emitter && start) {
- emitter.emit("message-evaluation", {
- type: "message-evaluation",
- value: messaged,
- time: end - start,
- groupId: `${"translate"}:${msg.key}`
- });
- }
- if (startTag && endTag && mark && measure) {
- mark(endTag);
- measure("intlify message evaluation", startTag, endTag);
- }
- }
- return messaged;
- }
- function parseTranslateArgs(...args) {
- const [arg1, arg2, arg3] = args;
- const options = {};
- if (!isString(arg1) && !isNumber(arg1) && !isMessageFunction(arg1)) {
- throw createCoreError(
- 14
- /* INVALID_ARGUMENT */
- );
- }
- const key = isNumber(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1;
- if (isNumber(arg2)) {
- options.plural = arg2;
- } else if (isString(arg2)) {
- options.default = arg2;
- } else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {
- options.named = arg2;
- } else if (isArray(arg2)) {
- options.list = arg2;
- }
- if (isNumber(arg3)) {
- options.plural = arg3;
- } else if (isString(arg3)) {
- options.default = arg3;
- } else if (isPlainObject(arg3)) {
- assign(options, arg3);
- }
- return [key, options];
- }
- function getCompileOptions(context, locale, key, source, warnHtmlMessage, errorDetector) {
- return {
- warnHtmlMessage,
- onError: (err) => {
- errorDetector && errorDetector(err);
- {
- const message = `Message compilation error: ${err.message}`;
- const codeFrame = err.location && generateCodeFrame(source, err.location.start.offset, err.location.end.offset);
- const emitter = context.__v_emitter;
- if (emitter) {
- emitter.emit("compile-error", {
- message: source,
- error: err.message,
- start: err.location && err.location.start.offset,
- end: err.location && err.location.end.offset,
- groupId: `${"translate"}:${key}`
- });
- }
- console.error(codeFrame ? `${message}
- ${codeFrame}` : message);
- }
- },
- onCacheKey: (source2) => generateFormatCacheKey(locale, key, source2)
- };
- }
- function getMessageContextOptions(context, locale, message, options) {
- const { modifiers, pluralRules } = context;
- const resolveMessage = (key) => {
- const val = resolveValue(message, key);
- if (isString(val)) {
- let occurred = false;
- const errorDetector = () => {
- occurred = true;
- };
- const msg = compileMessageFormat(context, key, locale, val, key, errorDetector);
- return !occurred ? msg : NOOP_MESSAGE_FUNCTION;
- } else if (isMessageFunction(val)) {
- return val;
- } else {
- return NOOP_MESSAGE_FUNCTION;
- }
- };
- const ctxOptions = {
- locale,
- modifiers,
- pluralRules,
- messages: resolveMessage
- };
- if (context.processor) {
- ctxOptions.processor = context.processor;
- }
- if (options.list) {
- ctxOptions.list = options.list;
- }
- if (options.named) {
- ctxOptions.named = options.named;
- }
- if (isNumber(options.plural)) {
- ctxOptions.pluralIndex = options.plural;
- }
- return ctxOptions;
- }
- const intlDefined = typeof Intl !== "undefined";
- const Availabilities = {
- dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== "undefined",
- numberFormat: intlDefined && typeof Intl.NumberFormat !== "undefined"
- };
- function datetime(context, ...args) {
- const { datetimeFormats, unresolving, fallbackLocale, onWarn } = context;
- const { __datetimeFormatters } = context;
- if (!Availabilities.dateTimeFormat) {
- onWarn(getWarnMessage$1(
- 4
- /* CANNOT_FORMAT_DATE */
- ));
- return MISSING_RESOLVE_VALUE;
- }
- const [key, value, options, overrides] = parseDateTimeArgs(...args);
- const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
- const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
- const part = !!options.part;
- const locale = isString(options.locale) ? options.locale : context.locale;
- const locales = getLocaleChain(context, fallbackLocale, locale);
- if (!isString(key) || key === "") {
- return new Intl.DateTimeFormat(locale).format(value);
- }
- let datetimeFormat = {};
- let targetLocale;
- let format2 = null;
- let from = locale;
- let to = null;
- const type = "datetime format";
- for (let i2 = 0; i2 < locales.length; i2++) {
- targetLocale = to = locales[i2];
- if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
- onWarn(getWarnMessage$1(5, {
- key,
- target: targetLocale
- }));
- }
- if (locale !== targetLocale) {
- const emitter = context.__v_emitter;
- if (emitter) {
- emitter.emit("fallback", {
- type,
- key,
- from,
- to,
- groupId: `${type}:${key}`
- });
- }
- }
- datetimeFormat = datetimeFormats[targetLocale] || {};
- format2 = datetimeFormat[key];
- if (isPlainObject(format2))
- break;
- handleMissing(context, key, targetLocale, missingWarn, type);
- from = to;
- }
- if (!isPlainObject(format2) || !isString(targetLocale)) {
- return unresolving ? NOT_REOSLVED : key;
- }
- let id = `${targetLocale}__${key}`;
- if (!isEmptyObject(overrides)) {
- id = `${id}__${JSON.stringify(overrides)}`;
- }
- let formatter = __datetimeFormatters.get(id);
- if (!formatter) {
- formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format2, overrides));
- __datetimeFormatters.set(id, formatter);
- }
- return !part ? formatter.format(value) : formatter.formatToParts(value);
- }
- function parseDateTimeArgs(...args) {
- const [arg1, arg2, arg3, arg4] = args;
- let options = {};
- let overrides = {};
- let value;
- if (isString(arg1)) {
- if (!/\d{4}-\d{2}-\d{2}(T.*)?/.test(arg1)) {
- throw createCoreError(
- 16
- /* INVALID_ISO_DATE_ARGUMENT */
- );
- }
- value = new Date(arg1);
- try {
- value.toISOString();
- } catch (e2) {
- throw createCoreError(
- 16
- /* INVALID_ISO_DATE_ARGUMENT */
- );
- }
- } else if (isDate(arg1)) {
- if (isNaN(arg1.getTime())) {
- throw createCoreError(
- 15
- /* INVALID_DATE_ARGUMENT */
- );
- }
- value = arg1;
- } else if (isNumber(arg1)) {
- value = arg1;
- } else {
- throw createCoreError(
- 14
- /* INVALID_ARGUMENT */
- );
- }
- if (isString(arg2)) {
- options.key = arg2;
- } else if (isPlainObject(arg2)) {
- options = arg2;
- }
- if (isString(arg3)) {
- options.locale = arg3;
- } else if (isPlainObject(arg3)) {
- overrides = arg3;
- }
- if (isPlainObject(arg4)) {
- overrides = arg4;
- }
- return [options.key || "", value, options, overrides];
- }
- function clearDateTimeFormat(ctx, locale, format2) {
- const context = ctx;
- for (const key in format2) {
- const id = `${locale}__${key}`;
- if (!context.__datetimeFormatters.has(id)) {
- continue;
- }
- context.__datetimeFormatters.delete(id);
- }
- }
- function number(context, ...args) {
- const { numberFormats, unresolving, fallbackLocale, onWarn } = context;
- const { __numberFormatters } = context;
- if (!Availabilities.numberFormat) {
- onWarn(getWarnMessage$1(
- 2
- /* CANNOT_FORMAT_NUMBER */
- ));
- return MISSING_RESOLVE_VALUE;
- }
- const [key, value, options, overrides] = parseNumberArgs(...args);
- const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
- const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
- const part = !!options.part;
- const locale = isString(options.locale) ? options.locale : context.locale;
- const locales = getLocaleChain(context, fallbackLocale, locale);
- if (!isString(key) || key === "") {
- return new Intl.NumberFormat(locale).format(value);
- }
- let numberFormat = {};
- let targetLocale;
- let format2 = null;
- let from = locale;
- let to = null;
- const type = "number format";
- for (let i2 = 0; i2 < locales.length; i2++) {
- targetLocale = to = locales[i2];
- if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
- onWarn(getWarnMessage$1(3, {
- key,
- target: targetLocale
- }));
- }
- if (locale !== targetLocale) {
- const emitter = context.__v_emitter;
- if (emitter) {
- emitter.emit("fallback", {
- type,
- key,
- from,
- to,
- groupId: `${type}:${key}`
- });
- }
- }
- numberFormat = numberFormats[targetLocale] || {};
- format2 = numberFormat[key];
- if (isPlainObject(format2))
- break;
- handleMissing(context, key, targetLocale, missingWarn, type);
- from = to;
- }
- if (!isPlainObject(format2) || !isString(targetLocale)) {
- return unresolving ? NOT_REOSLVED : key;
- }
- let id = `${targetLocale}__${key}`;
- if (!isEmptyObject(overrides)) {
- id = `${id}__${JSON.stringify(overrides)}`;
- }
- let formatter = __numberFormatters.get(id);
- if (!formatter) {
- formatter = new Intl.NumberFormat(targetLocale, assign({}, format2, overrides));
- __numberFormatters.set(id, formatter);
- }
- return !part ? formatter.format(value) : formatter.formatToParts(value);
- }
- function parseNumberArgs(...args) {
- const [arg1, arg2, arg3, arg4] = args;
- let options = {};
- let overrides = {};
- if (!isNumber(arg1)) {
- throw createCoreError(
- 14
- /* INVALID_ARGUMENT */
- );
- }
- const value = arg1;
- if (isString(arg2)) {
- options.key = arg2;
- } else if (isPlainObject(arg2)) {
- options = arg2;
- }
- if (isString(arg3)) {
- options.locale = arg3;
- } else if (isPlainObject(arg3)) {
- overrides = arg3;
- }
- if (isPlainObject(arg4)) {
- overrides = arg4;
- }
- return [options.key || "", value, options, overrides];
- }
- function clearNumberFormat(ctx, locale, format2) {
- const context = ctx;
- for (const key in format2) {
- const id = `${locale}__${key}`;
- if (!context.__numberFormatters.has(id)) {
- continue;
- }
- context.__numberFormatters.delete(id);
- }
- }
- /*!
- * @intlify/vue-devtools v9.1.9
- * (c) 2021 kazuya kawaguchi
- * Released under the MIT License.
- */
- const VueDevToolsLabels = {
- [
- "vue-devtools-plugin-vue-i18n"
- /* PLUGIN */
- ]: "Vue I18n devtools",
- [
- "vue-i18n-resource-inspector"
- /* CUSTOM_INSPECTOR */
- ]: "I18n Resources",
- [
- "vue-i18n-timeline"
- /* TIMELINE */
- ]: "Vue I18n"
- };
- const VueDevToolsPlaceholders = {
- [
- "vue-i18n-resource-inspector"
- /* CUSTOM_INSPECTOR */
- ]: "Search for scopes ..."
- };
- const VueDevToolsTimelineColors = {
- [
- "vue-i18n-timeline"
- /* TIMELINE */
- ]: 16764185
- };
- /*!
- * vue-i18n v9.1.9
- * (c) 2022 kazuya kawaguchi
- * Released under the MIT License.
- */
- const VERSION = "9.1.9";
- function initFeatureFlags() {
- let needWarn = false;
- {
- needWarn = true;
- }
- if (needWarn) {
- console.warn(`You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.`);
- }
- }
- const warnMessages = {
- [
- 6
- /* FALLBACK_TO_ROOT */
- ]: `Fall back to {type} '{key}' with root locale.`,
- [
- 7
- /* NOT_SUPPORTED_PRESERVE */
- ]: `Not supported 'preserve'.`,
- [
- 8
- /* NOT_SUPPORTED_FORMATTER */
- ]: `Not supported 'formatter'.`,
- [
- 9
- /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
- ]: `Not supported 'preserveDirectiveContent'.`,
- [
- 10
- /* NOT_SUPPORTED_GET_CHOICE_INDEX */
- ]: `Not supported 'getChoiceIndex'.`,
- [
- 11
- /* COMPONENT_NAME_LEGACY_COMPATIBLE */
- ]: `Component name legacy compatible: '{name}' -> 'i18n'`,
- [
- 12
- /* NOT_FOUND_PARENT_SCOPE */
- ]: `Not found parent scope. use the global scope.`
- };
- function getWarnMessage(code, ...args) {
- return format(warnMessages[code], ...args);
- }
- function createI18nError(code, ...args) {
- return createCompileError(code, null, { messages: errorMessages, args });
- }
- const errorMessages = {
- [
- 14
- /* UNEXPECTED_RETURN_TYPE */
- ]: "Unexpected return type in composer",
- [
- 15
- /* INVALID_ARGUMENT */
- ]: "Invalid argument",
- [
- 16
- /* MUST_BE_CALL_SETUP_TOP */
- ]: "Must be called at the top of a `setup` function",
- [
- 17
- /* NOT_INSLALLED */
- ]: "Need to install with `app.use` function",
- [
- 22
- /* UNEXPECTED_ERROR */
- ]: "Unexpected error",
- [
- 18
- /* NOT_AVAILABLE_IN_LEGACY_MODE */
- ]: "Not available in legacy mode",
- [
- 19
- /* REQUIRED_VALUE */
- ]: `Required in value: {0}`,
- [
- 20
- /* INVALID_VALUE */
- ]: `Invalid value`,
- [
- 21
- /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */
- ]: `Cannot setup vue-devtools plugin`
- };
- const DEVTOOLS_META = "__INTLIFY_META__";
- const TransrateVNodeSymbol = makeSymbol("__transrateVNode");
- const DatetimePartsSymbol = makeSymbol("__datetimeParts");
- const NumberPartsSymbol = makeSymbol("__numberParts");
- const EnableEmitter = makeSymbol("__enableEmitter");
- const DisableEmitter = makeSymbol("__disableEmitter");
- const SetPluralRulesSymbol = makeSymbol("__setPluralRules");
- const InejctWithOption = makeSymbol("__injectWithOption");
- let composerID = 0;
- function defineCoreMissingHandler(missing) {
- return (ctx, locale, key, type) => {
- return missing(locale, key, vue.getCurrentInstance() || void 0, type);
- };
- }
- function getLocaleMessages(locale, options) {
- const { messages: messages2, __i18n } = options;
- const ret = isPlainObject(messages2) ? messages2 : isArray(__i18n) ? {} : { [locale]: {} };
- if (isArray(__i18n)) {
- __i18n.forEach(({ locale: locale2, resource }) => {
- if (locale2) {
- ret[locale2] = ret[locale2] || {};
- deepCopy(resource, ret[locale2]);
- } else {
- deepCopy(resource, ret);
- }
- });
- }
- if (options.flatJson) {
- for (const key in ret) {
- if (hasOwn$1(ret, key)) {
- handleFlatJson(ret[key]);
- }
- }
- }
- return ret;
- }
- const isNotObjectOrIsArray = (val) => !isObject$1(val) || isArray(val);
- function deepCopy(src, des) {
- if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
- throw createI18nError(
- 20
- /* INVALID_VALUE */
- );
- }
- for (const key in src) {
- if (hasOwn$1(src, key)) {
- if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {
- des[key] = src[key];
- } else {
- deepCopy(src[key], des[key]);
- }
- }
- }
- }
- const getMetaInfo = () => {
- const instance = vue.getCurrentInstance();
- return instance && instance.type[DEVTOOLS_META] ? { [DEVTOOLS_META]: instance.type[DEVTOOLS_META] } : null;
- };
- function createComposer(options = {}) {
- const { __root } = options;
- const _isGlobal = __root === void 0;
- let _inheritLocale = isBoolean(options.inheritLocale) ? options.inheritLocale : true;
- const _locale = vue.ref(
- // prettier-ignore
- __root && _inheritLocale ? __root.locale.value : isString(options.locale) ? options.locale : "en-US"
- );
- const _fallbackLocale = vue.ref(
- // prettier-ignore
- __root && _inheritLocale ? __root.fallbackLocale.value : isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value
- );
- const _messages = vue.ref(getLocaleMessages(_locale.value, options));
- const _datetimeFormats = vue.ref(isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
- const _numberFormats = vue.ref(isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
- let _missingWarn = __root ? __root.missingWarn : isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true;
- let _fallbackWarn = __root ? __root.fallbackWarn : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
- let _fallbackRoot = __root ? __root.fallbackRoot : isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
- let _fallbackFormat = !!options.fallbackFormat;
- let _missing = isFunction(options.missing) ? options.missing : null;
- let _runtimeMissing = isFunction(options.missing) ? defineCoreMissingHandler(options.missing) : null;
- let _postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null;
- let _warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
- let _escapeParameter = !!options.escapeParameter;
- const _modifiers = __root ? __root.modifiers : isPlainObject(options.modifiers) ? options.modifiers : {};
- let _pluralRules = options.pluralRules || __root && __root.pluralRules;
- let _context;
- function getCoreContext() {
- return createCoreContext({
- version: VERSION,
- locale: _locale.value,
- fallbackLocale: _fallbackLocale.value,
- messages: _messages.value,
- messageCompiler: function compileToFunction(source) {
- return (ctx) => {
- return ctx.normalize([source]);
- };
- },
- datetimeFormats: _datetimeFormats.value,
- numberFormats: _numberFormats.value,
- modifiers: _modifiers,
- pluralRules: _pluralRules,
- missing: _runtimeMissing === null ? void 0 : _runtimeMissing,
- missingWarn: _missingWarn,
- fallbackWarn: _fallbackWarn,
- fallbackFormat: _fallbackFormat,
- unresolving: true,
- postTranslation: _postTranslation === null ? void 0 : _postTranslation,
- warnHtmlMessage: _warnHtmlMessage,
- escapeParameter: _escapeParameter,
- __datetimeFormatters: isPlainObject(_context) ? _context.__datetimeFormatters : void 0,
- __numberFormatters: isPlainObject(_context) ? _context.__numberFormatters : void 0,
- __v_emitter: isPlainObject(_context) ? _context.__v_emitter : void 0,
- __meta: { framework: "vue" }
- });
- }
- _context = getCoreContext();
- updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
- function trackReactivityValues() {
- return [
- _locale.value,
- _fallbackLocale.value,
- _messages.value,
- _datetimeFormats.value,
- _numberFormats.value
- ];
- }
- const locale = vue.computed({
- get: () => _locale.value,
- set: (val) => {
- _locale.value = val;
- _context.locale = _locale.value;
- }
- });
- const fallbackLocale = vue.computed({
- get: () => _fallbackLocale.value,
- set: (val) => {
- _fallbackLocale.value = val;
- _context.fallbackLocale = _fallbackLocale.value;
- updateFallbackLocale(_context, _locale.value, val);
- }
- });
- const messages2 = vue.computed(() => _messages.value);
- const datetimeFormats = vue.computed(() => _datetimeFormats.value);
- const numberFormats = vue.computed(() => _numberFormats.value);
- function getPostTranslationHandler() {
- return isFunction(_postTranslation) ? _postTranslation : null;
- }
- function setPostTranslationHandler(handler) {
- _postTranslation = handler;
- _context.postTranslation = handler;
- }
- function getMissingHandler() {
- return _missing;
- }
- function setMissingHandler(handler) {
- if (handler !== null) {
- _runtimeMissing = defineCoreMissingHandler(handler);
- }
- _missing = handler;
- _context.missing = _runtimeMissing;
- }
- function isResolvedTranslateMessage(type, arg) {
- return type !== "translate" || !!arg.resolvedMessage === false;
- }
- function wrapWithDeps(fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) {
- trackReactivityValues();
- let ret;
- {
- try {
- setAdditionalMeta(getMetaInfo());
- ret = fn(_context);
- } finally {
- setAdditionalMeta(null);
- }
- }
- if (isNumber(ret) && ret === NOT_REOSLVED) {
- const [key, arg2] = argumentParser();
- if (__root && isString(key) && isResolvedTranslateMessage(warnType, arg2)) {
- if (_fallbackRoot && (isTranslateFallbackWarn(_fallbackWarn, key) || isTranslateMissingWarn(_missingWarn, key))) {
- warn(getWarnMessage(6, {
- key,
- type: warnType
- }));
- }
- {
- const { __v_emitter: emitter } = _context;
- if (emitter && _fallbackRoot) {
- emitter.emit("fallback", {
- type: warnType,
- key,
- to: "global",
- groupId: `${warnType}:${key}`
- });
- }
- }
- }
- return __root && _fallbackRoot ? fallbackSuccess(__root) : fallbackFail(key);
- } else if (successCondition(ret)) {
- return ret;
- } else {
- throw createI18nError(
- 14
- /* UNEXPECTED_RETURN_TYPE */
- );
- }
- }
- function t2(...args) {
- return wrapWithDeps((context) => translate(context, ...args), () => parseTranslateArgs(...args), "translate", (root) => root.t(...args), (key) => key, (val) => isString(val));
- }
- function rt2(...args) {
- const [arg1, arg2, arg3] = args;
- if (arg3 && !isObject$1(arg3)) {
- throw createI18nError(
- 15
- /* INVALID_ARGUMENT */
- );
- }
- return t2(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]);
- }
- function d2(...args) {
- return wrapWithDeps((context) => datetime(context, ...args), () => parseDateTimeArgs(...args), "datetime format", (root) => root.d(...args), () => MISSING_RESOLVE_VALUE, (val) => isString(val));
- }
- function n2(...args) {
- return wrapWithDeps((context) => number(context, ...args), () => parseNumberArgs(...args), "number format", (root) => root.n(...args), () => MISSING_RESOLVE_VALUE, (val) => isString(val));
- }
- function normalize(values) {
- return values.map((val) => isString(val) ? vue.createVNode(vue.Text, null, val, 0) : val);
- }
- const interpolate = (val) => val;
- const processor = {
- normalize,
- interpolate,
- type: "vnode"
- };
- function transrateVNode(...args) {
- return wrapWithDeps(
- (context) => {
- let ret;
- const _context2 = context;
- try {
- _context2.processor = processor;
- ret = translate(_context2, ...args);
- } finally {
- _context2.processor = null;
- }
- return ret;
- },
- () => parseTranslateArgs(...args),
- "translate",
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- (root) => root[TransrateVNodeSymbol](...args),
- (key) => [vue.createVNode(vue.Text, null, key, 0)],
- (val) => isArray(val)
- );
- }
- function numberParts(...args) {
- return wrapWithDeps(
- (context) => number(context, ...args),
- () => parseNumberArgs(...args),
- "number format",
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- (root) => root[NumberPartsSymbol](...args),
- () => [],
- (val) => isString(val) || isArray(val)
- );
- }
- function datetimeParts(...args) {
- return wrapWithDeps(
- (context) => datetime(context, ...args),
- () => parseDateTimeArgs(...args),
- "datetime format",
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- (root) => root[DatetimePartsSymbol](...args),
- () => [],
- (val) => isString(val) || isArray(val)
- );
- }
- function setPluralRules(rules) {
- _pluralRules = rules;
- _context.pluralRules = _pluralRules;
- }
- function te2(key, locale2) {
- const targetLocale = isString(locale2) ? locale2 : _locale.value;
- const message = getLocaleMessage(targetLocale);
- return resolveValue(message, key) !== null;
- }
- function resolveMessages(key) {
- let messages22 = null;
- const locales = getLocaleChain(_context, _fallbackLocale.value, _locale.value);
- for (let i2 = 0; i2 < locales.length; i2++) {
- const targetLocaleMessages = _messages.value[locales[i2]] || {};
- const messageValue = resolveValue(targetLocaleMessages, key);
- if (messageValue != null) {
- messages22 = messageValue;
- break;
- }
- }
- return messages22;
- }
- function tm(key) {
- const messages22 = resolveMessages(key);
- return messages22 != null ? messages22 : __root ? __root.tm(key) || {} : {};
- }
- function getLocaleMessage(locale2) {
- return _messages.value[locale2] || {};
- }
- function setLocaleMessage(locale2, message) {
- _messages.value[locale2] = message;
- _context.messages = _messages.value;
- }
- function mergeLocaleMessage(locale2, message) {
- _messages.value[locale2] = _messages.value[locale2] || {};
- deepCopy(message, _messages.value[locale2]);
- _context.messages = _messages.value;
- }
- function getDateTimeFormat(locale2) {
- return _datetimeFormats.value[locale2] || {};
- }
- function setDateTimeFormat(locale2, format2) {
- _datetimeFormats.value[locale2] = format2;
- _context.datetimeFormats = _datetimeFormats.value;
- clearDateTimeFormat(_context, locale2, format2);
- }
- function mergeDateTimeFormat(locale2, format2) {
- _datetimeFormats.value[locale2] = assign(_datetimeFormats.value[locale2] || {}, format2);
- _context.datetimeFormats = _datetimeFormats.value;
- clearDateTimeFormat(_context, locale2, format2);
- }
- function getNumberFormat(locale2) {
- return _numberFormats.value[locale2] || {};
- }
- function setNumberFormat(locale2, format2) {
- _numberFormats.value[locale2] = format2;
- _context.numberFormats = _numberFormats.value;
- clearNumberFormat(_context, locale2, format2);
- }
- function mergeNumberFormat(locale2, format2) {
- _numberFormats.value[locale2] = assign(_numberFormats.value[locale2] || {}, format2);
- _context.numberFormats = _numberFormats.value;
- clearNumberFormat(_context, locale2, format2);
- }
- composerID++;
- if (__root) {
- vue.watch(__root.locale, (val) => {
- if (_inheritLocale) {
- _locale.value = val;
- _context.locale = val;
- updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
- }
- });
- vue.watch(__root.fallbackLocale, (val) => {
- if (_inheritLocale) {
- _fallbackLocale.value = val;
- _context.fallbackLocale = val;
- updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
- }
- });
- }
- const composer = {
- id: composerID,
- locale,
- fallbackLocale,
- get inheritLocale() {
- return _inheritLocale;
- },
- set inheritLocale(val) {
- _inheritLocale = val;
- if (val && __root) {
- _locale.value = __root.locale.value;
- _fallbackLocale.value = __root.fallbackLocale.value;
- updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
- }
- },
- get availableLocales() {
- return Object.keys(_messages.value).sort();
- },
- messages: messages2,
- datetimeFormats,
- numberFormats,
- get modifiers() {
- return _modifiers;
- },
- get pluralRules() {
- return _pluralRules || {};
- },
- get isGlobal() {
- return _isGlobal;
- },
- get missingWarn() {
- return _missingWarn;
- },
- set missingWarn(val) {
- _missingWarn = val;
- _context.missingWarn = _missingWarn;
- },
- get fallbackWarn() {
- return _fallbackWarn;
- },
- set fallbackWarn(val) {
- _fallbackWarn = val;
- _context.fallbackWarn = _fallbackWarn;
- },
- get fallbackRoot() {
- return _fallbackRoot;
- },
- set fallbackRoot(val) {
- _fallbackRoot = val;
- },
- get fallbackFormat() {
- return _fallbackFormat;
- },
- set fallbackFormat(val) {
- _fallbackFormat = val;
- _context.fallbackFormat = _fallbackFormat;
- },
- get warnHtmlMessage() {
- return _warnHtmlMessage;
- },
- set warnHtmlMessage(val) {
- _warnHtmlMessage = val;
- _context.warnHtmlMessage = val;
- },
- get escapeParameter() {
- return _escapeParameter;
- },
- set escapeParameter(val) {
- _escapeParameter = val;
- _context.escapeParameter = val;
- },
- t: t2,
- rt: rt2,
- d: d2,
- n: n2,
- te: te2,
- tm,
- getLocaleMessage,
- setLocaleMessage,
- mergeLocaleMessage,
- getDateTimeFormat,
- setDateTimeFormat,
- mergeDateTimeFormat,
- getNumberFormat,
- setNumberFormat,
- mergeNumberFormat,
- getPostTranslationHandler,
- setPostTranslationHandler,
- getMissingHandler,
- setMissingHandler,
- [TransrateVNodeSymbol]: transrateVNode,
- [NumberPartsSymbol]: numberParts,
- [DatetimePartsSymbol]: datetimeParts,
- [SetPluralRulesSymbol]: setPluralRules,
- [InejctWithOption]: options.__injectWithOption
- // eslint-disable-line @typescript-eslint/no-explicit-any
- };
- {
- composer[EnableEmitter] = (emitter) => {
- _context.__v_emitter = emitter;
- };
- composer[DisableEmitter] = () => {
- _context.__v_emitter = void 0;
- };
- }
- return composer;
- }
- function convertComposerOptions(options) {
- const locale = isString(options.locale) ? options.locale : "en-US";
- const fallbackLocale = isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale;
- const missing = isFunction(options.missing) ? options.missing : void 0;
- const missingWarn = isBoolean(options.silentTranslationWarn) || isRegExp(options.silentTranslationWarn) ? !options.silentTranslationWarn : true;
- const fallbackWarn = isBoolean(options.silentFallbackWarn) || isRegExp(options.silentFallbackWarn) ? !options.silentFallbackWarn : true;
- const fallbackRoot = isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
- const fallbackFormat = !!options.formatFallbackMessages;
- const modifiers = isPlainObject(options.modifiers) ? options.modifiers : {};
- const pluralizationRules = options.pluralizationRules;
- const postTranslation = isFunction(options.postTranslation) ? options.postTranslation : void 0;
- const warnHtmlMessage = isString(options.warnHtmlInMessage) ? options.warnHtmlInMessage !== "off" : true;
- const escapeParameter = !!options.escapeParameterHtml;
- const inheritLocale = isBoolean(options.sync) ? options.sync : true;
- if (options.formatter) {
- warn(getWarnMessage(
- 8
- /* NOT_SUPPORTED_FORMATTER */
- ));
- }
- if (options.preserveDirectiveContent) {
- warn(getWarnMessage(
- 9
- /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
- ));
- }
- let messages2 = options.messages;
- if (isPlainObject(options.sharedMessages)) {
- const sharedMessages = options.sharedMessages;
- const locales = Object.keys(sharedMessages);
- messages2 = locales.reduce((messages22, locale2) => {
- const message = messages22[locale2] || (messages22[locale2] = {});
- assign(message, sharedMessages[locale2]);
- return messages22;
- }, messages2 || {});
- }
- const { __i18n, __root, __injectWithOption } = options;
- const datetimeFormats = options.datetimeFormats;
- const numberFormats = options.numberFormats;
- const flatJson = options.flatJson;
- return {
- locale,
- fallbackLocale,
- messages: messages2,
- flatJson,
- datetimeFormats,
- numberFormats,
- missing,
- missingWarn,
- fallbackWarn,
- fallbackRoot,
- fallbackFormat,
- modifiers,
- pluralRules: pluralizationRules,
- postTranslation,
- warnHtmlMessage,
- escapeParameter,
- inheritLocale,
- __i18n,
- __root,
- __injectWithOption
- };
- }
- function createVueI18n(options = {}) {
- const composer = createComposer(convertComposerOptions(options));
- const vueI18n = {
- // id
- id: composer.id,
- // locale
- get locale() {
- return composer.locale.value;
- },
- set locale(val) {
- composer.locale.value = val;
- },
- // fallbackLocale
- get fallbackLocale() {
- return composer.fallbackLocale.value;
- },
- set fallbackLocale(val) {
- composer.fallbackLocale.value = val;
- },
- // messages
- get messages() {
- return composer.messages.value;
- },
- // datetimeFormats
- get datetimeFormats() {
- return composer.datetimeFormats.value;
- },
- // numberFormats
- get numberFormats() {
- return composer.numberFormats.value;
- },
- // availableLocales
- get availableLocales() {
- return composer.availableLocales;
- },
- // formatter
- get formatter() {
- warn(getWarnMessage(
- 8
- /* NOT_SUPPORTED_FORMATTER */
- ));
- return {
- interpolate() {
- return [];
- }
- };
- },
- set formatter(val) {
- warn(getWarnMessage(
- 8
- /* NOT_SUPPORTED_FORMATTER */
- ));
- },
- // missing
- get missing() {
- return composer.getMissingHandler();
- },
- set missing(handler) {
- composer.setMissingHandler(handler);
- },
- // silentTranslationWarn
- get silentTranslationWarn() {
- return isBoolean(composer.missingWarn) ? !composer.missingWarn : composer.missingWarn;
- },
- set silentTranslationWarn(val) {
- composer.missingWarn = isBoolean(val) ? !val : val;
- },
- // silentFallbackWarn
- get silentFallbackWarn() {
- return isBoolean(composer.fallbackWarn) ? !composer.fallbackWarn : composer.fallbackWarn;
- },
- set silentFallbackWarn(val) {
- composer.fallbackWarn = isBoolean(val) ? !val : val;
- },
- // modifiers
- get modifiers() {
- return composer.modifiers;
- },
- // formatFallbackMessages
- get formatFallbackMessages() {
- return composer.fallbackFormat;
- },
- set formatFallbackMessages(val) {
- composer.fallbackFormat = val;
- },
- // postTranslation
- get postTranslation() {
- return composer.getPostTranslationHandler();
- },
- set postTranslation(handler) {
- composer.setPostTranslationHandler(handler);
- },
- // sync
- get sync() {
- return composer.inheritLocale;
- },
- set sync(val) {
- composer.inheritLocale = val;
- },
- // warnInHtmlMessage
- get warnHtmlInMessage() {
- return composer.warnHtmlMessage ? "warn" : "off";
- },
- set warnHtmlInMessage(val) {
- composer.warnHtmlMessage = val !== "off";
- },
- // escapeParameterHtml
- get escapeParameterHtml() {
- return composer.escapeParameter;
- },
- set escapeParameterHtml(val) {
- composer.escapeParameter = val;
- },
- // preserveDirectiveContent
- get preserveDirectiveContent() {
- warn(getWarnMessage(
- 9
- /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
- ));
- return true;
- },
- set preserveDirectiveContent(val) {
- warn(getWarnMessage(
- 9
- /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
- ));
- },
- // pluralizationRules
- get pluralizationRules() {
- return composer.pluralRules || {};
- },
- // for internal
- __composer: composer,
- // t
- t(...args) {
- const [arg1, arg2, arg3] = args;
- const options2 = {};
- let list = null;
- let named = null;
- if (!isString(arg1)) {
- throw createI18nError(
- 15
- /* INVALID_ARGUMENT */
- );
- }
- const key = arg1;
- if (isString(arg2)) {
- options2.locale = arg2;
- } else if (isArray(arg2)) {
- list = arg2;
- } else if (isPlainObject(arg2)) {
- named = arg2;
- }
- if (isArray(arg3)) {
- list = arg3;
- } else if (isPlainObject(arg3)) {
- named = arg3;
- }
- return composer.t(key, list || named || {}, options2);
- },
- rt(...args) {
- return composer.rt(...args);
- },
- // tc
- tc(...args) {
- const [arg1, arg2, arg3] = args;
- const options2 = { plural: 1 };
- let list = null;
- let named = null;
- if (!isString(arg1)) {
- throw createI18nError(
- 15
- /* INVALID_ARGUMENT */
- );
- }
- const key = arg1;
- if (isString(arg2)) {
- options2.locale = arg2;
- } else if (isNumber(arg2)) {
- options2.plural = arg2;
- } else if (isArray(arg2)) {
- list = arg2;
- } else if (isPlainObject(arg2)) {
- named = arg2;
- }
- if (isString(arg3)) {
- options2.locale = arg3;
- } else if (isArray(arg3)) {
- list = arg3;
- } else if (isPlainObject(arg3)) {
- named = arg3;
- }
- return composer.t(key, list || named || {}, options2);
- },
- // te
- te(key, locale) {
- return composer.te(key, locale);
- },
- // tm
- tm(key) {
- return composer.tm(key);
- },
- // getLocaleMessage
- getLocaleMessage(locale) {
- return composer.getLocaleMessage(locale);
- },
- // setLocaleMessage
- setLocaleMessage(locale, message) {
- composer.setLocaleMessage(locale, message);
- },
- // mergeLocaleMessage
- mergeLocaleMessage(locale, message) {
- composer.mergeLocaleMessage(locale, message);
- },
- // d
- d(...args) {
- return composer.d(...args);
- },
- // getDateTimeFormat
- getDateTimeFormat(locale) {
- return composer.getDateTimeFormat(locale);
- },
- // setDateTimeFormat
- setDateTimeFormat(locale, format2) {
- composer.setDateTimeFormat(locale, format2);
- },
- // mergeDateTimeFormat
- mergeDateTimeFormat(locale, format2) {
- composer.mergeDateTimeFormat(locale, format2);
- },
- // n
- n(...args) {
- return composer.n(...args);
- },
- // getNumberFormat
- getNumberFormat(locale) {
- return composer.getNumberFormat(locale);
- },
- // setNumberFormat
- setNumberFormat(locale, format2) {
- composer.setNumberFormat(locale, format2);
- },
- // mergeNumberFormat
- mergeNumberFormat(locale, format2) {
- composer.mergeNumberFormat(locale, format2);
- },
- // getChoiceIndex
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- getChoiceIndex(choice, choicesLength) {
- warn(getWarnMessage(
- 10
- /* NOT_SUPPORTED_GET_CHOICE_INDEX */
- ));
- return -1;
- },
- // for internal
- __onComponentInstanceCreated(target) {
- const { componentInstanceCreatedListener } = options;
- if (componentInstanceCreatedListener) {
- componentInstanceCreatedListener(target, vueI18n);
- }
- }
- };
- {
- vueI18n.__enableEmitter = (emitter) => {
- const __composer = composer;
- __composer[EnableEmitter] && __composer[EnableEmitter](emitter);
- };
- vueI18n.__disableEmitter = () => {
- const __composer = composer;
- __composer[DisableEmitter] && __composer[DisableEmitter]();
- };
- }
- return vueI18n;
- }
- const baseFormatProps = {
- tag: {
- type: [String, Object]
- },
- locale: {
- type: String
- },
- scope: {
- type: String,
- validator: (val) => val === "parent" || val === "global",
- default: "parent"
- },
- i18n: {
- type: Object
- }
- };
- const Translation = {
- /* eslint-disable */
- name: "i18n-t",
- props: assign({
- keypath: {
- type: String,
- required: true
- },
- plural: {
- type: [Number, String],
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- validator: (val) => isNumber(val) || !isNaN(val)
- }
- }, baseFormatProps),
- /* eslint-enable */
- setup(props, context) {
- const { slots, attrs } = context;
- const i18n2 = props.i18n || useI18n({
- useScope: props.scope,
- __useComponent: true
- });
- const keys = Object.keys(slots).filter((key) => key !== "_");
- return () => {
- const options = {};
- if (props.locale) {
- options.locale = props.locale;
- }
- if (props.plural !== void 0) {
- options.plural = isString(props.plural) ? +props.plural : props.plural;
- }
- const arg = getInterpolateArg(context, keys);
- const children = i18n2[TransrateVNodeSymbol](props.keypath, arg, options);
- const assignedAttrs = assign({}, attrs);
- return isString(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$1(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children);
- };
- }
- };
- function getInterpolateArg({ slots }, keys) {
- if (keys.length === 1 && keys[0] === "default") {
- return slots.default ? slots.default() : [];
- } else {
- return keys.reduce((arg, key) => {
- const slot = slots[key];
- if (slot) {
- arg[key] = slot();
- }
- return arg;
- }, {});
- }
- }
- function renderFormatter(props, context, slotKeys, partFormatter) {
- const { slots, attrs } = context;
- return () => {
- const options = { part: true };
- let overrides = {};
- if (props.locale) {
- options.locale = props.locale;
- }
- if (isString(props.format)) {
- options.key = props.format;
- } else if (isObject$1(props.format)) {
- if (isString(props.format.key)) {
- options.key = props.format.key;
- }
- overrides = Object.keys(props.format).reduce((options2, prop) => {
- return slotKeys.includes(prop) ? assign({}, options2, { [prop]: props.format[prop] }) : options2;
- }, {});
- }
- const parts = partFormatter(...[props.value, options, overrides]);
- let children = [options.key];
- if (isArray(parts)) {
- children = parts.map((part, index) => {
- const slot = slots[part.type];
- return slot ? slot({ [part.type]: part.value, index, parts }) : [part.value];
- });
- } else if (isString(parts)) {
- children = [parts];
- }
- const assignedAttrs = assign({}, attrs);
- return isString(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$1(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children);
- };
- }
- const NUMBER_FORMAT_KEYS = [
- "localeMatcher",
- "style",
- "unit",
- "unitDisplay",
- "currency",
- "currencyDisplay",
- "useGrouping",
- "numberingSystem",
- "minimumIntegerDigits",
- "minimumFractionDigits",
- "maximumFractionDigits",
- "minimumSignificantDigits",
- "maximumSignificantDigits",
- "notation",
- "formatMatcher"
- ];
- const NumberFormat = {
- /* eslint-disable */
- name: "i18n-n",
- props: assign({
- value: {
- type: Number,
- required: true
- },
- format: {
- type: [String, Object]
- }
- }, baseFormatProps),
- /* eslint-enable */
- setup(props, context) {
- const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
- return renderFormatter(props, context, NUMBER_FORMAT_KEYS, (...args) => (
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- i18n2[NumberPartsSymbol](...args)
- ));
- }
- };
- const DATETIME_FORMAT_KEYS = [
- "dateStyle",
- "timeStyle",
- "fractionalSecondDigits",
- "calendar",
- "dayPeriod",
- "numberingSystem",
- "localeMatcher",
- "timeZone",
- "hour12",
- "hourCycle",
- "formatMatcher",
- "weekday",
- "era",
- "year",
- "month",
- "day",
- "hour",
- "minute",
- "second",
- "timeZoneName"
- ];
- const DatetimeFormat = {
- /* eslint-disable */
- name: "i18n-d",
- props: assign({
- value: {
- type: [Number, Date],
- required: true
- },
- format: {
- type: [String, Object]
- }
- }, baseFormatProps),
- /* eslint-enable */
- setup(props, context) {
- const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
- return renderFormatter(props, context, DATETIME_FORMAT_KEYS, (...args) => (
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- i18n2[DatetimePartsSymbol](...args)
- ));
- }
- };
- function getComposer$2(i18n2, instance) {
- const i18nInternal = i18n2;
- if (i18n2.mode === "composition") {
- return i18nInternal.__getInstance(instance) || i18n2.global;
- } else {
- const vueI18n = i18nInternal.__getInstance(instance);
- return vueI18n != null ? vueI18n.__composer : i18n2.global.__composer;
- }
- }
- function vTDirective(i18n2) {
- const bind = (el, { instance, value, modifiers }) => {
- if (!instance || !instance.$) {
- throw createI18nError(
- 22
- /* UNEXPECTED_ERROR */
- );
- }
- const composer = getComposer$2(i18n2, instance.$);
- if (modifiers.preserve) {
- warn(getWarnMessage(
- 7
- /* NOT_SUPPORTED_PRESERVE */
- ));
- }
- const parsedValue = parseValue(value);
- el.textContent = composer.t(...makeParams(parsedValue));
- };
- return {
- beforeMount: bind,
- beforeUpdate: bind
- };
- }
- function parseValue(value) {
- if (isString(value)) {
- return { path: value };
- } else if (isPlainObject(value)) {
- if (!("path" in value)) {
- throw createI18nError(19, "path");
- }
- return value;
- } else {
- throw createI18nError(
- 20
- /* INVALID_VALUE */
- );
- }
- }
- function makeParams(value) {
- const { path, locale, args, choice, plural } = value;
- const options = {};
- const named = args || {};
- if (isString(locale)) {
- options.locale = locale;
- }
- if (isNumber(choice)) {
- options.plural = choice;
- }
- if (isNumber(plural)) {
- options.plural = plural;
- }
- return [path, named, options];
- }
- function apply(app, i18n2, ...options) {
- const pluginOptions = isPlainObject(options[0]) ? options[0] : {};
- const useI18nComponentName = !!pluginOptions.useI18nComponentName;
- const globalInstall = isBoolean(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true;
- if (globalInstall && useI18nComponentName) {
- warn(getWarnMessage(11, {
- name: Translation.name
- }));
- }
- if (globalInstall) {
- app.component(!useI18nComponentName ? Translation.name : "i18n", Translation);
- app.component(NumberFormat.name, NumberFormat);
- app.component(DatetimeFormat.name, DatetimeFormat);
- }
- app.directive("t", vTDirective(i18n2));
- }
- const VUE_I18N_COMPONENT_TYPES = "vue-i18n: composer properties";
- let devtoolsApi;
- async function enableDevTools(app, i18n2) {
- return new Promise((resolve, reject) => {
- try {
- setupDevtoolsPlugin({
- id: "vue-devtools-plugin-vue-i18n",
- label: VueDevToolsLabels[
- "vue-devtools-plugin-vue-i18n"
- /* PLUGIN */
- ],
- packageName: "vue-i18n",
- homepage: "https://vue-i18n.intlify.dev",
- logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
- componentStateTypes: [VUE_I18N_COMPONENT_TYPES],
- app
- }, (api) => {
- devtoolsApi = api;
- api.on.visitComponentTree(({ componentInstance, treeNode }) => {
- updateComponentTreeTags(componentInstance, treeNode, i18n2);
- });
- api.on.inspectComponent(({ componentInstance, instanceData }) => {
- if (componentInstance.vnode.el.__VUE_I18N__ && instanceData) {
- if (i18n2.mode === "legacy") {
- if (componentInstance.vnode.el.__VUE_I18N__ !== i18n2.global.__composer) {
- inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
- }
- } else {
- inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
- }
- }
- });
- api.addInspector({
- id: "vue-i18n-resource-inspector",
- label: VueDevToolsLabels[
- "vue-i18n-resource-inspector"
- /* CUSTOM_INSPECTOR */
- ],
- icon: "language",
- treeFilterPlaceholder: VueDevToolsPlaceholders[
- "vue-i18n-resource-inspector"
- /* CUSTOM_INSPECTOR */
- ]
- });
- api.on.getInspectorTree((payload) => {
- if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
- registerScope(payload, i18n2);
- }
- });
- api.on.getInspectorState((payload) => {
- if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
- inspectScope(payload, i18n2);
- }
- });
- api.on.editInspectorState((payload) => {
- if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
- editScope(payload, i18n2);
- }
- });
- api.addTimelineLayer({
- id: "vue-i18n-timeline",
- label: VueDevToolsLabels[
- "vue-i18n-timeline"
- /* TIMELINE */
- ],
- color: VueDevToolsTimelineColors[
- "vue-i18n-timeline"
- /* TIMELINE */
- ]
- });
- resolve(true);
- });
- } catch (e2) {
- console.error(e2);
- reject(false);
- }
- });
- }
- function updateComponentTreeTags(instance, treeNode, i18n2) {
- const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
- if (instance && instance.vnode.el.__VUE_I18N__) {
- if (instance.vnode.el.__VUE_I18N__ !== global2) {
- const label = instance.type.name || instance.type.displayName || instance.type.__file;
- const tag = {
- label: `i18n (${label} Scope)`,
- textColor: 0,
- backgroundColor: 16764185
- };
- treeNode.tags.push(tag);
- }
- }
- }
- function inspectComposer(instanceData, composer) {
- const type = VUE_I18N_COMPONENT_TYPES;
- instanceData.state.push({
- type,
- key: "locale",
- editable: true,
- value: composer.locale.value
- });
- instanceData.state.push({
- type,
- key: "availableLocales",
- editable: false,
- value: composer.availableLocales
- });
- instanceData.state.push({
- type,
- key: "fallbackLocale",
- editable: true,
- value: composer.fallbackLocale.value
- });
- instanceData.state.push({
- type,
- key: "inheritLocale",
- editable: true,
- value: composer.inheritLocale
- });
- instanceData.state.push({
- type,
- key: "messages",
- editable: false,
- value: getLocaleMessageValue(composer.messages.value)
- });
- instanceData.state.push({
- type,
- key: "datetimeFormats",
- editable: false,
- value: composer.datetimeFormats.value
- });
- instanceData.state.push({
- type,
- key: "numberFormats",
- editable: false,
- value: composer.numberFormats.value
- });
- }
- function getLocaleMessageValue(messages2) {
- const value = {};
- Object.keys(messages2).forEach((key) => {
- const v2 = messages2[key];
- if (isFunction(v2) && "source" in v2) {
- value[key] = getMessageFunctionDetails(v2);
- } else if (isObject$1(v2)) {
- value[key] = getLocaleMessageValue(v2);
- } else {
- value[key] = v2;
- }
- });
- return value;
- }
- const ESC = {
- "<": "<",
- ">": ">",
- '"': """,
- "&": "&"
- };
- function escape$1(s2) {
- return s2.replace(/[<>"&]/g, escapeChar);
- }
- function escapeChar(a2) {
- return ESC[a2] || a2;
- }
- function getMessageFunctionDetails(func) {
- const argString = func.source ? `("${escape$1(func.source)}")` : `(?)`;
- return {
- _custom: {
- type: "function",
- display: `<span>ƒ</span> ${argString}`
- }
- };
- }
- function registerScope(payload, i18n2) {
- payload.rootNodes.push({
- id: "global",
- label: "Global Scope"
- });
- const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
- for (const [keyInstance, instance] of i18n2.__instances) {
- const composer = i18n2.mode === "composition" ? instance : instance.__composer;
- if (global2 === composer) {
- continue;
- }
- const label = keyInstance.type.name || keyInstance.type.displayName || keyInstance.type.__file;
- payload.rootNodes.push({
- id: composer.id.toString(),
- label: `${label} Scope`
- });
- }
- }
- function getComposer$1(nodeId, i18n2) {
- if (nodeId === "global") {
- return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
- } else {
- const instance = Array.from(i18n2.__instances.values()).find((item) => item.id.toString() === nodeId);
- if (instance) {
- return i18n2.mode === "composition" ? instance : instance.__composer;
- } else {
- return null;
- }
- }
- }
- function inspectScope(payload, i18n2) {
- const composer = getComposer$1(payload.nodeId, i18n2);
- if (composer) {
- payload.state = makeScopeInspectState(composer);
- }
- }
- function makeScopeInspectState(composer) {
- const state2 = {};
- const localeType = "Locale related info";
- const localeStates = [
- {
- type: localeType,
- key: "locale",
- editable: true,
- value: composer.locale.value
- },
- {
- type: localeType,
- key: "fallbackLocale",
- editable: true,
- value: composer.fallbackLocale.value
- },
- {
- type: localeType,
- key: "availableLocales",
- editable: false,
- value: composer.availableLocales
- },
- {
- type: localeType,
- key: "inheritLocale",
- editable: true,
- value: composer.inheritLocale
- }
- ];
- state2[localeType] = localeStates;
- const localeMessagesType = "Locale messages info";
- const localeMessagesStates = [
- {
- type: localeMessagesType,
- key: "messages",
- editable: false,
- value: getLocaleMessageValue(composer.messages.value)
- }
- ];
- state2[localeMessagesType] = localeMessagesStates;
- const datetimeFormatsType = "Datetime formats info";
- const datetimeFormatsStates = [
- {
- type: datetimeFormatsType,
- key: "datetimeFormats",
- editable: false,
- value: composer.datetimeFormats.value
- }
- ];
- state2[datetimeFormatsType] = datetimeFormatsStates;
- const numberFormatsType = "Datetime formats info";
- const numberFormatsStates = [
- {
- type: numberFormatsType,
- key: "numberFormats",
- editable: false,
- value: composer.numberFormats.value
- }
- ];
- state2[numberFormatsType] = numberFormatsStates;
- return state2;
- }
- function addTimelineEvent(event, payload) {
- if (devtoolsApi) {
- let groupId;
- if (payload && "groupId" in payload) {
- groupId = payload.groupId;
- delete payload.groupId;
- }
- devtoolsApi.addTimelineEvent({
- layerId: "vue-i18n-timeline",
- event: {
- title: event,
- groupId,
- time: Date.now(),
- meta: {},
- data: payload || {},
- logType: event === "compile-error" ? "error" : event === "fallback" || event === "missing" ? "warning" : "default"
- }
- });
- }
- }
- function editScope(payload, i18n2) {
- const composer = getComposer$1(payload.nodeId, i18n2);
- if (composer) {
- const [field] = payload.path;
- if (field === "locale" && isString(payload.state.value)) {
- composer.locale.value = payload.state.value;
- } else if (field === "fallbackLocale" && (isString(payload.state.value) || isArray(payload.state.value) || isObject$1(payload.state.value))) {
- composer.fallbackLocale.value = payload.state.value;
- } else if (field === "inheritLocale" && isBoolean(payload.state.value)) {
- composer.inheritLocale = payload.state.value;
- }
- }
- }
- function defineMixin(vuei18n, composer, i18n2) {
- return {
- beforeCreate() {
- const instance = vue.getCurrentInstance();
- if (!instance) {
- throw createI18nError(
- 22
- /* UNEXPECTED_ERROR */
- );
- }
- const options = this.$options;
- if (options.i18n) {
- const optionsI18n = options.i18n;
- if (options.__i18n) {
- optionsI18n.__i18n = options.__i18n;
- }
- optionsI18n.__root = composer;
- if (this === this.$root) {
- this.$i18n = mergeToRoot(vuei18n, optionsI18n);
- } else {
- optionsI18n.__injectWithOption = true;
- this.$i18n = createVueI18n(optionsI18n);
- }
- } else if (options.__i18n) {
- if (this === this.$root) {
- this.$i18n = mergeToRoot(vuei18n, options);
- } else {
- this.$i18n = createVueI18n({
- __i18n: options.__i18n,
- __injectWithOption: true,
- __root: composer
- });
- }
- } else {
- this.$i18n = vuei18n;
- }
- vuei18n.__onComponentInstanceCreated(this.$i18n);
- i18n2.__setInstance(instance, this.$i18n);
- this.$t = (...args) => this.$i18n.t(...args);
- this.$rt = (...args) => this.$i18n.rt(...args);
- this.$tc = (...args) => this.$i18n.tc(...args);
- this.$te = (key, locale) => this.$i18n.te(key, locale);
- this.$d = (...args) => this.$i18n.d(...args);
- this.$n = (...args) => this.$i18n.n(...args);
- this.$tm = (key) => this.$i18n.tm(key);
- },
- mounted() {
- {
- this.$el.__VUE_I18N__ = this.$i18n.__composer;
- const emitter = this.__v_emitter = createEmitter();
- const _vueI18n = this.$i18n;
- _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
- emitter.on("*", addTimelineEvent);
- }
- },
- beforeUnmount() {
- const instance = vue.getCurrentInstance();
- if (!instance) {
- throw createI18nError(
- 22
- /* UNEXPECTED_ERROR */
- );
- }
- {
- if (this.__v_emitter) {
- this.__v_emitter.off("*", addTimelineEvent);
- delete this.__v_emitter;
- }
- const _vueI18n = this.$i18n;
- _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();
- delete this.$el.__VUE_I18N__;
- }
- delete this.$t;
- delete this.$rt;
- delete this.$tc;
- delete this.$te;
- delete this.$d;
- delete this.$n;
- delete this.$tm;
- i18n2.__deleteInstance(instance);
- delete this.$i18n;
- }
- };
- }
- function mergeToRoot(root, options) {
- root.locale = options.locale || root.locale;
- root.fallbackLocale = options.fallbackLocale || root.fallbackLocale;
- root.missing = options.missing || root.missing;
- root.silentTranslationWarn = options.silentTranslationWarn || root.silentFallbackWarn;
- root.silentFallbackWarn = options.silentFallbackWarn || root.silentFallbackWarn;
- root.formatFallbackMessages = options.formatFallbackMessages || root.formatFallbackMessages;
- root.postTranslation = options.postTranslation || root.postTranslation;
- root.warnHtmlInMessage = options.warnHtmlInMessage || root.warnHtmlInMessage;
- root.escapeParameterHtml = options.escapeParameterHtml || root.escapeParameterHtml;
- root.sync = options.sync || root.sync;
- root.__composer[SetPluralRulesSymbol](options.pluralizationRules || root.pluralizationRules);
- const messages2 = getLocaleMessages(root.locale, {
- messages: options.messages,
- __i18n: options.__i18n
- });
- Object.keys(messages2).forEach((locale) => root.mergeLocaleMessage(locale, messages2[locale]));
- if (options.datetimeFormats) {
- Object.keys(options.datetimeFormats).forEach((locale) => root.mergeDateTimeFormat(locale, options.datetimeFormats[locale]));
- }
- if (options.numberFormats) {
- Object.keys(options.numberFormats).forEach((locale) => root.mergeNumberFormat(locale, options.numberFormats[locale]));
- }
- return root;
- }
- function createI18n(options = {}) {
- const __legacyMode = isBoolean(options.legacy) ? options.legacy : true;
- const __globalInjection = !!options.globalInjection;
- const __instances = /* @__PURE__ */ new Map();
- const __global = __legacyMode ? createVueI18n(options) : createComposer(options);
- const symbol = makeSymbol("vue-i18n");
- const i18n2 = {
- // mode
- get mode() {
- return __legacyMode ? "legacy" : "composition";
- },
- // install plugin
- async install(app, ...options2) {
- {
- app.__VUE_I18N__ = i18n2;
- }
- app.__VUE_I18N_SYMBOL__ = symbol;
- app.provide(app.__VUE_I18N_SYMBOL__, i18n2);
- if (!__legacyMode && __globalInjection) {
- injectGlobalFields(app, i18n2.global);
- }
- {
- apply(app, i18n2, ...options2);
- }
- if (__legacyMode) {
- app.mixin(defineMixin(__global, __global.__composer, i18n2));
- }
- {
- const ret = await enableDevTools(app, i18n2);
- if (!ret) {
- throw createI18nError(
- 21
- /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */
- );
- }
- const emitter = createEmitter();
- if (__legacyMode) {
- const _vueI18n = __global;
- _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
- } else {
- const _composer = __global;
- _composer[EnableEmitter] && _composer[EnableEmitter](emitter);
- }
- emitter.on("*", addTimelineEvent);
- }
- },
- // global accessor
- get global() {
- return __global;
- },
- // @internal
- __instances,
- // @internal
- __getInstance(component) {
- return __instances.get(component) || null;
- },
- // @internal
- __setInstance(component, instance) {
- __instances.set(component, instance);
- },
- // @internal
- __deleteInstance(component) {
- __instances.delete(component);
- }
- };
- return i18n2;
- }
- function useI18n(options = {}) {
- const instance = vue.getCurrentInstance();
- if (instance == null) {
- throw createI18nError(
- 16
- /* MUST_BE_CALL_SETUP_TOP */
- );
- }
- if (!instance.appContext.app.__VUE_I18N_SYMBOL__) {
- throw createI18nError(
- 17
- /* NOT_INSLALLED */
- );
- }
- const i18n2 = vue.inject(instance.appContext.app.__VUE_I18N_SYMBOL__);
- if (!i18n2) {
- throw createI18nError(
- 22
- /* UNEXPECTED_ERROR */
- );
- }
- const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
- const scope = isEmptyObject(options) ? "__i18n" in instance.type ? "local" : "global" : !options.useScope ? "local" : options.useScope;
- if (scope === "global") {
- let messages2 = isObject$1(options.messages) ? options.messages : {};
- if ("__i18nGlobal" in instance.type) {
- messages2 = getLocaleMessages(global2.locale.value, {
- messages: messages2,
- __i18n: instance.type.__i18nGlobal
- });
- }
- const locales = Object.keys(messages2);
- if (locales.length) {
- locales.forEach((locale) => {
- global2.mergeLocaleMessage(locale, messages2[locale]);
- });
- }
- if (isObject$1(options.datetimeFormats)) {
- const locales2 = Object.keys(options.datetimeFormats);
- if (locales2.length) {
- locales2.forEach((locale) => {
- global2.mergeDateTimeFormat(locale, options.datetimeFormats[locale]);
- });
- }
- }
- if (isObject$1(options.numberFormats)) {
- const locales2 = Object.keys(options.numberFormats);
- if (locales2.length) {
- locales2.forEach((locale) => {
- global2.mergeNumberFormat(locale, options.numberFormats[locale]);
- });
- }
- }
- return global2;
- }
- if (scope === "parent") {
- let composer2 = getComposer(i18n2, instance, options.__useComponent);
- if (composer2 == null) {
- {
- warn(getWarnMessage(
- 12
- /* NOT_FOUND_PARENT_SCOPE */
- ));
- }
- composer2 = global2;
- }
- return composer2;
- }
- if (i18n2.mode === "legacy") {
- throw createI18nError(
- 18
- /* NOT_AVAILABLE_IN_LEGACY_MODE */
- );
- }
- const i18nInternal = i18n2;
- let composer = i18nInternal.__getInstance(instance);
- if (composer == null) {
- const type = instance.type;
- const composerOptions = assign({}, options);
- if (type.__i18n) {
- composerOptions.__i18n = type.__i18n;
- }
- if (global2) {
- composerOptions.__root = global2;
- }
- composer = createComposer(composerOptions);
- setupLifeCycle(i18nInternal, instance, composer);
- i18nInternal.__setInstance(instance, composer);
- }
- return composer;
- }
- function getComposer(i18n2, target, useComponent = false) {
- let composer = null;
- const root = target.root;
- let current = target.parent;
- while (current != null) {
- const i18nInternal = i18n2;
- if (i18n2.mode === "composition") {
- composer = i18nInternal.__getInstance(current);
- } else {
- const vueI18n = i18nInternal.__getInstance(current);
- if (vueI18n != null) {
- composer = vueI18n.__composer;
- }
- if (useComponent && composer && !composer[InejctWithOption]) {
- composer = null;
- }
- }
- if (composer != null) {
- break;
- }
- if (root === current) {
- break;
- }
- current = current.parent;
- }
- return composer;
- }
- function setupLifeCycle(i18n2, target, composer) {
- let emitter = null;
- vue.onMounted(() => {
- if (target.vnode.el) {
- target.vnode.el.__VUE_I18N__ = composer;
- emitter = createEmitter();
- const _composer = composer;
- _composer[EnableEmitter] && _composer[EnableEmitter](emitter);
- emitter.on("*", addTimelineEvent);
- }
- }, target);
- vue.onUnmounted(() => {
- if (target.vnode.el && target.vnode.el.__VUE_I18N__) {
- emitter && emitter.off("*", addTimelineEvent);
- const _composer = composer;
- _composer[DisableEmitter] && _composer[DisableEmitter]();
- delete target.vnode.el.__VUE_I18N__;
- }
- i18n2.__deleteInstance(target);
- }, target);
- }
- const globalExportProps = [
- "locale",
- "fallbackLocale",
- "availableLocales"
- ];
- const globalExportMethods = ["t", "rt", "d", "n", "tm"];
- function injectGlobalFields(app, composer) {
- const i18n2 = /* @__PURE__ */ Object.create(null);
- globalExportProps.forEach((prop) => {
- const desc = Object.getOwnPropertyDescriptor(composer, prop);
- if (!desc) {
- throw createI18nError(
- 22
- /* UNEXPECTED_ERROR */
- );
- }
- const wrap = vue.isRef(desc.value) ? {
- get() {
- return desc.value.value;
- },
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- set(val) {
- desc.value.value = val;
- }
- } : {
- get() {
- return desc.get && desc.get();
- }
- };
- Object.defineProperty(i18n2, prop, wrap);
- });
- app.config.globalProperties.$i18n = i18n2;
- globalExportMethods.forEach((method) => {
- const desc = Object.getOwnPropertyDescriptor(composer, method);
- if (!desc || !desc.value) {
- throw createI18nError(
- 22
- /* UNEXPECTED_ERROR */
- );
- }
- Object.defineProperty(app.config.globalProperties, `$${method}`, desc);
- });
- }
- {
- initFeatureFlags();
- }
- {
- const target = getGlobalThis();
- target.__INTLIFY__ = true;
- setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
- }
- class Request {
- constructor(options = {}) {
- this.baseUrl = options.baseUrl || "http://10.168.1.100";
- this.url = options.url || "";
- this.method = "GET";
- this.data = null;
- this.header = options.header || {};
- this.beforeRequest = null;
- this.afterRequest = null;
- }
- // 添加对header的支持
- _mergeHeaders(customHeader = {}) {
- return Object.assign({}, this.header, customHeader);
- }
- get(url, data = {}, header = {}) {
- this.method = "GET";
- this.url = this.baseUrl + url;
- this.data = data;
- this.header = this._mergeHeaders(header);
- return this._();
- }
- post(url, data = {}, header = {}) {
- this.method = "POST";
- this.url = this.baseUrl + url;
- this.data = data;
- this.header = this._mergeHeaders(header);
- return this._();
- }
- put(url, data = {}) {
- this.method = "PUT";
- this.url = this.baseUrl + url;
- this.data = data;
- return this._();
- }
- delete(url, data = {}) {
- this.method = "DELETE";
- this.url = this.baseUrl + url;
- this.data = data;
- return this._();
- }
- _() {
- if (this.baseUrl == "") {
- this.url = "http://10.168.1.100" + this.url;
- }
- this.beforeRequest && typeof this.beforeRequest === "function" && this.beforeRequest(this);
- return new Promise((resolve, reject) => {
- let weixin = wx;
- if ("undefined" !== typeof uni) {
- weixin = uni;
- }
- weixin.request({
- url: this.url,
- method: this.method,
- data: this.data,
- header: this.header,
- success: (res) => {
- resolve(res);
- },
- fail: (err) => {
- reject(err);
- },
- complete: (res) => {
- this.afterRequest && typeof this.afterRequest === "function" && this.afterRequest(res);
- }
- });
- });
- }
- }
- const $http = new Request();
- var define_process_env_UNI_STATISTICS_CONFIG_default = { enable: true, version: "2" };
- var define_process_env_UNI_STAT_TITLE_JSON_default = {};
- var define_process_env_UNI_STAT_UNI_CLOUD_default = {};
- const sys = uni.getSystemInfoSync();
- const STAT_VERSION = "4.56";
- const STAT_URL = "https://tongji.dcloud.io/uni/stat";
- const STAT_H5_URL = "https://tongji.dcloud.io/uni/stat.gif";
- const PAGE_PVER_TIME = 1800;
- const APP_PVER_TIME = 300;
- const OPERATING_TIME = 10;
- const DIFF_TIME = 60 * 1e3 * 60 * 24;
- const appid = "__UNI__8782431";
- const dbSet = (name, value) => {
- let data = uni.getStorageSync("$$STAT__DBDATA:" + appid) || {};
- if (!data) {
- data = {};
- }
- data[name] = value;
- uni.setStorageSync("$$STAT__DBDATA:" + appid, data);
- };
- const dbGet = (name) => {
- let data = uni.getStorageSync("$$STAT__DBDATA:" + appid) || {};
- if (!data[name]) {
- let dbdata = uni.getStorageSync("$$STAT__DBDATA:" + appid);
- if (!dbdata) {
- dbdata = {};
- }
- if (!dbdata[name]) {
- return void 0;
- }
- data[name] = dbdata[name];
- }
- return data[name];
- };
- const dbRemove = (name) => {
- let data = uni.getStorageSync("$$STAT__DBDATA:" + appid) || {};
- if (data[name]) {
- delete data[name];
- uni.setStorageSync("$$STAT__DBDATA:" + appid, data);
- } else {
- data = uni.getStorageSync("$$STAT__DBDATA:" + appid);
- if (data[name]) {
- delete data[name];
- uni.setStorageSync("$$STAT__DBDATA:" + appid, data);
- }
- }
- };
- const uniStatisticsConfig = define_process_env_UNI_STATISTICS_CONFIG_default;
- let statConfig = {
- appid: "__UNI__8782431"
- };
- let titleJsons = {};
- titleJsons = define_process_env_UNI_STAT_TITLE_JSON_default;
- const UUID_KEY = "__DC_STAT_UUID";
- const UUID_VALUE = "__DC_UUID_VALUE";
- function getUuid() {
- let uuid = "";
- if (get_platform_name() === "n") {
- try {
- uuid = plus.runtime.getDCloudId();
- } catch (e2) {
- uuid = "";
- }
- return uuid;
- }
- try {
- uuid = uni.getStorageSync(UUID_KEY);
- } catch (e2) {
- uuid = UUID_VALUE;
- }
- if (!uuid) {
- uuid = Date.now() + "" + Math.floor(Math.random() * 1e7);
- try {
- uni.setStorageSync(UUID_KEY, uuid);
- } catch (e2) {
- uni.setStorageSync(UUID_KEY, UUID_VALUE);
- }
- }
- return uuid;
- }
- const get_uuid = (statData2) => {
- return sys.deviceId || getUuid();
- };
- const get_odid = (statData2) => {
- let odid = "";
- if (get_platform_name() === "n") {
- try {
- odid = plus.device.uuid;
- } catch (e2) {
- odid = "";
- }
- return odid;
- }
- return sys.deviceId || getUuid();
- };
- const stat_config = statConfig;
- const get_sgin = (statData2) => {
- let arr = Object.keys(statData2);
- let sortArr = arr.sort();
- let sgin = {};
- let sginStr = "";
- for (var i2 in sortArr) {
- sgin[sortArr[i2]] = statData2[sortArr[i2]];
- sginStr += sortArr[i2] + "=" + statData2[sortArr[i2]] + "&";
- }
- return {
- sign: "",
- options: sginStr.substr(0, sginStr.length - 1)
- };
- };
- const get_encodeURIComponent_options = (statData2) => {
- let data = {};
- for (let prop in statData2) {
- data[prop] = encodeURIComponent(statData2[prop]);
- }
- return data;
- };
- const get_platform_name = () => {
- const aliArr = ["y", "a", "p", "mp-ali"];
- const platformList = {
- app: "n",
- "app-plus": "n",
- "app-harmony": "n",
- "mp-harmony": "mhm",
- h5: "h5",
- "mp-weixin": "wx",
- [aliArr.reverse().join("")]: "ali",
- "mp-baidu": "bd",
- "mp-toutiao": "tt",
- "mp-qq": "qq",
- "quickapp-native": "qn",
- "mp-kuaishou": "ks",
- "mp-lark": "lark",
- "quickapp-webview": "qw",
- "mp-xhs": "xhs"
- };
- if (platformList["app"] === "ali") {
- if (my && my.env) {
- const clientName = my.env.clientName;
- if (clientName === "ap")
- return "ali";
- if (clientName === "dingtalk")
- return "dt";
- }
- }
- return platformList["app"] || "app";
- };
- const get_pack_name = () => {
- let packName = "";
- if (get_platform_name() === "wx" || get_platform_name() === "qq") {
- if (uni.canIUse("getAccountInfoSync")) {
- packName = uni.getAccountInfoSync().miniProgram.appId || "";
- }
- }
- if (get_platform_name() === "n")
- ;
- return packName;
- };
- const get_version = () => {
- return get_platform_name() === "n" ? plus.runtime.version : "";
- };
- const get_channel = () => {
- const platformName = get_platform_name();
- let channel = "";
- if (platformName === "n") {
- channel = plus.runtime.channel;
- }
- return channel;
- };
- const get_scene = (options) => {
- const platformName = get_platform_name();
- let scene = "";
- if (options) {
- return options;
- }
- if (platformName === "wx") {
- scene = uni.getLaunchOptionsSync().scene;
- }
- return scene;
- };
- const get_route = (pageVm) => {
- let _self = pageVm || get_page_vm();
- if (get_platform_name() === "bd") {
- let mp_route = _self.$mp && _self.$mp.page && _self.$mp.page.is;
- let scope_route = _self.$scope && _self.$scope.is;
- return mp_route || scope_route || "";
- } else {
- return _self.route || _self.$scope && _self.$scope.route || _self.$mp && _self.$mp.page.route;
- }
- };
- const get_page_route = (pageVm) => {
- let page = pageVm && (pageVm.$page || pageVm.$scope && pageVm.$scope.$page);
- let lastPageRoute = uni.getStorageSync("_STAT_LAST_PAGE_ROUTE");
- if (!page)
- return lastPageRoute || "";
- return page.fullPath === "/" ? page.route : page.fullPath || page.route;
- };
- const get_page_vm = () => {
- let pages2 = getCurrentPages();
- let $page = pages2[pages2.length - 1];
- if (!$page)
- return null;
- return $page.$vm;
- };
- const get_page_types = (self2) => {
- if (self2.mpType === "page" || self2.$mpType === "page" || self2.$mp && self2.$mp.mpType === "page" || self2.$options.mpType === "page") {
- return "page";
- }
- if (self2.mpType === "app" || self2.$mpType === "app" || self2.$mp && self2.$mp.mpType === "app" || self2.$options.mpType === "app") {
- return "app";
- }
- return null;
- };
- const handle_data = (statData2) => {
- let firstArr = [];
- let contentArr = [];
- let lastArr = [];
- for (let i2 in statData2) {
- const rd = statData2[i2];
- rd.forEach((elm) => {
- let newData = "";
- {
- newData = elm;
- }
- if (i2 === 0) {
- firstArr.push(newData);
- } else if (i2 === 3) {
- lastArr.push(newData);
- } else {
- contentArr.push(newData);
- }
- });
- }
- firstArr.push(...contentArr, ...lastArr);
- return JSON.stringify(firstArr);
- };
- const calibration = (eventName, options) => {
- if (!eventName) {
- console.error(`uni.report Missing [eventName] parameter`);
- return true;
- }
- if (typeof eventName !== "string") {
- console.error(
- `uni.report [eventName] Parameter type error, it can only be of type String`
- );
- return true;
- }
- if (eventName.length > 255) {
- console.error(
- `uni.report [eventName] Parameter length cannot be greater than 255`
- );
- return true;
- }
- if (typeof options !== "string" && typeof options !== "object") {
- console.error(
- "uni.report [options] Parameter type error, Only supports String or Object type"
- );
- return true;
- }
- if (typeof options === "string" && options.length > 255) {
- console.error(
- `uni.report [options] Parameter length cannot be greater than 255`
- );
- return true;
- }
- if (eventName === "title" && typeof options !== "string") {
- console.error(
- `uni.report [eventName] When the parameter is title, the [options] parameter can only be of type String`
- );
- return true;
- }
- };
- const get_page_name = (routepath) => {
- return titleJsons && titleJsons[routepath] || "";
- };
- const Report_Data_Time = "Report_Data_Time";
- const Report_Status = "Report_Status";
- const is_report_data = () => {
- return new Promise((resolve, reject) => {
- let start_time = "";
- let end_time = (/* @__PURE__ */ new Date()).getTime();
- let diff_time = DIFF_TIME;
- let report_status = 1;
- try {
- start_time = uni.getStorageSync(Report_Data_Time);
- report_status = uni.getStorageSync(Report_Status);
- } catch (e2) {
- start_time = "";
- report_status = 1;
- }
- if (report_status === "") {
- requestData(({ enable }) => {
- uni.setStorageSync(Report_Data_Time, end_time);
- uni.setStorageSync(Report_Status, enable);
- if (enable === 1) {
- resolve();
- }
- });
- return;
- }
- if (report_status === 1) {
- resolve();
- }
- if (!start_time) {
- uni.setStorageSync(Report_Data_Time, end_time);
- start_time = end_time;
- }
- if (end_time - start_time > diff_time) {
- requestData(({ enable }) => {
- uni.setStorageSync(Report_Data_Time, end_time);
- uni.setStorageSync(Report_Status, enable);
- });
- }
- });
- };
- const requestData = (done) => {
- const appid2 = "__UNI__8782431";
- let formData = {
- usv: STAT_VERSION,
- conf: JSON.stringify({
- ak: appid2
- })
- };
- uni.request({
- url: STAT_URL,
- method: "GET",
- data: formData,
- success: (res) => {
- const { data } = res;
- if (data.ret === 0) {
- typeof done === "function" && done({
- enable: data.enable
- });
- }
- },
- fail: (e2) => {
- let report_status_code = 1;
- try {
- report_status_code = uni.getStorageSync(Report_Status);
- } catch (e22) {
- report_status_code = 1;
- }
- if (report_status_code === "") {
- report_status_code = 1;
- }
- typeof done === "function" && done({
- enable: report_status_code
- });
- }
- });
- };
- const uni_cloud_config = () => {
- return define_process_env_UNI_STAT_UNI_CLOUD_default || {};
- };
- const get_space = (config) => {
- const uniCloudConfig = uni_cloud_config();
- const { spaceId, provider, clientSecret, secretKey, secretId } = uniCloudConfig;
- const space_type = ["tcb", "tencent", "aliyun", "alipay", "private", "dcloud"];
- const is_provider = space_type.indexOf(provider) !== -1;
- const is_aliyun = provider === "aliyun" && spaceId && clientSecret;
- const is_tcb = (provider === "tcb" || provider === "tencent") && spaceId;
- const is_alipay = provider === "alipay" && spaceId && secretKey && secretId;
- const is_private = provider === "private" && spaceId && clientSecret;
- const is_dcloud = provider === "dcloud" && spaceId && clientSecret;
- if (is_provider && (is_aliyun || is_tcb || is_alipay || is_private || is_dcloud)) {
- return uniCloudConfig;
- } else {
- if (config && config.spaceId) {
- return config;
- }
- }
- return null;
- };
- const get_report_Interval = (defaultTime) => {
- let time = uniStatisticsConfig.reportInterval;
- if (Number(time) === 0)
- return 0;
- time = time || defaultTime;
- let reg = /(^[1-9]\d*$)/;
- if (!reg.test(time))
- return defaultTime;
- return Number(time);
- };
- const is_push_clientid = () => {
- if (uniStatisticsConfig.collectItems) {
- const ClientID = uniStatisticsConfig.collectItems.uniPushClientID;
- return typeof ClientID === "boolean" ? ClientID : false;
- }
- return false;
- };
- const is_page_report = () => {
- if (uniStatisticsConfig.collectItems) {
- const statPageLog = uniStatisticsConfig.collectItems.uniStatPageLog;
- if (statPageLog === void 0)
- return true;
- return typeof statPageLog === "boolean" ? statPageLog : true;
- }
- return true;
- };
- const IS_HANDLE_DEVECE_ID = "is_handle_device_id";
- const is_handle_device = () => {
- let isHandleDevice = dbGet(IS_HANDLE_DEVECE_ID) || "";
- dbSet(IS_HANDLE_DEVECE_ID, "1");
- return isHandleDevice === "1";
- };
- const FIRST_VISIT_TIME_KEY = "__first__visit__time";
- const LAST_VISIT_TIME_KEY = "__last__visit__time";
- const get_time = () => {
- return parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3);
- };
- const get_first_visit_time = () => {
- const timeStorge = dbGet(FIRST_VISIT_TIME_KEY);
- let time = 0;
- if (timeStorge) {
- time = timeStorge;
- } else {
- time = get_time();
- dbSet(FIRST_VISIT_TIME_KEY, time);
- dbRemove(LAST_VISIT_TIME_KEY);
- }
- return time;
- };
- const get_last_visit_time = () => {
- const timeStorge = dbGet(LAST_VISIT_TIME_KEY);
- let time = 0;
- if (timeStorge) {
- time = timeStorge;
- }
- dbSet(LAST_VISIT_TIME_KEY, get_time());
- return time;
- };
- const PAGE_RESIDENCE_TIME = "__page__residence__time";
- let First_Page_Residence_Time = 0;
- let Last_Page_Residence_Time = 0;
- const set_page_residence_time = () => {
- First_Page_Residence_Time = get_time();
- dbSet(PAGE_RESIDENCE_TIME, First_Page_Residence_Time);
- return First_Page_Residence_Time;
- };
- const get_page_residence_time = () => {
- Last_Page_Residence_Time = get_time();
- First_Page_Residence_Time = dbGet(PAGE_RESIDENCE_TIME);
- return Last_Page_Residence_Time - First_Page_Residence_Time;
- };
- const TOTAL_VISIT_COUNT = "__total__visit__count";
- const get_total_visit_count = () => {
- const timeStorge = dbGet(TOTAL_VISIT_COUNT);
- let count = 1;
- if (timeStorge) {
- count = timeStorge;
- count++;
- }
- dbSet(TOTAL_VISIT_COUNT, count);
- return count;
- };
- const FIRST_TIME = "__first_time";
- const set_first_time = () => {
- let time = get_time();
- const timeStorge = dbSet(FIRST_TIME, time);
- return timeStorge;
- };
- const get_residence_time = (type) => {
- let residenceTime = 0;
- const first_time = dbGet(FIRST_TIME);
- const last_time = get_time();
- if (first_time !== 0) {
- residenceTime = last_time - first_time;
- }
- residenceTime = residenceTime < 1 ? 1 : residenceTime;
- if (type === "app") {
- let overtime = residenceTime > APP_PVER_TIME ? true : false;
- return {
- residenceTime,
- overtime
- };
- }
- if (type === "page") {
- let overtime = residenceTime > PAGE_PVER_TIME ? true : false;
- return {
- residenceTime,
- overtime
- };
- }
- return {
- residenceTime
- };
- };
- const eport_Interval = get_report_Interval(OPERATING_TIME);
- let statData = {
- uuid: get_uuid(),
- // 设备标识
- ak: stat_config.appid,
- // uni-app 应用 Appid
- p: "",
- // 手机系统,客户端平台
- ut: get_platform_name(),
- // 平台类型
- mpn: get_pack_name(),
- // 原生平台包名、小程序 appid
- usv: STAT_VERSION,
- // 统计 sdk 版本
- v: get_version(),
- // 应用版本,仅app
- ch: get_channel(),
- // 渠道信息
- cn: "",
- // 国家
- pn: "",
- // 省份
- ct: "",
- // 城市
- t: get_time(),
- // 上报数据时的时间戳
- tt: "",
- brand: sys.brand || "",
- // 手机品牌
- md: sys.model,
- // 手机型号
- sv: "",
- // 手机系统版本
- mpsdk: sys.SDKVersion || "",
- // x程序 sdk version
- mpv: sys.version || "",
- // 小程序平台版本 ,如微信、支付宝
- lang: sys.language,
- // 语言
- pr: sys.pixelRatio,
- // pixelRatio 设备像素比
- ww: sys.windowWidth,
- // windowWidth 可使用窗口宽度
- wh: sys.windowHeight,
- // windowHeight 可使用窗口高度
- sw: sys.screenWidth,
- // screenWidth 屏幕宽度
- sh: sys.screenHeight
- // screenHeight 屏幕高度
- };
- if (sys.platform) {
- switch (sys.platform) {
- case "android":
- statData.p = "a";
- break;
- case "ios":
- statData.p = "i";
- break;
- case "harmonyos":
- statData.p = "h";
- break;
- }
- }
- if (sys.system) {
- statData.sv = sys.system.replace(/(Android|iOS)\s/, "");
- }
- class Report {
- constructor() {
- this.self = "";
- this.__licationShow = false;
- this.__licationHide = false;
- this.statData = statData;
- this._navigationBarTitle = {
- config: "",
- page: "",
- report: "",
- lt: ""
- };
- this._query = {};
- let registerInterceptor = typeof uni.addInterceptor === "function";
- if (registerInterceptor) {
- this.addInterceptorInit();
- this.interceptLogin();
- this.interceptShare(true);
- this.interceptRequestPayment();
- }
- }
- addInterceptorInit() {
- let self2 = this;
- uni.addInterceptor("setNavigationBarTitle", {
- invoke(args) {
- self2._navigationBarTitle.page = args.title;
- }
- });
- }
- interceptLogin() {
- let self2 = this;
- uni.addInterceptor("login", {
- complete() {
- self2._login();
- }
- });
- }
- interceptShare(type) {
- let self2 = this;
- if (!type) {
- self2._share();
- return;
- }
- uni.addInterceptor("share", {
- success() {
- self2._share();
- },
- fail() {
- self2._share();
- }
- });
- }
- interceptRequestPayment() {
- let self2 = this;
- uni.addInterceptor("requestPayment", {
- success() {
- self2._payment("pay_success");
- },
- fail() {
- self2._payment("pay_fail");
- }
- });
- }
- _login() {
- this.sendEventRequest(
- {
- key: "login"
- },
- 0
- );
- }
- _share() {
- this.sendEventRequest(
- {
- key: "share"
- },
- 0
- );
- }
- _payment(key) {
- this.sendEventRequest(
- {
- key
- },
- 0
- );
- }
- /**
- * 进入应用触发
- */
- applicationShow() {
- if (this.__licationHide) {
- const time = get_residence_time("app");
- if (time.overtime) {
- let lastPageRoute = uni.getStorageSync("_STAT_LAST_PAGE_ROUTE");
- let options = {
- path: lastPageRoute,
- scene: this.statData.sc,
- cst: 2
- };
- this.sendReportRequest(options);
- } else {
- const scene = get_scene();
- if (scene !== this.statData.sc) {
- let lastPageRoute = uni.getStorageSync("_STAT_LAST_PAGE_ROUTE");
- let options = {
- path: lastPageRoute,
- scene,
- cst: 2
- };
- this.sendReportRequest(options);
- }
- }
- this.__licationHide = false;
- }
- }
- /**
- * 离开应用触发
- * @param {Object} self
- * @param {Object} type
- */
- applicationHide(self2, type) {
- if (!self2) {
- self2 = get_page_vm();
- }
- this.__licationHide = true;
- const time = get_residence_time();
- const route = get_page_route(self2);
- uni.setStorageSync("_STAT_LAST_PAGE_ROUTE", route);
- this.sendHideRequest(
- {
- urlref: route,
- urlref_ts: time.residenceTime
- },
- type
- );
- set_first_time();
- }
- /**
- * 进入页面触发
- */
- pageShow(self2) {
- this._navigationBarTitle = {
- config: "",
- page: "",
- report: "",
- lt: ""
- };
- const route = get_page_route(self2);
- const routepath = get_route(self2);
- this._navigationBarTitle.config = get_page_name(routepath);
- if (this.__licationShow) {
- set_first_time();
- uni.setStorageSync("_STAT_LAST_PAGE_ROUTE", route);
- this.__licationShow = false;
- return;
- }
- const time = get_residence_time("page");
- if (time.overtime) {
- let options = {
- path: route,
- scene: this.statData.sc,
- cst: 3
- };
- this.sendReportRequest(options);
- }
- set_first_time();
- }
- /**
- * 离开页面触发
- */
- pageHide(self2) {
- if (!this.__licationHide) {
- const time = get_residence_time("page");
- let route = get_page_route(self2);
- let lastPageRoute = uni.getStorageSync("_STAT_LAST_PAGE_ROUTE");
- if (!lastPageRoute) {
- lastPageRoute = route;
- }
- uni.setStorageSync("_STAT_LAST_PAGE_ROUTE", route);
- this.sendPageRequest({
- url: route,
- urlref: lastPageRoute,
- urlref_ts: time.residenceTime
- });
- return;
- }
- }
- /**
- * 发送请求,应用维度上报
- * @param {Object} options 页面信息
- * @param {Boolean} type 是否立即上报
- */
- sendReportRequest(options, type) {
- this._navigationBarTitle.lt = "1";
- this._navigationBarTitle.config = get_page_name(options.path);
- let is_opt = options.query && JSON.stringify(options.query) !== "{}";
- let query = is_opt ? "?" + JSON.stringify(options.query) : "";
- const last_time = get_last_visit_time();
- if (last_time !== 0 || !last_time) {
- const odid = get_odid();
- {
- const have_device = is_handle_device();
- if (!have_device) {
- this.statData.odid = odid;
- }
- }
- }
- Object.assign(this.statData, {
- lt: "1",
- url: options.path + query || "",
- t: get_time(),
- sc: get_scene(options.scene),
- fvts: get_first_visit_time(),
- lvts: last_time,
- tvc: get_total_visit_count(),
- // create session type 上报类型 ,1 应用进入 2.后台30min进入 3.页面30min进入
- cst: options.cst || 1
- });
- if (get_platform_name() === "n") {
- this.getProperty(type);
- } else {
- this.getNetworkInfo(type);
- }
- }
- /**
- * 发送请求,页面维度上报
- * @param {Object} opt
- */
- sendPageRequest(opt) {
- let { url, urlref, urlref_ts } = opt;
- this._navigationBarTitle.lt = "11";
- let options = {
- ak: this.statData.ak,
- uuid: this.statData.uuid,
- p: this.statData.p,
- lt: "11",
- ut: this.statData.ut,
- url,
- tt: this.statData.tt,
- urlref,
- urlref_ts,
- ch: this.statData.ch,
- usv: this.statData.usv,
- t: get_time()
- };
- this.request(options);
- }
- /**
- * 进入后台上报数据
- * @param {Object} opt
- * @param {Object} type
- */
- sendHideRequest(opt, type) {
- let { urlref, urlref_ts } = opt;
- let options = {
- ak: this.statData.ak,
- uuid: this.statData.uuid,
- p: this.statData.p,
- lt: "3",
- ut: this.statData.ut,
- urlref,
- urlref_ts,
- ch: this.statData.ch,
- usv: this.statData.usv,
- t: get_time()
- };
- this.request(options, type);
- }
- /**
- * 自定义事件上报
- */
- sendEventRequest({ key = "", value = "" } = {}) {
- let routepath = "";
- try {
- routepath = get_route();
- } catch (error) {
- const launch_options = dbGet("__launch_options");
- routepath = launch_options.path;
- }
- this._navigationBarTitle.config = get_page_name(routepath);
- this._navigationBarTitle.lt = "21";
- let options = {
- ak: this.statData.ak,
- uuid: this.statData.uuid,
- p: this.statData.p,
- lt: "21",
- ut: this.statData.ut,
- url: routepath,
- ch: this.statData.ch,
- e_n: key,
- e_v: typeof value === "object" ? JSON.stringify(value) : value.toString(),
- usv: this.statData.usv,
- t: get_time()
- };
- this.request(options);
- }
- sendPushRequest(options, cid) {
- let time = get_time();
- const statData2 = {
- lt: "101",
- cid,
- t: time,
- ut: this.statData.ut
- };
- const stat_data = handle_data({
- 101: [statData2]
- });
- let optionsData = {
- usv: STAT_VERSION,
- //统计 SDK 版本号
- t: time,
- //发送请求时的时间戮
- requests: stat_data
- };
- if (get_platform_name() === "n" && this.statData.p === "a") {
- setTimeout(() => {
- this.sendRequest(optionsData);
- }, 200);
- return;
- }
- this.sendRequest(optionsData);
- }
- /**
- * 获取wgt资源版本
- */
- getProperty(type) {
- plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
- this.statData.v = wgtinfo.version || "";
- this.getNetworkInfo(type);
- });
- }
- /**
- * 获取网络信息
- */
- getNetworkInfo(type) {
- uni.getNetworkType({
- success: (result) => {
- this.statData.net = result.networkType;
- this.getLocation(type);
- }
- });
- }
- /**
- * 获取位置信息
- */
- getLocation(type) {
- if (stat_config.getLocation) {
- uni.getLocation({
- type: "wgs84",
- geocode: true,
- success: (result) => {
- if (result.address) {
- this.statData.cn = result.address.country;
- this.statData.pn = result.address.province;
- this.statData.ct = result.address.city;
- }
- this.statData.lat = result.latitude;
- this.statData.lng = result.longitude;
- this.request(this.statData, type);
- }
- });
- } else {
- this.statData.lat = 0;
- this.statData.lng = 0;
- this.request(this.statData, type);
- }
- }
- /**
- * 发送请求
- * @param {Object} data 上报数据
- * @param {Object} type 类型
- */
- request(data, type) {
- let time = get_time();
- const title = this._navigationBarTitle;
- Object.assign(data, {
- ttn: title.page,
- ttpj: title.config,
- ttc: title.report
- });
- let uniStatData = dbGet("__UNI__STAT__DATA") || {};
- if (!uniStatData[data.lt]) {
- uniStatData[data.lt] = [];
- }
- uniStatData[data.lt].push(data);
- dbSet("__UNI__STAT__DATA", uniStatData);
- let page_residence_time = get_page_residence_time();
- if (page_residence_time < eport_Interval && !type)
- return;
- set_page_residence_time();
- const stat_data = handle_data(uniStatData);
- let optionsData = {
- usv: STAT_VERSION,
- //统计 SDK 版本号
- t: time,
- //发送请求时的时间戮
- requests: stat_data
- };
- dbRemove("__UNI__STAT__DATA");
- if (get_platform_name() === "n" && this.statData.p === "a") {
- setTimeout(() => {
- this.sendRequest(optionsData);
- }, 200);
- return;
- }
- this.sendRequest(optionsData);
- }
- getIsReportData() {
- return is_report_data();
- }
- /**
- * 数据上报
- * @param {Object} optionsData 需要上报的数据
- */
- sendRequest(optionsData) {
- {
- if (!uni.__stat_uniCloud_space) {
- console.error(
- "应用未关联服务空间,统计上报失败,请在uniCloud目录右键关联服务空间."
- );
- return;
- }
- const uniCloudObj = uni.__stat_uniCloud_space.importObject(
- "uni-stat-receiver",
- {
- customUI: true
- }
- );
- uniCloudObj.report(optionsData).then(() => {
- }).catch((err) => {
- });
- }
- }
- /**
- * h5 请求
- */
- imageRequest(data) {
- this.getIsReportData().then(() => {
- let image = new Image();
- let options = get_sgin(get_encodeURIComponent_options(data)).options;
- image.src = STAT_H5_URL + "?" + options;
- });
- }
- sendEvent(key, value) {
- if (calibration(key, value))
- return;
- if (key === "title") {
- this._navigationBarTitle.report = value;
- return;
- }
- this.sendEventRequest(
- {
- key,
- value: typeof value === "object" ? JSON.stringify(value) : value
- },
- 1
- );
- }
- }
- class Stat extends Report {
- static getInstance() {
- if (!uni.__stat_instance) {
- uni.__stat_instance = new Stat();
- }
- {
- let space = get_space(nr.config);
- if (!uni.__stat_uniCloud_space) {
- if (space && Object.keys(space).length !== 0) {
- let spaceData = {
- provider: space.provider,
- spaceId: space.spaceId,
- clientSecret: space.clientSecret
- };
- if (space.endpoint) {
- spaceData.endpoint = space.endpoint;
- }
- if (space.provider === "alipay") {
- spaceData.secretKey = space.secretKey;
- spaceData.accessKey = space.accessKey || space.secretId;
- spaceData.spaceAppId = space.spaceAppId || space.appId;
- }
- uni.__stat_uniCloud_space = nr.init(spaceData);
- } else {
- console.error("应用未关联服务空间,请在uniCloud目录右键关联服务空间");
- }
- }
- }
- return uni.__stat_instance;
- }
- constructor() {
- super();
- }
- /**
- * 获取推送id
- */
- pushEvent(options) {
- const ClientID = is_push_clientid();
- if (uni.getPushClientId && ClientID) {
- uni.getPushClientId({
- success: (res) => {
- const cid = res.cid || false;
- if (cid) {
- this.sendPushRequest(options, cid);
- }
- }
- });
- }
- }
- /**
- * 进入应用
- * @param {Object} options 页面参数
- * @param {Object} self 当前页面实例
- */
- launch(options, self2) {
- set_page_residence_time();
- this.__licationShow = true;
- dbSet("__launch_options", options);
- options.cst = 1;
- this.sendReportRequest(options, true);
- }
- load(options, self2) {
- this.self = self2;
- this._query = options;
- }
- appHide(self2) {
- this.applicationHide(self2, true);
- }
- appShow(self2) {
- this.applicationShow(self2);
- }
- show(self2) {
- this.self = self2;
- if (get_page_types(self2) === "page") {
- const isPageReport = is_page_report();
- if (isPageReport) {
- this.pageShow(self2);
- }
- }
- if (get_platform_name() === "h5" || get_platform_name() === "n") {
- if (get_page_types(self2) === "app") {
- this.appShow();
- }
- }
- }
- hide(self2) {
- this.self = self2;
- if (get_page_types(self2) === "page") {
- const isPageReport = is_page_report();
- if (isPageReport) {
- this.pageHide(self2);
- }
- }
- if (get_platform_name() === "h5" || get_platform_name() === "n") {
- if (get_page_types(self2) === "app") {
- this.appHide();
- }
- }
- }
- error(em) {
- let emVal = "";
- if (!em.message) {
- emVal = JSON.stringify(em);
- } else {
- emVal = em.stack;
- }
- let route = "";
- try {
- route = get_route();
- } catch (e2) {
- route = "";
- }
- let options = {
- ak: this.statData.ak,
- uuid: this.statData.uuid,
- p: this.statData.p,
- lt: "31",
- url: route,
- ut: this.statData.ut,
- ch: this.statData.ch,
- mpsdk: this.statData.mpsdk,
- mpv: this.statData.mpv,
- v: this.statData.v,
- em: emVal,
- usv: this.statData.usv,
- t: parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3)
- };
- this.request(options);
- }
- }
- Stat.getInstance();
- function main() {
- {
- {
- uni.report = function(type, options) {
- };
- }
- }
- }
- main();
- const messages = {
- en,
- "zh-Hans": zhHans,
- "zh-Hant": zhHant
- };
- let i18nConfig = {
- locale: uni.getStorageSync("userLanguage") || "zh-Hans",
- // 获取已设置的语言
- messages
- };
- const i18n = createI18n(i18nConfig);
- function createApp() {
- const app = vue.createVueApp(App);
- app.use(i18n);
- app.use(Store);
- return {
- app
- };
- }
- uni.$http = $http;
- $http.baseUrl = "";
- $http.beforeRequest = function(options) {
- };
- $http.afterRequest = function() {
- };
- const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
- uni.Vuex = __Vuex__;
- uni.Pinia = __Pinia__;
- __app__.provide("__globalStyles", __uniConfig.styles);
- __app__._component.mpType = "app";
- __app__._component.render = () => {
- };
- __app__.mount("#app");
- })(Vue);
|