| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194 |
- 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/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/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/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], A2 = e4[t4 + 14], C2 = e4[t4 + 15], P2 = i3[0], T2 = i3[1], x2 = i3[2], O2 = i3[3];
- P2 = u2(P2, T2, x2, O2, o3, 7, a2[0]), O2 = u2(O2, P2, T2, x2, c3, 12, a2[1]), x2 = u2(x2, O2, P2, T2, p2, 17, a2[2]), T2 = u2(T2, x2, O2, P2, f2, 22, a2[3]), P2 = u2(P2, T2, x2, O2, g2, 7, a2[4]), O2 = u2(O2, P2, T2, x2, m2, 12, a2[5]), x2 = u2(x2, O2, P2, T2, y2, 17, a2[6]), T2 = u2(T2, x2, O2, P2, _2, 22, a2[7]), P2 = u2(P2, T2, x2, O2, w2, 7, a2[8]), O2 = u2(O2, P2, T2, x2, v2, 12, a2[9]), x2 = u2(x2, O2, P2, T2, I2, 17, a2[10]), T2 = u2(T2, x2, O2, P2, S2, 22, a2[11]), P2 = u2(P2, T2, x2, O2, b2, 7, a2[12]), O2 = u2(O2, P2, T2, x2, k2, 12, a2[13]), x2 = u2(x2, O2, P2, T2, A2, 17, a2[14]), P2 = h2(P2, T2 = u2(T2, x2, O2, P2, C2, 22, a2[15]), x2, O2, c3, 5, a2[16]), O2 = h2(O2, P2, T2, x2, y2, 9, a2[17]), x2 = h2(x2, O2, P2, T2, S2, 14, a2[18]), T2 = h2(T2, x2, O2, P2, o3, 20, a2[19]), P2 = h2(P2, T2, x2, O2, m2, 5, a2[20]), O2 = h2(O2, P2, T2, x2, I2, 9, a2[21]), x2 = h2(x2, O2, P2, T2, C2, 14, a2[22]), T2 = h2(T2, x2, O2, P2, g2, 20, a2[23]), P2 = h2(P2, T2, x2, O2, v2, 5, a2[24]), O2 = h2(O2, P2, T2, x2, A2, 9, a2[25]), x2 = h2(x2, O2, P2, T2, f2, 14, a2[26]), T2 = h2(T2, x2, O2, P2, w2, 20, a2[27]), P2 = h2(P2, T2, x2, O2, k2, 5, a2[28]), O2 = h2(O2, P2, T2, x2, p2, 9, a2[29]), x2 = h2(x2, O2, P2, T2, _2, 14, a2[30]), P2 = l2(P2, T2 = h2(T2, x2, O2, P2, b2, 20, a2[31]), x2, O2, m2, 4, a2[32]), O2 = l2(O2, P2, T2, x2, w2, 11, a2[33]), x2 = l2(x2, O2, P2, T2, S2, 16, a2[34]), T2 = l2(T2, x2, O2, P2, A2, 23, a2[35]), P2 = l2(P2, T2, x2, O2, c3, 4, a2[36]), O2 = l2(O2, P2, T2, x2, g2, 11, a2[37]), x2 = l2(x2, O2, P2, T2, _2, 16, a2[38]), T2 = l2(T2, x2, O2, P2, I2, 23, a2[39]), P2 = l2(P2, T2, x2, O2, k2, 4, a2[40]), O2 = l2(O2, P2, T2, x2, o3, 11, a2[41]), x2 = l2(x2, O2, P2, T2, f2, 16, a2[42]), T2 = l2(T2, x2, O2, P2, y2, 23, a2[43]), P2 = l2(P2, T2, x2, O2, v2, 4, a2[44]), O2 = l2(O2, P2, T2, x2, b2, 11, a2[45]), x2 = l2(x2, O2, P2, T2, C2, 16, a2[46]), P2 = d2(P2, T2 = l2(T2, x2, O2, P2, p2, 23, a2[47]), x2, O2, o3, 6, a2[48]), O2 = d2(O2, P2, T2, x2, _2, 10, a2[49]), x2 = d2(x2, O2, P2, T2, A2, 15, a2[50]), T2 = d2(T2, x2, O2, P2, m2, 21, a2[51]), P2 = d2(P2, T2, x2, O2, b2, 6, a2[52]), O2 = d2(O2, P2, T2, x2, f2, 10, a2[53]), x2 = d2(x2, O2, P2, T2, I2, 15, a2[54]), T2 = d2(T2, x2, O2, P2, c3, 21, a2[55]), P2 = d2(P2, T2, x2, O2, w2, 6, a2[56]), O2 = d2(O2, P2, T2, x2, C2, 10, a2[57]), x2 = d2(x2, O2, P2, T2, y2, 15, a2[58]), T2 = d2(T2, x2, O2, P2, k2, 21, a2[59]), P2 = d2(P2, T2, x2, O2, g2, 6, a2[60]), O2 = d2(O2, P2, T2, x2, S2, 10, a2[61]), x2 = d2(x2, O2, P2, T2, p2, 15, a2[62]), T2 = d2(T2, x2, O2, P2, v2, 21, a2[63]), i3[0] = i3[0] + P2 | 0, i3[1] = i3[1] + T2 | 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", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), C = b, P = I(""), T = I("[]") || [];
- let O = "";
- try {
- O = "__UNI__8782431";
- } catch (e2) {
- }
- let E = {};
- function L(e2, t2 = {}) {
- var n2, s2;
- return n2 = E, s2 = e2, Object.prototype.hasOwnProperty.call(n2, s2) || (E[e2] = t2), E[e2];
- }
- E = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {};
- const R = ["invoke", "success", "fail", "complete"], U = L("_globalUniCloudInterceptor");
- function N(e2, t2) {
- U[e2] || (U[e2] = {}), g(t2) && Object.keys(t2).forEach((n2) => {
- R.indexOf(n2) > -1 && function(e3, t3, n3) {
- let s2 = U[e3][t3];
- s2 || (s2 = U[e3][t3] = []), -1 === s2.indexOf(n3) && m(n3) && s2.push(n3);
- }(e2, n2, t2[n2]);
- });
- }
- function D(e2, t2) {
- U[e2] || (U[e2] = {}), g(t2) ? Object.keys(t2).forEach((n2) => {
- R.indexOf(n2) > -1 && function(e3, t3, n3) {
- const s2 = U[e3][t3];
- if (!s2)
- return;
- const r2 = s2.indexOf(n3);
- r2 > -1 && s2.splice(r2, 1);
- }(e2, n2, t2[n2]);
- }) : delete U[e2];
- }
- function M(e2, t2) {
- return e2 && 0 !== e2.length ? e2.reduce((e3, n2) => e3.then(() => n2(t2)), Promise.resolve()) : Promise.resolve();
- }
- function q(e2, t2) {
- return U[e2] && U[e2][t2] || [];
- }
- function F(e2) {
- N("callObject", e2);
- }
- const K = L("_globalUniCloudListener"), j = "response", $ = "needLogin", B = "refreshToken", W = "clientdb", H = "cloudfunction", z = "cloudobject";
- function J(e2) {
- return K[e2] || (K[e2] = []), K[e2];
- }
- function V(e2, t2) {
- const n2 = J(e2);
- n2.includes(t2) || n2.push(t2);
- }
- function G(e2, t2) {
- const n2 = J(e2), s2 = n2.indexOf(t2);
- -1 !== s2 && n2.splice(s2, 1);
- }
- function Y(e2, t2) {
- const n2 = J(e2);
- for (let e3 = 0; e3 < n2.length; e3++) {
- (0, n2[e3])(t2);
- }
- }
- let Q, X = false;
- function Z() {
- return Q || (Q = new Promise((e2) => {
- X && e2(), function t2() {
- if ("function" == typeof getCurrentPages) {
- const t3 = getCurrentPages();
- t3 && t3[0] && (X = true, e2());
- }
- X || setTimeout(() => {
- t2();
- }, 30);
- }();
- }), Q);
- }
- function ee(e2) {
- const t2 = {};
- for (const n2 in e2) {
- const s2 = e2[n2];
- m(s2) && (t2[n2] = y(s2));
- }
- return t2;
- }
- class te 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 ne = { 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 se(e2) {
- return e2 && se(e2.__v_raw) || e2;
- }
- function re() {
- return { token: ne.getStorageSync("uni_id_token") || ne.getStorageSync("uniIdToken"), tokenExpired: ne.getStorageSync("uni_id_token_expired") };
- }
- function ie({ token: e2, tokenExpired: t2 } = {}) {
- e2 && ne.setStorageSync("uni_id_token", e2), t2 && ne.setStorageSync("uni_id_token_expired", t2);
- }
- let oe, ae;
- function ce() {
- return oe || (oe = uni.getSystemInfoSync()), oe;
- }
- function ue() {
- 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 he = {};
- function le() {
- const e2 = uni.getLocale && uni.getLocale() || "en";
- if (ae)
- return { ...he, ...ae, locale: e2, LOCALE: e2 };
- const t2 = ce(), { 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 ae = { PLATFORM: r2, OS: s2, APPID: i2, DEVICEID: n2, ...ue(), ...t2 }, { ...he, ...ae, locale: e2, LOCALE: e2 };
- }
- var de = { 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 te({ code: n3, message: r3, requestId: t3 }));
- }
- const r2 = e3.data;
- if (r2.error)
- return s2(new te({ 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 pe = 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 = ne, 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 te({ 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 de.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"] = de.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"] = de.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));
- }
- 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 te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
- }, fail(e3) {
- a2(new te({ 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 te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });
- if (!(t2 = t2.trim()))
- throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" });
- if (/:\/\//.test(t2))
- throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" });
- const o2 = i2 && i2.envType || this.config.envType;
- if (s2 && ("/" !== t2[0] && (t2 = "/" + t2), t2.indexOf("\\") > -1))
- throw new te({ 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 = de.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 te({ code: "UPLOAD_FAILED", message: "文件上传失败" });
- }
- getTempFileURL({ fileList: e2 } = {}) {
- return new Promise((t2, n2) => {
- Array.isArray(e2) && 0 !== e2.length || n2(new te({ 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 te({ 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 fe = { init(e2) {
- const t2 = new pe(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 ge = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
- var me;
- !function(e2) {
- e2.local = "local", e2.none = "none", e2.session = "session";
- }(me || (me = {}));
- var ye = function() {
- }, _e = 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);
- }), we = _e, ve = n(function(e2, t2) {
- e2.exports = r.HmacSHA256;
- });
- const Ie = () => {
- let e2;
- if (!Promise) {
- e2 = () => {
- }, e2.promise = {};
- const t3 = () => {
- throw new te({ 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 Se(e2) {
- return void 0 === e2;
- }
- function be(e2) {
- return "[object Null]" === Object.prototype.toString.call(e2);
- }
- var ke;
- function Ae(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";
- }(ke || (ke = {}));
- const Ce = { adapter: null, runtime: void 0 }, Pe = ["anonymousUuidKey"];
- class Te extends ye {
- constructor() {
- super(), Ce.adapter.root.tcbObject || (Ce.adapter.root.tcbObject = {});
- }
- setItem(e2, t2) {
- Ce.adapter.root.tcbObject[e2] = t2;
- }
- getItem(e2) {
- return Ce.adapter.root.tcbObject[e2];
- }
- removeItem(e2) {
- delete Ce.adapter.root.tcbObject[e2];
- }
- clear() {
- delete Ce.adapter.root.tcbObject;
- }
- }
- function xe(e2, t2) {
- switch (e2) {
- case "local":
- return t2.localStorage || new Te();
- case "none":
- return new Te();
- default:
- return t2.sessionStorage || new Te();
- }
- }
- class Oe {
- constructor(e2) {
- if (!this._storage) {
- this._persistence = Ce.adapter.primaryStorage || e2.persistence, this._storage = xe(this._persistence, Ce.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 = `user_info_${e2.env}`;
- this.keys = { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2, anonymousUuidKey: r2, loginTypeKey: i2, userInfoKey: o2 };
- }
- }
- updatePersistence(e2) {
- if (e2 === this._persistence)
- return;
- const t2 = "local" === this._persistence;
- this._persistence = e2;
- const n2 = xe(e2, Ce.adapter);
- for (const e3 in this.keys) {
- const s2 = this.keys[e3];
- if (t2 && Pe.includes(e3))
- continue;
- const r2 = this._storage.getItem(s2);
- Se(r2) || be(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 Ee = {}, Le = {};
- function Re(e2) {
- return Ee[e2];
- }
- class Ue {
- constructor(e2, t2) {
- this.data = t2 || null, this.name = e2;
- }
- }
- class Ne extends Ue {
- constructor(e2, t2) {
- super("error", { error: e2, data: t2 }), this.error = e2;
- }
- }
- const De = 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 Ne)
- return console.error(e2.error), this;
- const n2 = "string" == typeof e2 ? new Ue(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 Me(e2, t2) {
- De.on(e2, t2);
- }
- function qe(e2, t2 = {}) {
- De.fire(e2, t2);
- }
- function Fe(e2, t2) {
- De.off(e2, t2);
- }
- const Ke = "loginStateChanged", je = "loginStateExpire", $e = "loginTypeChanged", Be = "anonymousConverted", We = "refreshAccessToken";
- var He;
- !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";
- }(He || (He = {}));
- const ze = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"], Je = { "X-SDK-Version": "1.3.5" };
- function Ve(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 Ge() {
- const e2 = Math.random().toString(16).slice(2);
- return { data: { seqId: e2 }, headers: { ...Je, "x-seqid": e2 } };
- }
- class Ye {
- constructor(e2 = {}) {
- var t2;
- this.config = e2, this._reqClass = new Ce.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: `请求在${this.config.timeout / 1e3}s内未完成,已中断`, restrictedMethods: ["post"] }), this._cache = Re(this.config.env), this._localCache = (t2 = this.config.env, Le[t2]), Ve(this._reqClass, "post", [Ge]), Ve(this._reqClass, "upload", [Ge]), Ve(this._reqClass, "download", [Ge]);
- }
- 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 te({ 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) === He.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();
- }
- qe(je), this._cache.removeStore(n2);
- }
- throw new te({ code: a2.data.code, message: `刷新access token失败:${a2.data.code}` });
- }
- if (a2.data.access_token)
- return qe(We), 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 te({ 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 };
- if (-1 === ze.indexOf(e2)) {
- const { refreshTokenKey: e3 } = this._cache.keys;
- this._cache.getStore(e3) && (i2.access_token = (await this.getAccessToken()).accessToken);
- }
- let o2;
- if ("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.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}`;
- }(ge, "//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 te({ code: "NETWORK_ERROR", message: "network request error" });
- return f2;
- }
- async send(e2, t2 = {}) {
- const n2 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress });
- if ("ACCESS_TOKEN_EXPIRED" === n2.data.code && -1 === ze.indexOf(e2)) {
- await this.refreshAccessToken();
- const n3 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress });
- if (n3.data.code)
- throw new te({ code: n3.data.code, message: n3.data.message });
- return n3.data;
- }
- if (n2.data.code)
- throw new te({ code: n2.data.code, message: n2.data.message });
- return n2.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 Qe = {};
- function Xe(e2) {
- return Qe[e2];
- }
- class Ze {
- constructor(e2) {
- this.config = e2, this._cache = Re(e2.env), this._request = Xe(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 et {
- constructor(e2) {
- if (!e2)
- throw new te({ code: "PARAM_ERROR", message: "envId is not defined" });
- this._envId = e2, this._cache = Re(this._envId), this._request = Xe(this._envId), this.setUserInfo();
- }
- linkWithTicket(e2) {
- if ("string" != typeof e2)
- throw new te({ 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 te({ 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 { data: e2 } = await this._request.send("auth.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 tt {
- constructor(e2) {
- if (!e2)
- throw new te({ code: "PARAM_ERROR", message: "envId is not defined" });
- this._cache = Re(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 et(e2);
- }
- get isAnonymousAuth() {
- return this.loginType === He.ANONYMOUS;
- }
- get isCustomAuth() {
- return this.loginType === He.CUSTOM;
- }
- get isWeixinAuth() {
- return this.loginType === He.WECHAT || this.loginType === He.WECHAT_OPEN || this.loginType === He.WECHAT_PUBLIC;
- }
- get loginType() {
- return this._cache.getStore(this._cache.keys.loginTypeKey);
- }
- }
- class nt extends Ze {
- async signIn() {
- this._cache.updatePersistence("local");
- const { anonymousUuidKey: e2, refreshTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2) || void 0, s2 = this._cache.getStore(t2) || void 0, r2 = await this._request.send("auth.signInAnonymously", { anonymous_uuid: n2, refresh_token: s2 });
- if (r2.uuid && r2.refresh_token) {
- this._setAnonymousUUID(r2.uuid), this.setRefreshToken(r2.refresh_token), await this._request.refreshAccessToken(), qe(Ke), qe($e, { env: this.config.env, loginType: He.ANONYMOUS, persistence: "local" });
- const e3 = new tt(this.config.env);
- return await e3.user.refresh(), e3;
- }
- throw new te({ message: "匿名登录失败" });
- }
- 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(), qe(Be, { env: this.config.env }), qe($e, { loginType: He.CUSTOM, persistence: "local" }), { credential: { refreshToken: i2.refresh_token } };
- throw new te({ message: "匿名转化失败" });
- }
- _setAnonymousUUID(e2) {
- const { anonymousUuidKey: t2, loginTypeKey: n2 } = this._cache.keys;
- this._cache.removeStore(t2), this._cache.setStore(t2, e2), this._cache.setStore(n2, He.ANONYMOUS);
- }
- _clearAnonymousUUID() {
- this._cache.removeStore(this._cache.keys.anonymousUuidKey);
- }
- }
- class st extends Ze {
- async signIn(e2) {
- if ("string" != typeof e2)
- throw new te({ 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(), qe(Ke), qe($e, { env: this.config.env, loginType: He.CUSTOM, persistence: this.config.persistence }), await this.refreshUserInfo(), new tt(this.config.env);
- throw new te({ message: "自定义登录失败" });
- }
- }
- class rt extends Ze {
- async signIn(e2, t2) {
- if ("string" != typeof e2)
- throw new te({ 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(), qe(Ke), qe($e, { env: this.config.env, loginType: He.EMAIL, persistence: this.config.persistence }), new tt(this.config.env);
- throw s2.code ? new te({ code: s2.code, message: `邮箱登录失败: ${s2.message}` }) : new te({ 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 it extends Ze {
- async signIn(e2, t2) {
- if ("string" != typeof e2)
- throw new te({ 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: He.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(), qe(Ke), qe($e, { env: this.config.env, loginType: He.USERNAME, persistence: this.config.persistence }), new tt(this.config.env);
- throw s2.code ? new te({ code: s2.code, message: `用户名密码登录失败: ${s2.message}` }) : new te({ message: "用户名密码登录失败" });
- }
- }
- class ot {
- constructor(e2) {
- this.config = e2, this._cache = Re(e2.env), this._request = Xe(e2.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), Me($e, 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 nt(this.config);
- }
- customAuthProvider() {
- return new st(this.config);
- }
- emailAuthProvider() {
- return new rt(this.config);
- }
- usernameAuthProvider() {
- return new it(this.config);
- }
- async signInAnonymously() {
- return new nt(this.config).signIn();
- }
- async signInWithEmailAndPassword(e2, t2) {
- return new rt(this.config).signIn(e2, t2);
- }
- signInWithUsernameAndPassword(e2, t2) {
- return new it(this.config).signIn(e2, t2);
- }
- async linkAndRetrieveDataWithTicket(e2) {
- this._anonymousAuthProvider || (this._anonymousAuthProvider = new nt(this.config)), Me(Be, this._onAnonymousConverted);
- return await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e2);
- }
- async signOut() {
- if (this.loginType === He.ANONYMOUS)
- throw new te({ 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), qe(Ke), qe($e, { env: this.config.env, loginType: He.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) {
- Me(Ke, () => {
- const t3 = this.hasLoginState();
- e2.call(this, t3);
- });
- const t2 = this.hasLoginState();
- e2.call(this, t2);
- }
- onLoginStateExpired(e2) {
- Me(je, e2.bind(this));
- }
- onAccessTokenRefreshed(e2) {
- Me(We, e2.bind(this));
- }
- onAnonymousConverted(e2) {
- Me(Be, e2.bind(this));
- }
- onLoginTypeChanged(e2) {
- Me($e, () => {
- const t2 = this.hasLoginState();
- e2.call(this, t2);
- });
- }
- async getAccessToken() {
- return { accessToken: (await this._request.getAccessToken()).accessToken, env: this.config.env };
- }
- hasLoginState() {
- const { refreshTokenKey: e2 } = this._cache.keys;
- return this._cache.getStore(e2) ? new tt(this.config.env) : null;
- }
- async isUsernameRegistered(e2) {
- if ("string" != typeof e2)
- throw new te({ 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 st(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 at = function(e2, t2) {
- t2 = t2 || Ie();
- const n2 = Xe(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 te({ code: "STORAGE_REQUEST_FAIL", message: `STORAGE_REQUEST_FAIL: ${e4.data}` }));
- }).catch((e4) => {
- t2(e4);
- });
- }).catch((e3) => {
- t2(e3);
- }), t2.promise;
- }, ct = function(e2, t2) {
- t2 = t2 || Ie();
- const n2 = Xe(this.config.env), { cloudPath: s2 } = e2;
- return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => {
- t2(null, e3);
- }).catch((e3) => {
- t2(e3);
- }), t2.promise;
- }, ut = function({ fileList: e2 }, t2) {
- if (t2 = t2 || Ie(), !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 Xe(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;
- }, ht = function({ fileList: e2 }, t2) {
- t2 = t2 || Ie(), 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 Xe(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;
- }, lt = async function({ fileID: e2 }, t2) {
- const n2 = (await ht.call(this, { fileList: [{ fileID: e2, maxAge: 600 }] })).fileList[0];
- if ("SUCCESS" !== n2.code)
- return t2 ? t2(n2) : new Promise((e3) => {
- e3(n2);
- });
- const s2 = Xe(this.config.env);
- let r2 = n2.download_url;
- if (r2 = encodeURI(r2), !t2)
- return s2.download({ url: r2 });
- t2(await s2.download({ url: r2 }));
- }, dt = function({ name: e2, data: t2, query: n2, parse: s2, search: r2 }, i2) {
- const o2 = i2 || Ie();
- let a2;
- try {
- a2 = t2 ? JSON.stringify(t2) : "";
- } catch (e3) {
- return Promise.reject(e3);
- }
- if (!e2)
- return Promise.reject(new te({ code: "PARAM_ERROR", message: "函数名不能为空" }));
- const c2 = { inQuery: n2, parse: s2, search: r2, function_name: e2, request_data: a2 };
- return Xe(this.config.env).send("functions.invokeFunction", c2).then((e3) => {
- if (e3.code)
- o2(null, e3);
- else {
- let t3 = e3.data.response_data;
- if (s2)
- o2(null, { result: t3, requestId: e3.requestId });
- else
- try {
- t3 = JSON.parse(e3.data.response_data), o2(null, { result: t3, requestId: e3.requestId });
- } catch (e4) {
- o2(new te({ message: "response data must be json" }));
- }
- }
- return o2.promise;
- }).catch((e3) => {
- o2(e3);
- }), o2.promise;
- }, pt = { timeout: 15e3, persistence: "session" }, ft = {};
- class gt {
- constructor(e2) {
- this.config = e2 || this.config, this.authObj = void 0;
- }
- init(e2) {
- switch (Ce.adapter || (this.requestClient = new Ce.adapter.reqClass({ timeout: e2.timeout || 5e3, timeoutMsg: `请求在${(e2.timeout || 5e3) / 1e3}s内未完成,已中断` })), this.config = { ...pt, ...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 gt(this.config);
- }
- auth({ persistence: e2 } = {}) {
- if (this.authObj)
- return this.authObj;
- const t2 = e2 || Ce.adapter.primaryStorage || pt.persistence;
- var n2;
- return t2 !== this.config.persistence && (this.config.persistence = t2), function(e3) {
- const { env: t3 } = e3;
- Ee[t3] = new Oe(e3), Le[t3] = new Oe({ ...e3, persistence: "local" });
- }(this.config), n2 = this.config, Qe[n2.env] = new Ye(n2), this.authObj = new ot(this.config), this.authObj;
- }
- on(e2, t2) {
- return Me.apply(this, [e2, t2]);
- }
- off(e2, t2) {
- return Fe.apply(this, [e2, t2]);
- }
- callFunction(e2, t2) {
- return dt.apply(this, [e2, t2]);
- }
- deleteFile(e2, t2) {
- return ut.apply(this, [e2, t2]);
- }
- getTempFileURL(e2, t2) {
- return ht.apply(this, [e2, t2]);
- }
- downloadFile(e2, t2) {
- return lt.apply(this, [e2, t2]);
- }
- uploadFile(e2, t2) {
- return at.apply(this, [e2, t2]);
- }
- getUploadMetadata(e2, t2) {
- return ct.apply(this, [e2, t2]);
- }
- registerExtension(e2) {
- ft[e2.name] = e2;
- }
- async invokeExtension(e2, t2) {
- const n2 = ft[e2];
- if (!n2)
- throw new te({ message: `扩展${e2} 必须先注册` });
- return await n2.invoke(t2, this);
- }
- useAdapters(e2) {
- const { adapter: t2, runtime: n2 } = Ae(e2) || {};
- t2 && (Ce.adapter = t2), n2 && (Ce.runtime = n2);
- }
- }
- var mt = new gt();
- function yt(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 _t {
- post(e2) {
- const { url: t2, data: n2, headers: s2 } = e2;
- return new Promise((e3, r2) => {
- ne.request({ url: yt("https:", t2), data: n2, method: "POST", header: s2, success(t3) {
- e3(t3);
- }, fail(e4) {
- r2(e4);
- } });
- });
- }
- upload(e2) {
- return new Promise((t2, n2) => {
- const { url: s2, file: r2, data: i2, headers: o2, fileType: a2 } = e2, c2 = ne.uploadFile({ url: yt("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 wt = { setItem(e2, t2) {
- ne.setStorageSync(e2, t2);
- }, getItem: (e2) => ne.getStorageSync(e2), removeItem(e2) {
- ne.removeStorageSync(e2);
- }, clear() {
- ne.clearStorageSync();
- } };
- var vt = { genAdapter: function() {
- return { root: {}, reqClass: _t, localStorage: wt, primaryStorage: "local" };
- }, isMatch: function() {
- return true;
- }, runtime: "uni_app" };
- mt.useAdapters(vt);
- const It = mt, St = It.init;
- It.init = function(e2) {
- e2.env = e2.spaceId;
- const t2 = St.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 } = ee(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 bt = It;
- var kt = class extends pe {
- getAccessToken() {
- return new Promise((e2, t2) => {
- const n2 = "Anonymous_Access_token";
- this.setAccessToken(n2), e2(n2);
- });
- }
- setupRequest(e2, t2) {
- const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" };
- "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = de.sign(n2, this.config.clientSecret);
- const r2 = le();
- s2["x-client-info"] = encodeURIComponent(JSON.stringify(r2));
- const { token: i2 } = re();
- return s2["x-client-token"] = i2, { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: JSON.parse(JSON.stringify(s2)) };
- }
- 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, success(e3) {
- e3 && e3.statusCode < 400 ? o2(e3) : a2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
- }, fail(e3) {
- a2(new te({ 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 });
- });
- });
- }
- uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2 }) {
- if (!t2)
- throw new te({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" });
- let r2;
- return this.getOSSUploadOptionsFromPath({ cloudPath: t2 }).then((t3) => {
- const { url: i2, formData: o2, name: a2 } = t3.result;
- r2 = t3.result.fileUrl;
- const c2 = { url: i2, formData: o2, name: a2, filePath: e2, fileType: n2 };
- return this.uploadFileToOSS(Object.assign({}, c2, { onUploadProgress: s2 }));
- }).then(() => this.reportOSSUpload({ cloudPath: t2 })).then((t3) => new Promise((n3, s3) => {
- t3.success ? n3({ success: true, filePath: e2, fileID: r2 }) : s3(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
- }));
- }
- deleteFile({ fileList: e2 }) {
- const t2 = { method: "serverless.file.resource.delete", params: JSON.stringify({ fileList: e2 }) };
- return this.request(this.setupRequest(t2)).then((e3) => {
- if (e3.success)
- return e3.result;
- throw new te({ code: "DELETE_FILE_FAILED", message: "删除文件失败" });
- });
- }
- getTempFileURL({ fileList: e2, maxAge: t2 } = {}) {
- if (!Array.isArray(e2) || 0 === e2.length)
- throw new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
- const n2 = { method: "serverless.file.resource.getTempFileURL", params: JSON.stringify({ fileList: e2, maxAge: t2 }) };
- return this.request(this.setupRequest(n2)).then((e3) => {
- if (e3.success)
- return { fileList: e3.result.fileList.map((e4) => ({ fileID: e4.fileID, tempFileURL: e4.tempFileURL })) };
- throw new te({ code: "GET_TEMP_FILE_URL_FAILED", message: "获取临时文件链接失败" });
- });
- }
- };
- var At = { init(e2) {
- const t2 = new kt(e2), n2 = { signInAnonymously: function() {
- return t2.authorize();
- }, getLoginState: function() {
- return Promise.resolve(false);
- } };
- return t2.auth = function() {
- return n2;
- }, t2.customAuth = t2.auth, t2;
- } }, Ct = n(function(e2, t2) {
- e2.exports = r.enc.Hex;
- });
- function Pt() {
- 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 Tt(e2 = "", t2 = {}) {
- const { data: n2, functionName: s2, method: r2, headers: i2, signHeaderKeys: o2 = [], config: a2 } = t2, c2 = Date.now(), u2 = Pt(), 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 = we(e3.body).toString(Ct), r3 = `${e3.method.toUpperCase()}
- ${e3.path}
- ${e3.query}
- ${n3}
- ${t3}
- ${s3}
- `, i3 = we(r3).toString(Ct), o3 = `HMAC-SHA256
- ${e3.timestamp}
- ${i3}
- `, a3 = ve(o3, e3.secretKey).toString(Ct);
- 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 xt({ url: e2, data: t2, method: n2 = "POST", headers: s2 = {} }) {
- return new Promise((r2, i2) => {
- ne.request({ url: e2, method: n2, data: "object" == typeof t2 ? JSON.stringify(t2) : t2, header: s2, dataType: "json", 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 i2(new te({ code: "SYS_ERR", message: n3 || s3 || "request:fail", requestId: r3 || t3 }));
- }
- r2({ status: e3.statusCode, data: e3.data, headers: e3.header, requestId: t3 });
- } });
- });
- }
- function Ot(e2, t2) {
- const { path: n2, data: s2, method: r2 = "GET" } = e2, { url: i2, headers: o2 } = Tt(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 xt({ url: i2, data: s2, method: r2, headers: o2 }).then((e3) => {
- const t3 = e3.data || {};
- if (!t3.success)
- throw new te({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId });
- return t3.data || {};
- }).catch((e3) => {
- throw new te({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId });
- });
- }
- function Et(e2 = "") {
- const t2 = e2.trim().replace(/^cloud:\/\//, ""), n2 = t2.indexOf("/");
- if (n2 <= 0)
- throw new te({ 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 Lt(e2 = "") {
- return "cloud://".concat(this.config.spaceId, "/").concat(e2.replace(/^\/+/, ""));
- }
- class Rt {
- 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: Pt(), 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", we(i2).toString(Ct)].join("\n"), a2 = ve(o2, this.config.secretKey).toString(Ct), c2 = Object.keys(r2).map((e3) => `${e3}=${encodeURIComponent(r2[e3])}`).join("&");
- return `${this.config.wsEndpoint}${n2}?${c2}&signature=${a2}`;
- }
- }
- var Ut = 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 Rt(this.config);
- }
- callFunction(e2) {
- return function(e3, t2) {
- const { name: n2, data: s2, async: r2 = false } = e3, i2 = "POST", o2 = { "x-to-function-name": n2 };
- r2 && (o2["x-function-invoke-type"] = "async");
- const { url: a2, headers: c2 } = Tt("/functions/invokeFunction", { functionName: n2, data: s2, method: i2, headers: o2, signHeaderKeys: ["x-to-function-name"], config: t2 });
- return xt({ url: a2, data: s2, method: i2, headers: c2 }).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 te({ code: t3, message: e4.errMsg, requestId: e4.requestId });
- return { errCode: t3, success: 0 === t3, requestId: e4.requestId, result: e4.data };
- }).catch((e4) => {
- throw new te({ 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 = ne.uploadFile({ url: e2, filePath: t2, fileType: n2, formData: s2, name: "file", success(e3) {
- e3 && e3.statusCode < 400 ? i2(e3) : o2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
- }, fail(e3) {
- o2(new te({ 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 te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });
- if (!(t2 = t2.trim()))
- throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" });
- if (/:\/\//.test(t2))
- throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" });
- const r2 = await Ot({ 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) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList不能为空数组" })), e2.length > 50 && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList数组长度不能超过50" }));
- const s2 = [];
- for (const t3 of e2) {
- "string" !== f(t3) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList的元素必须是非空的字符串" }));
- const e3 = Et.call(this, t3);
- s2.push({ file_id: e3, expire: 600 });
- }
- Ot({ path: "/?download_url", data: { file_list: s2 }, method: "POST" }, this.config).then((e3) => {
- const { file_list: n3 = [] } = e3;
- t2({ fileList: n3.map((e4) => ({ fileID: Lt.call(this, e4.file_id), tempFileURL: e4.download_url })) });
- }).catch((e3) => n2(e3));
- });
- }
- async connectWebSocket(e2) {
- const { name: t2, query: n2 } = e2;
- return ne.connectSocket({ url: this._websocket.signedURL(t2, n2), complete: () => {
- } });
- }
- };
- var Nt = { init: (e2) => {
- e2.provider = "alipay";
- const t2 = new Ut(e2);
- return t2.auth = function() {
- return { signInAnonymously: function() {
- return Promise.resolve();
- }, getLoginState: function() {
- return Promise.resolve(true);
- } };
- }, t2;
- } };
- function Dt({ data: e2 }) {
- let t2;
- t2 = le();
- const n2 = JSON.parse(JSON.stringify(e2 || {}));
- if (Object.assign(n2, { clientInfo: t2 }), !n2.uniIdToken) {
- const { token: e3 } = re();
- e3 && (n2.uniIdToken = e3);
- }
- return n2;
- }
- async function Mt({ name: e2, data: t2 } = {}) {
- await this.__dev__.initLocalNetwork();
- const { localAddress: n2, localPort: s2 } = this.__dev__, r2 = { aliyun: "aliyun", tencent: "tcb", alipay: "alipay" }[this.config.provider], i2 = this.config.spaceId, o2 = `http://${n2}:${s2}/system/check-function`, a2 = `http://${n2}:${s2}/cloudfunctions/${e2}`;
- return new Promise((t3, n3) => {
- ne.request({ method: "POST", url: o2, data: { name: e2, platform: C, provider: r2, spaceId: i2 }, 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: n3, message: s3 }) => {
- if (0 !== n3) {
- switch (n3) {
- case "MODULE_ENCRYPTED":
- console.error(`此云函数(${e2})依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数`);
- break;
- case "FUNCTION_ENCRYPTED":
- console.error(`此云函数(${e2})已加密不可本地调试,自动切换为云端已部署的云函数`);
- break;
- case "ACTION_ENCRYPTED":
- console.error(s3 || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
- break;
- case "NETWORK_ERROR":
- console.error(s3 || "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下");
- break;
- case "SWITCH_TO_CLOUD":
- break;
- default: {
- const e3 = `检测本地调试服务出现错误:${s3},请检查网络环境或重启客户端再试`;
- throw console.error(e3), new Error(e3);
- }
- }
- return this._callCloudFunction({ name: e2, data: t2 });
- }
- return new Promise((e3, n4) => {
- const s4 = Dt.call(this, { data: t2 });
- ne.request({ method: "POST", url: a2, data: { provider: r2, platform: C, param: s4 }, success: ({ statusCode: t3, data: s5 } = {}) => !t3 || t3 >= 400 ? n4(new te({ code: s5.code || "SYS_ERR", message: s5.message || "request:fail" })) : e3({ result: s5 }), fail(e4) {
- n4(new te({ code: e4.code || e4.errCode || "SYS_ERR", message: e4.message || e4.errMsg || "request:fail" }));
- } });
- });
- });
- }
- const qt = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间", mode: "append" }];
- var Ft = /[\\^$.*+?()[\]{}|]/g, Kt = RegExp(Ft.source);
- function jt(e2, t2, n2) {
- return e2.replace(new RegExp((s2 = t2) && Kt.test(s2) ? s2.replace(Ft, "\\$&") : s2, "g"), n2);
- var s2;
- }
- const Bt = "request", Wt = "response", Ht = "both";
- const Tn = { code: 2e4, message: "System error" }, xn = { code: 20101, message: "Invalid client" };
- function Ln(e2) {
- const { errSubject: t2, subject: n2, errCode: s2, errMsg: r2, code: i2, message: o2, cause: a2 } = e2 || {};
- return new te({ subject: t2 || n2 || "uni-secure-network", code: s2 || i2 || Tn.code, message: r2 || o2, cause: a2 });
- }
- let Un;
- function Fn({ secretType: e2 } = {}) {
- return e2 === Bt || e2 === Wt || e2 === Ht;
- }
- function Kn({ name: e2, data: t2 = {} } = {}) {
- return "DCloud-clientDB" === e2 && "encryption" === t2.redirectTo && "getAppClientKey" === t2.action;
- }
- function jn({ provider: e2, spaceId: t2, functionName: n2 } = {}) {
- const { appId: s2, uniPlatform: r2, osName: i2 } = ce();
- let o2 = r2;
- "app" === r2 && (o2 = i2);
- const a2 = function({ provider: e3, spaceId: t3 } = {}) {
- const n3 = A;
- 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`), Ln(xn);
- }
- function $n({ 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 Bn(e2) {
- const t2 = e2.callFunction, n2 = function(n3) {
- const s2 = n3.name;
- n3.data = Dt.call(e2, { data: n3.data });
- const r2 = { aliyun: "aliyun", tencent: "tcb", tcb: "tcb", alipay: "alipay" }[this.config.provider], i2 = Fn(n3), o2 = Kn(n3), a2 = i2 || o2;
- return t2.call(this, n3).then((e3) => (e3.errCode = 0, !a2 && $n.call(this, { functionName: s2, result: e3, logPvd: r2 }), Promise.resolve(e3)), (e3) => (!a2 && $n.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 = jt(c2, `{$${e5}}`, a3[e5]);
- for (const e5 in t3)
- c2 = jt(c2, `{${e5}}`, t3[e5]);
- return "replace" === o3 ? c2 : e4 + c2;
- }
- return e4;
- }({ message: `[${n3.name}]: ${e3.message}`, formatter: qt, 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 && T ? (e2._callCloudFunction || (e2._callCloudFunction = n2, e2._callLocalFunction = Mt), o2 = Mt) : o2 = n2, o2 = o2.bind(e2), Kn(t3))
- a2 = n2.call(e2, t3);
- else if (Fn(t3)) {
- a2 = new Un({ secretType: t3.secretType, uniCloudIns: e2 }).wrapEncryptDataCallFunction(n2.bind(e2))(t3);
- } else if (jn({ provider: s2, spaceId: r2, functionName: i2 })) {
- a2 = new Un({ 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 && (e3.result = new UTSJSONObject(e3.result)), e3));
- };
- }
- Un = class {
- constructor() {
- throw Ln({ message: `Platform ${C} is not enabled, please check whether secure network module is enabled in your manifest.json` });
- }
- };
- const Wn = Symbol("CLIENT_DB_INTERNAL");
- function Hn(e2, t2) {
- return e2.then = "DoNotReturnProxyWithAFunctionNamedThen", e2._internalType = Wn, 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 zn(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 Jn = ["db.Geo", "db.command", "command.aggregate"];
- function Vn(e2, t2) {
- return Jn.indexOf(`${e2}.${t2}`) > -1;
- }
- function Gn(e2) {
- switch (f(e2 = se(e2))) {
- case "array":
- return e2.map((e3) => Gn(e3));
- case "object":
- return e2._internalType === Wn || Object.keys(e2).forEach((t2) => {
- e2[t2] = Gn(e2[t2]);
- }), e2;
- case "regexp":
- return { $regexp: { source: e2.source, flags: e2.flags } };
- case "date":
- return { $date: e2.toISOString() };
- default:
- return e2;
- }
- }
- function Yn(e2) {
- return e2 && e2.content && e2.content.$method;
- }
- class Qn {
- 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: Gn(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 = Yn(e2), n2 = Yn(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" === Yn(e2))
- return true;
- e2 = e2.prevStage;
- }
- return false;
- }
- get isAggregateCommand() {
- let e2 = this;
- for (; e2; ) {
- const t2 = Yn(e2), n2 = Yn(e2.prevStage);
- if ("aggregate" === t2 && "command" === n2)
- return true;
- e2 = e2.prevStage;
- }
- return false;
- }
- getNextStageFn(e2) {
- const t2 = this;
- return function() {
- return Xn({ $method: e2, $param: Gn(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: Gn(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 Xn(e2, t2, n2) {
- return Hn(new Qn(e2, t2, n2), { get(e3, t3) {
- let s2 = "db";
- return e3 && e3.content && (s2 = e3.content.$method), Vn(s2, t3) ? Xn({ $method: t3 }, e3, n2) : function() {
- return Xn({ $method: t3, $param: Gn(Array.from(arguments)) }, e3, n2);
- };
- } });
- }
- function Zn({ 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 es$1(e2, t2 = {}) {
- return Hn(new e2(t2), { get: (e3, t3) => Vn("db", t3) ? Xn({ $method: t3 }, null, e3) : function() {
- return Xn({ $method: t3, $param: Gn(Array.from(arguments)) }, null, e3);
- } });
- }
- class ts extends class {
- constructor({ uniClient: e2 = {}, isJQL: t2 = false } = {}) {
- this._uniClient = e2, this._authCallBacks = {}, this._dbCallBacks = {}, e2._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t2 || (this.auth = zn(this._authCallBacks)), this._isJQL = t2, Object.assign(this, zn(this._dbCallBacks)), this.env = Hn({}, { get: (e3, t3) => ({ $env: t3 }) }), this.Geo = Hn({}, { get: (e3, t3) => Zn({ path: ["Geo"], method: t3 }) }), this.serverDate = Zn({ path: [], method: "serverDate" }), this.RegExp = Zn({ 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]), M(q(o2, "fail"), e3).then(() => M(q(o2, "complete"), e3)).then(() => (r2(null, e3), Y(j, { type: W, content: e3 }), Promise.reject(e3)));
- }
- const c2 = M(q(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 te({ 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 && (ie({ token: s3, tokenExpired: c3 }), this._callbackAuth("refreshToken", [{ token: s3, tokenExpired: c3 }]), this._callback("refreshToken", [{ token: s3, tokenExpired: c3 }]), Y(B, { 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 M(q(o2, "success"), e4).then(() => M(q(o2, "complete"), e4)).then(() => {
- r2(e4, null);
- const t4 = i2._parseResult(e4);
- return Y(j, { type: W, 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 te({ code: e3.code || "SYSTEM_ERROR", message: e3.message, requestId: e3.requestId }));
- });
- }
- }
- const ns = "token无效,跳转登录页面", ss = "token过期,跳转登录页面", rs = { TOKEN_INVALID_TOKEN_EXPIRED: ss, TOKEN_INVALID_INVALID_CLIENTID: ns, TOKEN_INVALID: ns, TOKEN_INVALID_WRONG_TOKEN: ns, TOKEN_INVALID_ANONYMOUS_USER: ns }, is = { "uni-id-token-expired": ss, "uni-id-check-token-failed": ns, "uni-id-token-not-exist": ns, "uni-id-check-device-feature-failed": ns };
- function os(e2, t2) {
- let n2 = "";
- return n2 = e2 ? `${e2}/${t2}` : t2, n2.replace(/^\//, "");
- }
- function as(e2 = [], t2 = "") {
- const n2 = [], s2 = [];
- return e2.forEach((e3) => {
- true === e3.needLogin ? n2.push(os(t2, e3.path)) : false === e3.needLogin && s2.push(os(t2, e3.path));
- }), { needLoginPage: n2, notNeedLoginPage: s2 };
- }
- function cs(e2) {
- return e2.split("?")[0].replace(/^\//, "");
- }
- function us() {
- 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 hs() {
- return cs(us());
- }
- function ls(e2 = "", t2 = {}) {
- if (!e2)
- return false;
- if (!(t2 && t2.list && t2.list.length))
- return false;
- const n2 = t2.list, s2 = cs(e2);
- return n2.some((e3) => e3.pagePath === s2);
- }
- const ds = !!e.uniIdRouter;
- const { loginPage: ps, routerNeedLogin: fs, resToLogin: gs, needLoginPage: ms, notNeedLoginPage: ys, loginPageInTabBar: _s } = function({ pages: t2 = [], subPackages: n2 = [], uniIdRouter: s2 = {}, tabBar: r2 = {} } = e) {
- const { loginPage: i2, needLogin: o2 = [], resToLogin: a2 = true } = s2, { needLoginPage: c2, notNeedLoginPage: u2 } = as(t2), { needLoginPage: h2, notNeedLoginPage: l2 } = function(e2 = []) {
- const t3 = [], n3 = [];
- return e2.forEach((e3) => {
- const { root: s3, pages: r3 = [] } = e3, { needLoginPage: i3, notNeedLoginPage: o3 } = as(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: ls(i2, r2) };
- }();
- if (ms.indexOf(ps) > -1)
- throw new Error(`Login page [${ps}] should not be "needLogin", please check your pages.json`);
- function ws(e2) {
- const t2 = hs();
- 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 vs(e2) {
- const t2 = cs(ws(e2));
- return !(ys.indexOf(t2) > -1) && (ms.indexOf(t2) > -1 || fs.some((t3) => function(e3, t4) {
- return new RegExp(t4).test(e3);
- }(e2, t3)));
- }
- function Is({ redirect: e2 }) {
- const t2 = cs(e2), n2 = cs(ps);
- return hs() !== n2 && t2 !== n2;
- }
- function Ss({ api: e2, redirect: t2 } = {}) {
- if (!t2 || !Is({ 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;
- }(ps, t2);
- _s ? "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 bs({ url: e2 } = {}) {
- const t2 = { abortLoginPageJump: false, autoToLoginPage: false }, n2 = function() {
- const { token: e3, tokenExpired: t3 } = re();
- let n3;
- if (e3) {
- if (t3 < Date.now()) {
- const e4 = "uni-id-token-expired";
- n3 = { errCode: e4, errMsg: is[e4] };
- }
- } else {
- const e4 = "uni-id-check-token-failed";
- n3 = { errCode: e4, errMsg: is[e4] };
- }
- return n3;
- }();
- if (vs(e2) && n2) {
- n2.uniIdRedirectUrl = e2;
- if (J($).length > 0)
- return setTimeout(() => {
- Y($, n2);
- }, 0), t2.abortLoginPageJump = true, t2;
- t2.autoToLoginPage = true;
- }
- return t2;
- }
- function ks() {
- !function() {
- const e3 = us(), { abortLoginPageJump: t2, autoToLoginPage: n2 } = bs({ url: e3 });
- t2 || n2 && Ss({ 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 } = bs({ url: e3.url });
- return t3 ? e3 : s2 ? (Ss({ api: n2, redirect: ws(e3.url) }), false) : e3;
- } });
- }
- }
- function As() {
- 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 is;
- }(n2);
- break;
- case "clientdb":
- s2 = function(e3) {
- if ("object" != typeof e3)
- return false;
- const { errCode: t3 } = e3 || {};
- return t3 in rs;
- }(n2);
- }
- s2 && function(e3 = {}) {
- const t3 = J($);
- Z().then(() => {
- const n3 = us();
- if (n3 && Is({ redirect: n3 }))
- return t3.length > 0 ? Y($, Object.assign({ uniIdRedirectUrl: n3 }, e3)) : void (ps && Ss({ api: "navigateTo", redirect: n3 }));
- });
- }(n2);
- });
- }
- function Cs(e2) {
- !function(e3) {
- e3.onResponse = function(e4) {
- V(j, e4);
- }, e3.offResponse = function(e4) {
- G(j, e4);
- };
- }(e2), function(e3) {
- e3.onNeedLogin = function(e4) {
- V($, e4);
- }, e3.offNeedLogin = function(e4) {
- G($, e4);
- }, ds && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = true, Z().then(() => {
- ks.call(e3);
- }), gs && As.call(e3)));
- }(e2), function(e3) {
- e3.onRefreshToken = function(e4) {
- V(B, e4);
- }, e3.offRefreshToken = function(e4) {
- G(B, e4);
- };
- }(e2);
- }
- let Ps;
- const Ts = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", xs = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
- function Os() {
- const e2 = re().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(Ps(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;
- }
- Ps = "function" != typeof atob ? function(e2) {
- if (e2 = String(e2).replace(/[\t\n\f\r ]+/g, ""), !xs.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 = Ts.indexOf(e2.charAt(i2++)) << 18 | Ts.indexOf(e2.charAt(i2++)) << 12 | (n2 = Ts.indexOf(e2.charAt(i2++))) << 6 | (s2 = Ts.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 Es = 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);
- };
- };
- }), Ls = t$2(Es);
- const Rs = "manual";
- function Us(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 === Rs)
- 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 Ns(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 M(q(t3, "invoke"), { ...r3 }), i3 = await e3(...s4), await M(q(t3, "success"), { ...r3, result: i3 }), i3;
- } catch (e4) {
- throw o3 = e4, await M(q(t3, "fail"), { ...r3, error: o3 }), o3;
- } finally {
- await M(q(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 te(e3) };
- }
- const { errSubject: f2, errCode: g2, errMsg: m2, newToken: y2 } = l2.result || {};
- if (a2 && uni.hideLoading(), y2 && y2.token && y2.tokenExpired && (ie(y2), Y(B, { ...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 te({ subject: f2, code: g2, message: m2, requestId: l2.requestId });
- throw n3.detail = l2.result, Y(j, { type: z, content: n3 }), n3;
- }
- return Y(j, { type: z, content: l2.result }), l2.result;
- }, interceptorName: "callObject", getCallbackArgs: function({ params: e3 } = {}) {
- return { objectName: t2, methodName: c2, params: e3 };
- } });
- } });
- };
- }
- function Ds(e2) {
- return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e2.config.spaceId));
- }
- async function Ms({ openid: e2, callLoginByWeixin: t2 = false } = {}) {
- Ds(this);
- throw new Error(`[SecureNetwork] API \`initSecureNetworkByWeixin\` is not supported on platform \`${C}\``);
- }
- async function qs(e2) {
- const t2 = Ds(this);
- return t2.initPromise || (t2.initPromise = Ms.call(this, e2).then((e3) => e3).catch((e3) => {
- throw delete t2.initPromise, e3;
- })), t2.initPromise;
- }
- function Fs(e2) {
- return function({ openid: t2, callLoginByWeixin: n2 = false } = {}) {
- return qs.call(e2, { openid: t2, callLoginByWeixin: n2 });
- };
- }
- function Ks(e2) {
- !function(e3) {
- he = e3;
- }(e2);
- }
- function js(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 $s 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([js("getSystemInfo")(), js("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 Bs(e2, t2) {
- const n2 = `http://${e2}:${t2}/system/ping`;
- try {
- const e3 = await (s2 = { url: n2, timeout: 500 }, new Promise((e4, t3) => {
- ne.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 Ws(e2) {
- {
- const { osName: e3, osVersion: t3 } = ce();
- "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 async function(e3, t3) {
- let n3;
- for (let s3 = 0; s3 < e3.length; s3++) {
- const r3 = e3[s3];
- if (await Bs(r3, t3)) {
- n3 = r3;
- break;
- }
- }
- return { address: n3, port: t3 };
- }(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 === C.indexOf("mp-") && (o2 += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t2.debugInfo.forceRemote)
- throw new Error(o2);
- i2(o2);
- }
- function Hs(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 zs = { tcb: bt, tencent: bt, aliyun: fe, private: At, alipay: Nt };
- let Js = new class {
- init(e2) {
- let t2 = {};
- const n2 = zs[e2.provider];
- if (!n2)
- throw new Error("未提供正确的provider参数");
- t2 = n2.init(e2), function(e3) {
- const t3 = {};
- e3.__dev__ = t3, t3.debugLog = "app" === C;
- const n3 = P;
- n3 && !n3.code && (t3.debugInfo = n3);
- const s2 = new v({ createPromise: function() {
- return Ws(e3);
- } });
- t3.initLocalNetwork = function() {
- return s2.exec();
- };
- }(t2), Hs(t2), Bn(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 = es$1(ts, { 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 = es$1(ts, { uniClient: e3, isJQL: true });
- return this._databaseForJQL = n3, n3;
- };
- }(t2), function(e3) {
- e3.getCurrentUserInfo = Os, e3.chooseAndUploadFile = Ls.initChooseAndUploadFile(e3), Object.assign(e3, { get mixinDatacom() {
- return Us(e3);
- } }), e3.SSEChannel = $s, e3.initSecureNetworkByWeixin = Fs(e3), e3.setCustomClientInfo = Ks, e3.importObject = Ns(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 } = ee(n4), h2 = i2.then(() => s2 ? Promise.resolve() : M(q(t3, "invoke"), n4)).then(() => e4.call(this, n4)).then((e5) => s2 ? Promise.resolve(e5) : M(q(t3, "success"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (r2 && Y(j, { type: H, content: e5 }), Promise.resolve(e5))), (e5) => s2 ? Promise.reject(e5) : M(q(t3, "fail"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (Y(j, { type: H, content: e5 }), Promise.reject(e5))));
- if (!(o2 || a2 || u2))
- return h2;
- h2.then((e5) => {
- o2 && o2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 });
- }, (e5) => {
- a2 && a2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 });
- });
- };
- }(t2[e3], e3)).bind(t2);
- }), t2.init = this.init, t2;
- }
- }();
- (() => {
- const e2 = T;
- let t2 = {};
- if (e2 && 1 === e2.length)
- t2 = e2[0], Js = Js.init(t2), Js._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) => {
- Js[e3] = function() {
- return console.error(n2), Promise.reject(new te({ code: "SYS_ERR", message: n2 }));
- };
- });
- }
- Object.assign(Js, { get mixinDatacom() {
- return Us(Js);
- } }), Cs(Js), Js.addInterceptor = N, Js.removeInterceptor = D, Js.interceptObject = F;
- })();
- var Vs = Js;
- 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/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
- const _sfc_main$d = {
- name: "uni-data-select",
- mixins: [Vs.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/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.png";
- const _imports_1$3 = "/static/img/energy1.png";
- const _imports_2$3 = "/static/img/Energybrightness1.png";
- const _imports_3$4 = "/static/img/energy2.png";
- const _imports_4$3 = "/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 = "/static/img/setup.png";
- const _imports_10$1 = "/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:235", res);
- this.appVersion = res.appWgtVersion;
- },
- fail: (err) => {
- formatAppLog("error", "at pages/index/index.vue:239", "获取系统信息失败:", err);
- }
- });
- },
- beforeUnmount() {
- clearInterval(this.uidatas);
- },
- methods: {
- changeLanguage(locale) {
- formatAppLog("log", "at pages/index/index.vue:249", 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:263", 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/tite.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$3,
- 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$3,
- 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("SystemInformation")),
- 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,
- 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.createElementVNode("view", { class: "power_bj" }, [
- vue.createElementVNode("image", {
- src: _imports_1$3,
- 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.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.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.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,
- 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$1,
- 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/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/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/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue"]]);
- const _imports_1$2 = "/static/dian1.png";
- const _imports_2$2 = "/static/dian2.png";
- const _imports_3$3 = "/static/che.png";
- const _imports_4$2 = "/static/y8.png";
- const _imports_5 = "/static/y6.png";
- const _imports_6 = "/static/SOC.png";
- const _imports_7 = "/static/Battery.png";
- const _imports_8 = "/static/setup.png";
- const _imports_1$1 = "/static/home.png";
- const _imports_10 = "/static/home1.png";
- const _sfc_main$9 = {
- components: {
- cmdProgress: __easycom_0$1
- },
- data() {
- return {
- successtype: "success",
- confirmText: "确认启动",
- title: "你确定要开启该设备吗?",
- content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
- value: "",
- modeinput: "",
- segmented: 1,
- uidatas: "",
- formatTimeid: "",
- faultsdata: []
- };
- },
- 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() {
- this.onfaultsdata();
- },
- beforeUnmount() {
- if (this.scrollInterval) {
- clearInterval(this.scrollInterval);
- }
- },
- watch: {
- uidatasdata: {
- handler(newVal, oldVal) {
- formatAppLog("log", "at pages/home/index.vue:669", "uidatasdata 发生变化:", newVal);
- this.handleDataChange(newVal);
- },
- deep: true
- // 监听深层次的变化
- }
- },
- methods: {
- handleDataChange(newData) {
- formatAppLog("log", "at pages/home/index.vue:680", "数据变化处理:", newData);
- },
- onfaultsdata() {
- let data = {
- page: 1,
- rows: 10,
- device: "",
- starttime: "",
- endtime: "",
- rt: 0,
- type: "故障"
- };
- getfaultsList(data).then((res) => {
- formatAppLog("log", "at pages/home/index.vue:694", res);
- if (res.status == "ok") {
- this.faultsdata = res.data.list;
- }
- });
- },
- // 返回首页
- 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();
- },
- onpower() {
- this.modeinput = "input";
- this.title = this.$t("ACinputpowergiven");
- this.confirmText = this.$t("confirm");
- this.$refs.alertDialog.open();
- },
- // this.uidatasdata.AC_In_380V_63A1_Status==0
- // this.messageText = '需将AC输出端63A1的开关手动断开'
- // this.$refs.message.open()
- // this.uidatasdata.AC_In_380V_63A2_Status==0
- // this.messageText = '需将AC输出端63A2的开关手动断开'
- // this.$refs.message.open()
- // 确定
- dialogConfirm() {
- let data = {};
- if (this.title == this.$t("ACinputpowergiven")) {
- data = {
- id: "e612195b-cf9e-418b-9e2d-0fbae9b03ffa",
- issaveinitvalue: false,
- value: this.value
- };
- } else {
- data = {
- id: "c35c4db0-113f-442a-9e26-728489265fdb",
- issaveinitvalue: false,
- value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0"
- };
- }
- let uidatasdata = this.$store.state.uidatasdata;
- if (this.confirmText == this.$t("ConfirmStart")) {
- if (uidatasdata.AC_Out_380V_125A_Status == 0 || uidatasdata.AC_Out_380V_63A_Status == 0 || uidatasdata.AC_Out_220V_16A_Status == 0) {
- this.messageText = this.$t("ACRechargeelectricitytext");
- this.$refs.message.open();
- return;
- }
- }
- control(data).then((data2) => {
- formatAppLog("log", "at pages/home/index.vue:766", data2);
- if (data2.status == "ok") {
- if (this.title == this.$t("ACinputpowergiven")) {
- plus.navigator.hideSystemNavigation();
- }
- 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() {
- if (this.title == this.$t("ACinputpowergiven")) {
- plus.navigator.hideSystemNavigation();
- }
- this.$refs.alertDialog.close();
- },
- ontap(e2) {
- formatAppLog("log", "at pages/home/index.vue:796", e2);
- this.segmented = e2;
- }
- }
- };
- 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.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$2,
- 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.createElementVNode("view", { class: "parameter_2" }, [
- vue.createElementVNode("view", { class: "parameter_3" }, [
- vue.createElementVNode("view", { class: "parameter_4" }, [
- _ctx.uidatasdata.AC_In_380V_63A1_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _imports_4$2,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: _imports_5,
- mode: ""
- })),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$t("state163A")),
- 1
- /* TEXT */
- )
- ]),
- _ctx.uidatasdata.AC_In_380V_63A1_Status == 0 ? (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.createElementVNode("view", { class: "parameter_3" }, [
- vue.createElementVNode("view", { class: "parameter_4" }, [
- _ctx.uidatasdata.AC_In_380V_63A2_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _imports_4$2,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: _imports_5,
- mode: ""
- })),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$t("state63A2")),
- 1
- /* TEXT */
- )
- ]),
- _ctx.uidatasdata.AC_In_380V_63A2_Status == 0 ? (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.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 == 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_BatSysState==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_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_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(" 0.0 "),
- 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(" 0.0 "),
- 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(" 0.0 "),
- 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.createElementVNode("view", {
- class: "parameter_zheng31111",
- onClick: _cache[6] || (_cache[6] = (...args) => $options.onpower && $options.onpower(...args))
- }, [
- vue.createElementVNode("view", { class: "parameter_zheng31" }, [
- _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.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$1,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_hometext" },
- vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_home2" }, [
- vue.createElementVNode("image", {
- src: _imports_10,
- 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.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: "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/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/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/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:165", 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:188", e2);
- this.current = e2.current;
- this.onfaultsList();
- },
- // taps(e) {
- // this.faulttaps = e
- // this.current = 1
- // __f__('log','at pages/details/index.vue:195',e);
- // this.onfaultsList()
- // },
- // 文字提示
- closedevice() {
- for (let i2 = 1; i2 < this.total; i2++) {
- this.$refs["device" + i2].close();
- }
- },
- close() {
- for (let i2 = 1; i2 < this.total; i2++) {
- this.$refs["tooltip" + i2].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/tite.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.createVNode(_component_zb_tooltip, {
- onClick: $options.close,
- content: item.DEVICE,
- placement: "top",
- ref_for: true,
- ref: "tooltip" + index
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode(
- "view",
- { class: "parameter_xian4" },
- vue.toDisplayString(item.DEVICE),
- 1
- /* TEXT */
- )
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["onClick", "content"]),
- 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_xian5" },
- vue.toDisplayString(item.FAULTTIME.substring(0, 19)),
- 1
- /* TEXT */
- ),
- _ctx.event != "事件" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- 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$1,
- 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" },
- 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/pages/details/index.vue"]]);
- 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: ""
- };
- },
- 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() {
- this.onfaultsdata();
- },
- beforeUnmount() {
- },
- methods: {
- onfaultsdata() {
- let data = {
- page: 1,
- rows: 10,
- device: "",
- starttime: "",
- endtime: "",
- rt: 0,
- type: "故障"
- };
- getfaultsList(data).then((res) => {
- formatAppLog("log", "at pages/electricity/index.vue:634", res);
- if (res.status == "ok") {
- this.faultsdata = res.data.list;
- }
- });
- },
- // 返回首页
- 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 uidatasdata = this.$store.state.uidatasdata;
- let data = {
- id: "c35c4db0-113f-442a-9e26-728489265fdb",
- issaveinitvalue: false,
- value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0"
- };
- if (this.confirmText == this.$t("ConfirmStart")) {
- if (uidatasdata.AC_In_380V_63A1_Status == 0 || uidatasdata.AC_In_380V_63A2_Status == 0) {
- this.messageText = this.$t("ACpowerSupplytext");
- this.$refs.message.open();
- return;
- }
- }
- 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:706", this.value);
- this.$refs.alertDialog.close();
- },
- ontap(e2) {
- formatAppLog("log", "at pages/electricity/index.vue:710", 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.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.createElementVNode("view", { class: "parameter_2" }, [
- vue.createElementVNode("view", { class: "parameter_31" }, [
- vue.createElementVNode("view", { class: "parameter_4" }, [
- _ctx.uidatasdata.AC_Out_380V_125A_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _imports_4$2,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: _imports_5,
- mode: ""
- })),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$t("state125A")),
- 1
- /* TEXT */
- )
- ]),
- _ctx.uidatasdata.AC_Out_380V_125A_Status == 0 ? (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.createElementVNode("view", { class: "parameter_31" }, [
- vue.createElementVNode("view", { class: "parameter_4" }, [
- _ctx.uidatasdata.AC_Out_380V_63A_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _imports_4$2,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: _imports_5,
- mode: ""
- })),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$t("state63A")),
- 1
- /* TEXT */
- )
- ]),
- _ctx.uidatasdata.AC_Out_380V_63A_Status == 0 ? (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.createElementVNode("view", { class: "parameter_31" }, [
- vue.createElementVNode("view", { class: "parameter_4" }, [
- _ctx.uidatasdata.AC_Out_220V_16A_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _imports_4$2,
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: _imports_5,
- mode: ""
- })),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$t("state16A")),
- 1
- /* TEXT */
- )
- ]),
- _ctx.uidatasdata.AC_Out_220V_16A_Status == 0 ? (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.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_BatSysState==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_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_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_MaxDischargeCurrentLimit ?? "—") + " ",
- 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(" 0.0 "),
- 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(" 0.0 "),
- 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(" 0.0 "),
- 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$1,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_hometext" },
- vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_home2" }, [
- vue.createElementVNode("image", {
- src: _imports_10,
- 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.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/pages/electricity/index.vue"]]);
- 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: []
- };
- },
- 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() {
- this.onfaultsdata();
- },
- beforeUnmount() {
- },
- methods: {
- onfaultsdata() {
- let data = {
- page: 1,
- rows: 10,
- device: "",
- starttime: "",
- endtime: "",
- rt: 0,
- type: "故障"
- };
- getfaultsList(data).then((res) => {
- formatAppLog("log", "at pages/supply/supply.vue:649", res);
- if (res.status == "ok") {
- this.faultsdata = res.data.list;
- }
- });
- },
- // 返回首页
- 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.confirmText == this.$t("ConfirmStart") ? "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:709", this.value);
- this.$refs.alertDialog.close();
- },
- ontap(e2) {
- formatAppLog("log", "at pages/supply/supply.vue:713", 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.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_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 == 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_BatSysState==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?'无效':'有效'}} "),
- vue.createCommentVNode(' <view v-if="uidatasdata.bms_ChgLinkSt==0">\r\n 无连接\r\n </view>\r\n <view v-if="uidatasdata.bms_ChgLinkSt==1">\r\n 快充连接\r\n </view> '),
- _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 == 4 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 4 },
- vue.toDisplayString(_ctx.$t("Chargingstopped")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_ChargeStatus == 5 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 5 },
- vue.toDisplayString(_ctx.$t("retain")),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — "))
- ])
- ])
- ])
- ])
- ]),
- 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_BatSysState==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("initialization")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("voltagehasbeen")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 4 },
- vue.toDisplayString(_ctx.$t("Underhighpressure")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 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(" 0.0 "),
- 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(" 0.0 "),
- 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(" 0.0 "),
- 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$1,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_hometext" },
- vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_home2" }, [
- vue.createElementVNode("image", {
- src: _imports_10,
- 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.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/pages/supply/supply.vue"]]);
- const _imports_3$1 = "/static/che1.png";
- const _sfc_main$3 = {
- components: {
- cmdProgress: __easycom_0$1
- },
- data() {
- return {
- successtype: "success",
- confirmText: "确认启动",
- title: "你确定要开启该设备吗?",
- content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
- value: "",
- modeinput: "",
- segmented: 1,
- ChargingStation: 1,
- faultsdata: []
- };
- },
- 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() {
- this.onfaultsdata();
- },
- beforeUnmount() {
- },
- methods: {
- onfaultsdata() {
- let data = {
- page: 1,
- rows: 10,
- device: "",
- starttime: "",
- endtime: "",
- rt: 0,
- type: "故障"
- };
- getfaultsList(data).then((res) => {
- formatAppLog("log", "at pages/supplyss/supplyss.vue:903", res);
- if (res.status == "ok") {
- this.faultsdata = res.data.list;
- }
- });
- },
- // 返回首页
- 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.confirmText == this.$t("ConfirmStart") ? "1" : "0"
- };
- } else if (this.segmented == 2) {
- data = {
- id: "78f59493-65f3-4860-8296-7f07bb0ca55b",
- issaveinitvalue: false,
- value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0"
- };
- } else {
- data = {
- id: "c35c4db0-113f-442a-9e26-728489265fdb",
- issaveinitvalue: false,
- value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0"
- };
- }
- control(data).then((data2) => {
- formatAppLog("log", "at pages/supplyss/supplyss.vue:960", 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:979", this.value);
- this.$refs.alertDialog.close();
- },
- // 切换标签
- ontap(e2) {
- formatAppLog("log", "at pages/supplyss/supplyss.vue:984", 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/tite.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$2,
- 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$2,
- 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$2,
- 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$2,
- 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_BatSysState==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_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_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_MaxDischargeCurrentLimit ?? "—") + " ",
- 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_BatSysState==0.00?'无效':'有效'}} "),
- _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(_ctx.$t("initialization")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 2 },
- vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 3 },
- vue.toDisplayString(_ctx.$t("voltagehasbeen")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 4 },
- vue.toDisplayString(_ctx.$t("Underhighpressure")),
- 1
- /* TEXT */
- )) : _ctx.uidatasdata.bms_BatSysState == 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$1,
- mode: ""
- }),
- vue.createElementVNode(
- "text",
- { class: "parameter_hometext" },
- vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "parameter_home2" }, [
- vue.createElementVNode("image", {
- src: _imports_10,
- 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.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/pages/supplyss/supplyss.vue"]]);
- const _imports_1 = "/static/faultlist.png";
- const _imports_2 = "/static/fault.png";
- const _imports_3 = "/static/event.png";
- const _imports_4 = "/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/tite.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.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("WarningRec")),
- 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("RunningRec")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "parameter_box",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.onreturn("基础"))
- }, [
- vue.createElementVNode("view", { class: "parameter_list1" }, [
- vue.createElementVNode("image", {
- src: _imports_4,
- 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[4] || (_cache[4] = (...args) => $options.onclick && $options.onclick(...args))
- }, [
- vue.createElementVNode("image", {
- src: _imports_1$1,
- 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/pages/faultlist/index.vue"]]);
- const _sfc_main$1 = {
- data() {
- return {};
- },
- onLoad() {
- },
- computed: {
- // 使用 mapState 映射多个状态到组件的计算属性
- ...mapState(["formattedTime", "status"]),
- 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/tite.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("image", {
- class: "parameter_list",
- src: _ctx.$t("sysifoURL"),
- mode: ""
- }, null, 8, ["src"])
- ]),
- 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$1,
- 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/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/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 = "Mobile Ev Charger";
- const status$1 = "SYS Staus:";
- 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 = "Disconnected state";
- const ClosedState$1 = "Closed state";
- 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 = "Charing Voltage";
- const ChargingCurrent$1 = "Charing Current";
- const VehicleSOC$1 = "EV SOC";
- const ChargingCapacity$1 = "Charging capacity";
- const CharingPower$1 = "Charing Power";
- const ChargingFee$1 = "Charing Fee";
- const USD$1 = "USD";
- const ChargingTime$1 = "Unknown";
- 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 sysifoURL$1 = "../../static/enBasicdata3.png";
- const Tipswarning$1 = "Only a mode can be used at the same time";
- 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,
- sysifoURL: sysifoURL$1,
- Tipswarning: Tipswarning$1
- };
- const MainTitle = "移动储能充电系统";
- 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 = "OFF";
- const ClosedState = "ON";
- 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 sysifoURL = "../../static/zhBasicdata3.png";
- const Tipswarning = "若想重新选择模式,请返回之前模式停止以后再重新选择!";
- 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,
- sysifoURL,
- Tipswarning
- };
- 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();
- 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);
|