123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377 |
- /*!
- * Avue.js v2.8.6
- * (c) 2017-2021 Smallwei
- * Released under the MIT License.
- *
- */
- !function (t, e) {
- "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define("AVUE", [], e) : "object" == typeof exports ? exports.AVUE = e() : t.AVUE = e()
- }(this, (function () {
- return function (t) {
- var e = {};
- function n(i) {
- if (e[i]) return e[i].exports;
- var o = e[i] = {i: i, l: !1, exports: {}};
- return t[i].call(o.exports, o, o.exports, n), o.l = !0, o.exports
- }
- return n.m = t, n.c = e, n.d = function (t, e, i) {
- n.o(t, e) || Object.defineProperty(t, e, {enumerable: !0, get: i})
- }, n.r = function (t) {
- "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(t, "__esModule", {value: !0})
- }, n.t = function (t, e) {
- if (1 & e && (t = n(t)), 8 & e) return t;
- if (4 & e && "object" == typeof t && t && t.__esModule) return t;
- var i = Object.create(null);
- if (n.r(i), Object.defineProperty(i, "default", {
- enumerable: !0,
- value: t
- }), 2 & e && "string" != typeof t) for (var o in t) n.d(i, o, function (e) {
- return t[e]
- }.bind(null, o));
- return i
- }, n.n = function (t) {
- var e = t && t.__esModule ? function () {
- return t.default
- } : function () {
- return t
- };
- return n.d(e, "a", e), e
- }, n.o = function (t, e) {
- return Object.prototype.hasOwnProperty.call(t, e)
- }, n.p = "", n(n.s = 40)
- }([function (t, e, n) {
- "use strict";
- function i(t, e, n, i, o, a, r, s) {
- var l, c = "function" == typeof t ? t.options : t;
- if (e && (c.render = e, c.staticRenderFns = n, c._compiled = !0), i && (c.functional = !0), a && (c._scopeId = "data-v-" + a), r ? (l = function (t) {
- (t = t || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) || "undefined" == typeof __VUE_SSR_CONTEXT__ || (t = __VUE_SSR_CONTEXT__), o && o.call(this, t), t && t._registeredComponents && t._registeredComponents.add(r)
- }, c._ssrRegister = l) : o && (l = s ? function () {
- o.call(this, (c.functional ? this.parent : this).$root.$options.shadowRoot)
- } : o), l) if (c.functional) {
- c._injectStyles = l;
- var u = c.render;
- c.render = function (t, e) {
- return l.call(e), u(t, e)
- }
- } else {
- var d = c.beforeCreate;
- c.beforeCreate = d ? [].concat(d, l) : [l]
- }
- return {exports: t, options: c}
- }
- n.d(e, "a", (function () {
- return i
- }))
- }, function (t, e, n) {
- "use strict";
- var i = function (t, e, n) {
- return e ? t + n + e : t
- }, o = function t(e, n) {
- if ("string" == typeof n) return i(e, n, "--");
- if (Array.isArray(n)) return n.map((function (n) {
- return t(e, n)
- }));
- var o = {};
- return Object.keys(n || {}).forEach((function (t) {
- o[e + "--" + t] = n[t]
- })), o
- }, a = {
- methods: {
- b: function (t, e) {
- var n = this.$options.name;
- return t && "string" != typeof t && (e = t, t = ""), t = i(n, t, "__"), e ? [t, o(t, e)] : t
- }
- }
- }, r = n(3);
- e.a = function (t) {
- return t.name = r.i + (t.name || ""), t.mixins = t.mixins || [], t.mixins.push(a), t
- }
- }, function (module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.d(__webpack_exports__, "q", (function () {
- return hasOwn
- })), __webpack_require__.d(__webpack_exports__, "m", (function () {
- return getFixed
- })), __webpack_require__.d(__webpack_exports__, "l", (function () {
- return getAsVal
- })), __webpack_require__.d(__webpack_exports__, "s", (function () {
- return loadScript
- })), __webpack_require__.d(__webpack_exports__, "g", (function () {
- return downFile
- })), __webpack_require__.d(__webpack_exports__, "x", (function () {
- return strCorNum
- })), __webpack_require__.d(__webpack_exports__, "b", (function () {
- return createObj
- })), __webpack_require__.d(__webpack_exports__, "u", (function () {
- return setAsVal
- })), __webpack_require__.d(__webpack_exports__, "c", (function () {
- return dataURLtoFile
- })), __webpack_require__.d(__webpack_exports__, "k", (function () {
- return findObject
- })), __webpack_require__.d(__webpack_exports__, "t", (function () {
- return randomId
- })), __webpack_require__.d(__webpack_exports__, "r", (function () {
- return isJson
- })), __webpack_require__.d(__webpack_exports__, "d", (function () {
- return deepClone
- })), __webpack_require__.d(__webpack_exports__, "w", (function () {
- return sortArrys
- })), __webpack_require__.d(__webpack_exports__, "v", (function () {
- return setPx
- })), __webpack_require__.d(__webpack_exports__, "e", (function () {
- return detailDataType
- })), __webpack_require__.d(__webpack_exports__, "p", (function () {
- return getUrlParams
- })), __webpack_require__.d(__webpack_exports__, "f", (function () {
- return detailDic
- })), __webpack_require__.d(__webpack_exports__, "j", (function () {
- return findByValue
- })), __webpack_require__.d(__webpack_exports__, "h", (function () {
- return filterDefaultParams
- })), __webpack_require__.d(__webpack_exports__, "n", (function () {
- return getObjValue
- })), __webpack_require__.d(__webpack_exports__, "i", (function () {
- return findArray
- })), __webpack_require__.d(__webpack_exports__, "o", (function () {
- return getPasswordChar
- })), __webpack_require__.d(__webpack_exports__, "a", (function () {
- return clearVal
- })), __webpack_require__.d(__webpack_exports__, "y", (function () {
- return vaildData
- }));
- var _validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5),
- global_variable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
- function _typeof(t) {
- return (_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- })(t)
- }
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- function hasOwn(t, e) {
- return hasOwnProperty.call(t, e)
- }
- function getFixed() {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
- e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2;
- return Number(t.toFixed(e))
- }
- function getAsVal(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "", n = deepClone(t);
- return Object(_validate__WEBPACK_IMPORTED_MODULE_0__.b)(e) || e.split(".").forEach((function (t) {
- n = Object(_validate__WEBPACK_IMPORTED_MODULE_0__.b)(n[t]) ? "" : n[t]
- })), n
- }
- var loadScript = function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "js",
- e = arguments.length > 1 ? arguments[1] : void 0, n = !1;
- return new Promise((function (i) {
- var o, a = document.getElementsByTagName("head")[0];
- (a.children.forEach((function (t) {
- -1 !== (t.src || "").indexOf(e) && (n = !0, i())
- })), n) || ("js" === t ? ((o = document.createElement("script")).type = "text/javascript", o.src = e) : "css" === t && ((o = document.createElement("link")).rel = "stylesheet", o.type = "text/css", o.href = e), a.appendChild(o), o.onload = function () {
- i()
- })
- }))
- };
- function downFile(t, e) {
- var n = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
- n.href = t, n.download = e;
- var i = document.createEvent("MouseEvents");
- i.initMouseEvent("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), n.dispatchEvent(i)
- }
- function strCorNum(t) {
- return t.forEach((function (e, n) {
- t[n] = Number(e)
- })), t
- }
- function extend() {
- var t, e, n, i, o = arguments[0] || {}, a = !1, r = Array.prototype.slice.call(arguments), s = 1, l = !1;
- for ("boolean" == typeof o && (a = o, s++, o = arguments[1]); s < r.length; s++) if (null != (t = r[s])) for (n in t) i = t[n], e = o[n], a && ("[object Object]" === toString.call(i) || (l = "[object Array]" == toString.call(i))) ? (e = l ? "[object Array]" === toString.call(e) ? e : [] : "[object Object]" === toString.call(e) ? e : {}, o[n] = extend(a, e, i)) : void 0 !== i && i !== e && (o[n] = i);
- return o
- }
- function createObj(t, e) {
- var n = e.split("."), i = n.splice(0, 1)[0], o = {};
- if (o[i] = {}, n.length >= 2) {
- var a = "";
- n.forEach((function (t) {
- a = "".concat(a).concat("{", '"').concat(t, '":')
- })), a = "".concat(a, '""');
- for (var r = 0; r < n.length; r++) a = "".concat(a).concat("}");
- a = JSON.parse(a), o[i] = a
- }
- return t = extend(!0, t, o)
- }
- function setAsVal(obj) {
- var bind = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "",
- value = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "";
- return eval("obj." + bind + '="' + value + '"'), obj
- }
- function dataURLtoFile(t, e) {
- for (var n = t.split(","), i = n[0].match(/:(.*?);/)[1], o = atob(n[1]), a = o.length, r = new Uint8Array(a); a--;) r[a] = o.charCodeAt(a);
- return new File([r], e, {type: i})
- }
- function findObject(t, e) {
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "prop", i = -1, o = function () {
- var e;
- return t.forEach((function (t) {
- t.column ? e = "group" : t.children && (e = "tree")
- })), e
- }();
- return "group" === o ? t.forEach((function (t) {
- var o = findArray(t.column, e, n, !0);
- -1 !== o && (i = o)
- })) : i = "tree" === o ? findLabelNode(t, e, {value: n}, !0) : findArray(t, e, n, !0), i
- }
- function randomId() {
- for (var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", e = t.length, n = "", i = 0; i < 16; i++) n += t.charAt(Math.floor(Math.random() * e));
- return n
- }
- var getObjType = function (t) {
- var e = Object.prototype.toString;
- return t instanceof Element ? "element" : {
- "[object Boolean]": "boolean",
- "[object Number]": "number",
- "[object String]": "string",
- "[object Function]": "function",
- "[object Array]": "array",
- "[object Date]": "date",
- "[object RegExp]": "regExp",
- "[object Undefined]": "undefined",
- "[object Null]": "null",
- "[object Object]": "object"
- }[e.call(t)]
- }, isJson = function (t) {
- return Array.isArray(t) ? t[0] instanceof Object : t instanceof Object
- }, deepClone = function t(e) {
- var n, i = getObjType(e);
- if ("array" === i) n = []; else {
- if ("object" !== i) return e;
- n = {}
- }
- if ("array" === i) for (var o = 0, a = e.length; o < a; o++) e[o] = (e[o], e[o]), e[o] && delete e[o].$parent, n.push(t(e[o])); else if ("object" === i) for (var r in e) e && delete e.$parent, n[r] = t(e[r]);
- return n
- }, sortArrys = function (t, e) {
- return t.sort((function (t, n) {
- return t[e] > n[e] ? -1 : t[e] < n[e] ? 1 : 0
- })), t
- }, setPx = function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
- return Object(_validate__WEBPACK_IMPORTED_MODULE_0__.b)(t) && (t = e), Object(_validate__WEBPACK_IMPORTED_MODULE_0__.b)(t) ? "" : (-1 === (t += "").indexOf("%") && (t += "px"), t)
- }, detailDataType = function (t, e) {
- return "number" === e ? Number(t) : "string" === e ? t + "" : t
- }, getUrlParams = function (t) {
- var e = {url: "", params: {}}, n = t.split("?");
- e.url = n[0];
- var i = n[1];
- i && i.split("&").forEach((function (t) {
- var n = t.split("="), i = n[0], o = n[1];
- e.params[i] = o
- }));
- return e
- }, detailDic = function t() {
- var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
- n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
- i = arguments.length > 2 ? arguments[2] : void 0,
- o = n.value || global_variable__WEBPACK_IMPORTED_MODULE_1__.e.value,
- a = n.children || global_variable__WEBPACK_IMPORTED_MODULE_1__.e.children;
- return e.forEach((function (e) {
- e[o] = detailDataType(e[o], i), e[a] && t(e[a], n, i)
- })), e
- }, findByValue = function (t, e, n, i, o) {
- if (Object(_validate__WEBPACK_IMPORTED_MODULE_0__.b)(t)) return e;
- var a = "";
- if (n = n || global_variable__WEBPACK_IMPORTED_MODULE_1__.e, e instanceof Array) {
- a = [];
- for (var r = 0; r < e.length; r++) {
- var s = e[r];
- i ? a.push(findLabelNode(t, s, n) || s) : a.push(findArrayLabel(t, s, n))
- }
- a = a.join(global_variable__WEBPACK_IMPORTED_MODULE_1__.f).toString()
- } else ["string", "number", "boolean"].includes(_typeof(e)) && (a = findLabelNode(t, e, n) || e);
- return a
- }, filterDefaultParams = function (t) {
- var e = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n = deepClone(t);
- if (e) return n;
- for (var i in n) (-1 !== i.indexOf("$") || Object(_validate__WEBPACK_IMPORTED_MODULE_0__.b)(n[i])) && delete n[i];
- return n
- }, detailDicGroup = function (t) {
- t = deepClone(t);
- var e = [];
- return (t[0] || {}).groups ? (t.forEach((function (t) {
- t.groups && (e = e.concat(t.groups))
- })), e) : t
- }, findLabelNode = function (t, e, n, i) {
- var o;
- i || (t = detailDicGroup(t));
- return function t(e, n, a) {
- for (var r = a.label || global_variable__WEBPACK_IMPORTED_MODULE_1__.e.label, s = a.value || global_variable__WEBPACK_IMPORTED_MODULE_1__.e.value, l = a.children || global_variable__WEBPACK_IMPORTED_MODULE_1__.e.children, c = 0; c < e.length; c++) {
- var u = e[c], d = u[l] || [];
- u[s] === n ? o = i ? u : u[r] : t(d, n, a)
- }
- }(t, e, n), o
- }, getDeepData = function (t) {
- return (Array.isArray(t) ? t : t.data) || []
- }, getObjValue = function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "",
- n = arguments.length > 2 ? arguments[2] : void 0, i = e.split("."), o = t;
- return "" === i[0] && "object" !== n ? getDeepData(t) : ("" !== i[0] && i.forEach((function (t) {
- o = o[t]
- })), o)
- }, findArrayLabel = function (t, e, n) {
- t = detailDicGroup(t);
- for (var i = n.value || global_variable__WEBPACK_IMPORTED_MODULE_1__.e.value, o = n.label || global_variable__WEBPACK_IMPORTED_MODULE_1__.e.label, a = 0; a < t.length; a++) if (t[a][i] === e) return t[a][o];
- return e
- }, findArray = function (t, e, n, i) {
- i || (t = detailDicGroup(t)), n = n || global_variable__WEBPACK_IMPORTED_MODULE_1__.e.value;
- for (var o = 0; o < t.length; o++) if (t[o][n] === e) return i ? t[o] : o;
- return -1
- }, getPasswordChar = function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "",
- e = arguments.length > 1 ? arguments[1] : void 0, n = t.toString().length;
- t = "";
- for (var i = 0; i < n; i++) t += e;
- return t
- }, clearVal = function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
- return t ? (Object.keys(t).forEach((function (n) {
- e.includes(n) || (Array.isArray(t[n]) ? t[n] = [] : null !== t[n] && "object" === _typeof(t[n]) ? t[n] = {} : ["number", "boolean"].includes(_typeof(t[n])) || void 0 === t[n] ? t[n] = void 0 : t[n] = "")
- })), t) : {}
- }, vaildData = function (t, e) {
- return "boolean" == typeof t ? t : Object(_validate__WEBPACK_IMPORTED_MODULE_0__.b)(t) ? e : t
- }
- }, function (t, e, n) {
- "use strict";
- n.d(e, "i", (function () {
- return i
- })), n.d(e, "j", (function () {
- return o
- })), n.d(e, "e", (function () {
- return a
- })), n.d(e, "d", (function () {
- return r
- })), n.d(e, "c", (function () {
- return s
- })), n.d(e, "h", (function () {
- return l
- })), n.d(e, "a", (function () {
- return c
- })), n.d(e, "k", (function () {
- return u
- })), n.d(e, "b", (function () {
- return d
- })), n.d(e, "l", (function () {
- return p
- })), n.d(e, "f", (function () {
- return h
- })), n.d(e, "g", (function () {
- return f
- }));
- var i = "avue-", o = "echart-", a = {
- nodeKey: "id",
- label: "label",
- value: "value",
- desc: "desc",
- groups: "groups",
- title: "title",
- leaf: "leaf",
- children: "children",
- labelText: "名称",
- disabled: "disabled"
- }, r = {name: "name", url: "url", fileName: "file", res: ""},
- s = ["dates", "date", "datetime", "datetimerange", "daterange", "time", "timerange", "week", "month", "monthrange", "year"],
- l = ["tree", "number", "icon", "color", "table", "map"], c = ["img", "array", "url"], u = ["tree", "select"],
- d = c.concat(["upload", "dynamic", "map", "checkbox", "cascader", "dynamic", "timerange", "monthrange", "daterange", "datetimerange", "dates"]),
- p = s.concat(["select", "checkbox", "radio", "cascader", "tree", "color", "icon", "table", "map"]), h = " | ",
- f = ","
- }, function (t, e, n) {
- "use strict";
- var i = n(17), o = {
- AliOSS: {
- url: "https://avuex.avue.top/cdn/aliyun-oss-sdk.min.js",
- title: "阿里云云图片上传,需要引入OSS的sdk",
- version: "6.1.0",
- github: "https://github.com/ali-sdk/ali-oss/"
- },
- echarts: {
- url: "https://cdn.staticfile.org/echarts/4.2.1-rc1/echarts.min.js",
- title: "图表组件,需要引echart",
- version: "4.2.1-rc1",
- github: "https://github.com/apache/incubator-echarts"
- },
- Map: {
- url: "https://webapi.amap.com/maps?v=1.4.11&key=xxxxx&plugin=AMap.PlaceSearch,https://webapi.amap.com/ui/1.0/main.js?v=1.0.11",
- title: "地图组件,需要引高德SDK",
- version: "1.4.11"
- },
- MapUi: {url: "https://webapi.amap.com/ui/1.0/main.js?v=1.0.11", title: "地图组件,需要引高德UISDK", version: "1.0.11"},
- Sortable: {
- url: "https://cdn.staticfile.org/Sortable/1.10.0-rc2/Sortable.min.js",
- title: "表格拖拽,需要引sortableJs",
- version: "1.10.0-rc2",
- github: "https://github.com/SortableJS/Sortable"
- },
- Screenshot: {
- url: "https://cdn.staticfile.org/html2canvas/0.5.0-beta4/html2canvas.min.js",
- title: "需要引入html2canvas依赖包",
- version: "0.5.0-beta4",
- github: "https://github.com/niklasvh/html2canvas/"
- },
- CryptoJS: {url: "https://avuejs.com/cdn/CryptoJS.js", title: "七牛云图片上传,需要引入CryptoJS", version: "3.1.2"},
- "ant-design-vue": {
- url: "",
- title: "需要引入ant-design-vue框架包",
- version: "1.3.14",
- gihub: "https://github.com/vueComponent/ant-design-vue"
- },
- "element-ui": {
- url: "https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/index.js",
- title: "需要引入Element-ui框架包",
- version: "2.11.0",
- gihub: "https://github.com/ElemeFE/element"
- },
- hljs: {
- url: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js",
- title: "需要引入hljs框架包",
- version: "9.15.6",
- gihub: "https://github.com/highlightjs/highlight.js"
- },
- vant: {
- url: "https://cdn.jsdelivr.net/npm/vant@1.6/lib/vant.min.js",
- title: "需要引入Vant框架包",
- version: "1.6",
- gihub: "https://github.com/youzan/vant"
- },
- "file-saver": {
- url: "https://cdn.staticfile.org/FileSaver.js/2014-11-29/FileSaver.min.js",
- title: "需要引入文件操作包",
- version: "2014-11-29",
- gihub: "https://github.com/eligrey/FileSaver.js"
- },
- xlsx: {
- url: "https://cdn.staticfile.org/xlsx/0.14.1/xlsx.full.min.js",
- title: "需要引入excel操作包",
- version: "0.14.1",
- gihub: "https://github.com/SheetJS/js-xlsx"
- },
- mock: {
- url: "https://cdn.staticfile.org/Mock.js/1.0.1-beta3/mock-min.js",
- title: "需要引入mock模拟数据包",
- version: "1.0.1-beta3",
- gihub: "https://github.com/Colingo/mock"
- },
- axios: {
- title: "需要引入axios发送数据包",
- url: "https://cdn.staticfile.org/axios/0.19.0-beta.1/axios.js",
- version: "0.19.0-beta.1",
- github: "https://github.com/axios/axios"
- }
- };
- e.a = {
- logs: function (t) {
- var e = o[t];
- i.a.capsule(t, e.title, "warning"), i.a.warning("版本:" + (e.version || "-")), i.a.warning("CDN:" + (e.url || "-")), i.a.warning("GITHUB:" + (e.github || "-"))
- }
- }
- }, function (t, e, n) {
- "use strict";
- n.d(e, "b", (function () {
- return r
- })), n.d(e, "a", (function () {
- return s
- }));
- var i = n(26), o = n.n(i), a = n(2);
- function r(t) {
- if (t && 0 === parseInt(t)) return !1;
- if (t instanceof Date || "boolean" == typeof t || "number" == typeof t) return !1;
- if (!(t instanceof Array)) {
- if (t instanceof Object) {
- for (var e in t = Object(a.d)(t), ["$parent"].forEach((function (e) {
- delete t[e]
- })), t) return !1;
- return !0
- }
- return "null" === t || null == t || "undefined" === t || void 0 === t || "" === t
- }
- return 0 === t.length
- }
- var s = function (t, e) {
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
- return new Promise((function (i, a) {
- new o.a(t).validate(e, n, (function (t) {
- t ? a(t) : i()
- }))
- }))
- }
- }, function (t, e, n) {
- "use strict";
- var i = n(13);
- e.a = {
- methods: {
- t: function () {
- for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
- return i.b.apply(this, e)
- }
- }
- }
- }, function (t, e, n) {
- "use strict";
- n.d(e, "a", (function () {
- return c
- })), n.d(e, "b", (function () {
- return d
- })), n.d(e, "h", (function () {
- return p
- })), n.d(e, "g", (function () {
- return h
- })), n.d(e, "e", (function () {
- return f
- })), n.d(e, "d", (function () {
- return m
- })), n.d(e, "f", (function () {
- return b
- }));
- var i = n(5), o = n(3), a = n(2), r = n(13);
- function s(t) {
- return function (t) {
- if (Array.isArray(t)) return l(t)
- }(t) || function (t) {
- if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t)
- }(t) || function (t, e) {
- if (!t) return;
- if ("string" == typeof t) return l(t, e);
- var n = Object.prototype.toString.call(t).slice(8, -1);
- "Object" === n && t.constructor && (n = t.constructor.name);
- if ("Map" === n || "Set" === n) return Array.from(t);
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return l(t, e)
- }(t) || function () {
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
- }()
- }
- function l(t, e) {
- (null == e || e > t.length) && (e = t.length);
- for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n];
- return i
- }
- var c = function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
- return t.forEach((function (e, n) {
- if (!Object(i.b)(e.cascaderItem)) {
- var o = s(e.cascaderItem), r = e.prop;
- t[n].cascader = s(o), o.forEach((function (e, n) {
- var i = Object(a.k)(t, e);
- -1 !== i && (i.parentProp = r, i.cascader = s(o).splice(n + 1), r = i.prop)
- }))
- }
- })), t
- }, u = 0, d = function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 12,
- n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
- n && (u = 0);
- var i = 24;
- return (u = u + (t.span || e) + (t.offset || 0)) === i ? u = 0 : u > i ? u = 0 + (t.span || e) + (t.offset || 0) : t.row && u !== i && (t.count = i - u, u = 0), t
- }, p = function (t) {
- var e = t.type, n = t.multiple, r = t.dataType, s = t.value, l = t.callback, c = t.separator,
- u = void 0 === c ? o.g : c, d = s;
- return (o.k.includes(e) && n || o.b.includes(e)) && (Array.isArray(d) ? l && l(!1) : Object(i.b)(d) ? d = [] : (d = (d + "").split(u) || [], l && l(!0)), d.forEach((function (t, e) {
- d[e] = Object(a.e)(t, r)
- })), o.a.includes(e) && Object(i.b)(d) && (d = [""])), d
- }, h = function (t) {
- var e = t.type, n = t.searchRange, i = e;
- if (["radio", "checkbox", "switch"].includes(e)) i = "select"; else if (o.c.includes(e)) {
- i = n ? e.includes("range") ? e : e + "range" : e.replace("range", "")
- } else ["textarea"].includes(e) && (i = "input");
- return i
- }, f = function (t, e) {
- var n = t || "input";
- return Object(i.b)(e) ? (o.a.includes(t) ? n = "array" : ["time", "timerange"].includes(t) ? n = "time" : o.c.includes(t) ? n = "date" : ["password", "textarea", "search"].includes(t) ? n = "input" : o.h.includes(t) && (n = "input-" + t), o.i + n) : e
- }, m = function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], e = {};
- return t.forEach((function (t) {
- o.b.includes(t.type) || o.k.includes(t.type) && t.multiple || t.range || "array" === t.dataType ? e[t.prop] = [] : ["rate", "slider", "number"].includes(t.type) || "number" === t.dataType ? e[t.prop] = void 0 : e[t.prop] = "", t.bind && (e = Object(a.b)(e, t.bind)), Object(i.b)(t.value) || (e[t.prop] = t.value)
- })), {tableForm: e}
- }, b = function (t, e) {
- var n = t.placeholder, a = t.label;
- if ("search" === e) {
- var s = t.searchPlaceholder;
- return Object(i.b)(s) ? a : s
- }
- return Object(i.b)(n) ? o.l.includes(t.type) ? "".concat(Object(r.b)("tip.select"), " ").concat(a) : "".concat(Object(r.b)("tip.input"), " ").concat(a) : n
- }
- }, function (t, e, n) {
- "use strict";
- e.a = {
- defaultColumn: [{label: "隐藏", prop: "hide"}, {label: "冻结", prop: "fixed"}, {
- label: "过滤",
- prop: "filters"
- }, {label: "筛选", prop: "screen"}, {label: "排序", prop: "sortable"}, {label: "宽度", prop: "width", width: "auto"}],
- clientHeight: document.documentElement.clientHeight,
- menuWidth: 240,
- menuFixed: "right",
- menuXsWidth: 100,
- menuAlign: "center",
- menuHeaderAlign: "center",
- headerAlign: "left",
- cancelBtnIcon: "el-icon-circle-close",
- viewBtnIcon: "el-icon-view",
- editBtnIcon: "el-icon-edit",
- copyBtnIcon: "el-icon-document-add",
- addBtnIcon: "el-icon-plus",
- printBtnIcon: "el-icon-printer",
- excelBtnIcon: "el-icon-download",
- delBtnIcon: "el-icon-delete",
- searchBtnIcon: "el-icon-search",
- emptyBtnIcon: "el-icon-delete",
- saveBtnIcon: "el-icon-circle-plus-outline",
- updateBtnIcon: "el-icon-circle-check",
- columnBtnIcon: "el-icon-s-operation",
- filterBtnIcon: "el-icon-tickets",
- refreshBtnIcon: "el-icon-refresh",
- viewBtn: !1,
- editBtn: !0,
- copyBtn: !1,
- cancelBtn: !0,
- addBtn: !0,
- addRowBtn: !1,
- printBtn: !1,
- excelBtn: !1,
- delBtn: !0,
- cellBtn: !1,
- dateBtn: !1,
- updateBtn: !0,
- saveBtn: !0,
- refreshBtn: !0,
- columnBtn: !0,
- filterBtn: !1,
- queryBtn: !0,
- menuBtn: !1,
- searchBtn: !0,
- clearBtn: !0,
- selectClearBtn: !0,
- searchShow: !0,
- tip: !0,
- dialogTop: "100",
- dialogHeight: "auto",
- dialogWidth: "60%",
- dialogDrag: !1,
- formFullscreen: !1,
- customClass: "",
- pageBackground: !0,
- simplePage: !1,
- page: !0,
- menu: !0,
- indexLabel: "#",
- indexWidth: 50,
- indexFixed: "left",
- selectionWidth: 50,
- selectionFixed: "left",
- expandWidth: 60,
- expandFixed: "left",
- sortableWidth: 50,
- sortableFixed: !1,
- filterMultiple: !0,
- calcHeight: 300,
- title: "表格标题",
- width: "100%",
- searchGutter: 20,
- searchLabelWidth: 80,
- searchSpan: 6
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i = Object.assign || function (t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e];
- for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i])
- }
- return t
- }, o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- };
- e.convertFieldsError = r, e.format = function () {
- for (var t = arguments.length, e = Array(t), n = 0; n < t; n++) e[n] = arguments[n];
- var i = 1, o = e[0], r = e.length;
- if ("function" == typeof o) return o.apply(null, e.slice(1));
- if ("string" == typeof o) {
- for (var s = String(o).replace(a, (function (t) {
- if ("%%" === t) return "%";
- if (i >= r) return t;
- switch (t) {
- case"%s":
- return String(e[i++]);
- case"%d":
- return Number(e[i++]);
- case"%j":
- try {
- return JSON.stringify(e[i++])
- } catch (t) {
- return "[Circular]"
- }
- break;
- default:
- return t
- }
- })), l = e[i]; i < r; l = e[++i]) s += " " + l;
- return s
- }
- return o
- }, e.isEmptyValue = function (t, e) {
- if (null == t) return !0;
- if ("array" === e && Array.isArray(t) && !t.length) return !0;
- if (function (t) {
- return "string" === t || "url" === t || "hex" === t || "email" === t || "pattern" === t
- }(e) && "string" == typeof t && !t) return !0;
- return !1
- }, e.isEmptyObject = function (t) {
- return 0 === Object.keys(t).length
- }, e.asyncMap = function (t, e, n, i) {
- if (e.first) {
- return s(function (t) {
- var e = [];
- return Object.keys(t).forEach((function (n) {
- e.push.apply(e, t[n])
- })), e
- }(t), n, i)
- }
- var o = e.firstFields || [];
- !0 === o && (o = Object.keys(t));
- var a = Object.keys(t), l = a.length, c = 0, u = [], d = new Promise((function (e, d) {
- var p = function (t) {
- if (u.push.apply(u, t), ++c === l) return i(u), u.length ? d({errors: u, fields: r(u)}) : e()
- };
- a.forEach((function (e) {
- var i = t[e];
- -1 !== o.indexOf(e) ? s(i, n, p) : function (t, e, n) {
- var i = [], o = 0, a = t.length;
- function r(t) {
- i.push.apply(i, t), ++o === a && n(i)
- }
- t.forEach((function (t) {
- e(t, r)
- }))
- }(i, n, p)
- }))
- }));
- return d.catch((function (t) {
- return t
- })), d
- }, e.complementError = function (t) {
- return function (e) {
- return e && e.message ? (e.field = e.field || t.fullField, e) : {
- message: "function" == typeof e ? e() : e,
- field: e.field || t.fullField
- }
- }
- }, e.deepMerge = function (t, e) {
- if (e) for (var n in e) if (e.hasOwnProperty(n)) {
- var a = e[n];
- "object" === (void 0 === a ? "undefined" : o(a)) && "object" === o(t[n]) ? t[n] = i({}, t[n], a) : t[n] = a
- }
- return t
- };
- var a = /%[sdj%]/g;
- e.warning = function () {
- };
- function r(t) {
- if (!t || !t.length) return null;
- var e = {};
- return t.forEach((function (t) {
- var n = t.field;
- e[n] = e[n] || [], e[n].push(t)
- })), e
- }
- function s(t, e, n) {
- var i = 0, o = t.length;
- !function a(r) {
- if (r && r.length) n(r); else {
- var s = i;
- i += 1, s < o ? e(t[s], a) : n([])
- }
- }([])
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i = c(n(24)), o = c(n(43)), a = c(n(44)), r = c(n(45)), s = c(n(46)), l = c(n(47));
- function c(t) {
- return t && t.__esModule ? t : {default: t}
- }
- e.default = {
- required: i.default,
- whitespace: o.default,
- type: a.default,
- range: r.default,
- enum: s.default,
- pattern: l.default
- }
- }, function (t, e, n) {
- "use strict";
- n.d(e, "a", (function () {
- return r
- })), n.d(e, "b", (function () {
- return s
- })), n.d(e, "c", (function () {
- return l
- })), n.d(e, "d", (function () {
- return c
- }));
- var i = n(4), o = n(5), a = n(2), r = function (t, e) {
- return new Promise((function (n, i) {
- var a = [], r = [], s = {};
- t.forEach((function (t) {
- t.parentProp && a.push(t)
- })), e.forEach((function (t, e) {
- a.forEach((function (n) {
- !0 !== n.hide && !1 !== n.dicFlag && r.push(new Promise((function (i) {
- Object(o.b)(t[n.parentProp]) ? i({
- prop: n.prop,
- data: [],
- index: e
- }) : n.dicUrl && c(Object.assign({url: "".concat(n.dicUrl.replace("{{key}}", t[n.parentProp]))}, {
- props: n.props,
- method: n.dicMethod,
- formatter: n.dicFormatter,
- query: n.dicQuery
- })).then((function (t) {
- i({prop: n.prop, data: t, index: e})
- }))
- })))
- }))
- })), Promise.all(r).then((function (t) {
- t.forEach((function (t) {
- Object(o.b)(s[t.index]) && (s[t.index] = {}), s[t.index][t.prop] = t.data
- })), n(s)
- }))
- }))
- }, s = function (t) {
- var e = [];
- return new Promise((function (n, r) {
- var s, l, u, d = function (t) {
- var e = t.column || [], n = [], i = {}, o = [];
- return e.forEach((function (t) {
- var e = t.dicData, a = t.dicUrl, r = t.prop, s = t.parentProp;
- o = o.concat(t.cascaderItem || []), Array.isArray(e) && (i[r] = e), !1 === t.dicFlag || o.includes(r) || a && !s && n.push({
- url: a,
- name: r,
- method: t.dicMethod,
- formatter: t.dicFormatter,
- props: t.props,
- dataType: t.dataType,
- resKey: (t.props || {}).res,
- query: t.dicQuery
- })
- })), {ajaxdic: n, locationdic: i}
- }(t);
- e = d.ajaxdic, window.axios || Object(o.b)(e) || (i.a.logs("axios"), n()), (s = e, l = {}, u = [], new Promise((function (t) {
- s.forEach((function (t) {
- u.push(new Promise((function (e) {
- c(Object.assign(t, {url: "".concat(t.url.replace("{{key}}", ""))})).then((function (n) {
- n = Object(a.f)(n, t.props, t.dataType), e(n)
- })).catch((function () {
- e([])
- }))
- })))
- })), Promise.all(u).then((function (e) {
- s.forEach((function (t, n) {
- l[t.name] = e[n]
- })), t(l)
- }))
- }))).then((function (t) {
- n(t)
- })).catch((function (t) {
- r(t)
- }))
- }))
- }, l = function (t) {
- var e = {}, n = t.dicData || {};
- return t.column.forEach((function (t) {
- t.dicData && (e[t.prop] = t.dicData)
- })), Object.assign(n, e)
- };
- var c = function (t) {
- var e = t.url, n = t.query, o = t.method, r = t.resKey, s = t.props, l = t.formatter, c = t.value,
- u = void 0 === c ? "" : c, d = t.column, p = t.form, h = void 0 === p ? {} : p;
- d && (e = d.dicUrl, o = d.dicMethod, n = d.dicQuery, l = d.dicFormatter, s = d.props);
- e = e || "";
- var f = {};
- return "post" === o ? Object.keys(n).forEach((function (t) {
- var e = n[t] + "", i = h[e.replace(/\{{|}}/g, "")];
- e.match(/\{{|}}/g) ? f[t] = e.replace(e, -1 !== e.indexOf("key") ? u : i) : f[t] = e
- })) : (e.match(/[^\{\}]+(?=\})/g) || []).forEach((function (t) {
- var n = "{{".concat(t, "}}"), i = h[t];
- e = "key" === t ? e.replace(n, u) : e.replace(n, i)
- })), s && (r = (s || {}).res || r), new Promise((function (t) {
- var s = function (e) {
- var n = [];
- n = "function" == typeof l ? l(e.data) : Object(a.n)(e.data, r), t(n)
- };
- window.axios || (i.a.logs("axios"), t([])), "post" === o ? window.axios.post(e, f).then((function (t) {
- s(t)
- })).catch((function () {
- return [t([])]
- })) : window.axios.get(e, {params: n}).then((function (t) {
- s(t)
- })).catch((function () {
- return [t([])]
- }))
- }))
- }
- }, function (t, e, n) {
- "use strict";
- function i(t, e) {
- var n = e.value;
- t.style.display = !1 === n ? "none" : ""
- }
- e.a = {
- bind: function (t, e) {
- i(t, e)
- }, update: function (t, e) {
- i(t, e)
- }
- }
- }, function (t, e, n) {
- "use strict";
- n.d(e, "b", (function () {
- return f
- }));
- var i = {
- common: {condition: "条件", display: "显示", hide: "隐藏"},
- tip: {select: "请选择", input: "请输入"},
- upload: {upload: "点击上传", tip: "将文件拖到此处,或"},
- date: {start: "开始日期", end: "结束日期", t: "今日", y: "昨日", n: "近7天", a: "全部"},
- form: {printBtn: "打 印", mockBtn: "模 拟", submit: "提 交", empty: "清 空"},
- crud: {
- filter: {addBtn: "新增条件", clearBtn: "清空数据", resetBtn: "清空条件", cancelBtn: "取 消", submitBtn: "确 定"},
- tipStartTitle: "当前表格已选择",
- tipEndTitle: "项",
- editTitle: "编 辑",
- copyTitle: "复 制",
- addTitle: "新 增",
- viewTitle: "查 看",
- filterTitle: "过滤条件",
- showTitle: "列显隐",
- menu: "操作",
- addBtn: "新 增",
- show: "显 示",
- hide: "隐 藏",
- showBtn: "显 隐",
- filterBtn: "过 滤",
- refreshBtn: "刷 新",
- printBtn: "打 印",
- excelBtn: "导 出",
- updateBtn: "修 改",
- cancelBtn: "取 消",
- searchBtn: "搜 索",
- emptyBtn: "清 空",
- menuBtn: "功 能",
- saveBtn: "保 存",
- viewBtn: "查 看",
- editBtn: "编 辑",
- copyBtn: "复 制",
- delBtn: "删 除"
- }
- }, o = n(27), a = n.n(o), r = n(2);
- function s(t) {
- return (s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- })(t)
- }
- var l = /(%|)\{([0-9a-zA-Z_]+)\}/g, c = window.Vue, u = function () {
- for (var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++) n[i - 1] = arguments[i];
- return 1 === n.length && "object" === s(n[0]) && (n = n[0]), n && n.hasOwnProperty || (n = {}), t.replace(l, (function (e, i, o, a) {
- var s;
- return "{" === t[a - 1] && "}" === t[a + e.length] ? o : null == (s = Object(r.q)(n, o) ? n[o] : null) ? "" : s
- }))
- }, d = i, p = !1, h = function () {
- var t = Object.getPrototypeOf(this || c || {}).$t;
- if ("function" == typeof t && (c || {}).locale) return p || (p = !0, c.locale(c.config.lang, a()(d, c.locale(c.config.lang) || {}, {clone: !0}))), t.apply(this, arguments)
- }, f = function (t, e) {
- var n = h.apply(this, arguments);
- if (null != n) return n;
- for (var i = t.split("."), o = d, a = 0, r = i.length; a < r; a++) {
- var s = i[a];
- if (n = o[s], a === r - 1) return u(n, e);
- if (!n) return "";
- o = n
- }
- return ""
- }, m = {
- zh: i,
- en: {
- common: {condition: "condition", display: "display", hide: "hide"},
- tip: {select: "please select", input: "please input"},
- upload: {upload: "upload", tip: "Drag files here,/"},
- date: {start: "Start date", end: "End date", t: "today", y: "yesterday", n: "nearly 7", a: "whole"},
- form: {printBtn: "print", mockBtn: "mock", submit: "submit", empty: "empty"},
- crud: {
- filter: {addBtn: "add", clearBtn: "clear", resetBtn: "reset", cancelBtn: "cancel", submitBtn: "submit"},
- tipStartTitle: "Currently selected",
- tipEndTitle: "term",
- editTitle: "edit",
- copyTitle: "copy",
- addTitle: "add",
- viewTitle: "view",
- filterTitle: "filter",
- showTitle: "showTitle",
- menu: "menu",
- addBtn: "add",
- show: "show",
- hide: "hide",
- showBtn: "show",
- filterBtn: "filter",
- refreshBtn: "refresh",
- printBtn: "print",
- excelBtn: "excel",
- updateBtn: "update",
- cancelBtn: "cancel",
- searchBtn: "search",
- emptyBtn: "empty",
- menuBtn: "menu",
- saveBtn: "save",
- viewBtn: "view",
- editBtn: "edit",
- copyBtn: "copy",
- delBtn: "del"
- }
- }
- };
- e.a = {
- use: function (t) {
- d = m[t || "zh"]
- }, t: f, i18n: function (t) {
- h = t || h
- }, locale: m
- }
- }, function (t, e, n) {
- "use strict";
- e.a = {
- data: function () {
- return {slotList: {}}
- }, mounted: function () {
- var t = this;
- setTimeout((function () {
- return t.getSlotList()
- }))
- }, methods: {
- getSlotName: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
- e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "D",
- n = {F: "Form", H: "Header", E: "Error", L: "Label", S: "Search", T: "Type", D: ""};
- return t.prop + n[e]
- }, getSlotList: function () {
- var t = this;
- this.slotList = {}, Object.keys(this.$scopedSlots).forEach((function (e) {
- t.$set(t.slotList, e, !0)
- }))
- }
- }
- }
- }, function (t, e, n) {
- "use strict";
- var i, o = n(7);
- function a(t, e, n) {
- return e in t ? Object.defineProperty(t, e, {
- value: n,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = n, t
- }
- var r = {
- name: "form-temp",
- mixins: [n(14).a],
- props: (i = {
- value: {},
- uploadBefore: Function,
- uploadDelete: Function,
- uploadAfter: Function,
- uploadPreview: Function,
- uploadError: Function,
- uploadExceed: Function,
- columnSlot: {
- type: Array, default: function () {
- return []
- }
- },
- props: {type: Object},
- clearable: {type: Boolean},
- enter: {type: Boolean, default: !1},
- type: {type: String},
- propsHttp: {
- type: Object, default: function () {
- return {}
- }
- }
- }, a(i, "props", {type: Object}), a(i, "dic", {type: Array}), a(i, "placeholder", {type: String}), a(i, "size", {type: String}), a(i, "disabled", {type: Boolean}), a(i, "readonly", {type: Boolean}), a(i, "column", {
- type: Object,
- default: function () {
- return {}
- }
- }), i),
- data: function () {
- return {text: void 0}
- },
- computed: {
- params: function () {
- return this.column.params || {}
- }, event: function () {
- return this.column.event || {}
- }
- },
- watch: {
- value: {
- handler: function (t) {
- this.text = t
- }
- }
- },
- created: function () {
- this.text = this.value
- },
- methods: {
- getComponent: o.e, getPlaceholder: o.f, enterChange: function () {
- this.enter && this.$emit("enter")
- }, handleChange: function (t) {
- this.$emit("input", t), this.$emit("change", t)
- }
- }
- }, s = n(0), l = Object(s.a)(r, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n(t.getComponent(t.column.type, t.column.component), t._g(t._b({
- ref: "temp",
- tag: "component",
- attrs: {
- column: Object.assign(t.column, t.params),
- dic: t.dic,
- disabled: t.column.disabled || t.disabled,
- readonly: t.column.readonly || t.readonly,
- placeholder: t.getPlaceholder(t.column),
- props: t.column.props || t.props,
- propsHttp: t.column.propsHttp || t.propsHttp,
- size: t.column.size || t.size,
- type: t.type || t.column.type,
- "column-slot": t.columnSlot
- },
- on: {change: t.handleChange},
- nativeOn: {
- keyup: function (e) {
- return !e.type.indexOf("key") && t._k(e.keyCode, "enter", 13, e.key, "Enter") ? null : t.enterChange(e)
- }
- },
- scopedSlots: t._u([t._l(t.$scopedSlots[t.getSlotName(t.column, "T")] ? [t.column] : [], (function (e) {
- return {
- key: "default", fn: function (n) {
- return [t._t(t.getSlotName(e, "T"), null, null, n)]
- }
- }
- })), t._l(t.columnSlot, (function (e) {
- return {
- key: e.prop, fn: function (n) {
- return [t._t(e.prop, null, null, n)]
- }
- }
- }))], null, !0),
- model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- }, "component", Object.assign(t.column, t.$uploadFun(t.column)), !1), t.event), [t.params.html ? n("span", {domProps: {innerHTML: t._s(t.params.html)}}) : t._e()])
- }), [], !1, null, null, null);
- e.a = l.exports
- }, function (t, e, n) {
- "use strict";
- n.d(e, "b", (function () {
- return i
- })), n.d(e, "a", (function () {
- return o
- }));
- var i = function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Date;
- return "number" == typeof t ? t = new Date(t) : "string" == typeof t && (t = new Date(t.replace(/-/g, "/").replace(/\./g, "/"))), "日一二三四五六".charAt(t.getDay())
- }, o = function (t, e) {
- var n = {
- "M+": e.getMonth() + 1,
- "d+": e.getDate(),
- "h+": e.getHours(),
- "m+": e.getMinutes(),
- "s+": e.getSeconds(),
- "q+": Math.floor((e.getMonth() + 3) / 3),
- S: e.getMilliseconds()
- };
- for (var i in /(y+)/.test(t) && (t = t.replace(RegExp.$1, (e.getFullYear() + "").substr(4 - RegExp.$1.length))), n) new RegExp("(" + i + ")").test(t) && (t = t.replace(RegExp.$1, 1 === RegExp.$1.length ? n[i] : ("00" + n[i]).substr(("" + n[i]).length)));
- return t
- }
- }, function (t, e, n) {
- "use strict";
- function i(t) {
- return function (t) {
- if (Array.isArray(t)) return o(t)
- }(t) || function (t) {
- if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t)
- }(t) || function (t, e) {
- if (!t) return;
- if ("string" == typeof t) return o(t, e);
- var n = Object.prototype.toString.call(t).slice(8, -1);
- "Object" === n && t.constructor && (n = t.constructor.name);
- if ("Map" === n || "Set" === n) return Array.from(t);
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return o(t, e)
- }(t) || function () {
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
- }()
- }
- function o(t, e) {
- (null == e || e > t.length) && (e = t.length);
- for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n];
- return i
- }
- var a = {};
- function r() {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "default", e = "";
- switch (t) {
- case"default":
- e = "#35495E";
- break;
- case"primary":
- e = "#3488ff";
- break;
- case"success":
- e = "#43B883";
- break;
- case"warning":
- e = "#e6a23c";
- break;
- case"danger":
- e = "#f56c6c"
- }
- return e
- }
- a.capsule = function (t, e) {
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "primary";
- console.log("%c ".concat(t, " %c ").concat(e, " %c"), "background:#35495E; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;", "background:".concat(r(n), "; padding: 1px; border-radius: 0 3px 3px 0; color: #fff;"), "background:transparent")
- }, a.colorful = function (t) {
- var e;
- (e = console).log.apply(e, ["%c".concat(t.map((function (t) {
- return t.text || ""
- })).join("%c"))].concat(i(t.map((function (t) {
- return "color: ".concat(r(t.type), ";")
- })))))
- }, a.default = function (t) {
- a.colorful([{text: t}])
- }, a.primary = function (t) {
- a.colorful([{text: t, type: "primary"}])
- }, a.success = function (t) {
- a.colorful([{text: t, type: "success"}])
- }, a.warning = function (t) {
- a.colorful([{text: t, type: "warning"}])
- }, a.danger = function (t) {
- a.colorful([{text: t, type: "danger"}])
- }, window.$Log = a, e.a = a
- }, function (t, e, n) {
- "use strict";
- var i = n(11), o = n(14);
- e.a = function () {
- return {
- mixins: [o.a], props: {
- option: {
- type: Object, required: !0, default: function () {
- return {}
- }
- }
- }, watch: {
- option: {
- handler: function () {
- this.init(!1)
- }, deep: !0
- }
- }, data: function () {
- return {DIC: {}, cascaderDIC: {}, tableOption: {}, isMobile: ""}
- }, created: function () {
- this.init()
- }, computed: {
- resultOption: function () {
- return Object.assign(this.deepClone(this.tableOption), {column: this.propOption})
- }, rowKey: function () {
- return this.tableOption.rowKey || "id"
- }, formRules: function () {
- var t = {};
- return this.propOption.forEach((function (e) {
- e.rules && !1 !== e.display && (t[e.prop] = e.rules)
- })), t
- }, isMediumSize: function () {
- return this.controlSize
- }, controlSize: function () {
- return this.tableOption.size || this.$AVUE.size || "small"
- }
- }, methods: {
- init: function (t) {
- this.tableOption = this.option, this.getIsMobile(), this.handleLocalDic(), !1 !== t && this.handleLoadDic()
- }, dicInit: function (t) {
- "cascader" === t ? this.handleLoadCascaderDic() : this.handleLoadDic()
- }, getIsMobile: function () {
- this.isMobile = window.document.body.clientWidth <= 768
- }, updateDic: function (t, e) {
- var n = this, o = this.findObject(this.propOption, t);
- this.validatenull(e) && this.validatenull(t) ? this.handleLoadDic() : this.validatenull(e) && !this.validatenull(o.dicUrl) ? Object(i.d)({column: o}).then((function (e) {
- n.$set(n.DIC, t, e)
- })) : this.$set(this.DIC, t, e)
- }, handleSetDic: function (t) {
- var e = this, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- Object.keys(n).forEach((function (i) {
- e.$set(t, i, n[i])
- })), this.forEachLabel && this.forEachLabel()
- }, handleLocalDic: function () {
- var t = Object(i.c)(this.resultOption);
- this.handleSetDic(this.DIC, t)
- }, handleLoadDic: function () {
- var t = this;
- Object(i.b)(this.resultOption).then((function (e) {
- return t.handleSetDic(t.DIC, e)
- }))
- }, handleLoadCascaderDic: function () {
- var t = this;
- Object(i.a)(this.propOption, this.data).then((function (e) {
- return t.handleSetDic(t.cascaderDIC, e)
- }))
- }
- }
- }
- }
- }, function (t, e, n) {
- t.exports = function () {
- "use strict";
- var t = "millisecond", e = "second", n = "minute", i = "hour", o = "day", a = "week", r = "month", s = "quarter",
- l = "year", c = "date",
- u = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,
- d = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, p = {
- name: "en",
- weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
- months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_")
- }, h = function (t, e, n) {
- var i = String(t);
- return !i || i.length >= e ? t : "" + Array(e + 1 - i.length).join(n) + t
- }, f = {
- s: h, z: function (t) {
- var e = -t.utcOffset(), n = Math.abs(e), i = Math.floor(n / 60), o = n % 60;
- return (e <= 0 ? "+" : "-") + h(i, 2, "0") + ":" + h(o, 2, "0")
- }, m: function t(e, n) {
- if (e.date() < n.date()) return -t(n, e);
- var i = 12 * (n.year() - e.year()) + (n.month() - e.month()), o = e.clone().add(i, r), a = n - o < 0,
- s = e.clone().add(i + (a ? -1 : 1), r);
- return +(-(i + (n - o) / (a ? o - s : s - o)) || 0)
- }, a: function (t) {
- return t < 0 ? Math.ceil(t) || 0 : Math.floor(t)
- }, p: function (u) {
- return {
- M: r,
- y: l,
- w: a,
- d: o,
- D: c,
- h: i,
- m: n,
- s: e,
- ms: t,
- Q: s
- }[u] || String(u || "").toLowerCase().replace(/s$/, "")
- }, u: function (t) {
- return void 0 === t
- }
- }, m = "en", b = {};
- b[m] = p;
- var v = function (t) {
- return t instanceof x
- }, y = function (t, e, n) {
- var i;
- if (!t) return m;
- if ("string" == typeof t) b[t] && (i = t), e && (b[t] = e, i = t); else {
- var o = t.name;
- b[o] = t, i = o
- }
- return !n && i && (m = i), i || !n && m
- }, g = function (t, e) {
- if (v(t)) return t.clone();
- var n = "object" == typeof e ? e : {};
- return n.date = t, n.args = arguments, new x(n)
- }, _ = f;
- _.l = y, _.i = v, _.w = function (t, e) {
- return g(t, {locale: e.$L, utc: e.$u, x: e.$x, $offset: e.$offset})
- };
- var x = function () {
- function p(t) {
- this.$L = y(t.locale, null, !0), this.parse(t)
- }
- var h = p.prototype;
- return h.parse = function (t) {
- this.$d = function (t) {
- var e = t.date, n = t.utc;
- if (null === e) return new Date(NaN);
- if (_.u(e)) return new Date;
- if (e instanceof Date) return new Date(e);
- if ("string" == typeof e && !/Z$/i.test(e)) {
- var i = e.match(u);
- if (i) {
- var o = i[2] - 1 || 0, a = (i[7] || "0").substring(0, 3);
- return n ? new Date(Date.UTC(i[1], o, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, a)) : new Date(i[1], o, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, a)
- }
- }
- return new Date(e)
- }(t), this.$x = t.x || {}, this.init()
- }, h.init = function () {
- var t = this.$d;
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds()
- }, h.$utils = function () {
- return _
- }, h.isValid = function () {
- return !("Invalid Date" === this.$d.toString())
- }, h.isSame = function (t, e) {
- var n = g(t);
- return this.startOf(e) <= n && n <= this.endOf(e)
- }, h.isAfter = function (t, e) {
- return g(t) < this.startOf(e)
- }, h.isBefore = function (t, e) {
- return this.endOf(e) < g(t)
- }, h.$g = function (t, e, n) {
- return _.u(t) ? this[e] : this.set(n, t)
- }, h.unix = function () {
- return Math.floor(this.valueOf() / 1e3)
- }, h.valueOf = function () {
- return this.$d.getTime()
- }, h.startOf = function (t, s) {
- var u = this, d = !!_.u(s) || s, p = _.p(t), h = function (t, e) {
- var n = _.w(u.$u ? Date.UTC(u.$y, e, t) : new Date(u.$y, e, t), u);
- return d ? n : n.endOf(o)
- }, f = function (t, e) {
- return _.w(u.toDate()[t].apply(u.toDate("s"), (d ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), u)
- }, m = this.$W, b = this.$M, v = this.$D, y = "set" + (this.$u ? "UTC" : "");
- switch (p) {
- case l:
- return d ? h(1, 0) : h(31, 11);
- case r:
- return d ? h(1, b) : h(0, b + 1);
- case a:
- var g = this.$locale().weekStart || 0, x = (m < g ? m + 7 : m) - g;
- return h(d ? v - x : v + (6 - x), b);
- case o:
- case c:
- return f(y + "Hours", 0);
- case i:
- return f(y + "Minutes", 1);
- case n:
- return f(y + "Seconds", 2);
- case e:
- return f(y + "Milliseconds", 3);
- default:
- return this.clone()
- }
- }, h.endOf = function (t) {
- return this.startOf(t, !1)
- }, h.$set = function (a, s) {
- var u, d = _.p(a), p = "set" + (this.$u ? "UTC" : ""),
- h = (u = {}, u[o] = p + "Date", u[c] = p + "Date", u[r] = p + "Month", u[l] = p + "FullYear", u[i] = p + "Hours", u[n] = p + "Minutes", u[e] = p + "Seconds", u[t] = p + "Milliseconds", u)[d],
- f = d === o ? this.$D + (s - this.$W) : s;
- if (d === r || d === l) {
- var m = this.clone().set(c, 1);
- m.$d[h](f), m.init(), this.$d = m.set(c, Math.min(this.$D, m.daysInMonth())).$d
- } else h && this.$d[h](f);
- return this.init(), this
- }, h.set = function (t, e) {
- return this.clone().$set(t, e)
- }, h.get = function (t) {
- return this[_.p(t)]()
- }, h.add = function (t, s) {
- var c, u = this;
- t = Number(t);
- var d = _.p(s), p = function (e) {
- var n = g(u);
- return _.w(n.date(n.date() + Math.round(e * t)), u)
- };
- if (d === r) return this.set(r, this.$M + t);
- if (d === l) return this.set(l, this.$y + t);
- if (d === o) return p(1);
- if (d === a) return p(7);
- var h = (c = {}, c[n] = 6e4, c[i] = 36e5, c[e] = 1e3, c)[d] || 1, f = this.$d.getTime() + t * h;
- return _.w(f, this)
- }, h.subtract = function (t, e) {
- return this.add(-1 * t, e)
- }, h.format = function (t) {
- var e = this;
- if (!this.isValid()) return "Invalid Date";
- var n = t || "YYYY-MM-DDTHH:mm:ssZ", i = _.z(this), o = this.$locale(), a = this.$H, r = this.$m, s = this.$M,
- l = o.weekdays, c = o.months, u = function (t, i, o, a) {
- return t && (t[i] || t(e, n)) || o[i].substr(0, a)
- }, p = function (t) {
- return _.s(a % 12 || 12, t, "0")
- }, h = o.meridiem || function (t, e, n) {
- var i = t < 12 ? "AM" : "PM";
- return n ? i.toLowerCase() : i
- }, f = {
- YY: String(this.$y).slice(-2),
- YYYY: this.$y,
- M: s + 1,
- MM: _.s(s + 1, 2, "0"),
- MMM: u(o.monthsShort, s, c, 3),
- MMMM: u(c, s),
- D: this.$D,
- DD: _.s(this.$D, 2, "0"),
- d: String(this.$W),
- dd: u(o.weekdaysMin, this.$W, l, 2),
- ddd: u(o.weekdaysShort, this.$W, l, 3),
- dddd: l[this.$W],
- H: String(a),
- HH: _.s(a, 2, "0"),
- h: p(1),
- hh: p(2),
- a: h(a, r, !0),
- A: h(a, r, !1),
- m: String(r),
- mm: _.s(r, 2, "0"),
- s: String(this.$s),
- ss: _.s(this.$s, 2, "0"),
- SSS: _.s(this.$ms, 3, "0"),
- Z: i
- };
- return n.replace(d, (function (t, e) {
- return e || f[t] || i.replace(":", "")
- }))
- }, h.utcOffset = function () {
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15)
- }, h.diff = function (t, c, u) {
- var d, p = _.p(c), h = g(t), f = 6e4 * (h.utcOffset() - this.utcOffset()), m = this - h, b = _.m(this, h);
- return b = (d = {}, d[l] = b / 12, d[r] = b, d[s] = b / 3, d[a] = (m - f) / 6048e5, d[o] = (m - f) / 864e5, d[i] = m / 36e5, d[n] = m / 6e4, d[e] = m / 1e3, d)[p] || m, u ? b : _.a(b)
- }, h.daysInMonth = function () {
- return this.endOf(r).$D
- }, h.$locale = function () {
- return b[this.$L]
- }, h.locale = function (t, e) {
- if (!t) return this.$L;
- var n = this.clone(), i = y(t, e, !0);
- return i && (n.$L = i), n
- }, h.clone = function () {
- return _.w(this.$d, this)
- }, h.toDate = function () {
- return new Date(this.valueOf())
- }, h.toJSON = function () {
- return this.isValid() ? this.toISOString() : null
- }, h.toISOString = function () {
- return this.$d.toISOString()
- }, h.toString = function () {
- return this.$d.toUTCString()
- }, p
- }(), w = x.prototype;
- return g.prototype = w, [["$ms", t], ["$s", e], ["$m", n], ["$H", i], ["$W", o], ["$M", r], ["$y", l], ["$D", c]].forEach((function (t) {
- w[t[1]] = function (e) {
- return this.$g(e, t[0], t[1])
- }
- })), g.extend = function (t, e) {
- return t.$i || (t(e, x, g), t.$i = !0), g
- }, g.locale = y, g.isDayjs = v, g.unix = function (t) {
- return g(1e3 * t)
- }, g.en = b[m], g.Ls = b, g.p = {}, g
- }()
- }, function (t, e, n) {
- "use strict";
- n.d(e, "a", (function () {
- return l
- }));
- var i = n(5), o = n(2), a = n(3), r = n(19), s = n.n(r), l = function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
- e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
- n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : [], r = t[e.prop], l = e.type,
- c = e.separator;
- if (Object(i.b)(r) && (r = ""), !["string", "number"].includes(e.dataType) || Array.isArray(r) || Object(i.b)(r) || (r = (r + "").split(c || a.g), "number" === e.dataType && (r = Object(o.x)(r))), ["array"].includes(l) ? r = Array.isArray(r) ? r.join(c || a.f) : r.split(c || a.g).join(c || a.f) : ["password"].includes(l) ? r = Object(o.o)(r, "*") : ["color"].includes(l) ? r = '<i class="avue-crud__color" style="background-color:'.concat(r, '"></i>') : ["icon"].includes(l) && (r = '<i class="avue-crud__icon '.concat(r, '" ></i>')), a.c.includes(l) && e.format && !Object(i.b)(r)) {
- var u = e.format.replace("dd", "DD").replace("yyyy", "YYYY");
- if (-1 !== l.indexOf("range")) {
- var d = r[0], p = r[1];
- r = [s()(d).format(u), s()(p).format(u)].join(e.separator || "~")
- } else r = s()(r).format(u)
- }
- return e.bind && (r = Object(o.l)(t, e.bind)), Object(i.b)(n) || (r = Object(o.j)(n, r, e.props, ["cascader", "tree"].includes(e.type), e)), e.formatter && "function" == typeof e.formatter && (r = e.formatter(t, t[e.prop], r, e)), r
- }
- }, function (module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1),
- core_packages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4),
- _core_directive_permission__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12),
- _core_common_init_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18),
- _table_page__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35),
- _header_search__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(36),
- _core_common_locale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6),
- _column__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30),
- _header_menu__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(37),
- _dialog_column__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(33),
- _dialog_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31),
- _dialog_form__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(39),
- _column_menu__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(32),
- _column_default__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(38),
- _config_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(8),
- _eval__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(23),
- core_dataformat__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(7);
- function _createForOfIteratorHelper(t, e) {
- var n;
- if ("undefined" == typeof Symbol || null == t[Symbol.iterator]) {
- if (Array.isArray(t) || (n = _unsupportedIterableToArray(t)) || e && t && "number" == typeof t.length) {
- n && (t = n);
- var i = 0, o = function () {
- };
- return {
- s: o, n: function () {
- return i >= t.length ? {done: !0} : {done: !1, value: t[i++]}
- }, e: function (t) {
- throw t
- }, f: o
- }
- }
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
- }
- var a, r = !0, s = !1;
- return {
- s: function () {
- n = t[Symbol.iterator]()
- }, n: function () {
- var t = n.next();
- return r = t.done, t
- }, e: function (t) {
- s = !0, a = t
- }, f: function () {
- try {
- r || null == n.return || n.return()
- } finally {
- if (s) throw a
- }
- }
- }
- }
- function _unsupportedIterableToArray(t, e) {
- if (t) {
- if ("string" == typeof t) return _arrayLikeToArray(t, e);
- var n = Object.prototype.toString.call(t).slice(8, -1);
- return "Object" === n && t.constructor && (n = t.constructor.name), "Map" === n || "Set" === n ? Array.from(t) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(t, e) : void 0
- }
- }
- function _arrayLikeToArray(t, e) {
- (null == e || e > t.length) && (e = t.length);
- for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n];
- return i
- }
- __webpack_exports__.a = Object(core_create__WEBPACK_IMPORTED_MODULE_0__.a)({
- name: "crud",
- mixins: [Object(_core_common_init_js__WEBPACK_IMPORTED_MODULE_3__.a)(), _core_common_locale__WEBPACK_IMPORTED_MODULE_6__.a],
- directives: {permission: _core_directive_permission__WEBPACK_IMPORTED_MODULE_2__.a},
- provide: function () {
- return {crud: this}
- },
- components: {
- column: _column__WEBPACK_IMPORTED_MODULE_7__.a,
- columnDefault: _column_default__WEBPACK_IMPORTED_MODULE_13__.a,
- columnMenu: _column_menu__WEBPACK_IMPORTED_MODULE_12__.a,
- tablePage: _table_page__WEBPACK_IMPORTED_MODULE_4__.a,
- headerSearch: _header_search__WEBPACK_IMPORTED_MODULE_5__.a,
- headerMenu: _header_menu__WEBPACK_IMPORTED_MODULE_8__.a,
- dialogColumn: _dialog_column__WEBPACK_IMPORTED_MODULE_9__.a,
- dialogFilter: _dialog_filter__WEBPACK_IMPORTED_MODULE_10__.a,
- dialogForm: _dialog_form__WEBPACK_IMPORTED_MODULE_11__.a
- },
- data: function () {
- return {
- reload: !0,
- isChild: !1,
- config: _config_js__WEBPACK_IMPORTED_MODULE_14__.a,
- list: [],
- tableForm: {},
- tableHeight: void 0,
- tableIndex: -1,
- tableSelect: [],
- formIndexList: [],
- sumsList: [],
- cascaderDicList: {},
- formCascaderList: {},
- btnDisabledList: {},
- btnDisabled: !1,
- defaultColumn: _config_js__WEBPACK_IMPORTED_MODULE_14__.a.defaultColumn,
- default: {},
- defaultBind: {}
- }
- },
- created: function () {
- this.dataInit(), this.columnInit()
- },
- mounted: function () {
- var t = this;
- this.refreshTable((function () {
- t.$refs.headerSearch.init(), t.getTableHeight()
- }))
- },
- computed: {
- treeProps: function () {
- return this.tableOption.treeProps || {}
- }, isAutoHeight: function () {
- return "auto" === this.tableOption.height
- }, cellForm: function cellForm() {
- var _this2 = this, list = this.list;
- return list = list.filter((function (ele) {
- var result = [];
- for (var o in _this2.default) _this2.validatenull(_this2.default[o].screenValue) || result.push(-1 !== ele[o].indexOf(_this2.default[o].screenValue));
- return !!_this2.validatenull(result) || eval(result.join("&&"))
- })), {list: list}
- }, formSlot: function () {
- var t = this;
- return this.columnFormOption.filter((function (e) {
- return t.$scopedSlots["".concat(e.prop, "Form")]
- }))
- }, errorSlot: function () {
- var t = this;
- return this.columnFormOption.filter((function (e) {
- return t.$scopedSlots["".concat(e.prop, "Error")]
- }))
- }, labelSlot: function () {
- var t = this;
- return this.columnFormOption.filter((function (e) {
- return t.$scopedSlots["".concat(e.prop, "Label")]
- }))
- }, typeSlot: function () {
- var t = this;
- return this.columnFormOption.filter((function (e) {
- return t.$scopedSlots["".concat(e.prop, "Type")]
- }))
- }, searchSlot: function () {
- var t = this;
- return this.columnFormOption.filter((function (e) {
- return t.$scopedSlots["".concat(e.prop, "Search")]
- }))
- }, headerSlot: function () {
- var t = this;
- return this.columnFormOption.filter((function (e) {
- return t.$scopedSlots["".concat(e.prop, "Header")]
- }))
- }, mainSlot: function () {
- var t = this;
- return this.columnFormOption.filter((function (e) {
- return t.$scopedSlots[e.prop]
- }))
- }, calcHeight: function () {
- return (this.tableOption.calcHeight || 0) + this.$AVUE.calcHeight
- }, propOption: function () {
- var t = [], e = this;
- return function n(i) {
- Array.isArray(i) && i.forEach((function (i) {
- !i.prop && i.children || t.push(i), i.children && (e.isChild = !0, n(i.children))
- }))
- }(this.columnOption), t = this.isChild ? Object(core_dataformat__WEBPACK_IMPORTED_MODULE_16__.a)(t) : Object(core_dataformat__WEBPACK_IMPORTED_MODULE_16__.a)(this.columnOption)
- }, isTree: function () {
- var t = !1;
- return this.data.forEach((function (e) {
- e.children && (t = !0)
- })), this.vaildData(this.tableOption.tree, t)
- }, isCard: function () {
- return this.option.card ? "always" : "never"
- }, isGroup: function () {
- return !this.validatenull(this.tableOption.group)
- }, groupOption: function () {
- return this.parentOption.group
- }, dynamicOption: function () {
- var t = [];
- return this.propOption.forEach((function (e) {
- "dynamic" === e.type && (t = t.concat(e.children.column.map((function (t) {
- return Object.assign(t, {dynamic: !0})
- }))))
- })), t
- }, columnFormOption: function () {
- var t = [];
- return this.propOption.forEach((function (e) {
- t.push(e)
- })), this.isGroup && this.groupOption.forEach((function (e) {
- e.column && e.column.forEach((function (e) {
- t.push(e)
- }))
- })), t.concat(this.dynamicOption)
- }, expandLevel: function () {
- return this.parentOption.expandLevel || 0
- }, expandAll: function () {
- return this.parentOption.expandAll || !1
- }, rowParentKey: function () {
- return this.tableOption.rowParentKey || "parentId"
- }, parentOption: function () {
- return this.tableOption || {}
- }, columnOption: function () {
- return this.tableOption.column || []
- }, sumColumnList: function () {
- return this.tableOption.sumColumnList || []
- }, selectLen: function () {
- return this.tableSelect ? this.tableSelect.length : 0
- }
- },
- watch: {
- default: {
- handler: function (t) {
- this.$emit("update:defaults", t)
- }, deep: !0
- }, tableForm: {
- handler: function () {
- this.$emit("input", this.tableForm)
- }, deep: !0
- }, value: {
- handler: function () {
- this.formVal()
- }, deep: !0
- }, data: {
- handler: function () {
- this.dataInit()
- }, deep: !0
- }
- },
- props: {
- sortBy: Function,
- sortOrders: Array,
- sortMethod: Function,
- spanMethod: Function,
- summaryMethod: Function,
- rowStyle: Function,
- cellStyle: Function,
- beforeClose: Function,
- beforeOpen: Function,
- rowClassName: Function,
- cellClassName: Function,
- headerCellClassName: Function,
- uploadBefore: Function,
- uploadAfter: Function,
- uploadDelete: Function,
- uploadPreview: Function,
- uploadError: Function,
- uploadExceed: Function,
- permission: {
- type: [Function, Object], default: function () {
- return {}
- }
- },
- value: {
- type: Object, default: function () {
- return {}
- }
- },
- defaults: {
- type: Object, default: function () {
- return {}
- }
- },
- search: {
- type: Object, default: function () {
- return {}
- }
- },
- page: {
- type: Object, default: function () {
- return {}
- }
- },
- tableLoading: {type: Boolean, default: !1},
- disabled: {type: Boolean, default: !1},
- data: {
- type: Array, required: !0, default: function () {
- return []
- }
- }
- },
- methods: {
- getPermission: function (t, e, n) {
- return "function" == typeof this.permission ? this.permission(t, e, n) : !!this.validatenull(this.permission[t]) || this.permission[t]
- }, getTableHeight: function () {
- var t = this;
- this.isAutoHeight ? this.$nextTick((function () {
- var e = t.$refs.table, n = t.$refs.tablePage;
- if (e) {
- var i = e.$el, o = n ? n.$el.offsetHeight : 0;
- t.tableHeight = _config_js__WEBPACK_IMPORTED_MODULE_14__.a.clientHeight - i.offsetTop - o - t.calcHeight
- }
- })) : this.tableHeight = this.tableOption.height
- }, doLayout: function () {
- this.$refs.table.doLayout()
- }, refreshTable: function (t) {
- var e = this;
- this.reload = !1, this.$nextTick((function () {
- e.reload = !0, setTimeout((function () {
- return e.$refs.columnDefault.setSort()
- })), t && t()
- }))
- }, treeLoad: function (t, e, n) {
- this.$emit("tree-load", t, e, (function (e) {
- t.children = e, n(e)
- }))
- }, formatData: function () {
- var t = this.data;
- if (0 === t.length) return [];
- Object(_eval__WEBPACK_IMPORTED_MODULE_15__.a)(this, t, {
- expand: this.expandAll,
- expandLevel: this.expandLevel
- }), this.list = Object(_eval__WEBPACK_IMPORTED_MODULE_15__.b)(this, t)
- }, showRow: function (t) {
- t.rowIndex;
- var e = !t.row._parent || t.row._parent._expand && t.row._parent._show;
- return t.row._show = e, e ? "animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;" : "display:none;"
- }, menuIcon: function (t) {
- return this.vaildData(this.tableOption[t + "Text"], this.t("crud." + t))
- }, validateField: function (t) {
- return this.$refs.dialogForm.$refs.tableForm.validateField(t)
- }, handleGetRowKeys: function (t) {
- return t[this.rowKey]
- }, selectClear: function () {
- this.$refs.table.clearSelection()
- }, toggleRowSelection: function (t, e) {
- this.$refs.table.toggleRowSelection(t, e)
- }, toggleRowExpansion: function (t, e) {
- this.$refs.table.toggleRowExpansion(t, e)
- }, setCurrentRow: function (t) {
- this.$refs.table.setCurrentRow(t)
- }, formVal: function () {
- var t = this;
- Object.keys(this.value).forEach((function (e) {
- t.$set(t.tableForm, e, t.value[e])
- }))
- }, columnInit: function () {
- var t = this;
- this.default = {}, this.propOption.forEach((function (e) {
- var n = {};
- t.defaultColumn.forEach((function (t) {
- return n[t.prop] = e[t.prop]
- })), t.$set(t.default, e.prop, Object.assign(n, {
- order: void 0,
- label: e.label,
- showColumn: e.showColumn
- }, t.defaults[e.prop])), !0 !== t.defaultBind[e.prop] && (t.defaultColumn.forEach((function (n) {
- ["hide", "filters"].includes(n.prop) && t.$watch("default.".concat(e.prop, ".").concat(n.prop), (function () {
- return t.refreshTable()
- }))
- })), t.defaultBind[e.prop] = !0)
- }))
- }, dataInit: function () {
- var t = this;
- this.list = this.data, this.list.forEach((function (e, n) {
- e.$cellEdit && !t.formCascaderList[n] && (t.formCascaderList[n] = t.deepClone(e)), e.$index = n
- }))
- }, headerDragend: function (t, e, n, i) {
- this.default[n.property].width = t, this.$emit("header-dragend", t, e, n, i)
- }, expandChange: function (t, e) {
- this.$emit("expand-change", t, e)
- }, currentRowChange: function (t, e) {
- this.$emit("current-row-change", t, e)
- }, refreshChange: function () {
- this.$emit("refresh-change")
- }, toggleSelection: function (t) {
- var e = this;
- t ? t.forEach((function (t) {
- e.$refs.table.toggleRowSelection(t)
- })) : this.$refs.table.clearSelection()
- }, selectionChange: function (t) {
- this.tableSelect = t, this.$emit("selection-change", this.tableSelect)
- }, select: function (t, e) {
- this.$emit("select", t, e)
- }, selectAll: function (t) {
- this.$emit("select-all", t)
- }, filterChange: function (t) {
- this.$emit("filter-change", t)
- }, sortChange: function (t) {
- this.$emit("sort-change", t)
- }, rowDblclick: function (t, e) {
- this.$emit("row-dblclick", t, e)
- }, rowClick: function (t, e, n) {
- this.$emit("row-click", t, e, n)
- }, clearSort: function () {
- this.$refs.table.clearSort()
- }, cellMouseEnter: function (t, e, n, i) {
- this.$emit("cell-mouse-enter", t, e, n, i)
- }, cellMouseLeave: function (t, e, n, i) {
- this.$emit("cell-mouse-leave", t, e, n, i)
- }, cellClick: function (t, e, n, i) {
- this.$emit("cell-click", t, e, n, i)
- }, headerClick: function (t, e) {
- this.$emit("header-click", t, e)
- }, rowContextmenu: function (t, e, n) {
- this.$emit("row-contextmenu", t, e, n)
- }, headerContextmenu: function (t, e) {
- this.$emit("header-contextmenu", t, e)
- }, cellDblclick: function (t, e, n, i) {
- this.$emit("cell-dblclick", t, e, n, i)
- }, rowCell: function (t, e) {
- t.$cellEdit ? this.rowCellUpdate(t, e) : this.rowCellEdit(t, e)
- }, rowCellAdd: function () {
- var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, n = this.list.length,
- i = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_16__.d)(this.propOption).tableForm;
- e = this.deepClone(Object.assign({
- $cellEdit: !0,
- $index: n
- }, i, e)), this.list.push(e), this.formIndexList.push(n), setTimeout((function () {
- return t.$refs.columnDefault.setSort()
- }))
- }, rowCancel: function (t, e) {
- this.validatenull(t[this.rowKey]) ? this.list.splice(e, 1) : (this.formCascaderList[e].$cellEdit = !1, this.$set(this.list, e, this.formCascaderList[e]), delete this.formCascaderList[e], this.$set(this.cascaderDIC, e, this.cascaderDicList[e]), this.formIndexList.splice(this.formIndexList.indexOf(e), 1))
- }, rowCellEdit: function (t, e) {
- var n = this;
- t.$cellEdit = !0, this.$set(this.list, e, t), this.formCascaderList[e] = this.deepClone(t), this.cascaderDicList[e] = this.deepClone(this.cascaderDIC[e]), setTimeout((function () {
- n.formIndexList.push(e)
- }), 1e3)
- }, validateCellForm: function (t) {
- var e = this;
- return new Promise((function (t) {
- e.$refs.cellForm.validate((function (e, n) {
- t(n)
- }))
- }))
- }, validateCellField: function (t) {
- var e, n = !0, i = _createForOfIteratorHelper(this.$refs.cellForm.fields);
- try {
- for (i.s(); !(e = i.n()).done;) {
- var o = e.value;
- if (o.prop.split(".")[1] == t && this.$refs.cellForm.validateField(o.prop, (function (t) {
- t && (n = !1)
- })), !n) break
- }
- } catch (t) {
- i.e(t)
- } finally {
- i.f()
- }
- return n
- }, rowCellUpdate: function (t, e) {
- var n = this;
- this.validateCellField(e) && (this.btnDisabledList[e] = !0, this.btnDisabled = !0, this.$emit("row-update", t, e, (function () {
- n.btnDisabledList[e] = !1, n.btnDisabled = !1, t.$cellEdit = !1, n.$set(n.list, e, t), delete n.formCascaderList[e]
- }), (function () {
- n.btnDisabledList[e] = !1, n.btnDisabled = !1
- })))
- }, rowAdd: function () {
- this.$refs.dialogForm.show("add")
- }, rowSave: function () {
- return this.$refs.dialogForm.$refs.tableForm.submit()
- }, rowUpdate: function () {
- return this.$refs.dialogForm.$refs.tableForm.submit()
- }, closeDialog: function () {
- return this.$refs.dialogForm.closeDialog()
- }, rowClone: function (t) {
- var e = {};
- return Object.keys(t).forEach((function (n) {
- ["_parent", "children"].includes(n) || (e[n] = t[n])
- })), e
- }, searchChange: function () {
- this.$refs.headerSearch.searchChange()
- }, getPropRef: function (t) {
- return this.$refs.dialogForm.$refs.tableForm.getPropRef(t)
- }, searchReset: function () {
- this.$refs.headerSearch.searchReset()
- }, rowEdit: function (t, e) {
- this.tableForm = this.rowClone(t), this.$emit("input", this.tableForm), this.tableIndex = e, this.$refs.dialogForm.show("edit", e)
- }, rowCopy: function (t) {
- this.tableForm = this.rowClone(t), delete this.tableForm[this.rowKey], this.$emit("input", this.tableForm), this.tableIndex = -1, this.$refs.dialogForm.show("add")
- }, rowView: function (t, e) {
- this.tableForm = this.rowClone(t), this.$emit("input", this.tableForm), this.tableIndex = e, this.$refs.dialogForm.show("view")
- }, vaildParent: function (t) {
- return this.validatenull(t[this.rowParentKey])
- }, rowDel: function (t, e) {
- var n = this;
- this.$emit("row-del", t, e, (function () {
- var e = function () {
- var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
- i = e.findIndex((function (e) {
- return e[n.rowKey] === t[n.rowKey]
- }));
- e.splice(i, 1)
- };
- if (n.isTree) if (n.vaildParent(t)) e(n.data); else {
- var i = n.findObject(n.data, t[n.rowParentKey], n.rowKey);
- e(void 0 === i ? n.data : i.children)
- } else e(n.data)
- }))
- }, resetForm: function () {
- this.$refs.dialogForm.resetForm(), this.$emit("input", this.tableForm)
- }, tableSpanMethod: function (t) {
- if ("function" == typeof this.spanMethod) return this.spanMethod(t)
- }, tableSummaryMethod: function (t) {
- var e = this;
- if ("function" == typeof this.summaryMethod) return this.summaryMethod(t);
- var n = t.columns, i = t.data, o = [];
- return n.length > 0 && n.forEach((function (t, n) {
- var a = e.sumColumnList.find((function (e) {
- return e.name === t.property
- }));
- if (0 === n) o[n] = ""; else if (a) {
- var r = a.decimals || 2, s = a.label || "";
- switch (a.type) {
- case"count":
- o[n] = s + i.length;
- break;
- case"avg":
- var l = i.map((function (e) {
- return Number(e[t.property])
- })), c = 1;
- o[n] = l.reduce((function (t, e) {
- var n = Number(e);
- return isNaN(n) ? t : (t * (c - 1) + e) / c++
- }), 0), o[n] = s + o[n].toFixed(r);
- break;
- case"sum":
- var u = i.map((function (e) {
- return Number(e[t.property])
- }));
- o[n] = u.reduce((function (t, e) {
- var n = Number(e);
- return isNaN(n) ? t : t + e
- }), 0), o[n] = s + o[n].toFixed(r)
- }
- } else o[n] = "-"
- })), this.sumsList = o, o
- }
- }
- })
- }, function (module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var core_detail__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20),
- core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1),
- _core_common_init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18),
- _core_components_form_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15),
- global_variable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3),
- core_dataformat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7),
- core_dic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11),
- utils_util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2),
- utils_mock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(28),
- _menu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(34);
- function _toConsumableArray(t) {
- return _arrayWithoutHoles(t) || _iterableToArray(t) || _unsupportedIterableToArray(t) || _nonIterableSpread()
- }
- function _nonIterableSpread() {
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
- }
- function _unsupportedIterableToArray(t, e) {
- if (t) {
- if ("string" == typeof t) return _arrayLikeToArray(t, e);
- var n = Object.prototype.toString.call(t).slice(8, -1);
- return "Object" === n && t.constructor && (n = t.constructor.name), "Map" === n || "Set" === n ? Array.from(t) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(t, e) : void 0
- }
- }
- function _iterableToArray(t) {
- if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t)
- }
- function _arrayWithoutHoles(t) {
- if (Array.isArray(t)) return _arrayLikeToArray(t)
- }
- function _arrayLikeToArray(t, e) {
- (null == e || e > t.length) && (e = t.length);
- for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n];
- return i
- }
- __webpack_exports__.a = Object(core_create__WEBPACK_IMPORTED_MODULE_1__.a)({
- name: "form",
- mixins: [Object(_core_common_init__WEBPACK_IMPORTED_MODULE_2__.a)()],
- components: {
- formTemp: _core_components_form_index__WEBPACK_IMPORTED_MODULE_3__.a,
- formMenu: _menu__WEBPACK_IMPORTED_MODULE_9__.a
- },
- data: function () {
- return {
- activeName: "",
- labelWidth: 90,
- allDisabled: !1,
- optionIndex: [],
- optionBox: !1,
- tableOption: {},
- itemSpanDefault: 12,
- bindList: {},
- form: {},
- formList: [],
- formCreate: !1,
- formDefault: {},
- formVal: {}
- }
- },
- provide: function () {
- return {formSafe: this}
- },
- watch: {
- tabsActive: {
- handler: function (t) {
- this.activeName = this.tabsActive
- }, immediate: !0
- }, form: {
- handler: function (t) {
- this.formCreate && this.setVal()
- }, deep: !0
- }, value: {
- handler: function (t) {
- this.formCreate ? this.setForm(t) : this.formVal = Object.assign(this.formVal, t || {})
- }, deep: !0, immediate: !0
- }
- },
- computed: {
- labelSuffix: function () {
- return this.parentOption.labelSuffix || ":"
- }, isMenu: function () {
- return 1 != this.columnOption.length
- }, isDetail: function () {
- return this.option.detail
- }, isAdd: function () {
- return "add" === this.boxType
- }, isTabs: function () {
- return this.parentOption.tabs
- }, isEdit: function () {
- return "edit" === this.boxType
- }, isView: function () {
- return "view" === this.boxType
- }, disabled: function () {
- return this.parentOption.disabled
- }, readonly: function () {
- return this.parentOption.readonly
- }, tabsType: function () {
- return this.parentOption.tabsType
- }, columnLen: function () {
- return this.columnOption.length
- }, dynamicOption: function () {
- var t = this, e = [];
- return this.propOption.forEach((function (n) {
- "dynamic" == n.type && t.vaildDisplay(n) && e.push(n)
- })), e
- }, controlOption: function () {
- var t = [];
- return this.propOption.forEach((function (e) {
- e.control && t.push(e)
- })), t
- }, objectOption: function () {
- var t = {};
- return this.propOption.forEach((function (e) {
- return t[e.prop] = e
- })), t
- }, propOption: function () {
- var t = [];
- return this.columnOption.forEach((function (e) {
- e.column.forEach((function (e) {
- return t.push(e)
- }))
- })), t
- }, parentOption: function () {
- var t = this.deepClone(this.tableOption), e = t.group;
- return e || (t = Object.assign(t, {group: [this.deepClone(t)]})), e && e.unshift({
- arrow: !1,
- column: t.column
- }), t
- }, columnOption: function () {
- var t = this, e = _toConsumableArray(this.parentOption.group) || [];
- return e.forEach((function (e, n) {
- e.column = e.column || [], e.column.forEach((function (e, n) {
- !1 === e.display || t.isMobile || (e = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_5__.b)(e, t.itemSpanDefault, 0 === n))
- })), e.column = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_5__.a)(e.column), e.column = e.column.filter((function (e) {
- return !t.validatenull(e.order)
- })).sort((function (t, e) {
- return (t.order || 0) - (e.order || 0)
- })).concat(e.column.filter((function (e) {
- return t.validatenull(e.order)
- })))
- })), e
- }, menuPosition: function () {
- return this.parentOption.menuPosition ? this.parentOption.menuPosition : "center"
- }, boxType: function () {
- return this.parentOption.boxType
- }, isPrint: function () {
- return this.vaildData(this.parentOption.printBtn, !1)
- }, tabsActive: function () {
- return this.vaildData(this.tableOption.tabsActive + "", "1")
- }, isMock: function () {
- return this.vaildData(this.parentOption.mockBtn, !1)
- }
- },
- props: {
- uploadBefore: Function,
- uploadAfter: Function,
- uploadDelete: Function,
- uploadPreview: Function,
- uploadError: Function,
- uploadExceed: Function,
- reset: {type: Boolean, default: !0},
- isCrud: {type: Boolean, default: !1},
- value: {
- type: Object, required: !0, default: function () {
- return {}
- }
- }
- },
- created: function () {
- var t = this;
- this.$nextTick((function () {
- t.dataFormat(), t.setVal(), t.clearValidate(), t.formCreate = !0
- }))
- },
- methods: {
- getComponent: core_dataformat__WEBPACK_IMPORTED_MODULE_5__.e,
- getPlaceholder: core_dataformat__WEBPACK_IMPORTED_MODULE_5__.f,
- getChildrenColumn: function (t) {
- var e = this;
- return ((t.children || {}).column || []).filter((function (t) {
- return e.$scopedSlots[t.prop]
- }))
- },
- getDisabled: function (t) {
- return this.vaildDetail(t) || this.isDetail || this.vaildDisabled(t) || this.allDisabled
- },
- getSpan: function (t) {
- return t.span || this.parentOption.span || this.itemSpanDefault
- },
- isGroupShow: function (t, e) {
- return !this.isTabs || (e == this.activeName || 0 == e)
- },
- forEachLabel: function () {
- var t = this;
- this.propOption.forEach((function (e) {
- t.handleShowLabel(e, t.DIC[e.prop])
- }))
- },
- handleGroupClick: function (t) {
- this.$emit("tab-click", t)
- },
- handleTabClick: function (t, e) {
- this.$emit("tab-click", t, e)
- },
- getLabelWidth: function (t, e) {
- var n;
- return n = this.validatenull(t.labelWidth) ? this.validatenull(e.labelWidth) ? this.parentOption.labelWidth : e.labelWidth : t.labelWidth, this.setPx(n, this.labelWidth)
- },
- handleShowLabel: function (t, e) {
- var n;
- return this.validatenull(e) || (n = Object(core_detail__WEBPACK_IMPORTED_MODULE_0__.a)(this.form, t, this.tableOption, e), this.$set(this.form, ["$" + t.prop], n)), n
- },
- validateField: function (t) {
- return this.$refs.form.validateField(t)
- },
- validTip: function (t) {
- return !t.tip || "upload" === t.type
- },
- getPropRef: function (t) {
- return this.$refs[t][0]
- },
- dataFormat: function () {
- this.formDefault = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_5__.d)(this.propOption);
- var t = this.deepClone(this.formDefault.tableForm);
- this.setForm(this.deepClone(Object.assign(t, this.formVal)))
- },
- setVal: function () {
- this.setControl(), this.$emit("input", this.form), this.$emit("change", this.form)
- },
- setControl: function () {
- var t = this;
- this.controlOption.forEach((function (e) {
- var n = e.control(t.form[e.prop], t.form);
- ((null == n ? void 0 : n.hide) || []).forEach((function (e) {
- return t.objectOption[e].display = !1
- })), ((null == n ? void 0 : n.show) || []).forEach((function (e) {
- return t.objectOption[e].display = !0
- }))
- }))
- },
- setForm: function setForm(value) {
- var _this7 = this;
- Object.keys(value).forEach((function (ele) {
- var result = value[ele], column = _this7.propOption.find((function (t) {
- return t.prop == ele
- }));
- if (_this7.$set(_this7.form, ele, result), column) {
- var prop = column.prop, bind = column.bind;
- bind && !_this7.bindList[prop] && (_this7.$watch("form." + prop, (function (t, e) {
- t != e && Object(utils_util__WEBPACK_IMPORTED_MODULE_7__.u)(_this7.form, bind, t)
- })), _this7.$watch("form." + bind, (function (t, e) {
- t != e && _this7.$set(_this7.form, prop, t)
- })), _this7.$set(_this7.form, prop, eval("value." + bind)), _this7.bindList[prop] = !0)
- }
- })), this.forEachLabel()
- },
- handleChange: function (t, e) {
- var n = this;
- this.$nextTick((function () {
- var i = e.cascader, o = i.join(","), a = i[0], r = n.form[e.prop], s = n.findObject(t, a);
- n.formList.includes(o) && i.forEach((function (t) {
- n.form[t] = "", n.$set(n.DIC, t, [])
- })), n.validatenull(i) || n.validatenull(r) || n.validatenull(s) || Object(core_dic__WEBPACK_IMPORTED_MODULE_6__.d)({
- column: s,
- value: r,
- form: n.form
- }).then((function (t) {
- n.formList.includes(o) || n.formList.push(o);
- var e = Array.isArray(t) ? t : [];
- n.$set(n.DIC, a, e), n.validatenull(e) || n.validatenull(e) || n.validatenull(s.cascaderIndex) || !n.validatenull(n.form[a]) || (n.form[a] = e[s.cascaderIndex][(s.props || {}).value || global_variable__WEBPACK_IMPORTED_MODULE_4__.e.value])
- }))
- }))
- },
- handlePrint: function () {
- this.$Print({html: this.$el.innerHTML})
- },
- propChange: function (t, e) {
- this.$refs.form.validateField(e.prop), e.cascader && this.handleChange(t, e)
- },
- handleMock: function () {
- var t = this;
- this.isMock && (this.columnOption.forEach((function (e) {
- var n = Object(utils_mock__WEBPACK_IMPORTED_MODULE_8__.a)(e.column, t.DIC, t.form, t.isMock);
- t.validatenull(n) || (Object.keys(n).forEach((function (e) {
- t.form[e] = n[e]
- })), t.clearValidate())
- })), this.$emit("mock-change", this.form))
- },
- vaildDetail: function (t) {
- return !!this.detail || (this.validatenull(t.detail) ? this.isAdd ? this.vaildData(t.addDetail, !1) : this.isEdit ? this.vaildData(t.editDetail, !1) : !!this.isView : this.vaildData(t.detail, !1))
- },
- vaildDisabled: function (t) {
- return !!this.disabled || (this.validatenull(t.disabled) ? this.isAdd ? this.vaildData(t.addDisabled, !1) : this.isEdit ? this.vaildData(t.editDisabled, !1) : !!this.isView : this.vaildData(t.disabled, !1))
- },
- vaildDisplay: function (t) {
- return this.validatenull(t.display) ? this.isAdd ? this.vaildData(t.addDisplay, !0) : this.isEdit ? this.vaildData(t.editDisplay, !0) : !this.isView || this.vaildData(t.viewDisplay, !0) : this.vaildData(t.display, !0)
- },
- clearValidate: function (t) {
- var e = this;
- this.$nextTick((function () {
- e.$refs.form.clearValidate(t)
- }))
- },
- validateCellForm: function () {
- var t = this;
- return new Promise((function (e) {
- t.$refs.form.validate((function (t, n) {
- e(n)
- }))
- }))
- },
- validate: function (t) {
- var e = this;
- this.$refs.form.validate((function (n, i) {
- var o = [], a = [], r = {};
- e.dynamicOption.forEach((function (t) {
- var n = "form" === t.children.type;
- a.push(t.prop), n ? e.validatenull(e.$refs[t.prop][0].$refs.temp.$refs.main) || e.$refs[t.prop][0].$refs.temp.$refs.main.forEach((function (t) {
- o.push(t.validateCellForm())
- })) : o.push(e.$refs[t.prop][0].$refs.temp.$refs.main.validateCellForm())
- })), Promise.all(o).then((function (n) {
- n.forEach((function (t, n) {
- e.validatenull(t) || (r[a[n]] = t)
- }));
- var o = Object.assign(r, i);
- e.validatenull(o) ? (e.show(), t(!0, e.hide)) : t(!1, e.hide, o)
- }))
- }))
- },
- resetForm: function () {
- this.clearValidate(), this.reset && this.clearVal(), this.$emit("input", this.form), this.$emit("reset-change")
- },
- clearVal: function () {
- this.form = Object(utils_util__WEBPACK_IMPORTED_MODULE_7__.a)(this.form, (this.tableOption.clearExclude || []).concat([this.rowKey]))
- },
- resetFields: function () {
- this.$refs.form.resetFields()
- },
- show: function () {
- this.allDisabled = !0
- },
- hide: function () {
- this.allDisabled = !1
- },
- submit: function () {
- var t = this;
- this.validate((function (e, n) {
- e ? t.$emit("submit", Object(utils_util__WEBPACK_IMPORTED_MODULE_7__.h)(t.form, t.parentOption.translate), t.hide) : t.$emit("error", n)
- }))
- }
- }
- })
- }, function (t, e, n) {
- "use strict";
- function i(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [], n = [];
- return e.forEach((function (e, o) {
- if (t.$set(e, "_index", o), n.push(e), e.children && e.children.length > 0) {
- var a = i(t, e.children);
- n = n.concat(a)
- }
- })), n
- }
- function o(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [],
- n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, i = n.parent,
- a = void 0 === i ? null : i, r = n.preIndex, s = void 0 !== r && r, l = n.level, c = void 0 === l ? 1 : l,
- u = n.expandLevel, d = void 0 === u ? 0 : u, p = n.expand, h = void 0 !== p && p, f = n.show,
- m = void 0 === f || f;
- e.forEach((function (e, n) {
- var i = (s ? "".concat(s, "-").concat(n) : n) + "";
- t.$set(e, "_id", i), t.$set(e, "_level", c), t.$set(e, "_expand", !!h || 0 !== d && c < d), t.$set(e, "_parent", a), t.$set(e, "_show", m), e.children && e.children.length > 0 && o(t, e.children, {
- parent: e,
- level: c + 1,
- expand: h,
- expandLevel: d,
- preIndex: i,
- status: status
- })
- }))
- }
- n.d(e, "b", (function () {
- return i
- })), n.d(e, "a", (function () {
- return o
- }))
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i = function (t) {
- if (t && t.__esModule) return t;
- var e = {};
- if (null != t) for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
- return e.default = t, e
- }(n(9));
- e.default = function (t, e, n, o, a, r) {
- !t.required || n.hasOwnProperty(t.field) && !i.isEmptyValue(e, r || t.type) || o.push(i.format(a.messages.required, t.fullField))
- }
- }, function (t, e, n) {
- var i, o;
- void 0 === (o = "function" == typeof (i = function (t, e, n) {
- return function (t, e, n, i, o, a) {
- function r(t) {
- return "number" == typeof t && !isNaN(t)
- }
- var s = this;
- if (s.version = function () {
- return "1.9.3"
- }, s.options = {
- useEasing: !0, useGrouping: !0, separator: ",", decimal: ".", easingFn: function (t, e, n, i) {
- return n * (1 - Math.pow(2, -10 * t / i)) * 1024 / 1023 + e
- }, formattingFn: function (t) {
- var e, n, i, o, a, r, l = t < 0;
- if (t = Math.abs(t).toFixed(s.decimals), n = (e = (t += "").split("."))[0], i = e.length > 1 ? s.options.decimal + e[1] : "", s.options.useGrouping) {
- for (o = "", a = 0, r = n.length; a < r; ++a) 0 !== a && a % 3 == 0 && (o = s.options.separator + o), o = n[r - a - 1] + o;
- n = o
- }
- return s.options.numerals.length && (n = n.replace(/[0-9]/g, (function (t) {
- return s.options.numerals[+t]
- })), i = i.replace(/[0-9]/g, (function (t) {
- return s.options.numerals[+t]
- }))), (l ? "-" : "") + s.options.prefix + n + i + s.options.suffix
- }, prefix: "", suffix: "", numerals: []
- }, a && "object" == typeof a) for (var l in s.options) a.hasOwnProperty(l) && null !== a[l] && (s.options[l] = a[l]);
- "" === s.options.separator ? s.options.useGrouping = !1 : s.options.separator = "" + s.options.separator;
- for (var c = 0, u = ["webkit", "moz", "ms", "o"], d = 0; d < u.length && !window.requestAnimationFrame; ++d) window.requestAnimationFrame = window[u[d] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[u[d] + "CancelAnimationFrame"] || window[u[d] + "CancelRequestAnimationFrame"];
- window.requestAnimationFrame || (window.requestAnimationFrame = function (t, e) {
- var n = (new Date).getTime(), i = Math.max(0, 16 - (n - c)), o = window.setTimeout((function () {
- t(n + i)
- }), i);
- return c = n + i, o
- }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function (t) {
- clearTimeout(t)
- }), s.initialize = function () {
- return !(!s.initialized && (s.error = "", s.d = "string" == typeof t ? document.getElementById(t) : t, s.d ? (s.startVal = Number(e), s.endVal = Number(n), r(s.startVal) && r(s.endVal) ? (s.decimals = Math.max(0, i || 0), s.dec = Math.pow(10, s.decimals), s.duration = 1e3 * Number(o) || 2e3, s.countDown = s.startVal > s.endVal, s.frameVal = s.startVal, s.initialized = !0, 0) : (s.error = "[CountUp] startVal (" + e + ") or endVal (" + n + ") is not a number", 1)) : (s.error = "[CountUp] target is null or undefined", 1)))
- }, s.printValue = function (t) {
- var e = s.options.formattingFn(t);
- "INPUT" === s.d.tagName ? this.d.value = e : "text" === s.d.tagName || "tspan" === s.d.tagName ? this.d.textContent = e : this.d.innerHTML = e
- }, s.count = function (t) {
- s.startTime || (s.startTime = t), s.timestamp = t;
- var e = t - s.startTime;
- s.remaining = s.duration - e, s.options.useEasing ? s.countDown ? s.frameVal = s.startVal - s.options.easingFn(e, 0, s.startVal - s.endVal, s.duration) : s.frameVal = s.options.easingFn(e, s.startVal, s.endVal - s.startVal, s.duration) : s.countDown ? s.frameVal = s.startVal - (s.startVal - s.endVal) * (e / s.duration) : s.frameVal = s.startVal + (s.endVal - s.startVal) * (e / s.duration), s.countDown ? s.frameVal = s.frameVal < s.endVal ? s.endVal : s.frameVal : s.frameVal = s.frameVal > s.endVal ? s.endVal : s.frameVal, s.frameVal = Math.round(s.frameVal * s.dec) / s.dec, s.printValue(s.frameVal), e < s.duration ? s.rAF = requestAnimationFrame(s.count) : s.callback && s.callback()
- }, s.start = function (t) {
- s.initialize() && (s.callback = t, s.rAF = requestAnimationFrame(s.count))
- }, s.pauseResume = function () {
- s.paused ? (s.paused = !1, delete s.startTime, s.duration = s.remaining, s.startVal = s.frameVal, requestAnimationFrame(s.count)) : (s.paused = !0, cancelAnimationFrame(s.rAF))
- }, s.reset = function () {
- s.paused = !1, delete s.startTime, s.initialized = !1, s.initialize() && (cancelAnimationFrame(s.rAF), s.printValue(s.startVal))
- }, s.update = function (t) {
- if (s.initialize()) {
- if (!r(t = Number(t))) return void (s.error = "[CountUp] update() - new endVal is not a number: " + t);
- s.error = "", t !== s.frameVal && (cancelAnimationFrame(s.rAF), s.paused = !1, delete s.startTime, s.startVal = s.frameVal, s.endVal = t, s.countDown = s.startVal > s.endVal, s.rAF = requestAnimationFrame(s.count))
- }
- }, s.initialize() && s.printValue(s.startVal)
- }
- }) ? i.call(e, n, e, t) : i) || (t.exports = o)
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = Object.assign || function (t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e];
- for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i])
- }
- return t
- }, a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- }, r = n(9), s = n(41), l = (i = s) && i.__esModule ? i : {default: i}, c = n(61);
- function u(t) {
- this.rules = null, this._messages = c.messages, this.define(t)
- }
- u.prototype = {
- messages: function (t) {
- return t && (this._messages = (0, r.deepMerge)((0, c.newMessages)(), t)), this._messages
- }, define: function (t) {
- if (!t) throw new Error("Cannot configure a schema with no rules");
- if ("object" !== (void 0 === t ? "undefined" : a(t)) || Array.isArray(t)) throw new Error("Rules must be an object");
- this.rules = {};
- var e = void 0, n = void 0;
- for (e in t) t.hasOwnProperty(e) && (n = t[e], this.rules[e] = Array.isArray(n) ? n : [n])
- }, validate: function (t) {
- var e = this, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
- i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () {
- }, s = t, l = n, d = i;
- if ("function" == typeof l && (d = l, l = {}), !this.rules || 0 === Object.keys(this.rules).length) return d && d(), Promise.resolve();
- function p(t) {
- var e, n, i = void 0, o = [], a = {};
- for (i = 0; i < t.length; i++) e = t[i], n = void 0, Array.isArray(e) ? o = (n = o).concat.apply(n, e) : o.push(e);
- o.length ? a = (0, r.convertFieldsError)(o) : (o = null, a = null), d(o, a)
- }
- if (l.messages) {
- var h = this.messages();
- h === c.messages && (h = (0, c.newMessages)()), (0, r.deepMerge)(h, l.messages), l.messages = h
- } else l.messages = this.messages();
- var f = void 0, m = void 0, b = {}, v = l.keys || Object.keys(this.rules);
- v.forEach((function (n) {
- f = e.rules[n], m = s[n], f.forEach((function (i) {
- var a = i;
- "function" == typeof a.transform && (s === t && (s = o({}, s)), m = s[n] = a.transform(m)), (a = "function" == typeof a ? {validator: a} : o({}, a)).validator = e.getValidationMethod(a), a.field = n, a.fullField = a.fullField || n, a.type = e.getType(a), a.validator && (b[n] = b[n] || [], b[n].push({
- rule: a,
- value: m,
- source: s,
- field: n
- }))
- }))
- }));
- var y = {};
- return (0, r.asyncMap)(b, l, (function (t, e) {
- var n = t.rule,
- i = !("object" !== n.type && "array" !== n.type || "object" !== a(n.fields) && "object" !== a(n.defaultField));
- function s(t, e) {
- return o({}, e, {fullField: n.fullField + "." + t})
- }
- function c() {
- var a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], c = a;
- if (Array.isArray(c) || (c = [c]), !l.suppressWarning && c.length && u.warning("async-validator:", c), c.length && n.message && (c = [].concat(n.message)), c = c.map((0, r.complementError)(n)), l.first && c.length) return y[n.field] = 1, e(c);
- if (i) {
- if (n.required && !t.value) return c = n.message ? [].concat(n.message).map((0, r.complementError)(n)) : l.error ? [l.error(n, (0, r.format)(l.messages.required, n.field))] : [], e(c);
- var d = {};
- if (n.defaultField) for (var p in t.value) t.value.hasOwnProperty(p) && (d[p] = n.defaultField);
- for (var h in d = o({}, d, t.rule.fields)) if (d.hasOwnProperty(h)) {
- var f = Array.isArray(d[h]) ? d[h] : [d[h]];
- d[h] = f.map(s.bind(null, h))
- }
- var m = new u(d);
- m.messages(l.messages), t.rule.options && (t.rule.options.messages = l.messages, t.rule.options.error = l.error), m.validate(t.value, t.rule.options || l, (function (t) {
- var n = [];
- c && c.length && n.push.apply(n, c), t && t.length && n.push.apply(n, t), e(n.length ? n : null)
- }))
- } else e(c)
- }
- i = i && (n.required || !n.required && t.value), n.field = t.field;
- var d = void 0;
- n.asyncValidator ? d = n.asyncValidator(n, t.value, c, t.source, l) : n.validator && (!0 === (d = n.validator(n, t.value, c, t.source, l)) ? c() : !1 === d ? c(n.message || n.field + " fails") : d instanceof Array ? c(d) : d instanceof Error && c(d.message)), d && d.then && d.then((function () {
- return c()
- }), (function (t) {
- return c(t)
- }))
- }), (function (t) {
- p(t)
- }))
- }, getType: function (t) {
- if (void 0 === t.type && t.pattern instanceof RegExp && (t.type = "pattern"), "function" != typeof t.validator && t.type && !l.default.hasOwnProperty(t.type)) throw new Error((0, r.format)("Unknown rule type %s", t.type));
- return t.type || "string"
- }, getValidationMethod: function (t) {
- if ("function" == typeof t.validator) return t.validator;
- var e = Object.keys(t), n = e.indexOf("message");
- return -1 !== n && e.splice(n, 1), 1 === e.length && "required" === e[0] ? l.default.required : l.default[this.getType(t)] || !1
- }
- }, u.register = function (t, e) {
- if ("function" != typeof e) throw new Error("Cannot register a validator by type, validator is not a function");
- l.default[t] = e
- }, u.warning = r.warning, u.messages = c.messages, e.default = u
- }, function (t, e, n) {
- t.exports = function () {
- "use strict";
- var t = function (t) {
- return function (t) {
- return !!t && "object" == typeof t
- }(t) && !function (t) {
- var n = Object.prototype.toString.call(t);
- return "[object RegExp]" === n || "[object Date]" === n || function (t) {
- return t.$$typeof === e
- }(t)
- }(t)
- }, e = "function" == typeof Symbol && Symbol.for ? Symbol.for("react.element") : 60103;
- function n(t, e) {
- return !1 !== e.clone && e.isMergeableObject(t) ? r((n = t, Array.isArray(n) ? [] : {}), t, e) : t;
- var n
- }
- function i(t, e, i) {
- return t.concat(e).map((function (t) {
- return n(t, i)
- }))
- }
- function o(t) {
- return Object.keys(t).concat(function (t) {
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter((function (e) {
- return t.propertyIsEnumerable(e)
- })) : []
- }(t))
- }
- function a(t, e, i) {
- var a = {};
- return i.isMergeableObject(t) && o(t).forEach((function (e) {
- a[e] = n(t[e], i)
- })), o(e).forEach((function (o) {
- i.isMergeableObject(e[o]) && t[o] ? a[o] = function (t, e) {
- if (!e.customMerge) return r;
- var n = e.customMerge(t);
- return "function" == typeof n ? n : r
- }(o, i)(t[o], e[o], i) : a[o] = n(e[o], i)
- })), a
- }
- function r(e, o, r) {
- (r = r || {}).arrayMerge = r.arrayMerge || i, r.isMergeableObject = r.isMergeableObject || t;
- var s = Array.isArray(o);
- return s === Array.isArray(e) ? s ? r.arrayMerge(e, o, r) : a(e, o, r) : n(o, r)
- }
- return r.all = function (t, e) {
- if (!Array.isArray(t)) throw new Error("first argument should be an array");
- return t.reduce((function (t, n) {
- return r(t, n, e)
- }), {})
- }, r
- }()
- }, function (t, e, n) {
- "use strict";
- var i = n(4);
- function o(t) {
- return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- })(t)
- }
- e.a = function (t, e, n, a) {
- if (a) {
- if (window.Mock) {
- var r = (window.Mock || {}).Random, s = {};
- return Object.keys(t).forEach((function (i) {
- var a, c, u, d, p, h = t[i];
- if (h.mock && "object" === o(h.mock)) {
- var f = h.mock;
- switch (f.dic = "string" == typeof h.dicData ? e[h.dicData] : h.dicData || [], f.props = h.props || {}, f.columnType = h.type, f.multiple = h.multiple, f.type) {
- case"name":
- s[h.prop] = f.en ? r.name(!0) : r.cname();
- break;
- case"number":
- s[h.prop] = l(f);
- break;
- case"datetime":
- s[h.prop] = (p = (d = f).format, d.now ? r.now(p) : r.datetime(p));
- break;
- case"word":
- s[h.prop] = (c = (a = f).min, u = a.max, r.csentence(c, u));
- break;
- case"url":
- s[h.prop] = function (t) {
- var e = t.header, n = (t.footer, r.url()), i = n.indexOf("://");
- return n = !1 === e ? n.substring(i + 3) : "http://" + n.substring(i + 3)
- }(f);
- break;
- case"county":
- s[h.prop] = r.county(!0);
- break;
- case"dic":
- s[h.prop] = function (t) {
- var e = t.dic, n = t.props, i = t.columnType, o = t.multiple, a = n.value || "value", r = e.length;
- if (["checkbox"].includes(i) || o) {
- for (var s = l({min: 1, max: r}), c = [], u = 0; u < s; u++) for (var d = !0; d;) {
- var p = e[l({min: 0, max: r - 1})][a];
- c.includes(p) || (c.push(p), d = !1)
- }
- return c
- }
- return e[l({min: 0, max: r - 1})][a]
- }(f)
- }
- } else h.mock instanceof Function && (s[h.prop] = h.mock(n))
- })), s
- }
- i.a.logs("mock")
- }
- function l(t) {
- var e = t.max, n = t.min, i = t.precision;
- if (i) {
- var o = r.float(n, e, i) + "", a = o.indexOf(".") + 1;
- return Number(o.substring(0, a + i))
- }
- return r.integer(n, e)
- }
- }
- }, function (t, e, n) {
- var i, o;
- /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
- * @license MIT */
- void 0 === (o = "function" == typeof (i = function () {
- var t, e, n = {version: "0.2.0"}, i = n.settings = {
- minimum: .08,
- easing: "ease",
- positionUsing: "",
- speed: 200,
- trickle: !0,
- trickleRate: .02,
- trickleSpeed: 800,
- showSpinner: !0,
- barSelector: '[role="bar"]',
- spinnerSelector: '[role="spinner"]',
- parent: "body",
- template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
- };
- function o(t, e, n) {
- return t < e ? e : t > n ? n : t
- }
- function a(t) {
- return 100 * (-1 + t)
- }
- n.configure = function (t) {
- var e, n;
- for (e in t) void 0 !== (n = t[e]) && t.hasOwnProperty(e) && (i[e] = n);
- return this
- }, n.status = null, n.set = function (t) {
- var e = n.isStarted();
- t = o(t, i.minimum, 1), n.status = 1 === t ? null : t;
- var l = n.render(!e), c = l.querySelector(i.barSelector), u = i.speed, d = i.easing;
- return l.offsetWidth, r((function (e) {
- "" === i.positionUsing && (i.positionUsing = n.getPositioningCSS()), s(c, function (t, e, n) {
- var o;
- return (o = "translate3d" === i.positionUsing ? {transform: "translate3d(" + a(t) + "%,0,0)"} : "translate" === i.positionUsing ? {transform: "translate(" + a(t) + "%,0)"} : {"margin-left": a(t) + "%"}).transition = "all " + e + "ms " + n, o
- }(t, u, d)), 1 === t ? (s(l, {transition: "none", opacity: 1}), l.offsetWidth, setTimeout((function () {
- s(l, {transition: "all " + u + "ms linear", opacity: 0}), setTimeout((function () {
- n.remove(), e()
- }), u)
- }), u)) : setTimeout(e, u)
- })), this
- }, n.isStarted = function () {
- return "number" == typeof n.status
- }, n.start = function () {
- n.status || n.set(0);
- var t = function () {
- setTimeout((function () {
- n.status && (n.trickle(), t())
- }), i.trickleSpeed)
- };
- return i.trickle && t(), this
- }, n.done = function (t) {
- return t || n.status ? n.inc(.3 + .5 * Math.random()).set(1) : this
- }, n.inc = function (t) {
- var e = n.status;
- return e ? ("number" != typeof t && (t = (1 - e) * o(Math.random() * e, .1, .95)), e = o(e + t, 0, .994), n.set(e)) : n.start()
- }, n.trickle = function () {
- return n.inc(Math.random() * i.trickleRate)
- }, t = 0, e = 0, n.promise = function (i) {
- return i && "resolved" !== i.state() ? (0 === e && n.start(), t++, e++, i.always((function () {
- 0 == --e ? (t = 0, n.done()) : n.set((t - e) / t)
- })), this) : this
- }, n.render = function (t) {
- if (n.isRendered()) return document.getElementById("nprogress");
- c(document.documentElement, "nprogress-busy");
- var e = document.createElement("div");
- e.id = "nprogress", e.innerHTML = i.template;
- var o, r = e.querySelector(i.barSelector), l = t ? "-100" : a(n.status || 0),
- u = document.querySelector(i.parent);
- return s(r, {
- transition: "all 0 linear",
- transform: "translate3d(" + l + "%,0,0)"
- }), i.showSpinner || (o = e.querySelector(i.spinnerSelector)) && p(o), u != document.body && c(u, "nprogress-custom-parent"), u.appendChild(e), e
- }, n.remove = function () {
- u(document.documentElement, "nprogress-busy"), u(document.querySelector(i.parent), "nprogress-custom-parent");
- var t = document.getElementById("nprogress");
- t && p(t)
- }, n.isRendered = function () {
- return !!document.getElementById("nprogress")
- }, n.getPositioningCSS = function () {
- var t = document.body.style,
- e = "WebkitTransform" in t ? "Webkit" : "MozTransform" in t ? "Moz" : "msTransform" in t ? "ms" : "OTransform" in t ? "O" : "";
- return e + "Perspective" in t ? "translate3d" : e + "Transform" in t ? "translate" : "margin"
- };
- var r = function () {
- var t = [];
- function e() {
- var n = t.shift();
- n && n(e)
- }
- return function (n) {
- t.push(n), 1 == t.length && e()
- }
- }(), s = function () {
- var t = ["Webkit", "O", "Moz", "ms"], e = {};
- function n(n) {
- return n = n.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, (function (t, e) {
- return e.toUpperCase()
- })), e[n] || (e[n] = function (e) {
- var n = document.body.style;
- if (e in n) return e;
- for (var i, o = t.length, a = e.charAt(0).toUpperCase() + e.slice(1); o--;) if ((i = t[o] + a) in n) return i;
- return e
- }(n))
- }
- function i(t, e, i) {
- e = n(e), t.style[e] = i
- }
- return function (t, e) {
- var n, o, a = arguments;
- if (2 == a.length) for (n in e) void 0 !== (o = e[n]) && e.hasOwnProperty(n) && i(t, n, o); else i(t, a[1], a[2])
- }
- }();
- function l(t, e) {
- return ("string" == typeof t ? t : d(t)).indexOf(" " + e + " ") >= 0
- }
- function c(t, e) {
- var n = d(t), i = n + e;
- l(n, e) || (t.className = i.substring(1))
- }
- function u(t, e) {
- var n, i = d(t);
- l(t, e) && (n = i.replace(" " + e + " ", " "), t.className = n.substring(1, n.length - 1))
- }
- function d(t) {
- return (" " + (t.className || "") + " ").replace(/\s+/gi, " ")
- }
- function p(t) {
- t && t.parentNode && t.parentNode.removeChild(t)
- }
- return n
- }) ? i.call(e, n, e, t) : i) || (t.exports = o)
- }, function (t, e, n) {
- "use strict";
- var i = n(1), o = n(20), a = n(11), r = n(3), s = n(15), l = {
- name: "column-dynamic",
- components: {formTemp: s.a},
- inject: ["dynamic", "crud"],
- props: {t: Function, columnOption: {type: Object, required: !0}},
- created: function () {
- var t = this,
- e = ["getColumnProp", "corArray", "openImg", "detailData", "vaildLabel", "vaildColumn", "handleDetail", "handleShowLabel", "handleChange", "columnChange", "getImgList", "handleFiltersMethod", "handleFilters"];
- Object.keys(this.dynamic).forEach((function (n) {
- e.includes(n) && (t[n] = t.dynamic[n])
- }))
- }
- }, c = n(0), u = Object(c.a)(l, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("el-table-column", {
- attrs: {
- label: t.columnOption.label,
- "min-width": t.columnOption.minWidth,
- width: t.columnOption.width,
- "render-header": t.columnOption.renderHeader,
- align: t.columnOption.align || t.crud.tableOption.align,
- "header-align": t.columnOption.headerAlign || t.crud.tableOption.headerAlign,
- prop: t.columnOption.prop
- }
- }, [t._l(t.columnOption.children, (function (e) {
- return [e.children && e.children.length ? n("column-dynamic", {
- key: e.label,
- attrs: {columnOption: e},
- scopedSlots: t._u([t._l(t.crud.mainSlot, (function (e) {
- return {
- key: e.prop, fn: function (n) {
- return [t._t(e.prop, null, null, n)]
- }
- }
- })), t._l(t.crud.headerSlot, (function (e) {
- return {
- key: t.crud.getSlotName(e, "H"), fn: function (n) {
- return [t._t(t.crud.getSlotName(e, "H"), null, null, n)]
- }
- }
- })), t._l(t.crud.mainSlot, (function (e) {
- return {
- key: t.crud.getSlotName(e, "F"), fn: function (n) {
- return [t._t(t.crud.getSlotName(e, "F"), null, null, n)]
- }
- }
- }))], null, !0)
- }) : ["dynamic"].includes(e.type) ? t._e() : [t.vaildColumn(e) ? n("el-table-column", {
- key: e.prop,
- attrs: {
- prop: e.prop,
- label: e.label,
- "filter-placement": "bottom-end",
- filters: t.getColumnProp(e, "filters"),
- "filter-method": t.getColumnProp(e, "filterMethod") ? t.handleFiltersMethod : void 0,
- "filter-multiple": t.vaildData(e.filterMultiple, !0),
- "show-overflow-tooltip": e.overHidden,
- "min-width": e.minWidth,
- sortable: t.getColumnProp(e, "sortable"),
- "render-header": e.renderHeader,
- align: e.align || t.crud.tableOption.align,
- "header-align": e.headerAlign || t.crud.tableOption.headerAlign,
- width: t.getColumnProp(e, "width"),
- fixed: t.getColumnProp(e, "fixed")
- },
- scopedSlots: t._u([{
- key: "header", fn: function (i) {
- return [t.crud.$scopedSlots[t.crud.getSlotName(e, "H")] ? t._t(t.crud.getSlotName(e, "H"), null, null, Object.assign(i, {column: e})) : n("el-popover", {
- attrs: {
- placement: "bottom",
- disabled: !0 !== (t.crud.default[e.prop] || {}).screen,
- trigger: "hover"
- }
- }, [n("el-input", {
- attrs: {type: "text", placeholder: "请输入 " + e.label + " 筛选关键字", size: "mini"},
- model: {
- value: (t.crud.default[e.prop] || {}).screenValue, callback: function (n) {
- t.$set(t.crud.default[e.prop] || {}, "screenValue", n)
- }, expression: "(crud.default[column.prop] || {}).screenValue"
- }
- }), t._v(" "), n("span", {attrs: {slot: "reference"}, slot: "reference"}, [t._v(t._s(e.label))])], 1)]
- }
- }, {
- key: "default", fn: function (i) {
- var o = i.row, a = i.$index;
- return [o.$cellEdit && e.cell ? n("el-form-item", {
- attrs: {
- prop: t.crud.isTree ? "" : "list." + a + "." + e.prop,
- label: t.vaildLabel(e, o, " "),
- "label-width": t.vaildLabel(e, o, "1px"),
- rules: e.rules
- }
- }, [t.crud.$scopedSlots[t.crud.getSlotName(e, "F")] ? t._t(t.crud.getSlotName(e, "F"), null, null, {
- row: o,
- dic: t.crud.DIC[e.prop],
- size: t.crud.isMediumSize,
- index: a,
- disabled: t.crud.btnDisabledList[a],
- label: t.handleShowLabel(o, e, t.crud.DIC[e.prop]),
- $cell: o.$cellEdit
- }) : n("form-temp", t._b({
- attrs: {
- column: e,
- size: t.crud.isMediumSize,
- dic: (t.crud.cascaderDIC[a] || {})[e.prop] || t.crud.DIC[e.prop],
- props: e.props || t.crud.tableOption.props,
- readonly: e.readonly,
- disabled: t.crud.disabled || t.crud.tableOption.disabled || e.disabled || t.crud.btnDisabledList[a],
- clearable: t.vaildData(e.clearable, !1)
- }, on: {
- change: function (n) {
- return t.columnChange(t.index, o, e)
- }
- }, model: {
- value: o[e.prop], callback: function (n) {
- t.$set(o, e.prop, n)
- }, expression: "row[column.prop]"
- }
- }, "form-temp", t.$uploadFun(e, t.crud), !1))], 2) : t.crud.$scopedSlots[e.prop] ? t._t(e.prop, null, {
- row: o,
- index: a,
- dic: t.crud.DIC[e.prop],
- size: t.crud.isMediumSize,
- label: t.handleShowLabel(o, e, t.crud.DIC[e.prop])
- }) : [["img", "upload"].includes(e.type) ? n("span", [n("div", {staticClass: "avue-crud__img"}, t._l(t.getImgList(o, e), (function (i, a) {
- return n("img", {
- key: a, attrs: {src: i}, on: {
- click: function (n) {
- t.openImg(t.getImgList(o, e), a)
- }
- }
- })
- })), 0)]) : ["url"].includes(e.type) ? n("span", t._l(t.corArray(o[e.prop], e.separator), (function (i, o) {
- return n("el-link", {
- key: o,
- attrs: {type: "primary", href: i, target: e.target || "_blank"}
- }, [t._v(t._s(i))])
- })), 1) : ["rate"].includes(e.type) ? n("span", [n("avue-rate", {
- attrs: {disabled: ""},
- model: {
- value: o[e.prop], callback: function (n) {
- t.$set(o, e.prop, n)
- }, expression: "row[column.prop]"
- }
- })], 1) : n("span", {domProps: {innerHTML: t._s(t.handleDetail(o, e))}})]]
- }
- }], null, !0)
- }) : t._e()]]
- }))], 2)
- }), [], !1, null, null, null).exports;
- function d(t) {
- return (d = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- })(t)
- }
- function p(t) {
- return function (t) {
- if (Array.isArray(t)) return h(t)
- }(t) || function (t) {
- if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t)
- }(t) || function (t, e) {
- if (!t) return;
- if ("string" == typeof t) return h(t, e);
- var n = Object.prototype.toString.call(t).slice(8, -1);
- "Object" === n && t.constructor && (n = t.constructor.name);
- if ("Map" === n || "Set" === n) return Array.from(t);
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return h(t, e)
- }(t) || function () {
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
- }()
- }
- function h(t, e) {
- (null == e || e > t.length) && (e = t.length);
- for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n];
- return i
- }
- var f = Object(i.a)({
- name: "crud", data: function () {
- return {count: {}}
- }, components: {formTemp: s.a, columnDynamic: u}, inject: ["crud"], provide: function () {
- return {crud: this.crud, dynamic: this}
- }, props: {
- tableOption: {
- type: Object, default: function () {
- return {}
- }
- }, columnOption: {
- type: Array, default: function () {
- return []
- }
- }
- }, computed: {
- list: function () {
- var t = this, e = p(this.columnOption);
- return e = e.sort((function (e, n) {
- var i, o;
- return ((null === (i = t.crud.default[e.prop]) || void 0 === i ? void 0 : i.order) || 0) - ((null === (o = t.crud.default[n.prop]) || void 0 === o ? void 0 : o.order) || 0)
- }))
- }
- }, methods: {
- getColumnProp: function (t, e) {
- var n, i;
- if ("filterMethod" === e) return null === (n = this.crud.default[t.prop]) || void 0 === n ? void 0 : n.filters;
- if (this.crud.isMobile && ["fixed"].includes(e)) return !1;
- var o = null === (i = this.crud.default[t.prop]) || void 0 === i ? void 0 : i[e];
- return "width" != e || 0 != o ? "filters" == e ? this.handleFilters(t, o) : o : void 0
- }, vaildLabel: function (t, e, n) {
- if (t.rules && e.$cellEdit) return n
- }, vaildColumn: function (t) {
- var e;
- return !0 !== (null === (e = this.crud.default[t.prop]) || void 0 === e ? void 0 : e.hide)
- }, corArray: function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : r.g;
- return this.validatenull(t) ? [] : Array.isArray(t) ? t : t.split(e)
- }, getImgList: function (t, e) {
- var n = (e.propsHttp || {}).home || "", i = (e.props || {}).value || r.e.value;
- if (this.validatenull(t[e.prop])) return [];
- if ("picture-img" == e.listType) return [n + t[e.prop]];
- var o = this.corArray(this.deepClone(t[e.prop]), e.separator);
- return o.forEach((function (t, e) {
- "object" === d(t) ? o[e] = n + t[i] : o[e] = n + t
- })), o
- }, handleDetail: function (t, e) {
- var n = t[e.prop], i = e.parentProp ? (this.crud.cascaderDIC[t.$index] || {})[e.prop] : this.crud.DIC[e.prop];
- return n = Object(o.a)(t, e, this.tableOption, i), this.validatenull(i) || (t["$" + e.prop] = n), n
- }, handleShowLabel: function (t, e, n) {
- var i = "";
- return this.validatenull(n) || (i = Object(o.a)(t, e, this.tableOption, n), t["$" + e.prop] = i), i
- }, columnChange: function (t, e, n) {
- this.validatenull(this.count[n.prop]) && (this.count[n.prop] = 0), this.count[n.prop] = this.count[n.prop] + 1, n.cascader && this.handleChange(t, e), this.count[n.prop] % 3 == 0 && "function" == typeof n.change && !0 === n.cell && n.change({
- row: e,
- column: n,
- index: e.$index,
- value: e[n.prop]
- })
- }, handleChange: function (t, e) {
- var n = this;
- this.$nextTick((function () {
- var i = p(n.crud.propOption), o = i[t], s = o.cascader, l = e[o.prop], c = e.$index, u = i[t + 1],
- d = u.prop;
- n.validatenull(n.crud.cascaderDIC[c]) && n.$set(n.crud.cascaderDIC, c, {}), n.crud.formIndexList.includes(c) && s.forEach((function (t) {
- n.$set(n.crud.cascaderDIC[c], t.prop, []), s.forEach((function (t) {
- return e[t] = ""
- }))
- })), n.validatenull(s) || n.validatenull(l) || n.validatenull(u) || Object(a.d)({
- column: u,
- value: l,
- form: e
- }).then((function (t) {
- n.crud.formIndexList.includes(c) || n.crud.formIndexList.push(c);
- var i = Array.isArray(t) ? t : [];
- n.$set(n.crud.cascaderDIC[c], d, i), n.validatenull(i[u.cascaderIndex]) || n.validatenull(i) || n.validatenull(u.cascaderIndex) || (e[d] = i[u.cascaderIndex][(u.props || {}).value || r.e.value])
- }))
- }))
- }, openImg: function (t, e) {
- t = t.map((function (t) {
- return {thumbUrl: t, url: t}
- })), this.$ImagePreview(t, e)
- }, handleFiltersMethod: function (t, e, n) {
- var i = this.columnOption.filter((function (t) {
- return t.prop === n.property
- }))[0];
- return "function" == typeof i.filtersMethod ? i.filtersMethod(t, e, i) : e[i.prop] === t
- }, handleFilters: function (t, e) {
- var n = this;
- if (!0 === e) {
- var i = this.crud.DIC[t.prop] || [], o = [];
- return this.validatenull(i) ? this.crud.cellForm.list.forEach((function (e) {
- o.map((function (t) {
- return t.text
- })).includes(e[t.prop]) || o.push({text: e[t.prop], value: e[t.prop]})
- })) : i.forEach((function (e) {
- var i = t.props || n.tableOption.props || {};
- o.push({text: e[i.label || r.e.label], value: e[i.value || r.e.value]})
- })), o
- }
- }
- }
- }), m = Object(c.a)(f, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", [t._t("header"), t._v(" "), t._l(t.list, (function (e, i) {
- return [e.children && e.children.length ? n("column-dynamic", {
- key: e.label,
- attrs: {columnOption: e},
- scopedSlots: t._u([t._l(t.crud.mainSlot, (function (e) {
- return {
- key: e.prop, fn: function (n) {
- return [t._t(e.prop, null, null, n)]
- }
- }
- })), t._l(t.crud.headerSlot, (function (e) {
- return {
- key: t.crud.getSlotName(e, "H"), fn: function (n) {
- return [t._t(t.crud.getSlotName(e, "H"), null, null, n)]
- }
- }
- })), t._l(t.crud.mainSlot, (function (e) {
- return {
- key: t.crud.getSlotName(e, "F"), fn: function (n) {
- return [t._t(t.crud.getSlotName(e, "F"), null, null, n)]
- }
- }
- }))], null, !0)
- }) : ["dynamic"].includes(e.type) ? t._e() : [t.vaildColumn(e) ? n("el-table-column", {
- key: e.prop,
- attrs: {
- prop: e.prop,
- label: e.label,
- "filter-placement": "bottom-end",
- filters: t.getColumnProp(e, "filters"),
- "filter-method": t.getColumnProp(e, "filterMethod") ? t.handleFiltersMethod : void 0,
- "filter-multiple": t.vaildData(e.filterMultiple, !0),
- "show-overflow-tooltip": e.overHidden,
- "min-width": e.minWidth,
- sortable: t.getColumnProp(e, "sortable"),
- "render-header": e.renderHeader,
- align: e.align || t.tableOption.align,
- "header-align": e.headerAlign || t.tableOption.headerAlign,
- width: t.getColumnProp(e, "width"),
- fixed: t.getColumnProp(e, "fixed")
- },
- scopedSlots: t._u([{
- key: "header", fn: function (i) {
- return [t.crud.$scopedSlots[t.crud.getSlotName(e, "H")] ? t._t(t.crud.getSlotName(e, "H"), null, null, Object.assign(i, {column: e})) : n("el-popover", {
- attrs: {
- placement: "bottom",
- disabled: !0 !== (t.crud.default[e.prop] || {}).screen,
- trigger: "hover"
- }
- }, [n("el-input", {
- attrs: {type: "text", placeholder: "请输入 " + e.label + " 筛选关键字", size: "mini"},
- model: {
- value: (t.crud.default[e.prop] || {}).screenValue, callback: function (n) {
- t.$set(t.crud.default[e.prop] || {}, "screenValue", n)
- }, expression: "(crud.default[column.prop] || {}).screenValue"
- }
- }), t._v(" "), n("span", {attrs: {slot: "reference"}, slot: "reference"}, [t._v(t._s(e.label))])], 1)]
- }
- }, {
- key: "default", fn: function (o) {
- var a = o.row, r = o.$index;
- return [a.$cellEdit && e.cell ? n("el-form-item", {
- attrs: {
- prop: t.crud.isTree ? "" : "list." + r + "." + e.prop,
- label: t.vaildLabel(e, a, " "),
- "label-width": t.vaildLabel(e, a, "1px"),
- rules: e.rules
- }
- }, [t.crud.$scopedSlots[t.crud.getSlotName(e, "F")] ? t._t(t.crud.getSlotName(e, "F"), null, null, {
- row: a,
- dic: t.crud.DIC[e.prop],
- size: t.crud.isMediumSize,
- index: r,
- disabled: t.crud.btnDisabledList[r],
- label: t.handleShowLabel(a, e, t.crud.DIC[e.prop]),
- $cell: a.$cellEdit
- }) : n("form-temp", t._b({
- attrs: {
- column: e,
- size: t.crud.isMediumSize,
- dic: (t.crud.cascaderDIC[r] || {})[e.prop] || t.crud.DIC[e.prop],
- props: e.props || t.tableOption.props,
- readonly: e.readonly,
- disabled: t.crud.disabled || t.tableOption.disabled || e.disabled || t.crud.btnDisabledList[r],
- clearable: t.vaildData(e.clearable, !1)
- }, on: {
- change: function (n) {
- return t.columnChange(i, a, e)
- }
- }, model: {
- value: a[e.prop], callback: function (n) {
- t.$set(a, e.prop, n)
- }, expression: "row[column.prop]"
- }
- }, "form-temp", t.$uploadFun(e, t.crud), !1))], 2) : t.crud.$scopedSlots[e.prop] ? t._t(e.prop, null, {
- row: a,
- index: r,
- dic: t.crud.DIC[e.prop],
- size: t.crud.isMediumSize,
- label: t.handleShowLabel(a, e, t.crud.DIC[e.prop])
- }) : [["img", "upload"].includes(e.type) ? n("span", [n("div", {staticClass: "avue-crud__img"}, t._l(t.getImgList(a, e), (function (i, o) {
- return n("img", {
- key: o, attrs: {src: i}, on: {
- click: function (n) {
- t.openImg(t.getImgList(a, e), o)
- }
- }
- })
- })), 0)]) : ["url"].includes(e.type) ? n("span", t._l(t.corArray(a[e.prop], e.separator), (function (i, o) {
- return n("el-link", {
- key: o,
- attrs: {type: "primary", href: i, target: e.target || "_blank"}
- }, [t._v(t._s(i))])
- })), 1) : ["rate"].includes(e.type) ? n("span", [n("avue-rate", {
- attrs: {disabled: ""},
- model: {
- value: a[e.prop], callback: function (n) {
- t.$set(a, e.prop, n)
- }, expression: "row[column.prop]"
- }
- })], 1) : n("span", {domProps: {innerHTML: t._s(t.handleDetail(a, e))}})]]
- }
- }], null, !0)
- }) : t._e()]]
- })), t._v(" "), t._t("footer")], 2)
- }), [], !1, null, null, null);
- e.a = m.exports
- }, function (t, e, n) {
- "use strict";
- var i = n(7), o = n(6), a = n(1), r = n(15), s = Object(a.a)({
- name: "crud", mixins: [o.a], inject: ["crud"], components: {formTemp: r.a}, data: function () {
- return {box: !1, formDefault: {}, list: [], columnList: [], dateList: i.dateList, columnProps: {value: "prop"}}
- }, computed: {
- symbolDic: function () {
- return [{label: "=", value: "="}, {label: "≠", value: "≠"}, {label: "like", value: "like"}, {
- label: ">",
- value: ">"
- }, {label: "≥", value: "≥"}, {label: "<", value: "<"}, {label: "≤", value: "≤"}, {label: "∈", value: "∈"}]
- }, result: function () {
- var t = this, e = [];
- return this.list.forEach((function (n) {
- t.validatenull(n.value) || e.push([n.text, n.symbol, n.value])
- })), e
- }, columnObj: function () {
- return this.columnOption[0]
- }, columnOption: function () {
- return this.crud.propOption.filter((function (t) {
- return !1 !== t.filter && !1 !== t.showColumn
- }))
- }
- }, created: function () {
- this.getSearchType = i.g, this.formDefault = Object(i.d)(this.columnOption).tableForm
- }, methods: {
- getColumnByIndex: function (t, e) {
- var n = this.deepClone(t);
- return n.type = Object(i.g)(n), n.multiple = ["checkbox"].includes(t.type), n
- }, handleDelete: function (t) {
- this.list.splice(t, 1), this.columnList.splice(t, 1)
- }, handleClear: function () {
- this.list = [], this.columnList = []
- }, handleValueClear: function () {
- var t = this;
- this.list.forEach((function (e, n) {
- t.$set(t.list[n], "value", t.formDefault[e.text])
- }))
- }, handleGetColumn: function (t) {
- return this.columnOption.find((function (e) {
- return e.prop === t
- }))
- }, handleSubmit: function () {
- this.list.push({}), this.list.splice(this.list.length - 1, 1), this.crud.$emit("filter", this.result), this.box = !1
- }, handleChange: function (t, e) {
- var n = this.handleGetColumn(t);
- this.columnList[e] = n, this.list[e].value = this.formDefault[t]
- }, handleAdd: function () {
- this.list.length;
- var t = this.columnObj.prop, e = this.handleGetColumn(t);
- this.columnList.push(e), this.list.push({
- text: t,
- value: this.formDefault[t],
- symbol: this.symbolDic[0].value
- })
- }
- }
- }), l = n(0), c = Object(l.a)(s, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("el-drawer", {
- staticClass: "avue-dialog",
- class: [t.b("dialog"), t.b("filter")],
- attrs: {
- "lock-scroll": "",
- "modal-append-to-body": !1,
- "append-to-body": "",
- title: t.t("crud.filterTitle"),
- size: t.crud.isMobile ? "100%" : "60%",
- visible: t.box
- },
- on: {
- "update:visible": function (e) {
- t.box = e
- }
- }
- }, [n("el-row", {attrs: {span: 24}}, [n("div", {class: t.b("filter-menu")}, [n("el-button-group", [n("el-button", {
- attrs: {
- type: "primary",
- size: t.crud.isMediumSize
- }, on: {click: t.handleAdd}
- }, [t._v(t._s(t.t("crud.filter.addBtn")))]), t._v(" "), n("el-button", {
- attrs: {
- type: "primary",
- size: t.crud.isMediumSize
- }, on: {click: t.handleClear}
- }, [t._v(t._s(t.t("crud.filter.resetBtn")))]), t._v(" "), n("el-button", {
- attrs: {
- type: "primary",
- size: t.crud.isMediumSize
- }, on: {click: t.handleValueClear}
- }, [t._v(t._s(t.t("crud.filter.clearBtn")))])], 1)], 1), t._v(" "), t._l(t.list, (function (e, i) {
- return n("el-col", {
- key: i,
- class: t.b("filter-item"),
- attrs: {md: 12, xs: 24, sm: 12}
- }, [n("avue-select", {
- class: t.b("filter-label"),
- attrs: {dic: t.columnOption, props: t.columnProps, clearable: !1, size: t.crud.isMediumSize},
- on: {
- change: function (n) {
- return t.handleChange(e.text, i)
- }
- },
- model: {
- value: e.text, callback: function (n) {
- t.$set(e, "text", n)
- }, expression: "column.text"
- }
- }), t._v(" "), n("avue-select", {
- class: t.b("filter-symbol"),
- attrs: {dic: t.symbolDic, clearable: !1, size: t.crud.isMediumSize},
- model: {
- value: e.symbol, callback: function (n) {
- t.$set(e, "symbol", n)
- }, expression: "column.symbol"
- }
- }), t._v(" "), n("form-temp", {
- class: t.b("filter-value"),
- attrs: {
- column: t.getColumnByIndex(t.columnList[i]),
- size: t.crud.isMediumSize,
- dic: t.crud.DIC[t.columnList[i].prop],
- props: t.columnList[i].props || t.crud.tableOption.props
- },
- model: {
- value: e.value, callback: function (n) {
- t.$set(e, "value", n)
- }, expression: "column.value"
- }
- }), t._v(" "), n("el-button", {
- class: t.b("filter-icon"),
- attrs: {type: "danger", size: "mini", circle: "", icon: "el-icon-minus"},
- on: {
- click: function (e) {
- return t.handleDelete(i)
- }
- }
- })], 1)
- })), t._v(" "), n("el-col", {
- staticClass: "avue-form__menu avue-form__menu--right",
- attrs: {span: 24}
- }, [n("el-button", {
- attrs: {type: "primary", size: t.crud.isMediumSize},
- on: {click: t.handleSubmit}
- }, [t._v(t._s(t.t("crud.filter.submitBtn")))]), t._v(" "), n("el-button", {
- attrs: {size: t.crud.isMediumSize},
- on: {
- click: function (e) {
- t.box = !1
- }
- }
- }, [t._v(t._s(t.t("crud.filter.cancelBtn")))])], 1)], 2)], 1)
- }), [], !1, null, null, null);
- e.a = c.exports
- }, function (t, e, n) {
- "use strict";
- var i = n(1), o = n(8), a = n(6), r = n(12), s = Object(i.a)({
- name: "crud",
- data: function () {
- return {config: o.a}
- },
- mixins: [a.a],
- inject: ["crud"],
- directives: {permission: r.a},
- props: {
- tableOption: {
- type: Object, default: function () {
- return {}
- }
- }
- },
- computed: {
- menuType: function () {
- return this.tableOption.menuType || this.$AVUE.menuType || "button"
- }, isIconMenu: function () {
- return "icon" === this.menuType
- }, isTextMenu: function () {
- return "text" === this.menuType
- }, isMenu: function () {
- return "menu" === this.menuType
- }
- },
- methods: {
- menuText: function (t) {
- return ["text", "menu"].includes(this.menuType) ? "text" : t
- }
- }
- }), l = n(0), c = Object(l.a)(s, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return t.vaildData(t.tableOption.menu, t.config.menu) && t.crud.getPermission("menu") ? n("el-table-column", {
- class: t.b("btn"),
- attrs: {
- prop: "menu",
- fixed: t.vaildData(t.tableOption.menuFixed, t.config.menuFixed),
- label: t.tableOption.menuTitle || t.t("crud.menu"),
- align: t.tableOption.menuAlign || t.config.menuAlign,
- "header-align": t.tableOption.menuHeaderAlign || t.config.menuHeaderAlign,
- width: t.crud.isMobile ? t.tableOption.menuXsWidth || t.config.menuXsWidth : t.tableOption.menuWidth || t.config.menuWidth
- },
- scopedSlots: t._u([{
- key: "default", fn: function (e) {
- var i = e.row, o = e.$index;
- return [t.isMenu ? n("el-dropdown", {attrs: {size: t.crud.isMediumSize}}, [n("el-button", {
- attrs: {
- type: "text",
- size: t.crud.isMediumSize
- }
- }, [t._v("\n " + t._s(t.tableOption.menuBtnTitle || t.t("crud.menuBtn")) + "\n "), n("i", {staticClass: "el-icon-arrow-down el-icon--right"})]), t._v(" "), n("el-dropdown-menu", {
- attrs: {slot: "dropdown"},
- slot: "dropdown"
- }, [t.vaildData(t.tableOption.viewBtn, t.config.viewBtn) ? n("el-dropdown-item", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("viewBtn", i, o),
- expression: "crud.getPermission('viewBtn',row,$index)"
- }], attrs: {icon: t.config.viewBtnIcon}, nativeOn: {
- click: function (e) {
- return t.crud.rowView(i, o)
- }
- }
- }, [t._v(t._s(t.t("crud.viewBtn")))]) : t._e(), t._v(" "), t.vaildData(t.tableOption.editBtn, t.config.editBtn) ? n("el-dropdown-item", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("editBtn", i, o),
- expression: "crud.getPermission('editBtn',row,$index)"
- }], attrs: {icon: t.config.editBtnIcon}, nativeOn: {
- click: function (e) {
- return t.crud.rowEdit(i, o)
- }
- }
- }, [t._v(t._s(t.t("crud.editBtn")))]) : t._e(), t._v(" "), t.vaildData(t.tableOption.copyBtn, t.config.copyBtn) ? n("el-dropdown-item", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("copyBtn", i, o),
- expression: "crud.getPermission('copyBtn',row,$index)"
- }], attrs: {icon: t.config.copyBtnIcon}, nativeOn: {
- click: function (e) {
- return t.crud.rowCopy(i)
- }
- }
- }, [t._v(t._s(t.t("crud.copyBtn")))]) : t._e(), t._v(" "), t.vaildData(t.tableOption.delBtn, t.config.delBtn) ? n("el-dropdown-item", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("delBtn", i, o),
- expression: "crud.getPermission('delBtn',row,$index)"
- }], attrs: {icon: t.config.delBtnIcon}, nativeOn: {
- click: function (e) {
- return t.crud.rowDel(i, o)
- }
- }
- }, [t._v(t._s(t.t("crud.delBtn")))]) : t._e(), t._v(" "), t._t("menuBtn", null, {
- row: i,
- type: t.menuText("primary"),
- disabled: t.crud.btnDisabled,
- size: t.crud.isMediumSize,
- index: o
- })], 2)], 1) : ["button", "text", "icon"].includes(t.menuType) ? [t.vaildData(t.tableOption.cellBtn, t.config.cellBtn) ? [t.vaildData(t.tableOption.editBtn, t.config.editBtn) && !i.$cellEdit ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("editBtn", i, o),
- expression: "crud.getPermission('editBtn',row,$index)"
- }],
- attrs: {
- type: t.menuText("primary"),
- icon: t.config.editBtnIcon,
- size: t.crud.isMediumSize,
- disabled: t.crud.btnDisabledList[o]
- },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowCell(i, o)
- }
- }
- }, [t.isIconMenu ? t._e() : [t._v("\n " + t._s(t.crud.menuIcon("editBtn")) + "\n ")]], 2) : t.vaildData(t.tableOption.saveBtn, t.config.saveBtn) && i.$cellEdit ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("saveBtn", i, o),
- expression: "crud.getPermission('saveBtn',row,$index)"
- }],
- attrs: {
- type: t.menuText("primary"),
- icon: t.config.saveBtnIcon,
- size: t.crud.isMediumSize,
- disabled: t.crud.btnDisabledList[o]
- },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowCell(i, o)
- }
- }
- }, [t.isIconMenu ? t._e() : [t._v("\n " + t._s(t.crud.menuIcon("saveBtn")) + "\n ")]], 2) : t._e(), t._v(" "), i.$cellEdit ? n("el-button", {
- attrs: {
- type: t.menuText("danger"),
- icon: t.config.cancelBtnIcon,
- size: t.crud.isMediumSize,
- disabled: t.crud.btnDisabledList[o]
- }, on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowCancel(i, o)
- }
- }
- }, [t.isIconMenu ? t._e() : [t._v("\n " + t._s(t.crud.menuIcon("cancelBtn")) + "\n ")]], 2) : t._e()] : t._e(), t._v(" "), t.vaildData(t.tableOption.viewBtn, t.config.viewBtn) ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("viewBtn", i, o),
- expression: "crud.getPermission('viewBtn',row,$index)"
- }],
- attrs: {
- type: t.menuText("success"),
- icon: t.config.viewBtnIcon,
- size: t.crud.isMediumSize,
- disabled: t.btnDisabled
- },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowView(i, o)
- }
- }
- }, [t.isIconMenu ? t._e() : [t._v("\n " + t._s(t.crud.menuIcon("viewBtn")) + "\n ")]], 2) : t._e(), t._v(" "), t.vaildData(t.tableOption.editBtn, t.config.editBtn) && !t.tableOption.cellBtn ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("editBtn", i, o),
- expression: "crud.getPermission('editBtn',row,$index)"
- }],
- attrs: {
- type: t.menuText("primary"),
- icon: t.config.editBtnIcon,
- size: t.crud.isMediumSize,
- disabled: t.btnDisabled
- },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowEdit(i, o)
- }
- }
- }, [t.isIconMenu ? t._e() : [t._v("\n " + t._s(t.crud.menuIcon("editBtn")) + "\n ")]], 2) : t._e(), t._v(" "), t.vaildData(t.tableOption.copyBtn, t.config.copyBtn) ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("copyBtn", i, o),
- expression: "crud.getPermission('copyBtn',row,$index)"
- }],
- attrs: {
- type: t.menuText("primary"),
- icon: t.config.copyBtnIcon,
- size: t.crud.isMediumSize,
- disabled: t.btnDisabled
- },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowCopy(i)
- }
- }
- }, [t.isIconMenu ? t._e() : [t._v("\n " + t._s(t.crud.menuIcon("copyBtn")) + "\n ")]], 2) : t._e(), t._v(" "), t.vaildData(t.tableOption.delBtn, t.config.delBtn) && !i.$cellEdit ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("delBtn", i, o),
- expression: "crud.getPermission('delBtn',row,$index)"
- }],
- attrs: {
- type: t.menuText("danger"),
- icon: t.config.delBtnIcon,
- size: t.crud.isMediumSize,
- disabled: t.btnDisabled
- },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowDel(i, o)
- }
- }
- }, [t.isIconMenu ? t._e() : [t._v("\n " + t._s(t.crud.menuIcon("delBtn")) + "\n ")]], 2) : t._e()] : t._e(), t._v(" "), t._t("menu", null, {
- row: i,
- type: t.menuText("primary"),
- disabled: t.crud.btnDisabled,
- size: t.crud.isMediumSize,
- index: o
- })]
- }
- }], null, !0)
- }) : t._e()
- }), [], !1, null, null, null);
- e.a = c.exports
- }, function (t, e, n) {
- "use strict";
- var i = n(1), o = (n(4), n(6)), a = Object(i.a)({
- name: "crud", mixins: [o.a], inject: ["crud"], data: function () {
- return {columnBox: !1}
- }, computed: {
- list: function () {
- var t = [];
- for (var e in this.crud.default) {
- var n = this.crud.default[e] || {};
- 0 != n.showColumn && t.push(Object.assign(n, {prop: e}))
- }
- return t
- }
- }
- }), r = n(0), s = Object(r.a)(a, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("el-drawer", {
- staticClass: "avue-dialog",
- class: [t.b("dialog"), t.b("column")],
- attrs: {
- "lock-scroll": "",
- "modal-append-to-body": !1,
- "append-to-body": "",
- title: t.t("crud.showTitle"),
- size: t.crud.isMobile ? "100%" : "50%",
- visible: t.columnBox
- },
- on: {
- "update:visible": function (e) {
- t.columnBox = e
- }
- }
- }, [n("el-scrollbar", {staticStyle: {height: "calc(100% - 100px)"}}, [n("el-table", {
- attrs: {
- data: t.list,
- size: "small",
- border: ""
- }
- }, [n("el-table-column", {
- attrs: {
- align: "center",
- width: "100",
- "header-align": "center",
- prop: "label",
- label: "列名"
- }
- }), t._v(" "), t._l(t.crud.defaultColumn, (function (e, i) {
- return n("el-table-column", {
- key: i,
- attrs: {prop: e.prop, align: "center", "header-align": "center", width: e.width || 50, label: e.label},
- scopedSlots: t._u([{
- key: "default", fn: function (i) {
- var o = i.row;
- return ["width" == e.prop ? n("el-slider", {
- attrs: {min: 0, max: 2e3, size: "small"},
- model: {
- value: t.crud.default[o.prop][e.prop], callback: function (n) {
- t.$set(t.crud.default[o.prop], e.prop, n)
- }, expression: "crud.default[row.prop][item.prop]"
- }
- }) : n("el-checkbox", {
- model: {
- value: t.crud.default[o.prop][e.prop], callback: function (n) {
- t.$set(t.crud.default[o.prop], e.prop, n)
- }, expression: "crud.default[row.prop][item.prop]"
- }
- })]
- }
- }], null, !0)
- })
- }))], 2)], 1)], 1)
- }), [], !1, null, null, null);
- e.a = s.exports
- }, function (t, e, n) {
- "use strict";
- var i = {
- inject: ["formSafe"], mixins: [n(6).a], computed: {
- menuSpan: function () {
- return this.formSafe.parentOption.menuSpan || 24
- }, styleName: function () {
- return 24 !== this.menuSpan ? {padding: 0} : {}
- }
- }
- }, o = n(0), a = Object(o.a)(i, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return t.vaildData(t.formSafe.parentOption.menuBtn, !0) ? n("el-col", {
- class: t.formSafe.b("menu", [t.formSafe.menuPosition]),
- style: t.styleName,
- attrs: {span: t.menuSpan, md: t.menuSpan, sm: 12, xs: 24}
- }, [n("el-form-item", {attrs: {"label-width": "0px"}}, [t.formSafe.isMock ? n("el-button", {
- attrs: {
- type: "primary",
- size: t.formSafe.controlSize,
- icon: "el-icon-edit-outline",
- loading: t.formSafe.allDisabled
- }, on: {click: t.formSafe.handleMock}
- }, [t._v(t._s(t.t("form.mockBtn")))]) : t._e(), t._v(" "), t.formSafe.isPrint ? n("el-button", {
- attrs: {
- type: "primary",
- size: t.formSafe.controlSize,
- icon: "el-icon-printer",
- loading: t.formSafe.allDisabled
- }, on: {click: t.formSafe.handlePrint}
- }, [t._v(t._s(t.t("form.printBtn")))]) : t._e(), t._v(" "), t.vaildData(t.formSafe.parentOption.submitBtn, !0) ? n("el-button", {
- attrs: {
- type: "primary",
- size: t.formSafe.controlSize,
- icon: t.formSafe.parentOption.submitIcon || "el-icon-check",
- loading: t.formSafe.allDisabled
- }, on: {click: t.formSafe.submit}
- }, [t._v(t._s(t.vaildData(t.formSafe.parentOption.submitText, t.t("form.submit"))))]) : t._e(), t._v(" "), t.vaildData(t.formSafe.parentOption.emptyBtn, !0) ? n("el-button", {
- attrs: {
- icon: t.formSafe.parentOption.emptyIcon || "el-icon-delete",
- size: t.formSafe.controlSize,
- loading: t.formSafe.allDisabled
- }, on: {click: t.formSafe.resetForm}
- }, [t._v(t._s(t.vaildData(t.formSafe.parentOption.emptyText, t.t("form.empty"))))]) : t._e(), t._v(" "), t._t("menuForm", null, {
- disabled: t.formSafe.allDisabled,
- size: t.formSafe.controlSize
- })], 2)], 1) : t._e()
- }), [], !1, null, null, null);
- e.a = a.exports
- }, function (t, e, n) {
- "use strict";
- var i = n(8), o = n(1), a = Object(o.a)({
- name: "crud", inject: ["crud"], props: {
- page: {
- type: Object, default: function () {
- return {}
- }
- }
- }, data: function () {
- return {
- config: i.a,
- defaultPage: {
- total: 0,
- pagerCount: 7,
- currentPage: 1,
- pageSize: 10,
- pageSizes: [10, 20, 30, 40, 50, 100],
- layout: "total, sizes, prev, pager, next, jumper",
- background: !0
- }
- }
- }, created: function () {
- this.pageInit(), this.crud.$emit("on-load", this.defaultPage)
- }, watch: {
- page: {
- handler: function () {
- this.pageInit()
- }, deep: !0
- }, pageFlag: function () {
- var t = this;
- this.$nextTick((function () {
- t.crud.getTableHeight()
- }))
- }, "defaultPage.total": function (t) {
- this.defaultPage.total === (this.defaultPage.currentPage - 1) * this.defaultPage.pageSize && 0 != this.defaultPage.total && (this.defaultPage.currentPage = this.defaultPage.currentPage - 1, this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("current-change", this.defaultPage.currentPage), this.updateValue())
- }
- }, computed: {
- pageFlag: function () {
- return 0 != this.defaultPage.total
- }
- }, methods: {
- pageInit: function () {
- this.defaultPage = Object.assign(this.defaultPage, this.page, {
- total: Number(this.page.total || this.defaultPage.total),
- pagerCount: Number(this.page.pagerCount || this.defaultPage.pagerCount),
- currentPage: Number(this.page.currentPage || this.defaultPage.currentPage),
- pageSize: Number(this.page.pageSize || this.defaultPage.pageSize)
- }), this.updateValue()
- }, updateValue: function () {
- this.crud.$emit("update:page", this.defaultPage)
- }, nextClick: function (t) {
- this.crud.$emit("next-click", t)
- }, prevClick: function (t) {
- this.crud.$emit("prev-click", t)
- }, sizeChange: function (t) {
- this.defaultPage.currentPage = 1, this.defaultPage.pageSize = t, this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("size-change", t)
- }, currentChange: function (t) {
- this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("current-change", t)
- }
- }
- }), r = n(0), s = Object(r.a)(a, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b("pagination")}, [t._t("page"), t._v(" "), n("el-pagination", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: t.pageFlag,
- expression: "pageFlag"
- }],
- attrs: {
- small: t.crud.isMobile,
- disabled: t.defaultPage.disabled,
- "hide-on-single-page": t.vaildData(t.crud.tableOption.simplePage, t.config.simplePage),
- "pager-count": t.defaultPage.pagerCount,
- "current-page": t.defaultPage.currentPage,
- background: t.vaildData(t.defaultPage.background, t.config.pageBackground),
- "page-size": t.defaultPage.pageSize,
- "page-sizes": t.defaultPage.pageSizes,
- layout: t.defaultPage.layout,
- total: t.defaultPage.total
- },
- on: {
- "update:currentPage": function (e) {
- return t.$set(t.defaultPage, "currentPage", e)
- },
- "update:current-page": function (e) {
- return t.$set(t.defaultPage, "currentPage", e)
- },
- "size-change": t.sizeChange,
- "prev-click": t.prevClick,
- "next-click": t.nextClick,
- "current-change": t.currentChange
- }
- })], 2)
- }), [], !1, null, null, null);
- e.a = s.exports
- }, function (t, e, n) {
- "use strict";
- var i = n(1), o = n(2), a = n(5), r = n(6), s = n(14), l = n(7), c = n(8), u = Object(i.a)({
- name: "crud__search", inject: ["crud"], mixins: [r.a, s.a], data: function () {
- return {
- show: !1,
- flag: !1,
- reload: !1,
- config: c.a,
- defaultForm: {searchForm: {}},
- searchShow: !0,
- searchForm: {}
- }
- }, props: {
- search: {
- type: Object, default: function () {
- return {}
- }
- }
- }, watch: {
- "crud.propOption": {
- handler: function () {
- this.dataformat()
- }, immediate: !0
- }, search: {
- handler: function () {
- this.searchInit()
- }, deep: !0
- }, searchForm: {
- handler: function () {
- this.$emit("input", this.searchForm), this.updateValue()
- }, deep: !0
- }
- }, created: function () {
- this.init(), this.searchInit()
- }, computed: {
- isSearchIcon: function () {
- return !0 === this.crud.option.searchIcon && this.columnLen > this.searchIndex
- }, searchIndex: function () {
- return this.crud.option.searchIndex || 2
- }, columnLen: function () {
- var t = 0;
- return this.crud.propOption.forEach((function (e) {
- e.search && t++
- })), t
- }, option: function () {
- var t = this, e = this.crud.option;
- return function (n) {
- var i = t.deepClone(n);
- return i.translate = !1, i.group && delete i.group, i.column = function () {
- var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], i = [], o = 0;
- return n.forEach((function (n) {
- if (n.search) {
- var a = o < t.searchIndex;
- n = Object.assign(n, {
- type: Object(l.g)(n),
- multiple: n.searchMultiple,
- order: n.searchOrder,
- detail: !1,
- dicFlag: !1,
- span: n.searchSpan || e.searchSpan || t.config.searchSpan,
- gutter: n.searchGutter || e.searchGutter || t.config.searchGutter,
- labelWidth: n.searchLabelWidth || e.searchLabelWidth || t.config.searchLabelWidth,
- labelPosition: n.searchLabelPosition || e.searchLabelPosition,
- tip: n.searchTip,
- placeholder: Object(l.f)(n, "search"),
- filterable: n.searchFilterable,
- tipPlacement: n.searchTipPlacement,
- filterMethod: n.searchFilterMethod,
- checkStrictly: n.searchCheckStrictly || e.searchCheckStrictly,
- tags: n.searchTags,
- row: n.searchRow,
- size: n.searchSize || e.searchSize || t.crud.controlSize,
- clearable: n.searchClearable,
- rules: n.searchRules,
- disabled: n.searchDisabled,
- readonly: n.searchReadonly,
- value: n.searchValue,
- display: !t.isSearchIcon || (!!t.show || a)
- });
- ["disabled", "readonly"].forEach((function (t) {
- delete n[t]
- })), i.push(n), o += 1
- }
- })), i
- }(t.deepClone(t.crud.columnFormOption)), i = Object.assign(i, {
- tabs: !1,
- enter: t.vaildData(e.searchEnter, !0),
- printBtn: !1,
- mockBtn: !1,
- size: e.searchSize,
- submitText: t.vaildData(e.searchBtnText, t.t("crud.searchBtn")),
- submitBtn: t.vaildData(e.searchBtn, t.config.searchSubBtn),
- submitIcon: e.searchBtnIcon || t.config.searchBtnIcon,
- emptyText: t.vaildData(e.emptyBtnText, t.t("crud.emptyBtn")),
- emptyBtn: t.vaildData(e.emptyBtn, t.config.emptyBtn),
- emptyIcon: e.emptyBtnIcon || t.config.emptyBtnIcon,
- menuSpan: t.show || !t.isSearchIcon ? e.searchMenuSpan : 6,
- menuPosition: e.searchMenuPosition || "center",
- dicFlag: !1,
- dicData: t.crud.DIC
- })
- }(e)
- }, searchFlag: function () {
- return !Object(a.b)(this.searchForm)
- }
- }, methods: {
- searchInit: function () {
- this.searchForm = Object.assign(this.searchForm, this.search)
- }, updateValue: function () {
- this.crud.$emit("update:search", this.searchForm)
- }, init: function () {
- this.crud.searchChange = this.searchChange, this.crud.searchReset = this.searchReset
- }, searchChange: function (t, e) {
- this.crud.$emit("search-change", t, e)
- }, resetChange: function () {
- this.crud.$emit("search-reset", this.defaultForm.tableForm)
- }, searchReset: function () {
- this.$refs.form.resetForm()
- }, handleSearchShow: function () {
- this.searchShow = !this.searchShow
- }, dataformat: function () {
- this.defaultForm = Object(l.d)(this.option.column), this.searchForm = this.deepClone(this.defaultForm.tableForm), this.searchShow = Object(o.y)(this.crud.tableOption.searchShow, this.crud.config.searchShow)
- }
- }
- }), d = n(0), p = Object(d.a)(u, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("el-collapse-transition", [n("el-card", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: t.searchShow && t.searchFlag,
- expression: "searchShow && searchFlag"
- }], class: t.b(), attrs: {shadow: t.crud.isCard}
- }, [n("avue-form", {
- ref: "form",
- attrs: {option: t.option},
- on: {submit: t.searchChange, "reset-change": t.resetChange},
- scopedSlots: t._u([{
- key: "menuForm", fn: function (e) {
- return [t._t("searchMenu", null, null, Object.assign(e, {
- search: t.searchForm,
- row: t.searchForm
- })), t._v(" "), t.isSearchIcon ? [!1 === t.show ? n("el-button", {
- attrs: {
- type: "text",
- icon: "el-icon-arrow-down"
- }, on: {
- click: function (e) {
- t.show = !0
- }
- }
- }, [t._v("展 开")]) : t._e(), t._v(" "), !0 === t.show ? n("el-button", {
- attrs: {
- type: "text",
- icon: "el-icon-arrow-up"
- }, on: {
- click: function (e) {
- t.show = !1
- }
- }
- }, [t._v("收 缩")]) : t._e()] : t._e()]
- }
- }, t._l(t.crud.searchSlot, (function (e) {
- return {
- key: e.prop, fn: function (n) {
- return [t._t(e.prop, null, null, Object.assign(n, {search: t.searchForm, row: t.searchForm}))]
- }
- }
- })), {
- key: "search", fn: function (e) {
- return [t._t("search", null, {row: t.searchForm, search: t.searchForm, size: t.crud.controlSize})]
- }
- }], null, !0),
- model: {
- value: t.searchForm, callback: function (e) {
- t.searchForm = e
- }, expression: "searchForm"
- }
- })], 1)], 1)
- }), [], !1, null, null, null);
- e.a = p.exports
- }, function (t, e, n) {
- "use strict";
- var i = n(6), o = n(12), a = n(1), r = n(8), s = n(4), l = n(16), c = n(2);
- function u(t) {
- return function (t) {
- if (Array.isArray(t)) return d(t)
- }(t) || function (t) {
- if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t)
- }(t) || function (t, e) {
- if (!t) return;
- if ("string" == typeof t) return d(t, e);
- var n = Object.prototype.toString.call(t).slice(8, -1);
- "Object" === n && t.constructor && (n = t.constructor.name);
- if ("Map" === n || "Set" === n) return Array.from(t);
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return d(t, e)
- }(t) || function () {
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
- }()
- }
- function d(t, e) {
- (null == e || e > t.length) && (e = t.length);
- for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n];
- return i
- }
- var p = Object(a.a)({
- name: "crud", mixins: [i.a], directives: {permission: o.a}, inject: ["crud"], data: function () {
- return {
- dateCreate: !1, pickerOptions: {
- shortcuts: [{
- text: "今日", onClick: function (t) {
- var e = new Date, n = new Date;
- n.setTime(n.getTime()), t.$emit("pick", [n, e])
- }
- }, {
- text: "昨日", onClick: function (t) {
- var e = new Date, n = new Date;
- n.setTime(n.getTime() - 864e5), t.$emit("pick", [n, e])
- }
- }, {
- text: "最近一周", onClick: function (t) {
- var e = new Date, n = new Date;
- n.setTime(n.getTime() - 6048e5), t.$emit("pick", [n, e])
- }
- }, {
- text: "最近一个月", onClick: function (t) {
- var e = new Date, n = new Date;
- n.setTime(n.getTime() - 2592e6), t.$emit("pick", [n, e])
- }
- }, {
- text: "最近三个月", onClick: function (t) {
- var e = new Date, n = new Date;
- n.setTime(n.getTime() - 7776e6), t.$emit("pick", [n, e])
- }
- }]
- }, config: r.a
- }
- }, created: function () {
- this.initFun()
- }, computed: {
- data: function () {
- return this.crud.tableOption.selection ? this.crud.tableSelect : this.crud.list
- }
- }, methods: {
- dateChange: function (t) {
- this.dateCreate ? this.crud.$emit("date-change", t) : this.dateCreate = !0
- }, initFun: function () {
- this.vaildData = c.y, this.crud.rowExcel = this.rowExcel, this.crud.rowPrint = this.rowPrint
- }, rowExcel: function () {
- var t, e = this;
- if (!window.saveAs || !window.XLSX) return s.a.logs("file-saver"), void s.a.logs("xlsx");
- this.validatenull(this.data) ? this.$message.warning("请勾选要导出的数据") : (this.$export.excel({
- title: (this.crud.tableOption.title || "") + Object(l.a)("yyyy-MM-dd hh:mm:ss", new Date),
- columns: (t = [], e.crud.propOption.forEach((function (n) {
- var i;
- !1 !== (null === (i = e.crud.default[n.prop]) || void 0 === i ? void 0 : i.display) && !1 !== n.showColumn && t.push({
- label: n.label,
- prop: e.validatenull(e.crud.DIC[n.prop]) && e.validatenull(n.parentProp) ? n.prop : "$" + n.prop
- })
- })), t),
- data: this.handleSum()
- }), this.crud.setCurrentRow())
- }, handleSum: function () {
- var t = this, e = this.crud.tableOption, n = this.crud.propOption, i = 0, o = u(this.crud.sumsList), a = [];
- if (this.data.forEach((function (e) {
- var i = t.deepClone(e);
- n.forEach((function (t) {
- t.bind && (i[t.prop] = Object(c.l)(i, t.bind))
- })), a.push(i)
- })), e.index && i++, e.selection && i++, e.expand && i++, o.splice(0, i), o.splice(o.length - 1, 1), e.showSummary) {
- var r = {};
- o.forEach((function (t, e) {
- (n[e] || {}).prop && (r[n[e].prop] = t)
- })), a.push(r)
- }
- return a
- }, rowPrint: function () {
- var t = this;
- this.$nextTick((function () {
- t.$Print({html: t.crud.$el.innerHTML})
- }))
- }
- }
- }), h = n(0), f = Object(h.a)(p, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b("menu")}, [n("div", {class: t.b("left")}, [t.vaildData(t.crud.tableOption.addBtn, t.config.addBtn) ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("addBtn"),
- expression: "crud.getPermission('addBtn')"
- }], attrs: {type: "primary", icon: t.config.addBtnIcon, size: t.crud.isMediumSize}, on: {click: t.crud.rowAdd}
- }, [t.crud.isIconMenu ? t._e() : [t._v("\n " + t._s(t.crud.menuIcon("addBtn")) + "\n ")]], 2) : t._e(), t._v(" "), t.vaildData(t.crud.tableOption.addRowBtn, t.config.addRowBtn) ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("addRowBtn"),
- expression: "crud.getPermission('addRowBtn')"
- }],
- attrs: {type: "primary", icon: t.config.addBtnIcon, size: t.crud.isMediumSize},
- on: {click: t.crud.rowCellAdd}
- }, [t.crud.isIconMenu ? t._e() : [t._v("\n " + t._s(t.crud.menuIcon("addBtn")) + "\n ")]], 2) : t._e(), t._v(" "), t.vaildData(t.crud.tableOption.printBtn, t.config.printBtn) ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("printBtn"),
- expression: "crud.getPermission('printBtn')"
- }], attrs: {type: "primary", icon: t.config.printBtnIcon, size: t.crud.isMediumSize}, on: {click: t.rowPrint}
- }, [t.crud.isIconMenu ? t._e() : [t._v("\n " + t._s(t.crud.menuIcon("printBtn")) + "\n ")]], 2) : t._e(), t._v(" "), t.vaildData(t.crud.tableOption.excelBtn, t.config.excelBtn) ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("excelBtn"),
- expression: "crud.getPermission('excelBtn')"
- }], attrs: {type: "primary", icon: t.config.excelBtnIcon, size: t.crud.isMediumSize}, on: {click: t.rowExcel}
- }, [t.crud.isIconMenu ? t._e() : [t._v("\n " + t._s(t.crud.menuIcon("excelBtn")) + "\n ")]], 2) : t._e(), t._v(" "), t._t("menuLeft")], 2), t._v(" "), n("div", {class: t.b("right")}, [t._t("menuRight"), t._v(" "), t.vaildData(t.crud.tableOption.dateBtn, t.config.dateBtn) ? n("avue-date", {
- staticStyle: {
- display: "inline-block",
- "margin-right": "20px"
- },
- attrs: {
- type: "datetimerange",
- "value-format": "yyyy-MM-dd HH:mm:ss",
- format: "yyyy-MM-dd HH:mm:ss",
- pickerOptions: t.pickerOptions,
- size: t.crud.isMediumSize
- },
- on: {change: t.dateChange}
- }) : t._e(), t._v(" "), n("el-tooltip", {
- attrs: {
- effect: "dark",
- content: t.t("crud.refreshBtn"),
- placement: "top"
- }
- }, [t.vaildData(t.crud.tableOption.refreshBtn, t.config.refreshBtn) ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("refreshBtn"),
- expression: "crud.getPermission('refreshBtn')"
- }],
- attrs: {icon: t.config.refreshBtnIcon, circle: "", size: t.crud.isMediumSize},
- on: {click: t.crud.refreshChange}
- }) : t._e()], 1), t._v(" "), n("el-tooltip", {
- attrs: {
- effect: "dark",
- content: t.t("crud.showBtn"),
- placement: "top"
- }
- }, [t.vaildData(t.crud.tableOption.columnBtn, t.config.columnBtn) ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("columnBtn"),
- expression: "crud.getPermission('columnBtn')"
- }], attrs: {icon: t.config.columnBtnIcon, circle: "", size: t.crud.isMediumSize}, on: {
- click: function (e) {
- t.crud.$refs.dialogColumn.columnBox = !0
- }
- }
- }) : t._e()], 1), t._v(" "), n("el-tooltip", {
- attrs: {
- effect: "dark",
- content: t.t("crud.searchBtn"),
- placement: "top"
- }
- }, [(t.crud.$refs.headerSearch || {}).searchFlag && t.vaildData(t.crud.tableOption.searchShowBtn, !0) ? n("el-button", {
- attrs: {
- icon: t.config.searchBtnIcon,
- circle: "",
- size: t.crud.isMediumSize
- }, on: {
- click: function (e) {
- return t.crud.$refs.headerSearch.handleSearchShow()
- }
- }
- }) : t._e()], 1), t._v(" "), n("el-tooltip", {
- attrs: {
- effect: "dark",
- content: t.t("crud.filterBtn"),
- placement: "top"
- }
- }, [t.vaildData(t.crud.tableOption.filterBtn, t.config.filterBtn) ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.crud.getPermission("filterBtn"),
- expression: "crud.getPermission('filterBtn')"
- }], attrs: {icon: t.config.filterBtnIcon, circle: "", size: t.crud.isMediumSize}, on: {
- click: function (e) {
- t.crud.$refs.dialogFilter.box = !0
- }
- }
- }) : t._e()], 1)], 2)])
- }), [], !1, null, null, null);
- e.a = f.exports
- }, function (t, e, n) {
- "use strict";
- var i = n(1), o = n(8), a = n(6), r = (n(12), Object(i.a)({
- name: "crud", data: function () {
- return {config: o.a}
- }, mixins: [a.a], inject: ["crud"], props: {
- tableOption: {
- type: Object, default: function () {
- return {}
- }
- }
- }, computed: {
- isSortable: function () {
- return this.tableOption.sortable
- }
- }, methods: {
- indexMethod: function (t) {
- return t + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10)
- }, setSort: function () {
- if (this.isSortable) {
- if (!window.Sortable) return void packages.logs("Sortable");
- this.rowDrop(), this.columnDrop()
- }
- }, rowDrop: function () {
- var t = this, e = this.crud.$refs.table.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];
- this.sortable = window.Sortable.create(e, {
- ghostClass: "avue-crud__sortable",
- handle: this.tableOption.dragHandler ? ".avue-crud__drag-handler" : void 0,
- onEnd: function (e) {
- var n = e.oldIndex, i = e.newIndex, o = t.crud.list.splice(n, 1)[0];
- t.crud.list.splice(i, 0, o), t.crud.$emit("sortable-change", n, i, o, t.crud.list)
- }
- })
- }, columnDrop: function () {
- var t = this, e = this.crud.$refs.table.$el.querySelector(".el-table__header-wrapper tr");
- window.Sortable.create(e, {
- animation: 180, delay: 0, onEnd: function (e) {
- var n = e.oldIndex - 1, i = e.newIndex - 1, o = t.crud.propOption, a = o.splice(n, 1)[0];
- o.splice(i, 0, a), t.crud.refreshTable(), t.crud.propOption.forEach((function (e, n) {
- t.crud.default[e.prop].order = n
- }))
- }
- })
- }
- }
- })), s = n(0), l = Object(s.a)(r, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", [n("el-table-column", {attrs: {width: "1px"}}), t._v(" "), t.tableOption.expand ? n("el-table-column", {
- attrs: {
- type: "expand",
- width: t.tableOption.expandWidth || t.config.expandWidth,
- fixed: t.vaildData(t.tableOption.expandFixed, t.config.expandFixed),
- align: "center"
- }, scopedSlots: t._u([{
- key: "default", fn: function (e) {
- var n = e.row;
- return [t._t("expand", null, {row: n, index: n.$index})]
- }
- }], null, !0)
- }) : t._e(), t._v(" "), t.tableOption.sortable && t.tableOption.dragHandler ? n("el-table-column", {
- attrs: {
- width: t.tableOption.sortableWidth || t.config.sortableWidth,
- fixed: t.vaildData(t.tableOption.sortableFixed, t.config.sortableFixed),
- align: "center"
- }, scopedSlots: t._u([{
- key: "header", fn: function (t) {
- return [n("i", {staticClass: "el-icon-sort"})]
- }
- }, {
- key: "default", fn: function (t) {
- return [n("span", {staticClass: "avue-crud__drag-handler"}, [n("i", {staticClass: "el-icon-rank"})])]
- }
- }], null, !1, 172877315)
- }) : t._e(), t._v(" "), t.tableOption.selection ? n("el-table-column", {
- attrs: {
- fixed: t.vaildData(t.tableOption.selectionFixed, t.config.selectionFixed),
- type: "selection",
- selectable: t.tableOption.selectable,
- "reserve-selection": t.vaildData(t.tableOption.reserveSelection),
- width: t.tableOption.selectionWidth || t.config.selectionWidth,
- align: "center"
- }
- }) : t._e(), t._v(" "), t.vaildData(t.tableOption.index) ? n("el-table-column", {
- attrs: {
- fixed: t.vaildData(t.tableOption.indexFixed, t.config.indexFixed),
- label: t.tableOption.indexLabel || t.config.indexLabel,
- type: "index",
- width: t.tableOption.indexWidth || t.config.indexWidth,
- index: t.indexMethod,
- align: "center"
- }
- }) : t._e()], 1)
- }), [], !1, null, null, null);
- e.a = l.exports
- }, function (t, e, n) {
- "use strict";
- var i = n(2), o = n(1), a = n(6), r = n(8), s = Object(o.a)({
- name: "crud", mixins: [a.a], inject: ["crud"], data: function () {
- return {
- config: r.a,
- boxType: "",
- fullscreen: !1,
- size: null,
- boxVisible: !1,
- boxHeight: 0,
- tableForm: {},
- index: -1
- }
- }, props: {
- value: {
- type: Object, default: function () {
- return {}
- }
- }
- }, watch: {
- boxVisible: function (t) {
- var e = this;
- t && this.$nextTick((function () {
- e.initFun()
- }))
- }, value: {
- handler: function () {
- this.formVal()
- }, deep: !0
- }, tableForm: {
- handler: function () {
- this.$emit("input", this.tableForm)
- }, deep: !0
- }
- }, computed: {
- styleName: function () {
- return {height: this.dialogHeight, overflow: "hidden"}
- }, isView: function () {
- return "view" === this.boxType
- }, isAdd: function () {
- return "add" === this.boxType
- }, isEdit: function () {
- return "edit" === this.boxType
- }, direction: function () {
- return this.crud.tableOption.dialogDirection
- }, width: function () {
- return this.vaildData(this.crud.tableOption.dialogWidth + "", this.crud.isMobile ? "100%" : r.a.dialogWidth + "")
- }, dialogType: function () {
- return this.isDrawer ? "elDrawer" : "elDialog"
- }, dialogTop: function () {
- return this.crud.tableOption.dialogTop || r.a.dialogTop
- }, isDrawer: function () {
- return "drawer" === this.crud.tableOption.dialogType
- }, dialogHeight: function () {
- return this.isDrawer ? "calc(100% - 100px)" : this.crud.tableOption.dialogHeight === r.a.dialogHeight ? this.setPx(r.a.clientHeight - 3 * this.dialogTop) : this.setPx(this.crud.tableOption.dialogHeight)
- }, formOption: function () {
- var t = this, e = this.deepClone(this.crud.tableOption);
- return e.boxType = this.boxType, e.column = this.deepClone(this.crud.propOption), e.printBtn = !1, e.mockBtn = !1, this.isView ? (e.menuBtn = !1, e.detail = !0) : (e.menuPosition = e.dialogMenuPosition || "right", this.isAdd ? (e.submitBtn = e.saveBtn, e.submitText = this.crud.menuIcon("saveBtn"), e.submitIcon = e.saveBtnIcon || r.a.saveBtnIcon) : this.isEdit && (e.submitBtn = e.updateBtn, e.submitText = this.crud.menuIcon("updateBtn"), e.submitIcon = e.updateBtnIcon || r.a.updateBtnIcon), e.emptyBtn = e.cancelBtn, e.emptyIcon = e.cancelBtnIcon || r.a.cancelBtnIcon, e.emptyText = this.crud.menuIcon("cancelBtn")), this.crud.isGroup || (e.dicFlag = !1, e.dicData = this.crud.DIC), this.validatenull(e.dicFlag) || e.column.forEach((function (n) {
- n.boxType = t.boxType, n.dicFlag = n.dicFlag || e.dicFlag
- })), e
- }, dialogTitle: function () {
- var t = "".concat(this.boxType);
- if (!this.validatenull(this.boxType)) return this.crud.tableOption[t + "Title"] || this.t("crud.".concat(t, "Title"))
- }
- }, methods: {
- handleTabClick: function (t, e) {
- this.crud.$emit("tab-click", t, e)
- }, handleFullScreen: function () {
- this.isDrawer ? this.validatenull(this.size) ? this.size = "100%" : this.size = "" : this.fullscreen ? this.fullscreen = !1 : this.fullscreen = !0
- }, handleError: function (t) {
- this.crud.$emit("error", t)
- }, handleSubmit: function (t, e) {
- this.isAdd ? this.rowSave(e) : this.isEdit && this.rowUpdate(e)
- }, initFun: function () {
- var t = this;
- ["clearValidate", "validate"].forEach((function (e) {
- t.crud[e] = t.$refs.tableForm[e]
- }))
- }, formVal: function () {
- var t = this;
- Object.keys(this.value).forEach((function (e) {
- t.tableForm[e] = t.value[e]
- }))
- }, resetForm: function () {
- this.$refs.tableForm.resetForm(), this.$emit("input", this.tableForm)
- }, rowSave: function (t) {
- this.crud.$emit("row-save", Object(i.h)(this.tableForm, this.crud.tableOption.translate), this.closeDialog, t)
- }, rowUpdate: function (t) {
- this.crud.tableIndex;
- this.crud.$emit("row-update", Object(i.h)(this.tableForm, this.crud.tableOption.translate), this.index, this.closeDialog, t)
- }, closeDialog: function (t, e) {
- var n = this;
- t && function () {
- if (n.isEdit) {
- var i = n.findObject(n.crud.data, t[n.crud.rowKey], n.crud.rowKey);
- i = Object.assign(i || {}, t)
- } else if (n.isAdd) {
- var o = function () {
- var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
- i = arguments.length > 1 ? arguments[1] : void 0;
- n.validatenull(i) ? e.push(t) : e.splice(i, 0, t)
- };
- if (n.crud.isTree) {
- var a = n.crud.treeProps.children || "children", r = n.crud.treeProps.hasChildren || "hasChildren";
- if (t[a] || (t[a] = []), n.crud.vaildParent(t)) o(n.crud.data, e); else {
- var s = n.findObject(n.crud.data, t[n.crud.rowParentKey], n.crud.rowKey);
- if (void 0 === s) return o(n.crud.data, e);
- s[a] || (s[r] = !0, s[a] = []), o(s[a], e)
- }
- } else o(n.crud.data, e)
- }
- }(), this.hide()
- }, hide: function (t) {
- var e = this, n = function () {
- t && t(), e.crud.tableIndex = -1, e.tableForm = {}, e.$nextTick((function () {
- e.boxVisible = !1
- }))
- };
- "function" == typeof this.crud.beforeClose ? this.crud.beforeClose(n, this.boxType) : n()
- }, show: function (t) {
- var e = this, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : -1;
- this.index = n, this.boxType = t;
- var i = function () {
- e.$nextTick((function () {
- e.fullscreen = e.crud.tableOption.dialogFullscreen, e.boxVisible = !0
- }))
- };
- "function" == typeof this.crud.beforeOpen ? this.crud.beforeOpen(i, this.boxType) : i()
- }
- }
- }), l = n(0), c = Object(l.a)(s, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n(t.dialogType, {
- directives: [{
- name: "dialogdrag",
- rawName: "v-dialogdrag",
- value: t.vaildData(t.crud.tableOption.dialogDrag, t.config.dialogDrag),
- expression: "vaildData(crud.tableOption.dialogDrag,config.dialogDrag)"
- }],
- tag: "component",
- staticClass: "avue-dialog",
- class: t.b("dialog", {fullscreen: t.fullscreen}),
- attrs: {
- "lock-scroll": "",
- "destroy-on-close": t.crud.tableOption.dialogDestroy,
- wrapperClosable: t.crud.tableOption.dialogClickModal,
- direction: t.direction,
- "custom-class": t.vaildData(t.crud.tableOption.customClass, t.config.customClass),
- fullscreen: t.fullscreen,
- "modal-append-to-body": !1,
- "append-to-body": "",
- top: t.setPx(t.dialogTop),
- title: t.dialogTitle,
- "close-on-press-escape": t.crud.tableOption.dialogEscape,
- "close-on-click-modal": t.crud.tableOption.dialogClickModal,
- modal: t.crud.tableOption.dialogModal,
- "show-close": t.crud.tableOption.dialogCloseBtn,
- visible: t.boxVisible,
- size: t.size ? t.size : t.width,
- width: t.setPx(t.width),
- "before-close": t.hide
- },
- on: {
- "update:visible": function (e) {
- t.boxVisible = e
- }
- }
- }, [n("div", {
- class: t.b("dialog__header"),
- attrs: {slot: "title"},
- slot: "title"
- }, [n("span", {staticClass: "el-dialog__title"}, [t._v(t._s(t.dialogTitle))]), t._v(" "), n("div", {class: t.b("dialog__menu")}, [n("i", {
- staticClass: "el-dialog__close el-icon-full-screen",
- on: {click: t.handleFullScreen}
- })])]), t._v(" "), n("el-scrollbar", {style: t.styleName}, [t.boxVisible ? n("avue-form", t._b({
- ref: "tableForm",
- attrs: {reset: !1, option: t.formOption},
- on: {submit: t.handleSubmit, "tab-click": t.handleTabClick, error: t.handleError, "reset-change": t.hide},
- scopedSlots: t._u([t._l(t.crud.formSlot, (function (e) {
- return {
- key: e.prop, fn: function (n) {
- return [t._t(e.prop, null, null, Object.assign(n, {form: t.tableForm}))]
- }
- }
- })), t._l(t.crud.errorSlot, (function (e) {
- return {
- key: t.crud.getSlotName(e, "E"), fn: function (n) {
- return [t._t(t.crud.getSlotName(e, "E"), null, null, Object.assign(n, {form: t.tableForm}))]
- }
- }
- })), t._l(t.crud.typeSlot, (function (e) {
- return {
- key: t.crud.getSlotName(e, "T"), fn: function (n) {
- return [t._t(t.crud.getSlotName(e, "T"), null, null, Object.assign(n, {form: t.tableForm}))]
- }
- }
- })), t._l(t.crud.labelSlot, (function (e) {
- return {
- key: t.crud.getSlotName(e, "L"), fn: function (n) {
- return [t._t(t.crud.getSlotName(e, "L"), null, null, Object.assign(n, {form: t.tableForm}))]
- }
- }
- })), {
- key: "menuForm", fn: function (e) {
- return [t._t("menuForm", null, null, Object.assign(e, {type: t.boxType}))]
- }
- }], null, !0),
- model: {
- value: t.tableForm, callback: function (e) {
- t.tableForm = e
- }, expression: "tableForm"
- }
- }, "avue-form", t.$uploadFun({}, t.crud), !1)) : t._e()], 1)], 1)
- }), [], !1, null, null, null);
- e.a = c.exports
- }, function (t, e, n) {
- t.exports = n(63)
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i = v(n(42)), o = v(n(48)), a = v(n(49)), r = v(n(50)), s = v(n(51)), l = v(n(52)), c = v(n(53)), u = v(n(54)),
- d = v(n(55)), p = v(n(56)), h = v(n(57)), f = v(n(58)), m = v(n(59)), b = v(n(60));
- function v(t) {
- return t && t.__esModule ? t : {default: t}
- }
- e.default = {
- string: i.default,
- method: o.default,
- number: a.default,
- boolean: r.default,
- regexp: s.default,
- integer: l.default,
- float: c.default,
- array: u.default,
- object: d.default,
- enum: p.default,
- pattern: h.default,
- date: f.default,
- url: b.default,
- hex: b.default,
- email: b.default,
- required: m.default
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, r.isEmptyValue)(e, "string") && !t.required) return n();
- a.default.required(t, e, i, s, o, "string"), (0, r.isEmptyValue)(e, "string") || (a.default.type(t, e, i, s, o), a.default.range(t, e, i, s, o), a.default.pattern(t, e, i, s, o), !0 === t.whitespace && a.default.whitespace(t, e, i, s, o))
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i = function (t) {
- if (t && t.__esModule) return t;
- var e = {};
- if (null != t) for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
- return e.default = t, e
- }(n(9));
- e.default = function (t, e, n, o, a) {
- (/^\s+$/.test(e) || "" === e) && o.push(i.format(a.messages.whitespace, t.fullField))
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- }, a = function (t) {
- if (t && t.__esModule) return t;
- var e = {};
- if (null != t) for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
- return e.default = t, e
- }(n(9)), r = n(24), s = (i = r) && i.__esModule ? i : {default: i};
- var l = {
- email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
- url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i"),
- hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
- }, c = {
- integer: function (t) {
- return c.number(t) && parseInt(t, 10) === t
- }, float: function (t) {
- return c.number(t) && !c.integer(t)
- }, array: function (t) {
- return Array.isArray(t)
- }, regexp: function (t) {
- if (t instanceof RegExp) return !0;
- try {
- return !!new RegExp(t)
- } catch (t) {
- return !1
- }
- }, date: function (t) {
- return "function" == typeof t.getTime && "function" == typeof t.getMonth && "function" == typeof t.getYear
- }, number: function (t) {
- return !isNaN(t) && "number" == typeof t
- }, object: function (t) {
- return "object" === (void 0 === t ? "undefined" : o(t)) && !c.array(t)
- }, method: function (t) {
- return "function" == typeof t
- }, email: function (t) {
- return "string" == typeof t && !!t.match(l.email) && t.length < 255
- }, url: function (t) {
- return "string" == typeof t && !!t.match(l.url)
- }, hex: function (t) {
- return "string" == typeof t && !!t.match(l.hex)
- }
- };
- e.default = function (t, e, n, i, r) {
- if (t.required && void 0 === e) (0, s.default)(t, e, n, i, r); else {
- var l = t.type;
- ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"].indexOf(l) > -1 ? c[l](e) || i.push(a.format(r.messages.types[l], t.fullField, t.type)) : l && (void 0 === e ? "undefined" : o(e)) !== t.type && i.push(a.format(r.messages.types[l], t.fullField, t.type))
- }
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i = function (t) {
- if (t && t.__esModule) return t;
- var e = {};
- if (null != t) for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
- return e.default = t, e
- }(n(9));
- e.default = function (t, e, n, o, a) {
- var r = "number" == typeof t.len, s = "number" == typeof t.min, l = "number" == typeof t.max, c = e, u = null,
- d = "number" == typeof e, p = "string" == typeof e, h = Array.isArray(e);
- if (d ? u = "number" : p ? u = "string" : h && (u = "array"), !u) return !1;
- h && (c = e.length), p && (c = e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length), r ? c !== t.len && o.push(i.format(a.messages[u].len, t.fullField, t.len)) : s && !l && c < t.min ? o.push(i.format(a.messages[u].min, t.fullField, t.min)) : l && !s && c > t.max ? o.push(i.format(a.messages[u].max, t.fullField, t.max)) : s && l && (c < t.min || c > t.max) && o.push(i.format(a.messages[u].range, t.fullField, t.min, t.max))
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i = function (t) {
- if (t && t.__esModule) return t;
- var e = {};
- if (null != t) for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
- return e.default = t, e
- }(n(9));
- e.default = function (t, e, n, o, a) {
- t.enum = Array.isArray(t.enum) ? t.enum : [], -1 === t.enum.indexOf(e) && o.push(i.format(a.messages.enum, t.fullField, t.enum.join(", ")))
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i = function (t) {
- if (t && t.__esModule) return t;
- var e = {};
- if (null != t) for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
- return e.default = t, e
- }(n(9));
- e.default = function (t, e, n, o, a) {
- if (t.pattern) if (t.pattern instanceof RegExp) t.pattern.lastIndex = 0, t.pattern.test(e) || o.push(i.format(a.messages.pattern.mismatch, t.fullField, e, t.pattern)); else if ("string" == typeof t.pattern) {
- new RegExp(t.pattern).test(e) || o.push(i.format(a.messages.pattern.mismatch, t.fullField, e, t.pattern))
- }
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, r.isEmptyValue)(e) && !t.required) return n();
- a.default.required(t, e, i, s, o), void 0 !== e && a.default.type(t, e, i, s, o)
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ("" === e && (e = void 0), (0, r.isEmptyValue)(e) && !t.required) return n();
- a.default.required(t, e, i, s, o), void 0 !== e && (a.default.type(t, e, i, s, o), a.default.range(t, e, i, s, o))
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(9), a = n(10), r = (i = a) && i.__esModule ? i : {default: i};
- e.default = function (t, e, n, i, a) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, o.isEmptyValue)(e) && !t.required) return n();
- r.default.required(t, e, i, s, a), void 0 !== e && r.default.type(t, e, i, s, a)
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, r.isEmptyValue)(e) && !t.required) return n();
- a.default.required(t, e, i, s, o), (0, r.isEmptyValue)(e) || a.default.type(t, e, i, s, o)
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, r.isEmptyValue)(e) && !t.required) return n();
- a.default.required(t, e, i, s, o), void 0 !== e && (a.default.type(t, e, i, s, o), a.default.range(t, e, i, s, o))
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, r.isEmptyValue)(e) && !t.required) return n();
- a.default.required(t, e, i, s, o), void 0 !== e && (a.default.type(t, e, i, s, o), a.default.range(t, e, i, s, o))
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, r.isEmptyValue)(e, "array") && !t.required) return n();
- a.default.required(t, e, i, s, o, "array"), (0, r.isEmptyValue)(e, "array") || (a.default.type(t, e, i, s, o), a.default.range(t, e, i, s, o))
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, r.isEmptyValue)(e) && !t.required) return n();
- a.default.required(t, e, i, s, o), void 0 !== e && a.default.type(t, e, i, s, o)
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, r.isEmptyValue)(e) && !t.required) return n();
- a.default.required(t, e, i, s, o), e && a.default.enum(t, e, i, s, o)
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, r.isEmptyValue)(e, "string") && !t.required) return n();
- a.default.required(t, e, i, s, o), (0, r.isEmptyValue)(e, "string") || a.default.pattern(t, e, i, s, o)
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, r.isEmptyValue)(e) && !t.required) return n();
- if (a.default.required(t, e, i, s, o), !(0, r.isEmptyValue)(e)) {
- var l = void 0;
- l = "number" == typeof e ? new Date(e) : e, a.default.type(t, l, i, s, o), l && a.default.range(t, l.getTime(), i, s, o)
- }
- }
- n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- }, a = n(10), r = (i = a) && i.__esModule ? i : {default: i};
- e.default = function (t, e, n, i, a) {
- var s = [], l = Array.isArray(e) ? "array" : void 0 === e ? "undefined" : o(e);
- r.default.required(t, e, i, s, a, l), n(s)
- }
- }, function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o = n(10), a = (i = o) && i.__esModule ? i : {default: i}, r = n(9);
- e.default = function (t, e, n, i, o) {
- var s = t.type, l = [];
- if (t.required || !t.required && i.hasOwnProperty(t.field)) {
- if ((0, r.isEmptyValue)(e, s) && !t.required) return n();
- a.default.required(t, e, i, l, o, s), (0, r.isEmptyValue)(e, s) || a.default.type(t, e, i, l, o)
- }
- n(l)
- }
- }, function (t, e, n) {
- "use strict";
- function i() {
- return {
- default: "Validation error on field %s",
- required: "%s is required",
- enum: "%s must be one of %s",
- whitespace: "%s cannot be empty",
- date: {
- format: "%s date %s is invalid for format %s",
- parse: "%s date could not be parsed, %s is invalid ",
- invalid: "%s date %s is invalid"
- },
- types: {
- string: "%s is not a %s",
- method: "%s is not a %s (function)",
- array: "%s is not an %s",
- object: "%s is not an %s",
- number: "%s is not a %s",
- date: "%s is not a %s",
- boolean: "%s is not a %s",
- integer: "%s is not an %s",
- float: "%s is not a %s",
- regexp: "%s is not a valid %s",
- email: "%s is not a valid %s",
- url: "%s is not a valid %s",
- hex: "%s is not a valid %s"
- },
- string: {
- len: "%s must be exactly %s characters",
- min: "%s must be at least %s characters",
- max: "%s cannot be longer than %s characters",
- range: "%s must be between %s and %s characters"
- },
- number: {
- len: "%s must equal %s",
- min: "%s cannot be less than %s",
- max: "%s cannot be greater than %s",
- range: "%s must be between %s and %s"
- },
- array: {
- len: "%s must be exactly %s in length",
- min: "%s cannot be less than %s in length",
- max: "%s cannot be greater than %s in length",
- range: "%s must be between %s and %s in length"
- },
- pattern: {mismatch: "%s value %s does not match pattern %s"},
- clone: function () {
- var t = JSON.parse(JSON.stringify(this));
- return t.clone = this.clone, t
- }
- }
- }
- Object.defineProperty(e, "__esModule", {value: !0}), e.newMessages = i;
- e.messages = i()
- }, function (t, e) {
- /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
- !function (t) {
- "use strict";
- if (t.URL = t.URL || t.webkitURL, t.Blob && t.URL) try {
- return void new Blob
- } catch (t) {
- }
- var e = t.BlobBuilder || t.WebKitBlobBuilder || t.MozBlobBuilder || function (t) {
- var e = function (t) {
- return Object.prototype.toString.call(t).match(/^\[object\s(.*)\]$/)[1]
- }, n = function () {
- this.data = []
- }, i = function (t, e, n) {
- this.data = t, this.size = t.length, this.type = e, this.encoding = n
- }, o = n.prototype, a = i.prototype, r = t.FileReaderSync, s = function (t) {
- this.code = this[this.name = t]
- },
- l = "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),
- c = l.length, u = t.URL || t.webkitURL || t, d = u.createObjectURL, p = u.revokeObjectURL, h = u, f = t.btoa,
- m = t.atob, b = t.ArrayBuffer, v = t.Uint8Array;
- for (i.fake = a.fake = !0; c--;) s.prototype[l[c]] = c + 1;
- return u.createObjectURL || (h = t.URL = {}), h.createObjectURL = function (t) {
- var e, n = t.type;
- return null === n && (n = "application/octet-stream"), t instanceof i ? (e = "data:" + n, "base64" === t.encoding ? e + ";base64," + t.data : "URI" === t.encoding ? e + "," + decodeURIComponent(t.data) : f ? e + ";base64," + f(t.data) : e + "," + encodeURIComponent(t.data)) : d ? d.call(u, t) : void 0
- }, h.revokeObjectURL = function (t) {
- "data:" !== t.substring(0, 5) && p && p.call(u, t)
- }, o.append = function (t) {
- var n = this.data;
- if (v && (t instanceof b || t instanceof v)) {
- for (var o = "", a = new v(t), l = 0, c = a.length; l < c; l++) o += String.fromCharCode(a[l]);
- n.push(o)
- } else if ("Blob" === e(t) || "File" === e(t)) {
- if (!r) throw new s("NOT_READABLE_ERR");
- var u = new r;
- n.push(u.readAsBinaryString(t))
- } else t instanceof i ? "base64" === t.encoding && m ? n.push(m(t.data)) : "URI" === t.encoding ? n.push(decodeURIComponent(t.data)) : "raw" === t.encoding && n.push(t.data) : ("string" != typeof t && (t += ""), n.push(unescape(encodeURIComponent(t))))
- }, o.getBlob = function (t) {
- return arguments.length || (t = null), new i(this.data.join(""), t, "raw")
- }, o.toString = function () {
- return "[object BlobBuilder]"
- }, a.slice = function (t, e, n) {
- var o = arguments.length;
- return o < 3 && (n = null), new i(this.data.slice(t, o > 1 ? e : this.data.length), n, this.encoding)
- }, a.toString = function () {
- return "[object Blob]"
- }, a.close = function () {
- this.size = this.data.length = 0
- }, n
- }(t);
- t.Blob = function (t, n) {
- var i = n && n.type || "", o = new e;
- if (t) for (var a = 0, r = t.length; a < r; a++) o.append(t[a]);
- return o.getBlob(i)
- }
- }("undefined" != typeof self && self || "undefined" != typeof window && window || this.content || this)
- }, function (t, e, n) {
- "use strict";
- n.r(e);
- var i = n(1);
- function o(t) {
- return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- })(t)
- }
- var a = Object.prototype.hasOwnProperty;
- function r(t) {
- return null !== t && "object" === o(t) && (e = t, n = "componentOptions", a.call(e, n));
- var e, n
- }
- var s, l = Object(i.a)({
- name: "affix",
- props: {id: {}, offsetTop: {type: Number, default: 0}, offsetBottom: {type: Number}},
- data: function () {
- return {affix: !1, styles: {}, slot: !1, slotStyle: {}}
- },
- computed: {
- parent: function () {
- return this.validatenull(this.id) ? window : (t = this.id, ("object" === ("undefined" == typeof HTMLElement ? "undefined" : o(HTMLElement)) ? t instanceof HTMLElement : t && "object" === o(t) && 1 === t.nodeType && "string" == typeof t.nodeName) ? this.id : window.document.getElementById(this.id));
- var t
- }, offsetType: function () {
- var t = "top";
- return this.offsetBottom >= 0 && (t = "bottom"), t
- }
- },
- mounted: function () {
- this.parent.addEventListener("scroll", this.handleScroll, !1), this.parent.addEventListener("resize", this.handleScroll, !1)
- },
- beforeDestroy: function () {
- this.parent.removeEventListener("scroll", this.handleScroll, !1), this.parent.removeEventListener("resize", this.handleScroll, !1)
- },
- methods: {
- getScroll: function (t, e) {
- var n = e ? "scrollTop" : "scrollLeft", i = t[e ? "pageYOffset" : "pageXOffset"];
- return "number" != typeof i && (i = window.document.documentElement[n]), i
- }, getOffset: function (t) {
- var e = t.getBoundingClientRect(), n = this.getScroll(this.parent, !0), i = this.getScroll(this.parent),
- o = window.document.body, a = o.clientTop || 0, r = o.clientLeft || 0;
- return {top: e.top + n - a, left: e.left + i - r}
- }, handleScroll: function () {
- var t = this.affix, e = this.getScroll(window, !0), n = this.getOffset(this.$el), i = window.innerHeight,
- o = this.$el.getElementsByTagName("div")[0].offsetHeight;
- n.top - this.offsetTop < e && "top" == this.offsetType && !t ? (this.affix = !0, this.slotStyle = {
- width: this.$refs.point.clientWidth + "px",
- height: this.$refs.point.clientHeight + "px"
- }, this.slot = !0, this.styles = {
- top: "".concat(this.offsetTop, "px"),
- left: "".concat(n.left, "px"),
- width: "".concat(this.$el.offsetWidth, "px")
- }, this.$emit("on-change", !0)) : n.top - this.offsetTop > e && "top" == this.offsetType && t && (this.slot = !1, this.slotStyle = {}, this.affix = !1, this.styles = null, this.$emit("on-change", !1)), n.top + this.offsetBottom + o > e + i && "bottom" == this.offsetType && !t ? (this.affix = !0, this.styles = {
- bottom: "".concat(this.offsetBottom, "px"),
- left: "".concat(n.left, "px"),
- width: "".concat(this.$el.offsetWidth, "px")
- }, this.$emit("on-change", !0)) : n.top + this.offsetBottom + o < e + i && "bottom" == this.offsetType && t && (this.affix = !1, this.styles = null, this.$emit("on-change", !1))
- }
- }
- }), c = n(0), u = Object(c.a)(l, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", [e("div", {
- ref: "point",
- class: {"avue-affix": this.affix},
- style: this.styles
- }, [this._t("default")], 2), this._v(" "), e("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: this.slot,
- expression: "slot"
- }], style: this.slotStyle
- })])
- }), [], !1, null, null, null).exports, d = n(25), p = n.n(d), h = Object(i.a)({
- name: "count-up",
- props: {
- animation: {type: Boolean, default: !0},
- start: {type: Number, required: !1, default: 0},
- end: {required: !0},
- decimals: {type: Number, required: !1, default: 0},
- duration: {type: Number, required: !1, default: 2},
- options: {
- type: Object, required: !1, default: function () {
- return {}
- }
- },
- callback: {
- type: Function, required: !1, default: function () {
- }
- }
- },
- data: function () {
- return {c: null}
- },
- watch: {
- decimals: function () {
- this.c && this.c.update && this.c.update(this.end)
- }, end: function (t) {
- this.c && this.c.update && this.c.update(t)
- }
- },
- mounted: function () {
- this.animation && this.init()
- },
- methods: {
- init: function () {
- var t = this;
- this.c || (this.c = new p.a(this.$el, this.start, this.end, this.decimals, this.duration, this.options), this.c.start((function () {
- t.callback(t.c)
- })))
- }, destroy: function () {
- this.c = null
- }
- },
- beforeDestroy: function () {
- this.destroy()
- },
- start: function (t) {
- var e = this;
- this.c && this.c.start && this.c.start((function () {
- t && t(e.c)
- }))
- },
- pauseResume: function () {
- this.c && this.c.pauseResume && this.c.pauseResume()
- },
- reset: function () {
- this.c && this.c.reset && this.c.reset()
- },
- update: function (t) {
- this.c && this.c.update && this.c.update(t)
- }
- }), f = Object(c.a)(h, (function () {
- var t = this.$createElement;
- return (this._self._c || t)("span", [this._v(this._s(this.end))])
- }), [], !1, null, null, null).exports;
- function m(t, e, n) {
- return e in t ? Object.defineProperty(t, e, {
- value: n,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = n, t
- }
- var b = Object(i.a)({
- name: "avatar", props: (s = {
- src: String, shape: {
- validator: function (t) {
- return ["circle", "square"].includes(t)
- }, default: "circle"
- }
- }, m(s, "shape", String), m(s, "size", {
- validator: function (t) {
- return "number" == typeof t || ["small", "large", "default"].includes(t)
- }, default: "default"
- }), m(s, "icon", String), s), data: function () {
- return {scale: 1}
- }, updated: function () {
- var t = this;
- this.$nextTick((function () {
- t.setScale()
- }))
- }, computed: {
- sizeChildrenStyle: function () {
- var t = {}, e = (this.$refs.avatarChildren, "scale(".concat(this.scale, ") translateX(-50%)"));
- return t = {
- msTransform: e,
- WebkitTransform: e,
- transform: e
- }, "number" == typeof size && (t.lineHeight = "".concat(this.size, "px")), t
- }, sizeCls: function () {
- var t;
- return m(t = {}, "".concat("avue-avatar", "--").concat(this.shape), this.shape), m(t, "".concat("avue-avatar", "--lg"), "large" === this.size), m(t, "".concat("avue-avatar", "--sm"), "small" === this.size), t
- }, sizeStyle: function () {
- return "number" == typeof this.size ? {
- width: "".concat(this.size, "px"),
- height: "".concat(this.size, "px"),
- lineHeight: "".concat(this.size, "px"),
- fontSize: this.icon ? "".concat(this.size / 2, "px") : "18px"
- } : {}
- }
- }, mounted: function () {
- var t = this;
- this.$nextTick((function () {
- t.setScale()
- }))
- }, methods: {
- setScale: function () {
- var t = this.$refs.avatarChildren;
- if (t) {
- var e = t.offsetWidth, n = this.$el.getBoundingClientRect().width;
- this.scale = n - 8 < e ? (n - 8) / e : 1
- }
- }
- }
- }), v = Object(c.a)(b, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("span", {
- class: [t.b(), t.sizeCls, t.b("icon")],
- style: t.sizeStyle
- }, [t.src ? n("img", {
- class: t.b("images"),
- attrs: {src: t.src, alt: ""}
- }) : t.icon ? n("i", {class: t.icon}) : n("span", {
- ref: "avatarChildren",
- class: t.b("string"),
- style: t.sizeChildrenStyle
- }, [t._t("default")], 2)])
- }), [], !1, null, null, null).exports, y = {title: "title", meta: "meta", lead: "lead", body: "body"},
- g = Object(i.a)({
- name: "article", props: {
- data: {
- type: Object, default: function () {
- return {}
- }
- }, props: {
- type: Object, default: function () {
- return y
- }
- }, option: {
- type: Object, default: function () {
- return {}
- }
- }
- }, computed: {
- titleKey: function () {
- return this.props.title || y.title
- }, metaKey: function () {
- return this.props.meta || y.meta
- }, leadKey: function () {
- return this.props.lead || y.lead
- }, bodyKey: function () {
- return this.props.body || y.body
- }, title: function () {
- return this.data[this.titleKey]
- }, meta: function () {
- return this.data[this.metaKey]
- }, lead: function () {
- return this.data[this.leadKey]
- }, body: function () {
- return this.data[this.bodyKey]
- }
- }, mounted: function () {
- }
- }), _ = Object(c.a)(g, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("div", {class: t.b("header")}, [t.title ? n("div", {
- class: t.b("title"),
- domProps: {textContent: t._s(t.title)}
- }) : t._e(), t._v(" "), t.meta ? n("small", {
- class: t.b("meta"),
- domProps: {textContent: t._s(t.meta)}
- }) : t._e()]), t._v(" "), t.lead ? n("div", {
- class: t.b("lead"),
- domProps: {textContent: t._s(t.lead)}
- }) : t._e(), t._v(" "), t.body ? n("div", {class: t.b("body"), domProps: {innerHTML: t._s(t.body)}}) : t._e()])
- }), [], !1, null, null, null).exports, x = Object(i.a)({
- name: "carousel", data: function () {
- return {}
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }, computed: {
- data: function () {
- return this.option.data || []
- }
- }, created: function () {
- }, mounted: function () {
- }, watch: {}, methods: {}
- }), w = Object(c.a)(x, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: [t.b(), {"avue-carousel--fullscreen": t.option.fullscreen}]}, [n("el-carousel", {
- attrs: {
- type: t.option.type,
- height: t.option.height + "px",
- autoplay: t.option.autoplay,
- interval: t.option.interval,
- "indicator-position": "outside"
- }
- }, t._l(t.data, (function (e, i) {
- return n("el-carousel-item", {key: i}, [n("div", {class: t.b("item")}, [n("a", {
- attrs: {
- href: e.href ? e.href : "javascript:void(0);",
- target: e.target
- }
- }, [n("div", {
- class: t.b("img"),
- style: {backgroundImage: "url(" + e.src + ")"}
- }), t._v(" "), e.title ? n("div", {class: t.b("title")}, [t._v(t._s(e.title))]) : t._e()])])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, S = n(21).a, O = Object(c.a)(S, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b({card: !t.option.card})}, [t.tableOption.title ? n(t.tableOption.titleSize || "h2", {
- tag: "component",
- style: t.tableOption.titleStyle
- }, [t._v(t._s(t.tableOption.title))]) : t._e(), t._v(" "), n("header-search", {
- ref: "headerSearch",
- attrs: {search: t.search},
- scopedSlots: t._u([{
- key: "search", fn: function (e) {
- return [t._t("search", null, null, e)]
- }
- }, {
- key: "searchMenu", fn: function (e) {
- return [t._t("searchMenu", null, null, e)]
- }
- }, t._l(t.searchSlot, (function (e) {
- return {
- key: e.prop, fn: function (n) {
- return [t._t(t.getSlotName(e, "S"), null, null, n)]
- }
- }
- }))], null, !0)
- }), t._v(" "), n("el-card", {attrs: {shadow: t.isCard}}, [t.vaildData(t.tableOption.header, !0) ? n("header-menu", {ref: "headerMenu"}, [n("template", {slot: "menuLeft"}, [t._t("menuLeft")], 2), t._v(" "), n("template", {slot: "menuRight"}, [t._t("menuRight")], 2)], 2) : t._e(), t._v(" "), t.vaildData(t.tableOption.tip, t.config.tip) && t.tableOption.selection ? n("el-tag", {staticClass: "avue-crud__tip"}, [n("span", {staticClass: "avue-crud__tip-name"}, [t._v("\n " + t._s(t.t("crud.tipStartTitle")) + "\n "), n("span", {staticClass: "avue-crud__tip-count"}, [t._v(t._s(t.selectLen))]), t._v("\n " + t._s(t.t("crud.tipEndTitle")) + "\n ")]), t._v(" "), t.vaildData(t.tableOption.selectClearBtn, t.config.selectClearBtn) && t.tableOption.selection ? n("el-button", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.getPermission("selectClearBtn"),
- expression: "getPermission('selectClearBtn')"
- }], attrs: {type: "text", size: "small"}, on: {click: t.selectClear}
- }, [t._v(t._s(t.t("crud.emptyBtn")))]) : t._e(), t._v(" "), t._t("tip")], 2) : t._e(), t._v(" "), t._t("header"), t._v(" "), n("el-form", {
- ref: "cellForm",
- attrs: {model: t.cellForm}
- }, [t.reload ? n("el-table", {
- directives: [{name: "loading", rawName: "v-loading", value: t.tableLoading, expression: "tableLoading"}],
- ref: "table",
- class: {"avue-crud--indeterminate": t.vaildData(t.tableOption.indeterminate, !1)},
- attrs: {
- data: t.cellForm.list,
- "row-key": t.handleGetRowKeys,
- size: t.$AVUE.tableSize || t.controlSize,
- lazy: t.vaildData(t.tableOption.lazy, !1),
- load: t.treeLoad,
- "tree-props": t.treeProps,
- "expand-row-keys": t.tableOption.expandRowKeys,
- "default-expand-all": t.tableOption.defaultExpandAll,
- "highlight-current-row": t.tableOption.highlightCurrentRow,
- "show-summary": t.tableOption.showSummary,
- "summary-method": t.tableSummaryMethod,
- "span-method": t.tableSpanMethod,
- stripe: t.tableOption.stripe,
- "show-header": t.tableOption.showHeader,
- "default-sort": t.tableOption.defaultSort,
- "row-class-name": t.rowClassName,
- "cell-class-name": t.cellClassName,
- "row-style": t.rowStyle,
- "cell-style": t.cellStyle,
- "sort-method": t.sortMethod,
- "sort-orders": t.sortOrders,
- "sort-by": t.sortBy,
- fit: t.tableOption.fit,
- "header-cell-class-name": t.headerCellClassName,
- "max-height": t.isAutoHeight ? t.tableHeight : t.tableOption.maxHeight,
- height: t.tableHeight,
- width: t.setPx(t.tableOption.width, t.config.width),
- border: t.tableOption.border
- },
- on: {
- "current-change": t.currentRowChange,
- "expand-change": t.expandChange,
- "header-dragend": t.headerDragend,
- "row-click": t.rowClick,
- "row-dblclick": t.rowDblclick,
- "cell-mouse-enter": t.cellMouseEnter,
- "cell-mouse-leave": t.cellMouseLeave,
- "cell-click": t.cellClick,
- "header-click": t.headerClick,
- "row-contextmenu": t.rowContextmenu,
- "header-contextmenu": t.headerContextmenu,
- "cell-dblclick": t.cellDblclick,
- "filter-change": t.filterChange,
- "selection-change": t.selectionChange,
- select: t.select,
- "select-all": t.selectAll,
- "sort-change": t.sortChange
- }
- }, [n("template", {slot: "empty"}, [n("div", {class: t.b("empty")}, [t.$slots.empty ? t._t("empty") : n("avue-empty", {
- attrs: {
- size: "50",
- image: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iNDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAxKSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxlbGxpcHNlIGZpbGw9IiNGNUY1RjUiIGN4PSIzMiIgY3k9IjMzIiByeD0iMzIiIHJ5PSI3Ii8+CiAgICA8ZyBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0iI0Q5RDlEOSI+CiAgICAgIDxwYXRoIGQ9Ik01NSAxMi43Nkw0NC44NTQgMS4yNThDNDQuMzY3LjQ3NCA0My42NTYgMCA0Mi45MDcgMEgyMS4wOTNjLS43NDkgMC0xLjQ2LjQ3NC0xLjk0NyAxLjI1N0w5IDEyLjc2MVYyMmg0NnYtOS4yNHoiLz4KICAgICAgPHBhdGggZD0iTTQxLjYxMyAxNS45MzFjMC0xLjYwNS45OTQtMi45MyAyLjIyNy0yLjkzMUg1NXYxOC4xMzdDNTUgMzMuMjYgNTMuNjggMzUgNTIuMDUgMzVoLTQwLjFDMTAuMzIgMzUgOSAzMy4yNTkgOSAzMS4xMzdWMTNoMTEuMTZjMS4yMzMgMCAyLjIyNyAxLjMyMyAyLjIyNyAyLjkyOHYuMDIyYzAgMS42MDUgMS4wMDUgMi45MDEgMi4yMzcgMi45MDFoMTQuNzUyYzEuMjMyIDAgMi4yMzctMS4zMDggMi4yMzctMi45MTN2LS4wMDd6IiBmaWxsPSIjRkFGQUZBIi8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K",
- desc: t.tableOption.emptyText || "暂无数据"
- }
- })], 2)]), t._v(" "), n("column", {
- attrs: {columnOption: t.columnOption, tableOption: t.tableOption},
- scopedSlots: t._u([t._l(t.mainSlot, (function (e) {
- return {
- key: e.prop, fn: function (n) {
- return [t._t(e.prop, null, null, n)]
- }
- }
- })), t._l(t.headerSlot, (function (e) {
- return {
- key: t.getSlotName(e, "H"), fn: function (n) {
- return [t._t(t.getSlotName(e, "H"), null, null, n)]
- }
- }
- })), t._l(t.formSlot, (function (e) {
- return {
- key: t.getSlotName(e, "F"), fn: function (n) {
- return [t._t(t.getSlotName(e, "F"), null, null, n)]
- }
- }
- }))], null, !0)
- }, [n("column-default", {
- ref: "columnDefault",
- attrs: {slot: "header", tableOption: t.tableOption},
- slot: "header",
- scopedSlots: t._u([{
- key: "expand", fn: function (e) {
- var n = e.row, i = e.index;
- return [t._t("expand", null, {row: n, index: i})]
- }
- }], null, !0)
- }), t._v(" "), t._v(" "), t._v(" "), t._v(" "), n("column-menu", {
- attrs: {
- slot: "footer",
- tableOption: t.tableOption
- }, slot: "footer", scopedSlots: t._u([{
- key: "menu", fn: function (e) {
- return [t._t("menu", null, null, e)]
- }
- }, {
- key: "menuBtn", fn: function (e) {
- return [t._t("menuBtn", null, null, e)]
- }
- }], null, !0)
- })], 1)], 2) : t._e()], 1), t._v(" "), t._t("footer"), t._v(" "), t.vaildData(t.tableOption.page, !0) ? n("table-page", {
- ref: "tablePage",
- attrs: {page: t.page}
- }, [n("template", {slot: "page"}, [t._t("page")], 2)], 2) : t._e()], 2), t._v(" "), n("dialog-form", {
- ref: "dialogForm",
- scopedSlots: t._u([t._l(t.formSlot, (function (e) {
- return {
- key: e.prop, fn: function (n) {
- return [t._t(t.getSlotName(e, "F"), null, null, Object.assign(n, {
- row: e.dynamic ? n.row : t.tableForm,
- index: e.dynamic ? n.row.$index : t.tableIndex
- }))]
- }
- }
- })), t._l(t.labelSlot, (function (e) {
- return {
- key: t.getSlotName(e, "L"), fn: function (n) {
- return [t._t(t.getSlotName(e, "L"), null, null, Object.assign(n, {
- row: t.tableForm,
- index: t.tableIndex
- }))]
- }
- }
- })), t._l(t.errorSlot, (function (e) {
- return {
- key: t.getSlotName(e, "E"), fn: function (n) {
- return [t._t(t.getSlotName(e, "E"), null, null, Object.assign(n, {
- row: t.tableForm,
- index: t.tableIndex
- }))]
- }
- }
- })), t._l(t.typeSlot, (function (e) {
- return {
- key: t.getSlotName(e, "T"), fn: function (n) {
- return [t._t(t.getSlotName(e, "T"), null, null, Object.assign(n, {
- row: t.tableForm,
- index: t.tableIndex
- }))]
- }
- }
- })), {
- key: "menuForm", fn: function (e) {
- return [t._t("menuForm", null, null, e)]
- }
- }], null, !0),
- model: {
- value: t.tableForm, callback: function (e) {
- t.tableForm = e
- }, expression: "tableForm"
- }
- }), t._v(" "), n("dialog-column", {ref: "dialogColumn"}), t._v(" "), n("keep-alive", [n("dialog-filter", {ref: "dialogFilter"})], 1)], 1)
- }), [], !1, null, null, null).exports, C = {img: "img", title: "title", info: "info"}, k = Object(i.a)({
- name: "card", props: {
- props: {
- type: Object, default: function () {
- return C
- }
- }, option: {
- type: Object, default: function () {
- return {}
- }
- }, data: {
- type: Array, default: function () {
- return []
- }
- }
- }, data: function () {
- return {propsDefault: C}
- }, computed: {
- imgKey: function () {
- return this.option.props.img || this.propsDefault.img
- }, titleKey: function () {
- return this.option.props.title || this.propsDefault.title
- }, infoKey: function () {
- return this.option.props.info || this.propsDefault.info
- }, span: function () {
- return this.option.span || 8
- }, gutter: function () {
- return this.option.gutter || 20
- }
- }, methods: {
- rowAdd: function () {
- this.$emit("row-add")
- }, rowClick: function (t, e) {
- this.$emit("row-click", t, e)
- }
- }
- }), j = Object(c.a)(k, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("el-row", {
- attrs: {
- span: 24,
- gutter: t.gutter
- }
- }, [t.vaildData(t.option.addBtn, !0) ? n("el-col", {attrs: {span: t.span}}, [n("div", {
- class: t.b("item", {add: !0}),
- on: {
- click: function (e) {
- return t.rowAdd()
- }
- }
- }, [n("i", {staticClass: "el-icon-plus"}), t._v(" "), n("span", [t._v("添加")])])]) : t._e(), t._v(" "), t._l(t.data, (function (e, i) {
- return n("el-col", {key: i, attrs: {span: t.span}}, [n("div", {
- class: t.b("item"), on: {
- click: function (n) {
- return t.rowClick(e, i)
- }
- }
- }, [n("div", {class: t.b("body")}, [n("div", {class: t.b("avatar")}, [n("img", {
- attrs: {
- src: e[t.imgKey],
- alt: ""
- }
- })]), t._v(" "), n("div", {class: t.b("detail")}, [n("div", {class: t.b("title")}, [t._v(t._s(e[t.titleKey]))]), t._v(" "), n("div", {class: t.b("info")}, [t._v(t._s(e[t.infoKey]))])])]), t._v(" "), n("div", {class: t.b("menu")}, [t._t("menu", null, {
- index: i,
- row: e
- })], 2)])])
- }))], 2)], 1)
- }), [], !1, null, null, null).exports, D = n(4), E = Object(i.a)({
- name: "code",
- props: {height: {type: Number, default: 200}, syntax: {type: String, default: "javascript"}},
- computed: {
- styleName: function () {
- return {height: this.setPx(this.height)}
- }
- },
- mounted: function () {
- window.hljs ? window.hljs && "function" == typeof window.hljs.highlightBlock && window.hljs.highlightBlock(this.$refs.container) : D.a.logs("hljs")
- }
- }), M = Object(c.a)(E, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("el-scrollbar", {style: t.styleName}, [n("pre", [t._v(" "), n("code", {
- ref: "container",
- class: t.syntax
- }, [t._v("\n "), t._t("default"), t._v("\n ")], 2), t._v("\n ")])])], 1)
- }), [], !1, null, null, null).exports, T = n(16);
- function A(t) {
- return (A = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- })(t)
- }
- var I = Object(i.a)({
- name: "chat", data: function () {
- return {
- upload: {box: !1, src: "", type: "", title: ""},
- visible: !1,
- imgSrc: "",
- videoSrc: "",
- audioSrc: "",
- keys: "",
- show: !1,
- msg: ""
- }
- }, props: {
- beforeOpen: Function,
- tools: {
- type: Object, default: function () {
- return {img: !0, video: !0, file: !0}
- }
- },
- placeholder: {type: String, default: "请输入..."},
- width: {type: [String, Number], default: 320},
- height: {type: [String, Number], default: 520},
- value: {type: String},
- notice: {type: Boolean, default: !0},
- audio: {
- type: Array, default: function () {
- return ["https://www.helloweba.net/demo/notifysound/notify.ogg", "https://www.helloweba.net/demo/notifysound/notify.mp3", "https://www.helloweba.net/demo/notifysound/notify.wav"]
- }
- },
- config: {
- type: Object, default: function () {
- return {}
- }
- },
- keylist: {
- type: Array, default: function () {
- return []
- }
- },
- list: {
- type: Array, default: function () {
- return []
- }
- }
- }, watch: {
- "upload.box": function (t) {
- var e = this;
- t && this.$nextTick((function () {
- e.$refs.form.clearValidate()
- }))
- }, value: {
- handler: function () {
- this.msg = this.value
- }, immediate: !0
- }, msg: {
- handler: function () {
- this.$emit("input", this.msg)
- }, immediate: !0
- }
- }, computed: {
- heightStyleName: function () {
- return {height: this.setPx(this.height)}
- }, widthStyleName: function () {
- return {width: this.setPx(this.width)}
- }, msgActive: function () {
- return !this.validatenull(this.msg.replace(/[\r\n]/g, ""))
- }
- }, methods: {
- uploadSubmit: function () {
- var t = this;
- this.$refs.form.validate((function (e) {
- e && (t.upload.box = !1, t.$emit("submit", t.getDetail(t.upload)))
- }))
- }, handleUpload: function (t) {
- this.upload.type = t, this.upload.src = "", "img" === t ? this.upload.title = "图片上传" : "video" === t ? this.upload.title = "视频上传" : "file" === t && (this.upload.title = "文件上传"), this.upload.box = !0
- }, handleClose: function (t) {
- this.imgSrc = void 0, this.videoSrc = void 0, this.audioSrc = void 0, t()
- }, addKey: function () {
- "" !== this.keys && (this.$emit("keyadd", this.keys), this.keys = ""), this.visible = !1
- }, sendKey: function (t) {
- this.$emit("keysend", t)
- }, getAudio: function () {
- this.$refs.chatAudio.play()
- }, getNotification: function (t) {
- var e = this, n = Notification || window.Notification;
- if (n) {
- var i = function () {
- var n = new Notification(e.config.name, {body: t, icon: e.config.img});
- n.onshow = function () {
- e.getAudio(), setTimeout((function () {
- n.close()
- }), 2500)
- }, n.onclick = function (t) {
- n.close()
- }
- }, o = n.permission;
- "granted" === o ? i() : "denied" === o ? console.log("用户拒绝了你!!!") : n.requestPermission((function (t) {
- "granted" === t ? i() : console.log("用户无情残忍的拒绝了你!!!")
- }))
- }
- }, pushMsg: function () {
- var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, n = !0 === e.mine,
- i = e.text || {}, o = e.date, a = {
- date: o || Object(T.a)("yyyy-MM-dd hh:mm:ss", new Date),
- text: "object" != A(i) ? {text: i} : i,
- mine: n,
- img: n ? this.config.myImg : this.config.img,
- name: n ? this.config.myName : this.config.name
- };
- this.list.push(a), setTimeout((function () {
- t.setScroll()
- }), 50)
- }, setScroll: function (t) {
- var e = this;
- this.$nextTick((function () {
- e.$refs.main.scrollTop = t || e.$refs.main.scrollHeight
- }))
- }, handleSend: function () {
- this.msgActive && this.$emit("submit")
- }, handleItemMsg: function (t) {
- this.$emit("submit", t.ask)
- }, handleDetail: function () {
- var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", n = e;
- return setTimeout((function () {
- t.$refs.content.forEach((function (e) {
- for (var n = function (n) {
- var i = e.children[n];
- 0 != i.getAttribute("data-flag") && (i.setAttribute("data-flag", 0), i.onclick = function () {
- t.handleEvent(i.dataset)
- }, "IMG" === i.tagName ? (i.className = "web__msg--img", i.src = i.getAttribute("data-src")) : "VIDEO" === i.tagName ? (i.className = "web__msg--video", i.src = i.getAttribute("data-src")) : "AUDIO" === i.tagName ? (i.className = "web__msg--audio", i.controls = "controls", i.src = i.getAttribute("data-src")) : "FILE" === i.tagName ? (i.className = "web__msg--file", i.innerHTML = "<h2>File</h2><span>".concat(i.getAttribute("data-name"), "</span>")) : "MAP" === i.tagName && (i.className = "web__msg--file web__msg--map", i.innerHTML = "<h2>Map</h2><span>".concat(i.getAttribute("data-longitude"), " , ").concat(i.getAttribute("data-latitude"), "<br />").concat(i.getAttribute("data-address"), "</span>")), t.setScroll())
- }, i = 0; i < e.children.length; i++) n(i)
- }))
- }), 0), n
- }, getDetail: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.type, n = t.src,
- i = t.name, o = t.longitude, a = t.latitude, r = t.address;
- return "img" === e ? '<img data-type="IMG" data-src="'.concat(n, '" />') : "video" === e ? '<video data-type="VIDEO" data-src="'.concat(n, '"></video>') : "audio" === e ? '<audio data-type="AUDIO" data-src="'.concat(n, '"></audio>') : "file" === e ? '<file data-type="FILE" data-name="'.concat(i, '" data-src="').concat(n, '"></file>') : "map" === e ? '<map data-type="MAP" data-src="'.concat(n, '" data-address="').concat(r, ' "data-latitude="').concat(a, '" data-longitude="').concat(o, '"></map>') : void 0
- }, handleEvent: function (t) {
- var e = this, n = function () {
- "IMG" === t.type ? (e.imgSrc = t.src, e.show = !0) : "VIDEO" === t.type ? (e.videoSrc = t.src, e.show = !0) : "AUDIO" === t.type ? (e.audioSrc = t.src, e.show = !0) : "FILE" === t.type && window.open(t.src)
- };
- "function" == typeof this.beforeOpen ? this.beforeOpen(t, n) : n()
- }, rootSendMsg: function (t) {
- this.pushMsg({text: t}), this.notice && this.getNotification(t.text || t)
- }
- }
- }), P = Object(c.a)(I, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- class: t.b(), style: t.heightStyleName, on: {
- keyup: function (e) {
- return !e.type.indexOf("key") && t._k(e.keyCode, "enter", 13, e.key, "Enter") ? null : t.handleSend(e)
- }
- }
- }, [n("audio", {ref: "chatAudio"}, [n("source", {
- attrs: {
- src: t.audio[0],
- type: "audio/ogg"
- }
- }), t._v(" "), n("source", {
- attrs: {
- src: t.audio[1],
- type: "audio/mpeg"
- }
- }), t._v(" "), n("source", {
- attrs: {
- src: t.audio[2],
- type: "audio/wav"
- }
- })]), t._v(" "), n("div", {staticClass: "web__logo"}, [n("img", {
- staticClass: "web__logo-img",
- attrs: {src: t.config.img, alt: ""}
- }), t._v(" "), n("div", {staticClass: "web__logo-info"}, [n("p", {staticClass: "web__logo-name"}, [t._v(t._s(t.config.name))]), t._v(" "), n("p", {staticClass: "web__logo-dept"}, [t._v(t._s(t.config.dept))])]), t._v(" "), t._t("header")], 2), t._v(" "), n("div", {staticClass: "web__content"}, [n("div", {style: t.widthStyleName}, [n("div", {
- ref: "main",
- staticClass: "web__main"
- }, t._l(t.list, (function (e, i) {
- return n("div", {
- key: i,
- staticClass: "web__main-item",
- class: {"web__main-item--mine": e.mine}
- }, [n("div", {staticClass: "web__main-user"}, [n("img", {attrs: {src: e.img}}), t._v(" "), n("cite", [t._v("\n " + t._s(e.name) + "\n "), n("i", [t._v(t._s(e.date))])])]), t._v(" "), n("div", {staticClass: "web__main-text"}, [n("div", {staticClass: "web__main-arrow"}), t._v(" "), n("span", {
- ref: "content",
- refInFor: !0,
- domProps: {innerHTML: t._s(t.handleDetail(e.text.text))}
- }), t._v(" "), t.validatenull(e.text.list) ? t._e() : n("ul", {staticClass: " web__main-list"}, t._l(e.text.list, (function (e, i) {
- return n("li", {
- key: i, on: {
- click: function (n) {
- return t.handleItemMsg(e)
- }
- }
- }, [t._v(t._s(e.text))])
- })), 0)])])
- })), 0), t._v(" "), n("div", {
- staticClass: "web__footer",
- style: t.widthStyleName
- }, [n("div", {staticClass: "web__tools"}, [t.tools.img ? n("i", {
- staticClass: "el-icon-picture-outline",
- on: {
- click: function (e) {
- return t.handleUpload("img")
- }
- }
- }) : t._e(), t._v(" "), t.tools.video ? n("i", {
- staticClass: "el-icon-video-camera", on: {
- click: function (e) {
- return t.handleUpload("video")
- }
- }
- }) : t._e(), t._v(" "), t.tools.file ? n("i", {
- staticClass: "el-icon-folder-opened", on: {
- click: function (e) {
- return t.handleUpload("file")
- }
- }
- }) : t._e()]), t._v(" "), n("div", {staticClass: "web__msg"}, [n("textarea", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: t.msg,
- expression: "msg"
- }],
- staticClass: "web__msg-input",
- attrs: {rows: "2", placeholder: t.placeholder},
- domProps: {value: t.msg},
- on: {
- input: function (e) {
- e.target.composing || (t.msg = e.target.value)
- }
- }
- }), t._v(" "), n("div", {staticClass: "web__msg-menu"}, [n("el-dropdown", {
- staticClass: "web__msg-submit",
- attrs: {"split-button": "", type: "primary", size: "mini", trigger: "click"},
- on: {click: t.handleSend}
- }, [t._v("\n 发送\n "), n("el-dropdown-menu", {
- attrs: {slot: "dropdown"},
- slot: "dropdown"
- }, [n("el-dropdown-item", [n("el-popover", {
- attrs: {placement: "top", width: "160"},
- model: {
- value: t.visible, callback: function (e) {
- t.visible = e
- }, expression: "visible"
- }
- }, [n("el-input", {
- staticStyle: {"margin-bottom": "10px"},
- attrs: {
- size: "mini",
- rows: 3,
- "show-word-limit": "",
- maxlength: "100",
- placeholder: "请输入快捷回复语",
- type: "textarea"
- },
- model: {
- value: t.keys, callback: function (e) {
- t.keys = e
- }, expression: "keys"
- }
- }), t._v(" "), n("div", {
- staticStyle: {
- "text-align": "right",
- margin: "0"
- }
- }, [n("el-button", {
- attrs: {size: "mini", type: "text"}, on: {
- click: function (e) {
- t.visible = !1
- }
- }
- }, [t._v("取消")]), t._v(" "), n("el-button", {
- attrs: {type: "primary", size: "mini"},
- on: {click: t.addKey}
- }, [t._v("确定")])], 1), t._v(" "), n("el-button", {
- attrs: {slot: "reference", type: "text", icon: "el-icon-plus"},
- slot: "reference"
- })], 1)], 1), t._v(" "), n("el-scrollbar", {staticStyle: {height: "100px"}}, t._l(t.keylist, (function (e, i) {
- return n("el-dropdown-item", {
- key: i, nativeOn: {
- click: function (n) {
- return t.sendKey(e)
- }
- }
- }, [n("el-tooltip", {
- attrs: {
- effect: "dark",
- content: e,
- placement: "top"
- }
- }, [n("span", [t._v(" " + t._s(e.substr(0, 10)) + t._s(e.length > 10 ? "..." : ""))])])], 1)
- })), 1)], 1)], 1)], 1)])])]), t._v(" "), t._t("default")], 2), t._v(" "), n("el-dialog", {
- attrs: {
- title: t.upload.title,
- "append-to-body": "",
- visible: t.upload.box,
- width: "30%"
- }, on: {
- "update:visible": function (e) {
- return t.$set(t.upload, "box", e)
- }
- }
- }, [n("el-form", {ref: "form", attrs: {model: t.upload}}, [n("el-form-item", {
- attrs: {
- prop: "src",
- rules: [{required: !0, message: "地址不能为空"}]
- }
- }, [n("el-input", {
- staticStyle: {"margin-bottom": "10px"},
- attrs: {size: "mini", rows: 4, "show-word-limit": "", maxlength: "100", placeholder: "请输入地址", type: "textarea"},
- model: {
- value: t.upload.src, callback: function (e) {
- t.$set(t.upload, "src", e)
- }, expression: "upload.src"
- }
- })], 1)], 1), t._v(" "), n("span", {
- staticClass: "dialog-footer",
- attrs: {slot: "footer"},
- slot: "footer"
- }, [n("el-button", {
- attrs: {size: "small"}, on: {
- click: function (e) {
- t.upload.box = !1
- }
- }
- }, [t._v("取 消")]), t._v(" "), n("el-button", {
- attrs: {type: "primary", size: "small"},
- on: {click: t.uploadSubmit}
- }, [t._v("确 定")])], 1)], 1), t._v(" "), n("el-dialog", {
- staticClass: "web__dialog",
- attrs: {visible: t.show, width: "40%", "append-to-body": "", "before-close": t.handleClose},
- on: {
- "update:visible": function (e) {
- t.show = e
- }
- }
- }, [t.imgSrc ? n("img", {
- staticStyle: {width: "100%", "object-fit": "cover"},
- attrs: {src: t.imgSrc}
- }) : t._e(), t._v(" "), t.videoSrc ? n("video", {
- staticStyle: {width: "100%", "object-fit": "cover"},
- attrs: {src: t.videoSrc, controls: "controls"}
- }) : t._e(), t._v(" "), t.audioSrc ? n("audio", {
- staticStyle: {width: "100%", "object-fit": "cover"},
- attrs: {src: t.audioSrc, controls: "controls"}
- }) : t._e()])], 1)
- }), [], !1, null, null, null).exports, $ = {avatar: "avatar", author: "author", body: "body"}, L = Object(i.a)({
- name: "comment",
- props: {
- reverse: {type: Boolean, default: !1}, data: {
- type: Object, default: function () {
- return {}
- }
- }, props: {
- type: Object, default: function () {
- return $
- }
- }, option: {
- type: Object, default: function () {
- return {}
- }
- }
- },
- computed: {
- avatarKey: function () {
- return this.props.avatar || $.avatar
- }, authorKey: function () {
- return this.props.author || $.author
- }, bodyKey: function () {
- return this.props.body || $.body
- }, avatar: function () {
- return this.data[this.avatarKey]
- }, author: function () {
- return this.data[this.authorKey]
- }, body: function () {
- return this.data[this.bodyKey]
- }
- },
- mounted: function () {
- }
- }), N = Object(c.a)(L, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b({reverse: t.reverse})}, [n("img", {
- class: t.b("avatar"),
- attrs: {src: t.avatar, alt: ""}
- }), t._v(" "), n("div", {class: t.b("main")}, [n("div", {class: t.b("header")}, [t.author ? n("div", {
- class: t.b("author"),
- domProps: {textContent: t._s(t.author)}
- }) : t._e(), t._v(" "), t._t("default")], 2), t._v(" "), t.body ? n("div", {
- class: t.b("body"),
- domProps: {innerHTML: t._s(t.body)}
- }) : t._e()])])
- }), [], !1, null, null, null).exports, z = n(22).a, B = Object(c.a)(z, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- class: [t.b(), {"avue--view": t.isView, "avue--detail": t.isDetail}],
- style: {width: t.setPx(t.parentOption.formWidth, "100%")}
- }, [n("el-form", {
- ref: "form",
- attrs: {
- "status-icon": t.parentOption.statusIcon,
- model: t.form,
- "label-suffix": t.labelSuffix,
- size: t.$AVUE.formSize || t.controlSize,
- "label-position": t.parentOption.labelPosition,
- "label-width": t.setPx(t.parentOption.labelWidth, t.labelWidth)
- },
- nativeOn: {
- submit: function (t) {
- t.preventDefault()
- }
- }
- }, [n("el-row", {
- class: {"avue-form__tabs": t.isTabs},
- attrs: {span: 24}
- }, [t._l(t.columnOption, (function (e, i) {
- return n("avue-group", {
- key: e.prop,
- attrs: {
- tabs: t.isTabs,
- arrow: e.arrow,
- collapse: e.collapse,
- display: e.display,
- icon: e.icon,
- index: i,
- header: !t.isTabs,
- active: t.activeName,
- label: e.label
- },
- on: {change: t.handleGroupClick}
- }, [t.isTabs && 1 == i ? n("el-tabs", {
- class: t.b("tabs"),
- attrs: {slot: "tabs", type: t.tabsType},
- on: {"tab-click": t.handleTabClick},
- slot: "tabs",
- model: {
- value: t.activeName, callback: function (e) {
- t.activeName = e
- }, expression: "activeName"
- }
- }, [t._l(t.columnOption, (function (e, i) {
- return [t.vaildData(e.display, !0) && 0 != i ? n("el-tab-pane", {
- key: i,
- attrs: {name: i + ""}
- }, [n("span", {
- attrs: {slot: "label"},
- slot: "label"
- }, [t.$slots[t.getSlotName(e, "H")] ? t._t(t.getSlotName(e, "H")) : [n("i", {class: e.icon}, [t._v(" ")]), t._v("\n " + t._s(e.label) + "\n ")]], 2)]) : t._e()]
- }))], 2) : t._e(), t._v(" "), t.$slots[t.getSlotName(e, "H")] ? n("template", {slot: "header"}, [t._t(t.getSlotName(e, "H"))], 2) : t._e(), t._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: t.isGroupShow(e, i),
- expression: "isGroupShow(item,index)"
- }], class: t.b("group", {flex: t.vaildData(e.flex, !0)})
- }, [t._l(e.column, (function (i, o) {
- return [t.vaildDisplay(i) ? n("el-col", {
- key: o,
- class: [t.b("row"), {"avue--detail": t.vaildDetail(i)}, i.className],
- style: {
- paddingLeft: t.setPx((t.parentOption.gutter || 20) / 2),
- paddingRight: t.setPx((t.parentOption.gutter || 20) / 2)
- },
- attrs: {span: t.getSpan(i), md: t.getSpan(i), sm: 12, xs: 24, offset: i.offset || 0}
- }, [n("el-form-item", {
- class: t.b("item--" + (i.labelPosition || e.labelPosition || "")),
- attrs: {
- prop: i.prop,
- label: i.label,
- rules: i.rules,
- "label-position": i.labelPosition || e.labelPosition || t.parentOption.labelPosition,
- "label-width": t.getLabelWidth(i, e)
- },
- scopedSlots: t._u([{
- key: "error", fn: function (e) {
- return t.$scopedSlots[i.prop + "Error"] ? [t._t(i.prop + "Error", null, null, Object.assign(e, {
- column: i,
- value: t.form[i.prop],
- readonly: i.readonly || t.readonly,
- disabled: t.getDisabled(i),
- size: i.size || t.controlSize,
- dic: t.DIC[i.prop]
- }))] : void 0
- }
- }], null, !0)
- }, [t.$scopedSlots[t.getSlotName(i, "L")] ? n("template", {slot: "label"}, [t._t(t.getSlotName(i, "L"), null, {
- column: i,
- value: t.form[i.prop],
- readonly: t.readonly || i.readonly,
- disabled: t.getDisabled(i),
- size: i.size || t.controlSize,
- dic: t.DIC[i.prop]
- })], 2) : i.labelTip ? n("template", {slot: "label"}, [n("el-tooltip", {
- staticClass: "item",
- attrs: {effect: "dark", placement: i.labelTipPlacement || "top-start"}
- }, [n("div", {
- attrs: {slot: "content"},
- domProps: {innerHTML: t._s(i.labelTip)},
- slot: "content"
- }), t._v(" "), n("i", {staticClass: "el-icon-info"})]), t._v(" "), n("span", [t._v(" " + t._s(i.label) + t._s(t.labelSuffix))])], 1) : t._e(), t._v(" "), t._v(" "), n(t.validTip(i) ? "div" : "elTooltip", {
- tag: "component",
- attrs: {
- disabled: t.validTip(i),
- content: t.vaildData(i.tip, t.getPlaceholder(i)),
- placement: i.tipPlacement
- }
- }, [t.$scopedSlots[i.prop] ? t._t(i.prop, null, {
- value: t.form[i.prop],
- column: i,
- label: t.form["$" + i.prop],
- size: i.size || t.controlSize,
- readonly: t.readonly || i.readonly,
- disabled: t.getDisabled(i),
- dic: t.DIC[i.prop]
- }) : n("form-temp", t._b({
- ref: i.prop,
- refInFor: !0,
- attrs: {
- column: i,
- dic: t.DIC[i.prop],
- props: t.parentOption.props,
- propsHttp: t.parentOption.propsHttp,
- disabled: t.getDisabled(i),
- enter: t.parentOption.enter,
- size: t.parentOption.size,
- "column-slot": t.getChildrenColumn(i)
- },
- on: {
- enter: t.submit, change: function (n) {
- return t.propChange(e.column, i)
- }
- },
- scopedSlots: t._u([t._l(t.getChildrenColumn(i), (function (e) {
- return {
- key: e.prop, fn: function (n) {
- return [t._t(e.prop, null, null, n)]
- }
- }
- })), t._l(t.$scopedSlots[t.getSlotName(i, "T")] ? [i] : [], (function (e) {
- return {
- key: t.getSlotName(i, "T"), fn: function (n) {
- return [t._t(t.getSlotName(e, "T"), null, null, n)]
- }
- }
- }))], null, !0),
- model: {
- value: t.form[i.prop], callback: function (e) {
- t.$set(t.form, i.prop, e)
- }, expression: "form[column.prop]"
- }
- }, "form-temp", t.$uploadFun(i), !1))], 2)], 2)], 1) : t._e(), t._v(" "), t.vaildDisplay(i) && i.row && 24 !== i.span && i.count ? n("div", {
- key: "line" + o,
- class: t.b("line"),
- style: {width: i.count / 24 * 100 + "%"}
- }) : t._e()]
- })), t._v(" "), t._t("search"), t._v(" "), t.isDetail || t.isMenu ? t._e() : n("form-menu", {
- scopedSlots: t._u([{
- key: "menuForm",
- fn: function (e) {
- return [t._t("menuForm", null, null, e)]
- }
- }], null, !0)
- })], 2)], 2)
- })), t._v(" "), !t.isDetail && t.isMenu ? n("form-menu", {
- scopedSlots: t._u([{
- key: "menuForm", fn: function (e) {
- return [t._t("menuForm", null, null, e)]
- }
- }], null, !0)
- }) : t._e()], 2)], 1)], 1)
- }), [], !1, null, null, null).exports, F = n(3), R = n(14), K = function () {
- return {
- mixins: [R.a], data: function () {
- return {stringMode: !1, name: "", text: void 0, propsHttpDefault: F.d, propsDefault: F.e}
- }, props: {
- blur: Function,
- focus: Function,
- change: Function,
- click: Function,
- typeformat: Function,
- control: Function,
- separator: {type: String, default: F.g},
- params: {
- type: Object, default: function () {
- return {}
- }
- },
- listType: {type: String},
- value: {},
- column: {
- type: Object, default: function () {
- return {}
- }
- },
- label: {type: String, default: ""},
- readonly: {type: Boolean, default: !1},
- size: {type: String, default: ""},
- tip: {type: String, default: ""},
- disabled: {type: Boolean, default: !1},
- dataType: {type: String},
- clearable: {type: Boolean, default: !0},
- type: {type: String, default: ""},
- dicUrl: {type: String, default: ""},
- dicMethod: {type: String, default: ""},
- dicFormatter: Function,
- dicQuery: {
- type: Object, default: function () {
- return {}
- }
- },
- dic: {
- type: Array, default: function () {
- return []
- }
- },
- placeholder: {type: String, default: ""},
- rules: {type: Array},
- min: {type: Number},
- max: {type: Number},
- multiple: {type: Boolean, default: !1},
- button: {type: Boolean, default: !1},
- group: {type: Boolean, default: !1},
- row: {type: Boolean, default: !1},
- prop: {type: String, default: ""},
- border: {type: Boolean, default: !1},
- propsHttp: {
- type: Object, default: function () {
- return F.d
- }
- },
- props: {
- type: Object, default: function () {
- return F.e
- }
- }
- }, watch: {
- text: {
- handler: function (t) {
- this.handleChange(t)
- }
- }, value: {
- handler: function () {
- this.initVal()
- }
- }
- }, computed: {
- componentName: function () {
- var t = this.$AVUE.ui.type;
- return "".concat(t, "-").concat(this.name).concat(this.button ? "-button" : "")
- }, required: function () {
- return !this.validatenull(this.rules)
- }, isArray: function () {
- return "array" === this.dataType
- }, isString: function () {
- return "string" === this.dataType
- }, isNumber: function () {
- return "number" === this.dataType
- }, nameKey: function () {
- return this.propsHttp.name || this.propsHttpDefault.name
- }, urlKey: function () {
- return this.propsHttp.url || this.propsHttpDefault.url
- }, resKey: function () {
- return this.propsHttp.res || this.propsHttpDefault.res
- }, groupsKey: function () {
- return this.props.groups || this.propsDefault.groups
- }, valueKey: function () {
- return this.props.value || this.propsDefault.value
- }, descKey: function () {
- return this.props.desc || this.propsDefault.desc
- }, leafKey: function () {
- return this.props.leaf || this.propsDefault.leaf
- }, labelKey: function () {
- return this.props.label || this.propsDefault.label
- }, childrenKey: function () {
- return this.props.children || this.propsDefault.children
- }, disabledKey: function () {
- return this.props.disabled || this.propsDefault.disabled
- }, idKey: function () {
- return this.props.id || this.propsDefault.id
- }
- }, created: function () {
- this.initVal()
- }
- }
- }, W = n(7);
- function U(t, e, n) {
- "function" == typeof t[e] && t[e]({value: t.value, column: t.column}), t.$emit(e, t.value, n)
- }
- var V, H = function () {
- return {
- methods: {
- initVal: function () {
- var t = this;
- this.text = Object(W.h)({
- type: this.type,
- multiple: this.multiple,
- dataType: this.dataType,
- value: this.value,
- separator: this.separator,
- callback: function (e) {
- t.stringMode = e
- }
- })
- }, getLabelText: function (t) {
- return this.validatenull(t) ? "" : "function" == typeof this.typeformat ? this.typeformat(t, this.labelKey, this.valueKey) : t[this.labelKey]
- }, handleFocus: function (t) {
- U(this, "focus", t)
- }, handleBlur: function (t) {
- U(this, "blur", t)
- }, handleClick: function (t) {
- U(this, "click", t)
- }, handleChange: function (t) {
- var e = t;
- (this.isString || this.isNumber || this.stringMode || "picture-img" === this.listType) && Array.isArray(t) && (e = t.join(",")), "function" == typeof this.change && !0 !== this.column.cell && this.change({
- value: e,
- column: this.column
- }), this.$emit("input", e), this.$emit("change", e)
- }
- }
- }
- }, q = Object(i.a)({
- name: "checkbox",
- props: {all: {type: Boolean, default: !1}},
- mixins: [K(), H()],
- data: function () {
- return {checkAll: !1, isIndeterminate: !1, name: "checkbox"}
- },
- watch: {
- dic: function () {
- this.handleCheckChange(this.text)
- }, text: {
- handler: function (t) {
- this.handleChange(t), this.handleCheckChange(t)
- }, immediate: !0
- }
- },
- created: function () {
- },
- mounted: function () {
- },
- methods: {
- handleCheckAll: function (t) {
- var e = this;
- this.all && (this.text = t ? this.dic.map((function (t) {
- return t[e.valueKey]
- })) : [], this.isIndeterminate = !1)
- }, handleCheckChange: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
- if (this.all) {
- var e = t.length;
- if (0 !== e) {
- var n = this.dic.length;
- this.checkAll = e === n, this.isIndeterminate = e > 0 && e < n
- }
- }
- }
- }
- }), Y = Object(c.a)(q, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [t.all ? [n("el-checkbox", {
- attrs: {indeterminate: t.isIndeterminate},
- on: {change: t.handleCheckAll},
- model: {
- value: t.checkAll, callback: function (e) {
- t.checkAll = e
- }, expression: "checkAll"
- }
- }, [t._v("全选")]), t._v(" "), n("div", {staticStyle: {margin: "5px 0"}})] : t._e(), t._v(" "), n("el-checkbox-group", {
- attrs: {
- disabled: t.disabled,
- size: t.size,
- min: t.min,
- max: t.max
- }, on: {change: t.handleCheckChange}, nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- }, model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- }, t._l(t.dic, (function (e, i) {
- return n(t.componentName, {
- key: i,
- tag: "component",
- attrs: {
- label: e[t.valueKey],
- border: t.border,
- size: t.size,
- readonly: t.readonly,
- disabled: e[t.disabledKey]
- }
- }, [t._v(t._s(e[t.labelKey]) + "\n ")])
- })), 1)], 2)
- }), [], !1, null, null, null).exports, G = n(6), X = Object(i.a)({
- name: "date",
- mixins: [K(), H(), G.a],
- data: function () {
- return {text: "", menu: []}
- },
- props: {
- unlinkPanels: {type: Boolean, default: !1},
- value: {},
- startPlaceholder: {type: String, default: "开始日期"},
- endPlaceholder: {type: String, default: "结束日期"},
- rangeSeparator: {type: String},
- defaultValue: {type: [String, Array]},
- defaultTime: {type: [String, Array]},
- pickerOptions: {
- type: Object, default: function () {
- }
- },
- type: {type: String, default: "date"},
- valueFormat: {},
- format: {}
- }
- }), Q = Object(c.a)(X, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("el-date-picker", {
- attrs: {
- type: t.type,
- size: t.size,
- "unlink-panels": t.unlinkPanels,
- readonly: t.readonly,
- "default-value": t.defaultValue,
- "default-time": t.defaultTime,
- "range-separator": t.rangeSeparator,
- "start-placeholder": t.startPlaceholder,
- "end-placeholder": t.endPlaceholder,
- format: t.format,
- clearable: !t.disabled && t.clearable,
- "picker-options": t.pickerOptions,
- "value-format": t.valueFormat,
- placeholder: t.placeholder,
- disabled: t.disabled
- }, on: {blur: t.handleBlur, focus: t.handleFocus}, nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- }, model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- })], 1)
- }), [], !1, null, null, null).exports, J = n(2), Z = Object(i.a)({
- name: "draggable",
- props: {
- index: {type: [String, Number]},
- mask: {type: Boolean, default: !0},
- scale: {type: Number, default: 1},
- readonly: {type: Boolean, default: !1},
- resize: {type: Boolean, default: !0},
- disabled: {type: Boolean, default: !1},
- step: {type: Number, default: 1},
- zIndex: {type: [Number, String], default: 1},
- left: {type: Number, default: 0},
- top: {type: Number, default: 0},
- width: {type: Number},
- height: {type: Number}
- },
- data: function () {
- return {
- value: "",
- baseWidth: 0,
- baseHeight: 0,
- baseLeft: 0,
- baseTop: 0,
- children: {},
- moveActive: !1,
- overActive: !1,
- rangeActive: !1,
- active: !1,
- keyDown: null,
- rangeList: [{classname: "left"}, {classname: "right"}, {classname: "top"}, {classname: "bottom"}, {classname: "top-left"}, {classname: "top-right"}, {classname: "bottom-left"}, {classname: "bottom-right"}]
- }
- },
- computed: {
- scaleVal: function () {
- return this.scale
- }, styleMenuName: function () {
- return {transformOrigin: "0 0", transform: "scale(".concat(this.scaleVal, ")")}
- }, styleLineName: function () {
- return {borderWidth: this.setPx(this.scaleVal)}
- }, styleRangeName: function () {
- var t = 10 * this.scaleVal;
- return {width: this.setPx(t), height: this.setPx(t)}
- }, styleLabelName: function () {
- return {fontSize: this.setPx(18 * this.scaleVal)}
- }, styleName: function () {
- var t = this;
- return Object.assign(t.active ? Object.assign({zIndex: 9999}, t.styleLineName) : {zIndex: t.zIndex}, {
- top: this.setPx(this.baseTop),
- left: this.setPx(this.baseLeft),
- width: this.setPx(this.baseWidth),
- height: this.setPx(this.baseHeight)
- })
- }
- },
- watch: {
- active: function (t) {
- t ? this.handleKeydown() : document.onkeydown = this.keyDown
- }, width: function (t) {
- this.baseWidth = Object(J.m)(t) || this.children.offsetWidth
- }, height: function (t) {
- this.baseHeight = Object(J.m)(t) || this.children.offsetHeight
- }, left: function (t) {
- this.baseLeft = Object(J.m)(t)
- }, top: function (t) {
- this.baseTop = Object(J.m)(t)
- }, baseWidth: function (t) {
- this.$refs.wrapper.style.width = this.setPx(t), this.resize && this.children.style && (this.children.style.width = this.setPx(t))
- }, baseHeight: function (t) {
- this.$refs.wrapper.style.height = this.setPx(t), this.resize && this.children.style && (this.children.style.height = this.setPx(t))
- }
- },
- mounted: function () {
- this.init()
- },
- methods: {
- init: function () {
- this.children = this.$refs.item.firstChild, this.baseWidth = Object(J.m)(this.width) || this.children.offsetWidth, this.baseHeight = Object(J.m)(this.height) || this.children.offsetHeight, this.baseLeft = Object(J.m)(this.left), this.baseTop = Object(J.m)(this.top), this.keyDown = document.onkeydown
- }, setLeft: function (t) {
- this.baseLeft = t
- }, setTop: function (t) {
- this.baseTop = t
- }, getRangeStyle: function (t) {
- var e = this, n = 10 * this.scaleVal / 2, i = {};
- return t.split("-").forEach((function (t) {
- i[t] = e.setPx(-n)
- })), i
- }, setOverActive: function (t) {
- this.overActive = t
- }, setActive: function (t) {
- this.active = t
- }, rangeMove: function (t, e) {
- var n = this;
- if (!this.disabled) {
- var i, o, a, r, s, l;
- this.rangeActive = !0, this.handleMouseDown();
- var c = t.clientX, u = t.clientY;
- document.onmousemove = function (t) {
- n.moveActive = !0, "right" === e ? (i = !0, o = !1) : "left" === e ? (i = !0, a = !0, s = !0, o = !1) : "top" === e ? (i = !1, o = !0, r = !0, l = !0) : "bottom" === e ? (i = !1, o = !0) : "bottom-right" === e ? (i = !0, o = !0) : "bottom-left" === e ? (i = !0, o = !0, a = !0, s = !0) : "top-right" === e ? (i = !0, o = !0, r = !0, l = !0) : "top-left" === e && (i = !0, o = !0, a = !0, s = !0, r = !0, l = !0);
- var d = t.clientX - c, p = t.clientY - u;
- if (c = t.clientX, u = t.clientY, i) {
- var h = d * n.step;
- s && (h = -h), a && (n.baseLeft = Object(J.m)(n.baseLeft - h)), n.baseWidth = Object(J.m)(n.baseWidth + h)
- }
- if (o) {
- var f = p * n.step;
- l && (f = -f), r && (n.baseTop = Object(J.m)(n.baseTop - f)), n.baseHeight = Object(J.m)(n.baseHeight + f)
- }
- }, this.handleClear()
- }
- }, handleOut: function () {
- this.overActive = !1, this.$emit("out", {
- index: this.index,
- width: this.baseWidth,
- height: this.baseHeight,
- left: this.baseLeft,
- top: this.baseTop
- })
- }, handleOver: function () {
- this.disabled || (this.overActive = !0, this.$emit("over", {
- index: this.index,
- width: this.baseWidth,
- height: this.baseHeight,
- left: this.baseLeft,
- top: this.baseTop
- }))
- }, handleMove: function (t) {
- var e = this;
- if (!this.disabled) {
- setTimeout((function () {
- e.$refs.input.focus()
- })), this.active = !0, this.handleMouseDown();
- var n = t.clientX, i = t.clientY;
- document.onmousemove = function (t) {
- var o = t.clientX - n, a = t.clientY - i;
- n = t.clientX, i = t.clientY, e.baseLeft = Object(J.m)(e.baseLeft + o * e.step), e.baseTop = Object(J.m)(e.baseTop + a * e.step)
- }, this.handleClear()
- }
- }, handleClear: function () {
- var t = this;
- document.onmouseup = function () {
- document.onmousemove = null, document.onmouseup = null, t.handleMouseUp()
- }
- }, handleKeydown: function () {
- var t = arguments, e = this;
- document.onkeydown = function (n) {
- var i = n || window.event || t.callee.caller.arguments[0], o = 1 * e.step;
- e.$refs.input.focused && (i && 38 == i.keyCode ? e.baseTop = Object(J.m)(e.baseTop - o) : i && 37 == i.keyCode ? e.baseLeft = Object(J.m)(e.baseLeft - o) : i && 40 == i.keyCode ? e.baseTop = Object(J.m)(e.baseTop + o) : i && 39 == i.keyCode && (e.baseLeft = Object(J.m)(e.baseLeft + o)), n.stopPropagation(), n.preventDefault(), e.$emit("blur", {
- index: e.index,
- width: e.baseWidth,
- height: e.baseHeight,
- left: e.baseLeft,
- top: e.baseTop
- }), e.keyDown && e.keyDown(n))
- }
- }, handleMouseDown: function (t) {
- this.moveActive = !0, this.$emit("focus", {
- index: this.index,
- width: this.baseWidth,
- height: this.baseHeight,
- left: this.baseLeft,
- top: this.baseTop
- })
- }, handleMouseUp: function () {
- this.moveActive = !1, this.rangeActive = !1, this.$emit("blur", {
- index: this.index,
- width: this.baseWidth,
- height: this.baseHeight,
- left: this.baseLeft,
- top: this.baseTop
- })
- }
- }
- }), tt = Object(c.a)(Z, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- class: t.b({
- active: (t.active || t.overActive) && !t.readonly,
- move: t.moveActive,
- click: t.disabled
- }), style: t.styleName, on: {
- mousedown: function (e) {
- return e.stopPropagation(), t.handleMove(e)
- }, mouseover: function (e) {
- return e.stopPropagation(), t.handleOver(e)
- }, mouseout: function (e) {
- return e.stopPropagation(), t.handleOut(e)
- }
- }
- }, [n("el-input", {
- ref: "input", class: t.b("focus"), model: {
- value: t.value, callback: function (e) {
- t.value = e
- }, expression: "value"
- }
- }), t._v(" "), n("div", {
- ref: "wrapper",
- class: t.b("wrapper")
- }, [(t.active || t.overActive || t.moveActive) && !t.readonly ? [n("div", {
- class: t.b("line", ["left"]),
- style: t.styleLineName
- }), t._v(" "), n("div", {
- class: t.b("line", ["top"]),
- style: t.styleLineName
- }), t._v(" "), n("div", {
- class: t.b("line", ["label"]),
- style: t.styleLabelName
- }, [t._v(t._s(t.baseLeft) + "," + t._s(t.baseTop))])] : t._e(), t._v(" "), t._l(t.rangeList, (function (e, i) {
- return t.readonly ? t._e() : [t.active ? n("div", {
- key: i,
- class: t.b("range", [e.classname]),
- style: [t.styleRangeName, t.getRangeStyle(e.classname)],
- on: {
- mousedown: function (n) {
- return n.stopPropagation(), t.rangeMove(n, e.classname)
- }
- }
- }) : t._e()]
- })), t._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: t.active || t.overActive,
- expression: "active || overActive"
- }], class: t.b("menu"), style: t.styleMenuName
- }, [t._t("menu", null, {zIndex: t.zIndex, index: t.index})], 2), t._v(" "), n("div", {
- ref: "item",
- class: t.b("item")
- }, [t._t("default")], 2), t._v(" "), !t.disabled && t.mask ? n("div", {class: t.b("mask")}) : t._e()], 2)], 1)
- }), [], !1, null, null, null).exports, et = Object(i.a)({
- name: "empty", props: {
- size: {type: String},
- image: {
- type: String,
- default: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTg0IiBoZWlnaHQ9IjE1MiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQgMzEuNjcpIj4KICAgICAgPGVsbGlwc2UgZmlsbC1vcGFjaXR5PSIuOCIgZmlsbD0iI0Y1RjVGNyIgY3g9IjY3Ljc5NyIgY3k9IjEwNi44OSIgcng9IjY3Ljc5NyIgcnk9IjEyLjY2OCIvPgogICAgICA8cGF0aCBkPSJNMTIyLjAzNCA2OS42NzRMOTguMTA5IDQwLjIyOWMtMS4xNDgtMS4zODYtMi44MjYtMi4yMjUtNC41OTMtMi4yMjVoLTUxLjQ0Yy0xLjc2NiAwLTMuNDQ0LjgzOS00LjU5MiAyLjIyNUwxMy41NiA2OS42NzR2MTUuMzgzaDEwOC40NzVWNjkuNjc0eiIgZmlsbD0iI0FFQjhDMiIvPgogICAgICA8cGF0aCBkPSJNMTAxLjUzNyA4Ni4yMTRMODAuNjMgNjEuMTAyYy0xLjAwMS0xLjIwNy0yLjUwNy0xLjg2Ny00LjA0OC0xLjg2N0gzMS43MjRjLTEuNTQgMC0zLjA0Ny42Ni00LjA0OCAxLjg2N0w2Ljc2OSA4Ni4yMTR2MTMuNzkyaDk0Ljc2OFY4Ni4yMTR6IiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMy41NikiLz4KICAgICAgPHBhdGggZD0iTTMzLjgzIDBoNjcuOTMzYTQgNCAwIDAgMSA0IDR2OTMuMzQ0YTQgNCAwIDAgMS00IDRIMzMuODNhNCA0IDAgMCAxLTQtNFY0YTQgNCAwIDAgMSA0LTR6IiBmaWxsPSIjRjVGNUY3Ii8+CiAgICAgIDxwYXRoIGQ9Ik00Mi42NzggOS45NTNoNTAuMjM3YTIgMiAwIDAgMSAyIDJWMzYuOTFhMiAyIDAgMCAxLTIgMkg0Mi42NzhhMiAyIDAgMCAxLTItMlYxMS45NTNhMiAyIDAgMCAxIDItMnpNNDIuOTQgNDkuNzY3aDQ5LjcxM2EyLjI2MiAyLjI2MiAwIDEgMSAwIDQuNTI0SDQyLjk0YTIuMjYyIDIuMjYyIDAgMCAxIDAtNC41MjR6TTQyLjk0IDYxLjUzaDQ5LjcxM2EyLjI2MiAyLjI2MiAwIDEgMSAwIDQuNTI1SDQyLjk0YTIuMjYyIDIuMjYyIDAgMCAxIDAtNC41MjV6TTEyMS44MTMgMTA1LjAzMmMtLjc3NSAzLjA3MS0zLjQ5NyA1LjM2LTYuNzM1IDUuMzZIMjAuNTE1Yy0zLjIzOCAwLTUuOTYtMi4yOS02LjczNC01LjM2YTcuMzA5IDcuMzA5IDAgMCAxLS4yMjItMS43OVY2OS42NzVoMjYuMzE4YzIuOTA3IDAgNS4yNSAyLjQ0OCA1LjI1IDUuNDJ2LjA0YzAgMi45NzEgMi4zNyA1LjM3IDUuMjc3IDUuMzdoMzQuNzg1YzIuOTA3IDAgNS4yNzctMi40MjEgNS4yNzctNS4zOTNWNzUuMWMwLTIuOTcyIDIuMzQzLTUuNDI2IDUuMjUtNS40MjZoMjYuMzE4djMzLjU2OWMwIC42MTctLjA3NyAxLjIxNi0uMjIxIDEuNzg5eiIgZmlsbD0iI0RDRTBFNiIvPgogICAgPC9nPgogICAgPHBhdGggZD0iTTE0OS4xMjEgMzMuMjkybC02LjgzIDIuNjVhMSAxIDAgMCAxLTEuMzE3LTEuMjNsMS45MzctNi4yMDdjLTIuNTg5LTIuOTQ0LTQuMTA5LTYuNTM0LTQuMTA5LTEwLjQwOEMxMzguODAyIDguMTAyIDE0OC45MiAwIDE2MS40MDIgMCAxNzMuODgxIDAgMTg0IDguMTAyIDE4NCAxOC4wOTdjMCA5Ljk5NS0xMC4xMTggMTguMDk3LTIyLjU5OSAxOC4wOTctNC41MjggMC04Ljc0NC0xLjA2Ni0xMi4yOC0yLjkwMnoiIGZpbGw9IiNEQ0UwRTYiLz4KICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE0OS42NSAxNS4zODMpIiBmaWxsPSIjRkZGIj4KICAgICAgPGVsbGlwc2UgY3g9IjIwLjY1NCIgY3k9IjMuMTY3IiByeD0iMi44NDkiIHJ5PSIyLjgxNSIvPgogICAgICA8cGF0aCBkPSJNNS42OTggNS42M0gwTDIuODk4LjcwNHpNOS4yNTkuNzA0aDQuOTg1VjUuNjNIOS4yNTl6Ii8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K"
- },
- desc: {type: String, default: "暂无数据"}
- }, methods: {}
- }), nt = Object(c.a)(et, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("div", {
- class: t.b("image"),
- style: {height: t.setPx(t.size)}
- }, [n("img", {
- attrs: {
- src: t.image,
- alt: ""
- }
- })]), t._v(" "), n("p", {class: t.b("desc")}, [t._v(t._s(t.desc))]), t._v(" "), t._t("default")], 2)
- }), [], !1, null, null, null).exports, it = Object(i.a)({
- name: "flow",
- props: {active: [String, Number], index: [String, Number], node: Object},
- data: function () {
- return {mouseEnter: !1}
- },
- computed: {
- flowNodeContainer: {
- get: function () {
- return {
- position: "absolute",
- width: "200px",
- top: this.setPx(this.node.top),
- left: this.setPx(this.node.left),
- boxShadow: this.mouseEnter ? "#66a6e0 0px 0px 12px 0px" : "",
- backgroundColor: "transparent"
- }
- }
- }
- },
- methods: {
- showDelete: function () {
- this.mouseEnter = !0
- }, hideDelete: function () {
- this.mouseEnter = !1
- }, changeNodeSite: function () {
- this.node.left == this.$refs.node.style.left && this.node.top == this.$refs.node.style.top || this.$emit("changeNodeSite", {
- index: this.index,
- left: Number(this.$refs.node.style.left.replace("px", "")),
- top: Number(this.$refs.node.style.top.replace("px", ""))
- })
- }
- }
- }), ot = Object(c.a)(it, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- ref: "node",
- style: t.flowNodeContainer,
- attrs: {left: t.node.left, top: t.node.top, disabled: "", mask: !1},
- on: {mouseenter: t.showDelete, mouseleave: t.hideDelete, mouseup: t.changeNodeSite}
- }, [n("div", {class: t.b("node", {active: t.active === t.node.id})}, [n("div", {class: t.b("node-header")}, [n("i", {
- staticClass: "el-icon-rank",
- class: t.b("node-drag")
- }), t._v(" "), t._t("header", null, {node: t.node})], 2), t._v(" "), n("div", {class: t.b("node-body")}, [t._t("default", null, {node: t.node})], 2)])])
- }), [], !1, null, null, null).exports, at = Object(i.a)({
- name: "flow",
- components: {flowNode: ot},
- data: function () {
- return {
- active: "",
- jsPlumb: {},
- id: "",
- jsplumbSetting: {
- Anchors: ["Top", "TopCenter", "TopRight", "TopLeft", "Right", "RightMiddle", "Bottom", "BottomCenter", "BottomRight", "BottomLeft", "Left", "LeftMiddle"],
- Container: "",
- Connector: "Flowchart",
- ConnectionsDetachable: !1,
- DeleteEndpointsOnDetach: !1,
- Endpoint: ["Rectangle", {height: 10, width: 10}],
- EndpointStyle: {fill: "rgba(255,255,255,0)", outlineWidth: 1},
- LogEnabled: !0,
- PaintStyle: {stroke: "black", strokeWidth: 3},
- Overlays: [["Arrow", {width: 12, length: 12, location: 1}]],
- RenderMode: "svg"
- },
- jsplumbConnectOptions: {isSource: !0, isTarget: !0, anchor: "Continuous"},
- jsplumbSourceOptions: {
- filter: ".avue-flow__node-drag",
- filterExclude: !1,
- anchor: "Continuous",
- allowLoopback: !1
- },
- jsplumbTargetOptions: {
- filter: ".avue-flow__node-drag",
- filterExclude: !1,
- anchor: "Continuous",
- allowLoopback: !1
- },
- loadEasyFlowFinish: !1
- }
- },
- props: {
- value: {type: String},
- option: {type: Object},
- width: {type: [Number, String], default: "100%"},
- height: {type: [Number, String], default: "100%"}
- },
- watch: {
- value: {
- handler: function () {
- this.active = this.value
- }, immediate: !0
- }, active: function (t) {
- this.$emit("input", t)
- }
- },
- created: function () {
- this.id = Object(J.t)(), this.jsplumbSetting.Container = this.id
- },
- mounted: function () {
- this.init()
- },
- computed: {
- styleName: function () {
- return {position: "relative", width: this.setPx(this.width), height: this.setPx(this.height)}
- }
- },
- methods: {
- init: function () {
- var t = this;
- this.jsPlumb = jsPlumb.getInstance(), this.$nextTick((function () {
- t.jsPlumbInit()
- }))
- }, handleClick: function (t) {
- this.$emit("click", t)
- }, hasLine: function (t, e) {
- for (var n = 0; n < this.data.lineList.length; n++) {
- var i = this.data.lineList[n];
- if (i.from === t && i.to === e) return !0
- }
- return !1
- }, hashOppositeLine: function (t, e) {
- return this.hasLine(e, t)
- }, deleteLine: function (t, e) {
- this.option.lineList = this.option.lineList.filter((function (n) {
- return n.from !== t && n.to !== e
- }))
- }, changeLine: function (t, e) {
- this.deleteLine(t, e)
- }, changeNodeSite: function (t) {
- for (var e = t.index, n = t.left, i = t.top, o = 0; o < this.option.nodeList.length; o++) {
- this.option.nodeList[o];
- o === e && (this.$set(this.option.nodeList[o], "left", n), this.$set(this.option.nodeList[o], "top", i))
- }
- }, deleteNode: function (t) {
- var e = this;
- return this.$confirm("确定要删除节点" + t + "?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- closeOnClickModal: !1
- }).then((function () {
- e.option.nodeList.forEach((function (e) {
- e.id === t && (e.display = !0)
- })), e.$nextTick((function () {
- this.jsPlumb.removeAllEndpoints(t)
- }))
- })).catch((function () {
- })), !0
- }, addNode: function (t) {
- var e = this.option.nodeList.length, n = "node" + e;
- this.option.nodeList.push({id: "node" + e, name: t, left: 0, top: 0}), this.$nextTick((function () {
- this.jsPlumb.makeSource(n, this.jsplumbSourceOptions), this.jsPlumb.makeTarget(n, this.jsplumbTargetOptions), this.jsPlumb.draggable(n, {containment: "parent"})
- }))
- }, loadEasyFlow: function () {
- for (var t = 0; t < this.option.nodeList.length; t++) {
- var e = this.option.nodeList[t];
- this.jsPlumb.makeSource(e.id, this.jsplumbSourceOptions), this.jsPlumb.makeTarget(e.id, this.jsplumbTargetOptions), this.jsPlumb.draggable(e.id)
- }
- for (t = 0; t < this.option.lineList.length; t++) {
- var n = this.option.lineList[t];
- this.jsPlumb.connect({source: n.from, target: n.to}, this.jsplumbConnectOptions)
- }
- this.$nextTick((function () {
- this.loadEasyFlowFinish = !0
- }))
- }, jsPlumbInit: function () {
- var t = this;
- this.jsPlumb.ready((function () {
- t.jsPlumb.importDefaults(t.jsplumbSetting), t.jsPlumb.setSuspendDrawing(!1, !0), t.loadEasyFlow(), t.jsPlumb.bind("click", (function (e, n) {
- console.log("click", e), t.$confirm("确定删除所点击的线吗?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then((function () {
- t.jsPlumb.deleteConnection(e)
- })).catch((function () {
- }))
- })), t.jsPlumb.bind("connection", (function (e) {
- console.log("connection", e);
- var n = e.source.id, i = e.target.id;
- t.loadEasyFlowFinish && t.option.lineList.push({from: n, to: i})
- })), t.jsPlumb.bind("connectionDetached", (function (e) {
- console.log("connectionDetached", e), t.deleteLine(e.sourceId, e.targetId)
- })), t.jsPlumb.bind("connectionMoved", (function (e) {
- console.log("connectionMoved", e), t.changeLine(e.originalSourceId, e.originalTargetId)
- })), t.jsPlumb.bind("contextmenu", (function (t) {
- console.log("contextmenu", t)
- })), t.jsPlumb.bind("beforeDrop", (function (e) {
- console.log("beforeDrop", e);
- var n = e.sourceId, i = e.targetId;
- return n === i ? (t.$message.error("不能连接自己"), !1) : t.hasLine(n, i) ? (t.$message.error("不能重复连线"), !1) : !t.hashOppositeLine(n, i) || (t.$message.error("不能回环哦"), !1)
- })), t.jsPlumb.bind("beforeDetach", (function (t) {
- console.log("beforeDetach", t)
- }))
- }))
- }
- }
- }), rt = Object(c.a)(at, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b(), style: t.styleName}, [n("div", {
- style: t.styleName,
- attrs: {id: t.id}
- }, [n("div", {staticClass: "avue-grid"}), t._v(" "), t._l(t.option.nodeList, (function (e, i) {
- return e.display ? t._e() : n("flow-node", {
- key: i,
- attrs: {node: e, id: e.id, index: i, active: t.active},
- on: {changeNodeSite: t.changeNodeSite},
- nativeOn: {
- click: function (n) {
- return t.handleClick(e)
- }
- },
- scopedSlots: t._u([{
- key: "header", fn: function (e) {
- var n = e.node;
- return [t._t("header", null, {node: n})]
- }
- }], null, !0)
- }, [t._v(" "), t._t("default", null, {node: e})], 2)
- }))], 2)])
- }), [], !1, null, null, null).exports,
- st = {img: "img", title: "title", subtile: "title", tag: "tag", status: "status"}, lt = Object(i.a)({
- name: "notice", props: {
- option: {
- type: Object, default: function () {
- return {}
- }
- }, data: {
- type: Array, default: function () {
- return []
- }
- }
- }, data: function () {
- return {page: 1, loading: !1}
- }, computed: {
- props: function () {
- return this.option.props || st
- }, imgKey: function () {
- return this.props.img || st.img
- }, titleKey: function () {
- return this.props.title || st.title
- }, subtitleKey: function () {
- return this.props.subtitle || st.subtitle
- }, tagKey: function () {
- return this.props.tag || st.tag
- }, statusKey: function () {
- return this.props.status || st.status
- }
- }, methods: {
- click: function (t) {
- this.$emit("click", t)
- }, handleClick: function () {
- var t = this;
- this.loading = !0;
- this.page++, this.$emit("page-change", this.page, (function () {
- t.loading = !1
- }))
- }, getType: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
- return 0 == t ? "info" : 1 == t ? "" : 2 == t ? "warning" : 3 == t ? "danger" : 4 == t ? "success" : void 0
- }
- }
- }), ct = Object(c.a)(lt, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [t._l(t.data, (function (e, i) {
- return n("div", {
- key: i, class: t.b("item"), on: {
- click: function (n) {
- return t.click(e)
- }
- }
- }, [e[t.imgKey] ? n("div", {class: t.b("img")}, [n("img", {
- attrs: {
- src: e[t.imgKey],
- alt: ""
- }
- })]) : t._e(), t._v(" "), n("div", {class: t.b("content")}, [n("div", {class: t.b("title")}, [n("span", {class: t.b("name")}, [t._v(t._s(e[t.titleKey]))]), t._v(" "), e[t.tagKey] ? n("span", {class: t.b("tag")}, [n("el-tag", {
- attrs: {
- size: "small",
- type: t.getType(e[t.statusKey])
- }
- }, [t._v(t._s(e[t.tagKey]))])], 1) : t._e()]), t._v(" "), n("div", {class: t.b("subtitle")}, [t._v(t._s(e[t.subtitleKey]))])])])
- })), t._v(" "), n("div", {
- directives: [{
- name: "loading",
- rawName: "v-loading",
- value: t.loading,
- expression: "loading"
- }], class: t.b("more"), on: {click: t.handleClick}
- }, [t._v("\n 加载更多\n ")])], 2)
- }), [], !1, null, null, null).exports, ut = Object(i.a)({
- name: "license", props: {
- id: {type: String, default: ""}, option: {
- type: Object, default: function () {
- return {}
- }
- }
- }, watch: {
- option: {
- handler: function () {
- this.init()
- }, deep: !0
- }
- }, data: function () {
- return {base64: "", draw: !1, canvas: "", context: ""}
- }, computed: {
- img: function () {
- return this.option.img
- }, list: function () {
- return this.option.list || []
- }
- }, mounted: function () {
- this.canvas = document.getElementById("canvas" + this.id), this.context = this.canvas.getContext("2d"), this.init()
- }, methods: {
- init: function () {
- var t = this;
- this.draw = !1;
- var e = new Image;
- e.src = this.img, e.onload = function () {
- var n = t.option.width || e.width, i = t.option.width ? e.height / e.width * t.option.width : e.height;
- t.$refs.canvas.width = n, t.$refs.canvas.height = i, t.context.clearRect(0, 0, n, i), t.context.drawImage(e, 0, 0, n, i), t.list.forEach((function (e, n) {
- var i = function () {
- n == t.list.length - 1 && setTimeout((function () {
- t.draw = !0
- }), 0)
- };
- if (e.img) {
- var o = new Image;
- o.src = e.img, o.onload = function () {
- var n = e.width || o.width, a = e.width ? o.height / o.width * e.width : o.height;
- t.context.drawImage(o, e.left, e.top, n, a), i()
- }
- } else e.bold ? t.context.font = "bold ".concat(e.size, "px ").concat(e.style) : t.context.font = "".concat(e.size, "px ").concat(e.style), t.context.fillStyle = e.color, t.context.fillText(e.text, e.left, e.top), t.context.stroke(), i()
- }))
- }
- }, getFile: function () {
- var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : (new Date).getTime();
- return new Promise((function (n) {
- var i = setInterval((function () {
- if (t.draw) {
- var o = t.canvas.toDataURL("image/jpeg", 1), a = t.dataURLtoFile(o, e);
- clearInterval(i), n(a)
- }
- }), 1e3)
- }))
- }, downFile: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : (new Date).getTime();
- Object(J.g)(this.base64, t)
- }, getBase64: function () {
- var t = this;
- return new Promise((function (e) {
- var n = setInterval((function () {
- if (t.draw) {
- var i = t.canvas.toDataURL("image/jpeg", 1);
- t.base64 = i, clearInterval(n), e(i)
- }
- }), 100)
- }))
- }, getPdf: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : (new Date).getTime(),
- e = this.canvas.width, n = this.canvas.height, i = e / 592.28 * 841.89, o = n, a = 0, r = 595.28,
- s = 592.28 / e * n, l = this.canvas.toDataURL("image/jpeg", 1), c = new window.jsPDF("", "pt", "a4");
- if (o < i) c.addImage(l, "JPEG", 0, 0, r, s); else for (; o > 0;) c.addImage(l, "JPEG", 0, a, r, s), a -= 841.89, (o -= i) > 0 && c.addPage();
- c.save("".concat(t, ".pdf"))
- }
- }
- }), dt = Object(c.a)(ut, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b(), staticStyle: {position: "relative"}}, [e("canvas", {
- ref: "canvas",
- attrs: {id: "canvas" + this.id}
- }), this._v(" "), this._t("default")], 2)
- }), [], !1, null, null, null).exports, pt = Object(i.a)({
- name: "progress",
- props: {
- showText: {type: Boolean},
- width: {type: [Number, String]},
- strokeWidth: {type: [Number, String]},
- type: {type: String},
- color: {type: String},
- percentage: {type: [Number]}
- }
- }), ht = Object(c.a)(pt, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b()}, [e("el-progress", {
- attrs: {
- type: this.type,
- color: this.color,
- width: this.width,
- "text-inside": "",
- "show-text": this.showText,
- "stroke-width": this.strokeWidth,
- percentage: this.percentage
- }
- })], 1)
- }), [], !1, null, null, null).exports, ft = Object(i.a)({
- name: "time",
- mixins: [K(), H(), G.a],
- data: function () {
- return {}
- },
- props: {
- startPlaceholder: {type: String, default: "开始时间"},
- endPlaceholder: {type: String, default: "结束时间"},
- rangeSeparator: {type: String},
- value: {required: !0},
- defaultValue: {type: [String, Array]},
- valueFormat: {default: ""},
- arrowControl: {type: Boolean, default: !1},
- type: {default: ""},
- format: {default: ""}
- },
- watch: {
- text: function () {
- Array.isArray(this.text) && this.validatenull(this.text) && (this.text = this.text.join(","))
- }
- },
- created: function () {
- },
- mounted: function () {
- },
- computed: {
- isRange: function () {
- return "timerange" === this.type
- }
- },
- methods: {}
- }), mt = Object(c.a)(ft, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("el-time-picker", {
- attrs: {
- "is-range": t.isRange,
- size: t.size,
- "default-value": t.defaultValue,
- "range-separator": t.rangeSeparator,
- "arrow-control": t.arrowControl,
- "start-placeholder": t.startPlaceholder,
- "end-placeholder": t.endPlaceholder,
- format: t.format,
- readonly: t.readonly,
- clearable: !t.disabled && t.clearable,
- "value-format": t.valueFormat,
- placeholder: t.placeholder,
- disabled: t.disabled
- }, on: {change: t.handleChange}, nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- }, model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- })], 1)
- }), [], !1, null, null, null).exports, bt = n(5);
- function vt(t, e, n) {
- return e in t ? Object.defineProperty(t, e, {
- value: n,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = n, t
- }
- var yt, gt = Object(i.a)({
- name: "input",
- mixins: [K(), H()],
- data: function () {
- return {}
- },
- props: (V = {
- value: {},
- maxlength: "",
- minlength: "",
- showPassword: {type: Boolean, default: !0},
- showWordLimit: {type: Boolean, default: !1},
- target: {type: String, default: " _blank"},
- prefixIcon: {type: String},
- suffixIcon: {type: String},
- prependClick: {
- type: Function, default: function () {
- }
- },
- prepend: {type: String},
- appendClick: {
- type: Function, default: function () {
- }
- },
- append: {type: String}
- }, vt(V, "minlength", {type: Number}), vt(V, "maxlength", {type: Number}), vt(V, "minRows", {
- type: Number,
- default: 5
- }), vt(V, "maxRows", {type: Number, default: 10}), vt(V, "autocomplete", {type: String}), V),
- computed: {
- isSearch: function () {
- return "search" == this.type
- }, typeParam: function () {
- return "textarea" === this.type ? "textarea" : "password" === this.type ? "password" : "text"
- }
- }
- }), _t = Object(c.a)(gt, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("el-input", {
- class: t.b(),
- attrs: {
- size: t.size,
- clearable: !t.disabled && t.clearable,
- type: t.typeParam,
- maxlength: t.maxlength,
- minlength: t.minlength,
- "show-password": "password" == t.typeParam && t.showPassword,
- autosize: {minRows: t.minRows, maxRows: t.maxRows},
- "prefix-icon": t.prefixIcon,
- "suffix-icon": t.suffixIcon,
- readonly: t.readonly,
- placeholder: t.placeholder,
- "show-word-limit": t.showWordLimit,
- disabled: t.disabled,
- autocomplete: t.autocomplete
- },
- on: {
- keyup: function (e) {
- if (!e.type.indexOf("key") && t._k(e.keyCode, "enter", 13, e.key, "Enter")) return null;
- t.isSearch && t.appendClick()
- }, focus: t.handleFocus, blur: t.handleBlur
- },
- nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- },
- model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- }, [t.prepend ? n("template", {slot: "prepend"}, [n("span", {
- on: {
- click: function (e) {
- return t.prependClick()
- }
- }
- }, [t._v(t._s(t.prepend))])]) : t._e(), t._v(" "), t.append ? n("template", {slot: "append"}, [n("span", {
- on: {
- click: function (e) {
- return t.appendClick()
- }
- }
- }, [t._v(t._s(t.append))])]) : t.isSearch ? n("el-button", {
- attrs: {slot: "append", icon: "el-icon-search"},
- on: {
- click: function (e) {
- return t.appendClick()
- }
- },
- slot: "append"
- }) : t._e()], 2)
- }), [], !1, null, null, null).exports, xt = Object(i.a)({
- name: "radio", mixins: [K(), H()], data: function () {
- return {name: "radio"}
- }, props: {value: {}}, watch: {}, created: function () {
- }, mounted: function () {
- }, methods: {}
- }), wt = Object(c.a)(xt, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("el-radio-group", {
- attrs: {size: t.size, disabled: t.disabled},
- on: {change: t.handleChange},
- nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- },
- model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- }, t._l(t.dic, (function (e, i) {
- return n(t.componentName, {
- key: i,
- tag: "component",
- attrs: {label: e[t.valueKey], border: t.border, readonly: t.readonly, disabled: e[t.disabledKey]}
- }, [t._v(t._s(e[t.labelKey]))])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, St = n(11), Ot = Object(i.a)({
- name: "select",
- mixins: [K(), H()],
- data: function () {
- return {created: !1, netDic: [], loading: !1}
- },
- props: {
- value: {},
- loadingText: {type: String},
- noMatchText: {type: String},
- noDataText: {type: String},
- drag: {type: Boolean, default: !1},
- remote: {type: Boolean, default: !1},
- tags: {type: Boolean, default: !1},
- limit: {type: Number, default: 0},
- filterable: {type: Boolean, default: !1},
- allowCreate: {type: Boolean, default: !1},
- defaultFirstOption: {type: Boolean, default: !1}
- },
- watch: {
- value: function (t) {
- this.validatenull(t) || this.remote && !this.created && (this.created = !0, this.handleRemoteMethod(this.multiple ? this.text.join(",") : this.text))
- }, dic: {
- handler: function (t) {
- this.netDic = t
- }, immediate: !0
- }
- },
- mounted: function () {
- this.drag && this.setSort()
- },
- methods: {
- setSort: function () {
- var t = this;
- if (window.Sortable) {
- var e = this.$refs.main.$el.querySelectorAll(".el-select__tags > span")[0];
- this.sortable = window.Sortable.create(e, {
- ghostClass: "sortable-ghost", setData: function (t) {
- t.setData("Text", "")
- }, onEnd: function (e) {
- var n = t.value.splice(e.oldIndex, 1)[0];
- t.value.splice(e.newIndex, 0, n)
- }
- })
- } else D.a.logs("Sortable")
- }, handleRemoteMethod: function (t) {
- var e = this;
- this.loading = !0, Object(St.d)({column: this.column, value: t}).then((function (t) {
- e.loading = !1, e.netDic = t
- }))
- }
- }
- }), Ct = Object(c.a)(Ot, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("el-select", {
- ref: "main",
- class: t.b(),
- attrs: {
- size: t.size,
- loading: t.loading,
- "loading-text": t.loadingText,
- multiple: t.multiple,
- filterable: !!t.remote || t.filterable,
- remote: t.remote,
- readonly: t.readonly,
- "no-match-text": t.noMatchText,
- "no-data-text": t.noDataText,
- "remote-method": t.handleRemoteMethod,
- "collapse-tags": t.tags,
- clearable: !t.disabled && t.clearable,
- placeholder: t.placeholder,
- "multiple-limit": t.limit,
- "allow-create": t.allowCreate,
- "default-first-option": t.defaultFirstOption,
- disabled: t.disabled
- },
- on: {focus: t.handleFocus, blur: t.handleBlur},
- nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- },
- model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- }, [t.group ? t._l(t.netDic, (function (e, i) {
- return n("el-option-group", {key: i, attrs: {label: t.getLabelText(e)}}, t._l(e[t.groupsKey], (function (e, i) {
- return n("el-option", {
- key: i,
- attrs: {disabled: e[t.disabledKey], label: t.getLabelText(e), value: e[t.valueKey]}
- }, [t.$scopedSlots.default ? t._t("default", null, {
- label: t.labelKey,
- value: t.valueKey,
- item: e
- }) : [n("span", [t._v(t._s(t.getLabelText(e)))]), t._v(" "), e.desc ? n("span", {class: t.b("desc")}, [t._v(t._s(e.desc))]) : t._e()]], 2)
- })), 1)
- })) : t._l(t.netDic, (function (e, i) {
- return n("el-option", {
- key: i,
- attrs: {disabled: e[t.disabledKey], label: t.getLabelText(e), value: e[t.valueKey]}
- }, [t.$scopedSlots.default ? t._t("default", null, {
- label: t.labelKey,
- value: t.valueKey,
- item: e
- }) : [n("span", [t._v(t._s(t.getLabelText(e)))]), t._v(" "), e[t.descKey] ? n("span", {class: t.b("desc")}, [t._v(t._s(e[t.descKey]))]) : t._e()]], 2)
- }))], 2)
- }), [], !1, null, null, null).exports;
- function kt(t, e, n) {
- return e in t ? Object.defineProperty(t, e, {
- value: n,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = n, t
- }
- var jt = Object(i.a)({
- name: "cascader",
- mixins: [K(), H()],
- props: (yt = {
- checkStrictly: {type: Boolean, default: !1},
- emitPath: {type: Boolean, default: !0},
- tags: {type: Boolean, default: !1},
- value: {
- type: Array, default: function () {
- return []
- }
- },
- changeOnSelect: {type: Boolean, default: !1},
- expandTrigger: {type: String, default: "hover"},
- showAllLevels: {type: Boolean, default: !0},
- lazy: {type: Boolean, default: !1},
- lazyLoad: Function,
- filterable: {type: Boolean, default: !1}
- }, kt(yt, "expandTrigger", {type: String, default: "click"}), kt(yt, "separator", {type: String}), yt),
- data: function () {
- return {}
- },
- watch: {},
- computed: {
- allProps: function () {
- var t = this;
- return {
- label: this.labelKey,
- value: this.valueKey,
- children: this.childrenKey,
- checkStrictly: this.checkStrictly,
- multiple: this.multiple,
- lazy: this.lazy,
- lazyLoad: function (e, n) {
- t.lazyLoad && t.lazyLoad(e, (function (i) {
- !function e(n, i, o) {
- n.forEach((function (n) {
- n[t.valueKey] == i ? n[t.childrenKey] = o : n[t.childrenKey] && e(n[t.childrenKey])
- }))
- }(t.dic, e[t.valueKey], i), n(i)
- }))
- },
- expandTrigger: this.expandTrigger
- }
- }
- },
- created: function () {
- },
- mounted: function () {
- },
- methods: {}
- }), Dt = Object(c.a)(jt, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("el-cascader", {
- attrs: {
- options: t.dic,
- placeholder: t.placeholder,
- props: t.allProps,
- size: t.size,
- "emit-path": t.emitPath,
- "change-on-select": t.changeOnSelect,
- clearable: !t.disabled && t.clearable,
- "expand-trigger": t.expandTrigger,
- "show-all-levels": t.showAllLevels,
- filterable: t.filterable,
- separator: t.separator,
- disabled: t.disabled,
- "collapse-tags": t.tags
- }, on: {focus: t.handleFocus, blur: t.handleBlur}, nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- }, scopedSlots: t._u([{
- key: "default", fn: function (e) {
- var i = e.data, o = e.node;
- return [t.$scopedSlots.default ? t._t("default", null, {
- data: i,
- node: o
- }) : n("span", [t._v(t._s(i[t.labelKey]))])]
- }
- }], null, !0), model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- })
- }), [], !1, null, null, null).exports, Et = Object(i.a)({
- name: "input-color",
- mixins: [K(), H()],
- props: {
- colorFormat: String, iconList: {
- type: Array, default: function () {
- return []
- }
- }
- },
- data: function () {
- return {predefineColors: ["#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "rgba(255, 69, 0, 0.68)", "rgb(255, 120, 0)", "hsv(51, 100, 98)", "hsva(120, 40, 94, 0.5)", "hsl(181, 100%, 37%)", "hsla(209, 100%, 56%, 0.73)", "#c7158577"]}
- },
- methods: {}
- }), Mt = Object(c.a)(Et, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("el-input", {
- ref: "main",
- attrs: {
- placeholder: t.placeholder,
- size: t.size,
- readonly: t.readonly,
- clearable: !t.disabled && t.clearable,
- disabled: t.disabled
- },
- on: {change: t.handleChange},
- nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- },
- model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- }, [n("template", {slot: "append"}, [n("el-color-picker", {
- attrs: {
- size: "mini",
- "color-format": t.colorFormat,
- disabled: t.disabled,
- "show-alpha": "",
- predefine: t.predefineColors
- }, on: {change: t.handleChange}, model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- })], 1)], 2)], 1)
- }), [], !1, null, null, null).exports, Tt = Object(i.a)({
- name: "input-number",
- mixins: [K(), H()],
- data: function () {
- return {}
- },
- props: {
- controls: {type: Boolean, default: !0},
- step: {type: Number, default: 1},
- controlsPosition: {type: String, default: "right"},
- precision: {type: Number},
- minRows: {type: Number, default: -1 / 0},
- maxRows: {type: Number, default: 1 / 0}
- },
- created: function () {
- },
- mounted: function () {
- },
- methods: {}
- }), At = Object(c.a)(Tt, (function () {
- var t = this, e = t.$createElement;
- return (t._self._c || e)("el-input-number", {
- class: t.b(),
- attrs: {
- precision: t.precision,
- placeholder: t.placeholder,
- size: t.size,
- min: t.minRows,
- max: t.maxRows,
- step: t.step,
- clearable: !t.disabled && t.clearable,
- readonly: t.readonly,
- "controls-position": t.controlsPosition,
- controls: t.controls,
- label: t.placeholder,
- disabled: t.disabled
- },
- on: {focus: t.handleFocus, blur: t.handleBlur},
- nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- },
- model: {
- value: t.text, callback: function (e) {
- t.text = t._n(e)
- }, expression: "text"
- }
- })
- }), [], !1, null, null, null).exports, It = Object(i.a)({
- name: "input-tree",
- mixins: [K(), H()],
- data: function () {
- return {node: [], filterValue: "", box: !1}
- },
- props: {
- nodeClick: Function,
- treeLoad: Function,
- checked: Function,
- value: {},
- lazy: {type: Boolean, default: !1},
- leafOnly: {type: Boolean, default: !1},
- tags: {type: Boolean, default: !1},
- limit: {type: Number, default: 0},
- expandOnClickNode: {type: Boolean, default: !0},
- filter: {type: Boolean, default: !0},
- filterText: {type: String, default: "输入关键字进行过滤"},
- checkStrictly: {type: Boolean, default: !1},
- accordion: {type: Boolean, default: !1},
- parent: {type: Boolean, default: !0},
- defaultExpandedKeys: {type: Array},
- iconClass: {type: String},
- defaultCheckedKeys: {type: Array},
- defaultExpandAll: {type: Boolean, default: !1}
- },
- watch: {
- text: {
- handler: function (t) {
- this.init(), this.validatenull(t) && this.clearHandle()
- }
- }, dic: function () {
- this.init()
- }, filterValue: function (t) {
- this.$refs.tree.filter(t)
- }
- },
- computed: {
- treeProps: function () {
- return Object.assign(this.props, {isLeaf: this.leafKey})
- }, dicList: function () {
- var t = this.dic;
- return function t(e, n) {
- e.forEach((function (e) {
- var i = e.children;
- i && t(i, e), n && (e.$parent = n)
- }))
- }(t), t
- }, keysList: function () {
- var t = this;
- if (this.validatenull(this.text)) return [];
- return Array.isArray(this.text) ? this.text : (this.text + "").split(this.separator).map((function (e) {
- return Object(J.e)(e, t.dataType)
- }))
- }, labelShow: function () {
- var t = this, e = [], n = this.deepClone(this.node);
- return e = this.typeformat ? n.map((function (e) {
- return t.getLabelText(e)
- })) : n.map((function (e) {
- return e[t.labelKey]
- })), this.multiple ? e : e.join("")
- }
- },
- methods: {
- handleClear: function () {
- this.multiple ? this.text = [] : this.text = "", this.node = []
- }, handleTreeLoad: function (t, e) {
- var n = this;
- this.treeLoad && this.treeLoad(t, (function (i) {
- !function t(e, i, o) {
- e.forEach((function (e) {
- e[n.valueKey] == i ? e[n.childrenKey] = o : e[n.childrenKey] && t(e[n.childrenKey])
- }))
- }(n.dic, t.key, i), e(i)
- }))
- }, initScroll: function (t) {
- var e = this;
- setTimeout((function () {
- e.$nextTick((function () {
- document.querySelectorAll(".el-scrollbar .el-select-dropdown__wrap").forEach((function (t) {
- t.scrollTop = 0
- }))
- }))
- }), 0), this.handleClick(t)
- }, filterNode: function (t, e) {
- return !t || -1 !== e[this.labelKey].indexOf(t)
- }, checkChange: function (t, e, n, i) {
- var o = this;
- this.text = [], this.$refs.tree.getCheckedNodes(this.leafOnly, !1).forEach((function (t) {
- return o.text.push(t[o.valueKey])
- })), "function" == typeof this.checked && this.checked(t, e, n, i)
- }, getHalfList: function () {
- var t = this, e = this.$refs.tree.getCheckedNodes(!1, !0);
- return e = e.map((function (e) {
- return e[t.valueKey]
- }))
- }, init: function () {
- var t = this;
- this.$nextTick((function () {
- if (t.node = [], t.multiple) {
- t.$refs.tree.getCheckedNodes(t.leafOnly, !1).forEach((function (e) {
- t.node.push(e)
- }))
- } else {
- var e = t.$refs.tree.getNode(t.text);
- if (e) {
- var n = e.data;
- t.$refs.tree.setCurrentKey(n[t.valueKey]), t.node.push(n)
- }
- }
- })), this.disabledParentNode(this.dic, this.parent)
- }, disabledParentNode: function (t, e) {
- var n = this;
- t.forEach((function (t) {
- var i = t[n.childrenKey];
- n.validatenull(i) || (e || (t.disabled = !0), n.disabledParentNode(i, e))
- }))
- }, clearHandle: function () {
- this.filterValue = "", this.$refs.tree.setCurrentKey(null), this.$refs.tree.setCheckedKeys([])
- }, handleNodeClick: function (t, e, n) {
- t.disabled || ("function" == typeof this.nodeClick && this.nodeClick(t, e, n), this.multiple || (this.validatenull(t[this.childrenKey]) && !this.multiple || this.parent) && (this.text = t[this.valueKey], this.$refs.main.blur()))
- }
- }
- }), Pt = Object(c.a)(It, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("el-select", {
- ref: "main",
- class: t.b(),
- attrs: {
- size: t.size,
- multiple: t.multiple,
- "multiple-limit": t.limit,
- "collapse-tags": t.tags,
- value: t.labelShow,
- clearable: !t.disabled && t.clearable,
- placeholder: t.placeholder,
- disabled: t.disabled
- },
- on: {focus: t.handleFocus, blur: t.handleBlur, clear: t.handleClear},
- nativeOn: {
- click: function (e) {
- return t.initScroll(e)
- }
- }
- }, [t.filter ? n("div", {
- staticStyle: {
- padding: "0 10px",
- margin: "5px 0 0 0"
- }
- }, [n("el-input", {
- attrs: {size: "mini", placeholder: t.filterText},
- model: {
- value: t.filterValue, callback: function (e) {
- t.filterValue = e
- }, expression: "filterValue"
- }
- })], 1) : t._e(), t._v(" "), n("el-option", {attrs: {value: t.text}}, [n("el-tree", {
- ref: "tree",
- staticClass: "tree-option",
- staticStyle: {padding: "10px 0"},
- attrs: {
- data: t.dicList,
- lazy: t.lazy,
- load: t.handleTreeLoad,
- "node-key": t.valueKey,
- accordion: t.accordion,
- "icon-class": t.iconClass,
- "show-checkbox": t.multiple,
- "expand-on-click-node": t.expandOnClickNode,
- props: t.treeProps,
- "check-strictly": t.checkStrictly,
- "highlight-current": !t.multiple,
- "current-node-key": t.multiple ? "" : t.text,
- "filter-node-method": t.filterNode,
- "default-expanded-keys": t.defaultExpandedKeys ? t.defaultExpandedKeys : t.defaultExpandAll ? [] : t.keysList,
- "default-checked-keys": t.defaultCheckedKeys ? t.defaultCheckedKeys : t.keysList,
- "default-expand-all": t.defaultExpandAll
- },
- on: {
- check: t.checkChange, "node-click": function (e) {
- return e.target !== e.currentTarget ? null : t.handleNodeClick(e)
- }
- },
- scopedSlots: t._u([{
- key: "default", fn: function (e) {
- var i = e.data;
- return n("div", {
- staticStyle: {
- width: "100%",
- "padding-right": "10px"
- }
- }, [t.$scopedSlots.default ? t._t("default", null, {
- label: t.labelKey,
- value: t.valueKey,
- item: i
- }) : n("span", {class: {"avue--disabled": i[t.disabledKey]}}, [t._v(t._s(i[t.labelKey]))])], 2)
- }
- }], null, !0)
- })], 1)], 1)
- }), [], !1, null, null, null).exports, $t = Object(i.a)({
- name: "input-map", mixins: [K(), H()], data: function () {
- return {formattedAddress: "", address: "", poi: {}, marker: null, map: null, box: !1}
- }, watch: {
- poi: function (t) {
- this.formattedAddress = t.formattedAddress
- }, value: function (t) {
- this.validatenull(t) && (this.poi = {})
- }, text: function (t) {
- this.validatenull(t) || (this.poi = {
- longitude: t[0],
- latitude: t[1],
- formattedAddress: t[2]
- }, this.address = t[2])
- }, box: {
- handler: function () {
- var t = this;
- this.box && this.$nextTick((function () {
- return t.init((function () {
- t.longitude && t.latitude && (t.addMarker(t.longitude, t.latitude), t.getAddress(t.longitude, t.latitude))
- }))
- }))
- }, immediate: !0
- }
- }, computed: {
- longitude: function () {
- return this.text[0]
- }, latitude: function () {
- return this.text[1]
- }, title: function () {
- return this.disabled || this.readonly ? "查看" : "选择"
- }
- }, methods: {
- clear: function () {
- this.poi = {}, this.clearMarker()
- }, handleSubmit: function () {
- this.setVal(), this.box = !1
- }, handleClear: function () {
- this.text = [], this.poi = {}, this.handleChange(this.text)
- }, setVal: function () {
- this.text = [this.poi.longitude, this.poi.latitude, this.poi.formattedAddress], this.handleChange(this.text)
- }, handleShow: function () {
- this.$refs.main.blur(), this.box = !0
- }, addMarker: function (t, e) {
- this.clearMarker(), this.marker = new window.AMap.Marker({position: [t, e]}), this.marker.setMap(this.map)
- }, clearMarker: function () {
- this.marker && (this.marker.setMap(null), this.marker = null)
- }, getAddress: function (t, e) {
- var n = this;
- new window.AMap.service("AMap.Geocoder", (function () {
- new window.AMap.Geocoder({}).getAddress([t, e], (function (i, o) {
- if ("complete" === i && "OK" === o.info) {
- var a = o.regeocode;
- n.poi = Object.assign(a, {longitude: t, latitude: e});
- var r = document.createElement("div"), s = document.createElement("img");
- s.src = "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png", r.appendChild(s);
- var l = document.createElement("span");
- l.className = "avue-input-map__marker", l.innerHTML = n.poi.formattedAddress, r.appendChild(l), n.marker.setContent(r)
- }
- }))
- }))
- }, handleClose: function () {
- window.poiPicker.clearSearchResults()
- }, addClick: function () {
- var t = this;
- this.map.on("click", (function (e) {
- if (!t.disabled && !t.readonly) {
- var n = e.lnglat, i = n.P || n.Q, o = n.R;
- t.addMarker(o, i), t.getAddress(o, i)
- }
- }))
- }, init: function (t) {
- var e = this;
- window.AMap ? (this.map = new window.AMap.Map("map__container", Object.assign({
- zoom: 13, center: function () {
- if (e.longitude && e.latitude) return [e.longitude, e.latitude]
- }()
- }, this.params)), this.initPoip(), this.addClick(), t()) : D.a.logs("Map")
- }, initPoip: function () {
- var t = this;
- window.AMapUI ? window.AMapUI.loadUI(["misc/PoiPicker"], (function (e) {
- var n = new e({
- input: "map__input",
- placeSearchOptions: {map: t.map, pageSize: 10},
- searchResultsContainer: "map__result"
- });
- t.poiPickerReady(n)
- })) : D.a.logs("MapUi")
- }, poiPickerReady: function (t) {
- var e = this;
- window.poiPicker = t, t.on("poiPicked", (function (n) {
- e.clearMarker();
- var i = n.source, o = n.item;
- e.poi = Object.assign(o, {
- formattedAddress: o.name,
- longitude: o.location.R,
- latitude: o.location.P || o.location.Q
- }), "search" !== i && t.searchByKeyword(o.name)
- }))
- }
- }
- }), Lt = Object(c.a)($t, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("el-input", {
- ref: "main",
- attrs: {size: t.size, clearable: !t.disabled && t.clearable, disabled: t.disabled, placeholder: t.placeholder},
- on: {clear: t.handleClear, focus: t.handleShow},
- nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- },
- model: {
- value: t.address, callback: function (e) {
- t.address = e
- }, expression: "address"
- }
- }), t._v(" "), n("el-dialog", {
- staticClass: "avue-dialog",
- attrs: {width: "80%", "append-to-body": "", title: t.placeholder, visible: t.box},
- on: {
- close: t.handleClose, "update:visible": function (e) {
- t.box = e
- }
- }
- }, [t.box ? n("div", {class: t.b("content")}, [n("el-input", {
- class: t.b("content-input"),
- attrs: {id: "map__input", size: t.size, readonly: t.disabled, clearable: "", placeholder: "输入关键字选取地点"},
- on: {clear: t.clear},
- model: {
- value: t.formattedAddress, callback: function (e) {
- t.formattedAddress = e
- }, expression: "formattedAddress"
- }
- }), t._v(" "), n("div", {class: t.b("content-box")}, [n("div", {
- class: t.b("content-container"),
- attrs: {id: "map__container", tabindex: "0"}
- }), t._v(" "), n("div", {
- class: t.b("content-result"),
- attrs: {id: "map__result"}
- })])], 1) : t._e(), t._v(" "), n("span", {
- staticClass: "dialog-footer",
- attrs: {slot: "footer"},
- slot: "footer"
- }, [t.disabled || t.readonly ? t._e() : n("el-button", {
- attrs: {
- type: "primary",
- size: t.size,
- icon: "el-icon-check"
- }, on: {click: t.handleSubmit}
- }, [t._v("确 定")])], 1)])], 1)
- }), [], !1, null, null, null).exports, Nt = Object(i.a)({
- name: "input-icon", mixins: [K(), H()], props: {
- iconList: {
- type: Array, default: function () {
- return []
- }
- }
- }, data: function () {
- return {box: !1, tabs: {}}
- }, computed: {
- list: function () {
- var t = (this.tabs.list || []).map((function (t) {
- return t.value ? t : {value: t}
- }));
- return t
- }, option: function () {
- return {column: this.iconList}
- }
- }, created: function () {
- this.tabs = this.iconList[0] || {}
- }, methods: {
- handleTabs: function (t) {
- this.tabs = t
- }, handleSubmit: function (t) {
- this.box = !1, this.text = t, this.handleChange(t)
- }, handleShow: function () {
- this.$refs.main.blur(), this.disabled || this.readonly || (this.box = !0)
- }
- }
- }), zt = Object(c.a)(Nt, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("el-input", {
- ref: "main",
- attrs: {placeholder: t.placeholder, size: t.size, clearable: !t.disabled && t.clearable, disabled: t.disabled},
- on: {change: t.handleChange, focus: t.handleShow},
- nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- },
- model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- }, [n("span", {
- attrs: {slot: "append"},
- on: {click: t.handleShow},
- slot: "append"
- }, [n("i", {
- staticClass: "avue-crud__icon--small",
- class: t.text
- })])]), t._v(" "), n("el-dialog", {
- staticClass: "avue-dialog",
- attrs: {title: t.placeholder, "append-to-body": "", visible: t.box, width: "80%"},
- on: {
- "update:visible": function (e) {
- t.box = e
- }
- }
- }, [n("el-scrollbar", {
- staticStyle: {
- height: "400px",
- "overflow-x": "hidden"
- }
- }, [n("avue-tabs", {
- attrs: {option: t.option},
- on: {change: t.handleTabs}
- }), t._v(" "), n("div", {class: t.b("list")}, t._l(t.list, (function (e, i) {
- return n("div", {key: i, class: t.b("item", {active: t.text === e})}, [n("i", {
- class: [t.b("icon"), e.value],
- on: {
- click: function (n) {
- return t.handleSubmit(e.value)
- }
- }
- }), t._v(" "), n("p", [t._v(t._s(e.label || e.value))])])
- })), 0)], 1)], 1)], 1)
- }), [], !1, null, null, null).exports, Bt = Object(i.a)({
- name: "input-table", mixins: [K(), H()], data: function () {
- return {object: {}, active: {}, page: {}, loading: !1, box: !1, created: !1, data: []}
- }, props: {formatter: Function, onLoad: Function}, watch: {
- value: function (t) {
- this.validatenull(t) && (this.active = {}, this.object = {})
- }, box: function (t) {
- var e = this;
- t && setTimeout((function () {
- var t = e.data.find((function (t) {
- return t[e.valueKey] == e.object[e.valueKey]
- }));
- e.$refs.crud.setCurrentRow(t)
- }))
- }, text: function (t) {
- var e = this;
- this.created || this.validatenull(t) || "function" == typeof this.onLoad && this.onLoad({value: this.text}, (function (t) {
- e.active = t, e.object = t, e.created = !0
- }))
- }
- }, computed: {
- title: function () {
- return this.disabled || this.readonly ? "查看" : "选择"
- }, labelShow: function () {
- return "function" == typeof this.formatter ? this.formatter(this.object) : this.object[this.labelKey] || ""
- }, option: function () {
- return Object.assign({
- menu: !1,
- header: !1,
- size: "mini",
- headerAlign: "center",
- align: "center",
- highlightCurrentRow: !0
- }, this.column.children)
- }
- }, methods: {
- handleClear: function () {
- this.active = {}, this.setVal()
- }, handleShow: function () {
- this.$refs.main.blur(), this.disabled || this.readonly || (this.box = !0)
- }, setVal: function () {
- this.object = this.active, this.text = this.active[this.valueKey] || "", this.handleChange(this.text), this.box = !1
- }, handleCurrentRowChange: function (t) {
- this.active = t
- }, handleSearchChange: function (t, e) {
- var n = this;
- this.onLoad({page: this.page, data: t}, (function (t) {
- n.page.total = t.total, n.data = t.data
- })), e && e()
- }, onList: function (t) {
- var e = this;
- this.loading = !0, "function" == typeof this.onLoad && this.onLoad({page: this.page}, (function (t) {
- e.page.total = t.total, e.data = t.data, e.loading = !1
- }))
- }
- }
- }), Ft = Object(c.a)(Bt, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("el-input", {
- ref: "main",
- attrs: {
- size: t.size,
- value: t.labelShow,
- clearable: !t.disabled && t.clearable,
- placeholder: t.placeholder,
- disabled: t.disabled
- },
- on: {clear: t.handleClear, focus: t.handleShow},
- nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- }
- }), t._v(" "), n("el-dialog", {
- staticClass: "avue-dialog",
- attrs: {width: "80%", "append-to-body": "", title: t.placeholder, visible: t.box},
- on: {
- "update:visible": function (e) {
- t.box = e
- }
- }
- }, [n("avue-crud", {
- directives: [{
- name: "loading",
- rawName: "v-loading",
- value: t.loading,
- expression: "loading"
- }],
- ref: "crud",
- class: t.b("crud"),
- attrs: {option: t.option, data: t.data, page: t.page},
- on: {
- "on-load": t.onList,
- "search-change": t.handleSearchChange,
- "search-reset": t.handleSearchChange,
- "current-row-change": t.handleCurrentRowChange,
- "update:page": function (e) {
- t.page = e
- }
- }
- }), t._v(" "), n("span", {
- staticClass: "dialog-footer",
- attrs: {slot: "footer"},
- slot: "footer"
- }, [n("el-button", {
- attrs: {type: "primary", size: t.size, icon: "el-icon-check"},
- on: {click: t.setVal}
- }, [t._v("确 定")])], 1)], 1)], 1)
- }), [], !1, null, null, null).exports, Rt = Object(i.a)({
- name: "verify",
- props: {
- size: {type: [Number, String], default: 50},
- value: [Number, String],
- len: {type: [Number, String], default: 6}
- },
- computed: {
- styleName: function () {
- return {
- padding: "".concat(this.setPx(this.size / 7), " ").concat(this.setPx(this.size / 4)),
- fontSize: this.setPx(this.size)
- }
- }, list: function () {
- return this.data.split("")
- }
- },
- watch: {
- value: {
- handler: function (t) {
- this.validatenull(t) ? this.randomn() : this.data = t + ""
- }, immediate: !0
- }, data: {
- handler: function (t) {
- this.$emit("input", t)
- }, immediate: !0
- }
- },
- data: function () {
- return {data: 0}
- },
- methods: {
- randomn: function () {
- var t = this.len;
- if (t > 21) return null;
- var e = new RegExp("(\\d{" + t + "})(\\.|$)"),
- n = (Array(t - 1).join(0) + Math.pow(10, t) * Math.random()).match(e)[1];
- this.data = n
- }
- }
- }), Kt = Object(c.a)(Rt, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, t._l(t.list, (function (e, i) {
- return n("span", {key: i, class: t.b("item"), style: t.styleName}, [t._v("\n " + t._s(e) + "\n ")])
- })), 0)
- }), [], !1, null, null, null).exports, Wt = Object(i.a)({
- name: "switch",
- mixins: [K(), H()],
- props: {
- value: {},
- activeIconClass: String,
- inactiveIconClass: String,
- activeColor: String,
- inactiveColor: String,
- len: Number
- },
- data: function () {
- return {}
- },
- watch: {},
- created: function () {
- },
- mounted: function () {
- },
- computed: {
- active: function () {
- return this.dic[1] || {}
- }, inactive: function () {
- return this.dic[0] || {}
- }
- },
- methods: {}
- }), Ut = Object(c.a)(Wt, (function () {
- var t = this, e = t.$createElement;
- return (t._self._c || e)("el-switch", {
- attrs: {
- "active-text": t.active[t.labelKey],
- "active-value": t.active[t.valueKey],
- "inactive-value": t.inactive[t.valueKey],
- "inactive-text": t.inactive[t.labelKey],
- "active-icon-class": t.activeIconClass,
- "inactive-icon-class": t.inactiveIconClass,
- "active-color": t.activeColor,
- "inactive-color": t.inactiveColor,
- width: t.len,
- disabled: t.disabled,
- readonly: t.readonly,
- size: t.size
- }, nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- }, model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- })
- }), [], !1, null, null, null).exports, Vt = Object(i.a)({
- name: "rate",
- mixins: [K(), H()],
- props: {
- value: {type: Number, default: 0},
- colors: {type: Array},
- max: {type: Number, default: 5},
- iconClasses: {type: Array},
- texts: {type: Array},
- showText: {type: Boolean, default: !1},
- voidIconClass: {type: String}
- },
- data: function () {
- return {}
- },
- watch: {},
- created: function () {
- },
- mounted: function () {
- },
- methods: {}
- }), Ht = Object(c.a)(Vt, (function () {
- var t = this, e = t.$createElement;
- return (t._self._c || e)("el-rate", {
- staticStyle: {"margin-top": "10px"},
- attrs: {
- max: t.max,
- readonly: t.readonly,
- texts: t.texts,
- "show-text": t.showText,
- "icon-classes": t.iconClasses,
- "void-icon-class": t.voidIconClass,
- disabled: t.disabled,
- colors: t.colors
- },
- on: {change: t.handleChange},
- nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- },
- model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- })
- }), [], !1, null, null, null).exports;
- function qt(t, e) {
- if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
- }
- function Yt(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i)
- }
- }
- var Gt, Xt, Qt = function () {
- function t() {
- var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
- qt(this, t), this.CONTAINERID = Object(J.t)(), this.drawCanvas = this.drawCanvas.bind(this), this.parentObserver = this.parentObserver.bind(this), this.Repaint = this.Repaint.bind(this), this.isOberserve = !1, this.init(e), this.drawCanvas(), this.parentObserver()
- }
- var e, n, i;
- return e = t, (n = [{
- key: "init", value: function (t) {
- this.option = {}, this.option.text = t.text || "avue商用通用无敌大水印", this.option.font = t.font || "30px 黑体", this.option.canvasWidth = t.canvasWidth || 500, this.option.canvasHeight = t.canvasHeight || 200, this.option.textAlign = t.textAlign || "center", this.option.textStyle = t.textStyle || "rgba(100,100,100,0.15)", this.option.degree = t.degree || -20
- }
- }, {
- key: "drawCanvas", value: function () {
- this.isOberserve = !0;
- var t = document.createElement("div"), e = document.createElement("canvas"), n = e.getContext("2d");
- t.id = this.CONTAINERID, e.width = this.option.canvasWidth, e.height = this.option.canvasHeight, n.font = this.option.font, n.textAlign = this.option.textAlign, n.fillStyle = this.option.textStyle, n.translate(e.width / 2, e.height / 2), n.rotate(this.option.degree * Math.PI / 180), n.fillText(this.option.text, 0, 0);
- var i = e.toDataURL("image/png");
- this.styleStr = "\n position:fixed;\n top:0;\n left:0;\n width:100%;\n height:100%;\n z-index:9999;\n pointer-events:none;\n background-repeat:repeat;\n background-image:url('".concat(i, "')"), t.setAttribute("style", this.styleStr), document.body.appendChild(t), this.wmObserver(t), this.isOberserve = !1
- }
- }, {
- key: "wmObserver", value: function (t) {
- var e = this, n = new MutationObserver((function (t) {
- if (!e.isOberserve) {
- var i = t[0].target;
- i.setAttribute("style", e.styleStr), i.setAttribute("id", e.CONTAINERID), n.takeRecords()
- }
- }));
- n.observe(t, {attributes: !0, childList: !0, characterData: !0})
- }
- }, {
- key: "parentObserver", value: function () {
- var t = this;
- new MutationObserver((function () {
- if (!t.isOberserve) {
- var e = document.querySelector("#".concat(t.CONTAINERID));
- e ? e.getAttribute("style") !== t.styleStr && e.setAttribute("style", t.styleStr) : t.drawCanvas()
- }
- })).observe(document.querySelector("#".concat(this.CONTAINERID)).parentNode, {childList: !0})
- }
- }, {
- key: "Repaint", value: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
- this.remove(), this.init(t), this.drawCanvas()
- }
- }, {
- key: "remove", value: function () {
- this.isOberserve = !0;
- var t = document.querySelector("#".concat(this.CONTAINERID));
- t.parentNode.removeChild(t)
- }
- }]) && Yt(e.prototype, n), i && Yt(e, i), t
- }(), Jt = 200, Zt = 200, te = {
- text: "avue.top",
- fontFamily: "microsoft yahei",
- color: "#999",
- fontSize: 16,
- opacity: 100,
- bottom: 10,
- right: 10,
- ratio: 1
- };
- function ee(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- return new Promise((function (n, i) {
- var o = e.text, a = e.fontFamily, r = e.color, s = e.fontSize, l = e.opacity, c = e.bottom, u = e.right,
- d = e.ratio;
- te.text = o || te.text, te.fontFamily = a || te.fontFamily, te.color = r || te.color, te.fontSize = s || te.fontSize, te.opacity = l || te.opacity, te.bottom = c || te.bottom, te.right = u || te.right, te.ratio = d || te.ratio, function (t, e) {
- var n = new FileReader;
- n.readAsDataURL(t), n.onload = function (t) {
- e(t.target.result)
- }
- }(t, (function (e) {
- var i = new Image;
- i.src = e, i.onload = function () {
- var e = i.width, o = i.height;
- !function (t, e) {
- null === (Gt = document.getElementById("canvas")) && ((Gt = document.createElement("canvas")).id = "canvas", Gt.className = "avue-canvas", document.body.appendChild(Gt));
- Xt = Gt.getContext("2d"), Gt.width = t, Gt.height = e
- }(e, o), Xt.drawImage(i, 0, 0, e, o), function (t, e) {
- var n = te.text, i = function (t, e, n) {
- var i, o, a = te.fontSize / Jt * e;
- o = te.bottom ? Zt - te.bottom : te.top;
- i = te.right ? Jt - te.right : te.left;
- Xt.font = te.fontSize + "px " + te.fontFamily;
- var r = Number(Xt.measureText(t).width);
- return {x: i = (i = i - r) / Jt * e, y: o = o / Zt * n, fontSize: a}
- }(n, t, e);
- Xt.font = i.fontSize + "px " + te.fontFamily, Xt.fillStyle = te.color, Xt.globalAlpha = te.opacity / 100, Xt.fillText(n, i.x, i.y)
- }(e, o), n(Object(J.c)(document.getElementById("canvas").toDataURL(t.type, te.ratio), t.name))
- }
- }))
- }))
- }
- var ne = function (t, e, n) {
- var i = function (t) {
- var e, n, i, o, a, r;
- i = t.length, n = 0, e = "";
- for (; n < i;) {
- if (o = 255 & t.charCodeAt(n++), n == i) {
- e += ie.charAt(o >> 2), e += ie.charAt((3 & o) << 4), e += "==";
- break
- }
- if (a = t.charCodeAt(n++), n == i) {
- e += ie.charAt(o >> 2), e += ie.charAt((3 & o) << 4 | (240 & a) >> 4), e += ie.charAt((15 & a) << 2), e += "=";
- break
- }
- r = t.charCodeAt(n++), e += ie.charAt(o >> 2), e += ie.charAt((3 & o) << 4 | (240 & a) >> 4), e += ie.charAt((15 & a) << 2 | (192 & r) >> 6), e += ie.charAt(63 & r)
- }
- return e
- }(function (t) {
- var e, n, i, o;
- for (e = "", i = t.length, n = 0; n < i; n++) (o = t.charCodeAt(n)) >= 1 && o <= 127 ? e += t.charAt(n) : o > 2047 ? (e += String.fromCharCode(224 | o >> 12 & 15), e += String.fromCharCode(128 | o >> 6 & 63), e += String.fromCharCode(128 | o >> 0 & 63)) : (e += String.fromCharCode(192 | o >> 6 & 31), e += String.fromCharCode(128 | o >> 0 & 63));
- return e
- }(JSON.stringify(n))), o = CryptoJS.HmacSHA1(i, e).toString(CryptoJS.enc.Base64);
- return t + ":" + oe(o) + ":" + i
- };
- var ie = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
- new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
- var oe = function (t) {
- return t = (t = t.replace(/\+/g, "-")).replace(/\//g, "_")
- };
- function ae(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
- return e.match(/(^http:\/\/|^https:\/\/|^\/\/|data:image\/)/) ? e : t + e
- }
- var re = Object(i.a)({
- name: "upload", mixins: [K(), H(), {
- data: function () {
- return {res: "", loading: !1, text: [], file: {}}
- }, props: {
- data: {
- type: Object, default: function () {
- return {}
- }
- },
- onRemove: Function,
- showFileList: {type: Boolean, default: !0},
- oss: {type: String},
- limit: {type: Number, default: 10},
- headers: {
- type: Object, default: function () {
- return {}
- }
- },
- accept: {type: [String, Array], default: ""},
- canvasOption: {
- type: Object, default: function () {
- return {}
- }
- },
- fileSize: {type: Number},
- drag: {type: Boolean, default: !1},
- isVideo: {type: Boolean, default: !1},
- isImage: {type: Boolean, default: !0},
- loadText: {type: String, default: "文件上传中,请稍等"},
- action: {type: String, default: ""},
- uploadBefore: Function,
- uploadAfter: Function,
- uploadDelete: Function,
- uploadPreview: Function,
- uploadError: Function,
- uploadExceed: Function
- }, computed: {
- isMultiple: function () {
- return this.isArray || this.isString || this.stringMode
- }, acceptList: function () {
- return Array.isArray(this.accept) ? this.accept.join(",") : this.accept
- }, homeUrl: function () {
- return this.propsHttp.home || ""
- }, allParams: function () {
- return this.$typeList.video.test(this.imgUrl) || this.isVideo ? Object.assign({is: "video"}, this.params) : this.params
- }, fileName: function () {
- return this.propsHttp.fileName || "file"
- }, isAliOss: function () {
- return "ali" === this.oss
- }, isQiniuOss: function () {
- return "qiniu" === this.oss
- }, isPictureImg: function () {
- return "picture-img" === this.listType
- }, imgUrl: function () {
- if (!this.validatenull(this.text)) return ae(this.homeUrl, this.text[0])
- }, fileList: function () {
- var t = this, e = [];
- return (this.text || []).forEach((function (n, i) {
- if (n) {
- var o;
- if (t.isMultiple) {
- var a = n.lastIndexOf("/");
- o = n.substring(a + 1)
- }
- e.push({
- uid: i + "",
- status: "done",
- isImage: t.isImage,
- name: t.isMultiple ? o : n[t.labelKey],
- url: ae(t.homeUrl, t.isMultiple ? n : n[t.valueKey])
- })
- }
- })), e
- }
- }, methods: {
- handleSuccess: function (t) {
- if (this.isPictureImg) this.text.splice(0, 1, t[this.urlKey]); else if (this.isMultiple) this.text.push(t[this.urlKey]); else {
- var e = {};
- e[this.labelKey] = t[this.nameKey], e[this.valueKey] = t[this.urlKey], this.text.push(e)
- }
- }, handleRemove: function (t, e) {
- this.onRemove && this.onRemove(t, e), this.delete(t)
- }, handleError: function (t) {
- this.uploadError && this.uploadError(t, this.column)
- }, delete: function (t) {
- var e = this;
- (this.text || []).forEach((function (n, i) {
- (e.isMultiple ? n : n[e.valueKey]) === t.url.replace(e.homeUrl, "") && e.text.splice(i, 1)
- }))
- }, show: function (t) {
- this.loading = !1, this.handleSuccess(t || this.res)
- }, hide: function (t) {
- this.loading = !1, this.handleError(t)
- }, handleFileChange: function (t, e) {
- e.splice(e.length - 1, 1)
- }, httpRequest: function (t) {
- var e = this;
- this.loading = !0;
- var n = t.file, i = n.size / 1024;
- if (this.file = t.file, !this.validatenull(i) && i > this.fileSize) this.hide("文件太大不符合"); else {
- var o = Object.assign(this.headers, {"Content-Type": "multipart/form-data"}), a = {}, r = {},
- s = new FormData, l = function () {
- var t = function (t) {
- var i = e.action;
- for (var l in e.data) s.append(l, e.data[l]);
- var c = t || n;
- if (s.append(e.fileName, c), e.isQiniuOss) {
- if (!window.CryptoJS) return D.a.logs("CryptoJS"), void e.hide();
- a = e.$AVUE.qiniu;
- var u = ne(a.AK, a.SK, {scope: a.scope, deadline: (new Date).getTime() + 3600 * a.deadline});
- s.append("token", u), i = a.bucket
- } else if (e.isAliOss) {
- if (!window.OSS) return D.a.logs("AliOSS"), void e.hide();
- a = e.$AVUE.ali, r = new OSS(a)
- }
- (e.isAliOss ? r.put(c.name, c) : window.axios ? e.$axios.post(i, s, {headers: o}) : (D.a.logs("axios"), Promise.reject())).then((function (t) {
- e.res = {}, e.isQiniuOss && (t.data.key = a.url + t.data.key), e.isAliOss ? e.res = Object(J.l)(t, e.resKey) : e.res = Object(J.l)(t.data, e.resKey), "function" == typeof e.uploadAfter ? e.uploadAfter(e.res, e.show, (function () {
- e.loading = !1
- }), e.column) : e.show(e.res)
- })).catch((function (t) {
- "function" == typeof e.uploadAfter ? e.uploadAfter(t, e.hide, (function () {
- e.loading = !1
- }), e.column) : e.hide(t)
- }))
- };
- "function" == typeof e.uploadBefore ? e.uploadBefore(e.file, t, (function () {
- e.loading = !1
- }), e.column) : t()
- };
- this.validatenull(this.canvasOption) ? l() : ee(n, this.canvasOption).then((function (t) {
- n = t, l()
- }))
- }
- }, handleExceed: function (t, e) {
- this.uploadExceed && this.uploadExceed(this.limit, t, e, this.column)
- }, handlePreview: function (t) {
- var e = this, n = function () {
- var n = t.url, i = e.fileList.map((function (t) {
- return Object.assign(t, {type: e.$typeList.video.test(t.url) || e.isVideo ? "video" : ""})
- })), o = e.fileList.findIndex((function (t) {
- return t.url === n
- }));
- e.$isVan || e.$ImagePreview(i, o)
- };
- "function" == typeof this.uploadPreview ? this.uploadPreview(t, this.column, n) : n()
- }, handleDelete: function (t) {
- var e = this;
- this.beforeRemove(t).then((function () {
- e.text = [], e.menu = !1
- })).catch((function () {
- }))
- }, beforeRemove: function (t) {
- return "function" == typeof this.uploadDelete ? this.uploadDelete(t, this.column) : Promise.resolve()
- }
- }
- }, G.a], data: function () {
- return {menu: !1}
- }
- }), se = Object(c.a)(re, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- directives: [{
- name: "loading",
- rawName: "v-loading.lock",
- value: t.loading,
- expression: "loading",
- modifiers: {lock: !0}
- }], class: t.b()
- }, [n("el-upload", {
- class: t.b({list: "picture-img" == t.listType, upload: t.disabled}),
- attrs: {
- action: t.action,
- "on-remove": t.handleRemove,
- accept: t.acceptList,
- "before-remove": t.beforeRemove,
- multiple: t.multiple,
- "on-preview": t.handlePreview,
- limit: t.limit,
- "http-request": t.httpRequest,
- drag: t.drag,
- readonly: t.readonly,
- "show-file-list": !t.isPictureImg && t.showFileList,
- "list-type": t.listType,
- "on-change": t.handleFileChange,
- "on-exceed": t.handleExceed,
- disabled: t.disabled,
- "file-list": t.fileList
- },
- nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- },
- scopedSlots: t._u([{
- key: "file", fn: function (e) {
- return t.$scopedSlots.default ? [t._t("default", null, null, e)] : void 0
- }
- }], null, !0)
- }, ["picture-card" == t.listType ? [n("i", {staticClass: "el-icon-plus"})] : "picture-img" == t.listType ? [t.$scopedSlots.default ? t._t("default", null, {file: {url: t.imgUrl}}) : [t.imgUrl ? n("img", t._b({
- class: t.b("avatar"),
- attrs: {src: t.imgUrl},
- on: {
- mouseover: function (e) {
- t.menu = !0
- }
- }
- }, "img", t.allParams, !1)) : n("i", {
- staticClass: "el-icon-plus",
- class: t.b("icon")
- }), t._v(" "), t.menu ? n("div", {
- staticClass: "el-upload-list__item-actions",
- class: t.b("menu"),
- on: {
- mouseover: function (e) {
- t.menu = !0
- }, mouseout: function (e) {
- t.menu = !1
- }, click: function (t) {
- return t.stopPropagation(), !1
- }
- }
- }, [n("i", {
- staticClass: "el-icon-zoom-in", on: {
- click: function (e) {
- return e.stopPropagation(), t.handlePreview({url: t.imgUrl})
- }
- }
- }), t._v(" "), t.disabled ? t._e() : n("i", {
- staticClass: "el-icon-delete", on: {
- click: function (e) {
- return e.stopPropagation(), t.handleDelete(t.imgUrl)
- }
- }
- })]) : t._e()]] : t.drag ? [n("i", {staticClass: "el-icon-upload"}), t._v(" "), n("div", {staticClass: "el-upload__text"}, [t._v("\n " + t._s(t.t("upload.tip")) + "\n "), n("em", [t._v(t._s(t.t("upload.upload")))])])] : [n("el-button", {
- attrs: {
- size: "small",
- type: "primary"
- }
- }, [t._v(t._s(t.t("upload.upload")))])], t._v(" "), n("div", {
- staticClass: "el-upload__tip",
- attrs: {slot: "tip"},
- slot: "tip"
- }, [t._v(t._s(t.tip))])], 2)], 1)
- }), [], !1, null, null, null).exports, le = Object(i.a)({
- name: "sign",
- props: {width: {type: Number, default: 600}, height: {type: Number, default: 400}},
- data: function () {
- return {linex: [], liney: [], linen: [], canvas: {}, context: {}}
- },
- computed: {
- styleName: function () {
- return {width: this.setPx(this.width), height: this.setPx(this.height)}
- }
- },
- mounted: function () {
- this.init()
- },
- methods: {
- getStar: function (t, e, n) {
- var i = this.canvas, o = this.context, a = i.width / 2, r = i.height / 2;
- o.lineWidth = 7, o.strokeStyle = "#f00", o.beginPath(), o.arc(a, r, 110, 0, 2 * Math.PI), o.stroke(), function (t, e, n, i, o, a) {
- t.save(), t.fillStyle = o, t.translate(e, n), t.rotate(Math.PI + a), t.beginPath();
- for (var r = Math.sin(0), s = Math.cos(0), l = Math.PI / 5 * 4, c = 0; c < 5; c++) {
- r = Math.sin(c * l), s = Math.cos(c * l);
- t.lineTo(r * i, s * i)
- }
- t.closePath(), t.stroke(), t.fill(), t.restore()
- }(o, a, r, 20, "#f00", 0), o.font = "18px 黑体", o.textBaseline = "middle", o.textAlign = "center", o.lineWidth = 1, o.strokeStyle = "#f00", o.strokeText(t, a, r + 50), o.font = "14px 黑体", o.textBaseline = "middle", o.textAlign = "center", o.lineWidth = 1, o.strokeStyle = "#f00", o.strokeText(n, a, r + 80), o.translate(a, r), o.font = "22px 黑体";
- for (var s, l = e.length, c = 4 * Math.PI / (3 * (l - 1)), u = e.split(""), d = 0; d < l; d++) s = u[d], 0 == d ? o.rotate(5 * Math.PI / 6) : o.rotate(c), o.save(), o.translate(90, 0), o.rotate(Math.PI / 2), o.strokeText(s, 0, 0), o.restore(), o.save()
- }, submit: function (t, e) {
- return t || (t = this.width), e || (e = this.height), this.canvas.toDataURL("i/png")
- }, clear: function () {
- this.linex = new Array, this.liney = new Array, this.linen = new Array, this.canvas.width = this.canvas.width
- }, init: function () {
- this.canvas = this.$refs.canvas;
- var t = this.canvas, e = this;
- void 0 !== document.ontouchstart ? (t.addEventListener("touchmove", s, !1), t.addEventListener("touchstart", l, !1), t.addEventListener("touchend", c, !1)) : (t.addEventListener("mousemove", s, !1), t.addEventListener("mousedown", l, !1), t.addEventListener("mouseup", c, !1), t.addEventListener("mouseleave", c, !1)), this.context = t.getContext("2d");
- var n = this.context;
- this.linex = new Array, this.liney = new Array, this.linen = new Array;
- var i = 1, o = 30, a = 0;
- function r(t, e) {
- var n, i, o = t.getBoundingClientRect();
- return e.targetTouches ? (n = e.targetTouches[0].clientX, i = e.targetTouches[0].clientY) : (n = e.clientX, i = e.clientY), {
- x: (n - o.left) * (t.width / o.width),
- y: (i - o.top) * (t.height / o.height)
- }
- }
- function s(s) {
- var l = r(t, s).x, c = r(t, s).y;
- if (1 == a) {
- e.linex.push(l), e.liney.push(c), e.linen.push(1), n.save(), n.translate(n.canvas.width / 2, n.canvas.height / 2), n.translate(-n.canvas.width / 2, -n.canvas.height / 2), n.beginPath(), n.lineWidth = 2;
- for (var u = 1; u < e.linex.length; u++) i = e.linex[u], o = e.liney[u], 0 == e.linen[u] ? n.moveTo(i, o) : n.lineTo(i, o);
- n.shadowBlur = 10, n.stroke(), n.restore()
- }
- s.preventDefault()
- }
- function l(n) {
- var i = r(t, n).x, o = r(t, n).y;
- a = 1, e.linex.push(i), e.liney.push(o), e.linen.push(0)
- }
- function c() {
- a = 0
- }
- }
- }
- }), ce = Object(c.a)(le, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b()}, [e("canvas", {
- ref: "canvas",
- class: this.b("canvas"),
- attrs: {width: this.width, height: this.height}
- })])
- }), [], !1, null, null, null).exports, ue = Object(i.a)({
- name: "slider",
- mixins: [K(), H()],
- props: {
- value: {},
- step: {type: Number},
- min: {type: Number},
- max: {type: Number},
- marks: {type: Object},
- range: {type: Boolean, default: !1},
- showInput: {type: Boolean, default: !1},
- showStops: {type: Boolean, default: !1},
- formatTooltip: Function
- },
- data: function () {
- return {}
- },
- watch: {},
- created: function () {
- },
- mounted: function () {
- },
- methods: {}
- }), de = Object(c.a)(ue, (function () {
- var t = this, e = t.$createElement;
- return (t._self._c || e)("el-slider", {
- attrs: {
- disabled: t.disabled,
- step: t.step,
- min: t.min,
- max: t.max,
- range: t.range,
- "show-stops": t.showStops,
- "show-input": t.showInput,
- marks: t.marks,
- "format-tooltip": t.formatTooltip
- }, on: {change: t.handleChange}, nativeOn: {
- click: function (e) {
- return t.handleClick(e)
- }
- }, model: {
- value: t.text, callback: function (e) {
- t.text = e
- }, expression: "text"
- }
- })
- }), [], !1, null, null, null).exports;
- function pe(t) {
- return (pe = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- })(t)
- }
- function he(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i)
- }
- }
- var fe = function () {
- function t(e) {
- if (function (t, e) {
- if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
- }(this, t), "object" === pe(e)) {
- this.obj = e;
- var n = document.querySelector(e.el), i = "";
- if ("object" === pe(e.style)) for (var o in e.style) i += o + ": " + e.style[o] + ";";
- for (var a = '<div class="akeyboard-keyboard' + (e.fixedBottomCenter ? " akeyboard-keyboard-fixedBottomCenter" : "") + '" style="' + i + '">', r = [], s = 1; s < 10; s++) r.push(s.toString());
- r.push("0");
- for (var l, c = e.keys || [["`"].concat(r).concat(["-", "=", "Delete"]), ["Tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", "]", "\\"], ["Caps", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", "Enter"], ["Shift", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "Shift"], ["Space"]], u = [], d = [], p = 0; p < c.length; p++) {
- u.push([]), d.push([]), l = c[p];
- for (var h = 0; h < l.length; h++) if (1 !== l[h].length) u[p].push(l[h]), d[p].push(l[h]); else {
- switch (d[p].push(l[h].toUpperCase()), l[h]) {
- case"`":
- u[p].push("~");
- continue;
- case"1":
- u[p].push("!");
- continue;
- case"2":
- u[p].push("@");
- continue;
- case"3":
- u[p].push("#");
- continue;
- case"4":
- u[p].push("$");
- continue;
- case"5":
- u[p].push("%");
- continue;
- case"6":
- u[p].push("^");
- continue;
- case"7":
- u[p].push("&");
- continue;
- case"8":
- u[p].push("*");
- continue;
- case"9":
- u[p].push("(");
- continue;
- case"0":
- u[p].push(")");
- continue;
- case"-":
- u[p].push("_");
- continue;
- case"=":
- u[p].push("+");
- continue;
- case"[":
- u[p].push("{");
- continue;
- case"]":
- u[p].push("}");
- continue;
- case"\\":
- u[p].push("|");
- continue;
- case";":
- u[p].push(":");
- continue;
- case"'":
- u[p].push('"');
- continue;
- case",":
- u[p].push("<");
- continue;
- case".":
- u[p].push(">");
- continue;
- case"/":
- u[p].push("?");
- continue
- }
- u[p].push(l[h].toUpperCase())
- }
- }
- for (var f = 0; f < c.length; f++) {
- l = c[f], a += '<div class="akeyboard-keyboard-innerKeys">';
- for (var m = 0; m < l.length; m++) a += '<div class="akeyboard-keyboard-keys akeyboard-keyboard-keys-' + l[m] + '">' + l[m] + "</div>";
- a += "</div>"
- }
- a += "</div>", n.innerHTML = a;
- var b = !1;
- if (c.forEach((function (t) {
- t.includes("Shift") && (b = !0)
- })), b) document.querySelectorAll(e.el + " .akeyboard-keyboard-keys-Shift").forEach((function (t) {
- t.onclick = function () {
- if (this.isShift) {
- t.isShift = !1, t.innerHTML = "Shift", this.classList.remove("keyboard-keyboard-keys-focus");
- for (var n, i = document.querySelectorAll(e.el + " .akeyboard-keyboard-innerKeys"), o = 0; o < i.length; o++) {
- n = i[o];
- for (var a = 0; a < n.childNodes.length; a++) n.childNodes[a].innerHTML = c[o][a]
- }
- } else {
- var r = document.querySelector(e.el + " .akeyboard-keyboard-keys-Caps");
- if (r && r.isCaps) return;
- t.isShift = !0, t.innerHTML = "SHIFT", this.classList.add("keyboard-keyboard-keys-focus");
- for (var s, l = document.querySelectorAll(e.el + " .akeyboard-keyboard-innerKeys"), d = 0; d < l.length; d++) {
- s = l[d];
- for (var p = 0; p < s.childNodes.length; p++) "Shift" !== u[d][p] && (s.childNodes[p].innerHTML = u[d][p])
- }
- }
- }
- }));
- var v = !1;
- if (c.forEach((function (t) {
- t.includes("Caps") && (v = !0)
- })), v) document.querySelectorAll(e.el + " .akeyboard-keyboard-keys-Caps").forEach((function (t) {
- t.onclick = function () {
- if (this.isCaps) {
- this.isCaps = !1, this.classList.remove("keyboard-keyboard-keys-focus");
- for (var t, n = document.querySelectorAll(e.el + " .akeyboard-keyboard-innerKeys"), i = 0; i < n.length; i++) {
- t = n[i];
- for (var o = 0; o < t.childNodes.length; o++) t.childNodes[o].innerHTML = c[i][o]
- }
- } else {
- var a = document.querySelector(e.el + " .akeyboard-keyboard-keys-Shift");
- if (a && a.isShift) return;
- this.isCaps = !0, this.classList.add("keyboard-keyboard-keys-focus");
- for (var r, s = document.querySelectorAll(e.el + " .akeyboard-keyboard-innerKeys"), l = 0; l < s.length; l++) {
- r = s[l];
- for (var u = 0; u < r.childNodes.length; u++) r.childNodes[u].innerHTML = d[l][u]
- }
- }
- }
- }))
- } else console.error('aKeyboard: The obj parameter needs to be an object <In "new aKeyboard()">')
- }
- var e, n, i;
- return e = t, (n = [{
- key: "inputOn", value: function (t, e, n, i) {
- if ("string" == typeof t) if ("string" == typeof e) for (var o = document.querySelector(t), a = document.querySelectorAll(this.obj.el + " .akeyboard-keyboard-keys"), r = 0; r < a.length; r++) ["Shift", "Caps"].includes(a[r].innerHTML) || ("Delete" !== a[r].innerHTML ? "Tab" !== a[r].innerHTML ? "Enter" !== a[r].innerHTML ? "Space" !== a[r].innerHTML ? i && "object" === pe(i) && Object.keys(i).length > 0 && i[a[r].innerHTML] ? a[r].onclick = i[a[r].innerHTML] : a[r].onclick = function () {
- o[e] += this.innerText, n(this.innerText, o[e])
- } : a[r].onclick = function () {
- o[e] += " ", n("Space", o[e])
- } : a[r].onclick = function () {
- o[e] += "\n", n("Enter", o[e])
- } : a[r].onclick = function () {
- o[e] += " ", n("Tab", o[e])
- } : a[r].onclick = function () {
- o[e] = o[e].substr(0, o[e].length - 1), n("Delete", o[e])
- }); else console.error('aKeyboard: The type parameter needs to be a string <In "aKeyboard.inputOn()">'); else console.error('aKeyboard: The inputEle parameter needs to be a string <In "aKeyboard.inputOn()">')
- }
- }, {
- key: "onclick", value: function (t, e) {
- if ("string" == typeof t) if ("function" == typeof e) {
- var n = document.querySelector(this.obj.el + " .akeyboard-keyboard-keys-" + t);
- n ? n.onclick = e : console.error("Can not find key: " + t)
- } else console.error('aKeyboard: The fn parameter needs to be a function <In "aKeyboard.onclick()">'); else console.error('aKeyboard: The btn parameter needs to be a string <In "aKeyboard.onclick()">')
- }
- }]) && he(e.prototype, n), i && he(e, i), t
- }();
- function me(t) {
- return (me = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
- return typeof t
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
- })(t)
- }
- function be(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i)
- }
- }
- var ve = function () {
- function t(e) {
- if (function (t, e) {
- if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
- }(this, t), "object" === me(e)) {
- this.obj = e;
- var n = document.querySelector(e.el), i = "";
- if ("object" === me(e.style)) for (var o in e.style) i += o + ": " + e.style[o] + ";";
- var a = '<div class="akeyboard-numberKeyboard' + (e.fixedBottomCenter ? " akeyboard-keyboard-fixedBottomCenter" : "") + '" style="' + i + '">';
- a += '<div class="akeyboard-keyboard-innerKeys">';
- for (var r = 1; r < 10; r++) a += '<div class="akeyboard-keyboard-keys akeyboard-keyboard-keys-' + r + '">' + r + "</div>", r % 3 == 0 && (a += '</div><div class="akeyboard-keyboard-innerKeys">');
- a += '<div class="akeyboard-keyboard-keys akeyboard-keyboard-keys-0">0</div><div class="akeyboard-keyboard-keys akeyboard-keyboard-keys-Delete">Delete</div></div><div class="akeyboard-keyboard-innerKeys"><div class="akeyboard-keyboard-keys akeyboard-numberKeyboard-keys-Enter">Enter</div></div>', a += "</div>", n.innerHTML = a
- } else console.error('aKeyboard: The obj parameter needs to be an object <In "new aKeyboard()">')
- }
- var e, n, i;
- return e = t, (n = [{
- key: "inputOn", value: function (t, e, n, i) {
- if ("string" == typeof t) if ("string" == typeof e) for (var o = document.querySelector(t), a = document.querySelectorAll(this.obj.el + " .akeyboard-keyboard-keys"), r = 0; r < a.length; r++) "Delete" !== a[r].innerHTML ? "Enter" !== a[r].innerHTML ? i && "object" === me(i) && Object.keys(i).length > 0 && i[a[r].innerHTML] ? a[r].onclick = i[a[r].innerHTML] : a[r].onclick = function () {
- o[e] += this.innerText, n(this.innerText, o[e])
- } : a[r].onclick = function () {
- o[e] += "\n", n("Enter", o[e])
- } : a[r].onclick = function () {
- o[e] = o[e].substr(0, o[e].length - 1), n("Delete", o[e])
- }; else console.error('aKeyboard: The type parameter needs to be a string <In "aKeyboard.inputOn()">'); else console.error('aKeyboard: The inputEle parameter needs to be a string <In "aKeyboard.inputOn()">')
- }
- }, {
- key: "onclick", value: function (t, e) {
- if ("string" == typeof t) if ("function" == typeof e) {
- var n = document.querySelector(this.obj.el + " .akeyboard-keyboard-keys-" + t);
- n ? n.onclick = e : console.error("Can not find key: " + t)
- } else console.error('aKeyboard: The fn parameter needs to be a function <In "aKeyboard.onclick()">'); else console.error('aKeyboard: The btn parameter needs to be a string <In "aKeyboard.onclick()">')
- }
- }]) && be(e.prototype, n), i && be(e, i), t
- }();
- var ye = Object(i.a)({
- name: "keyboard",
- props: {
- ele: {type: String, required: !0},
- keys: Array,
- theme: {
- type: String, default: "default", validator: function (t) {
- return ["default", "dark", "green", "classic"].includes(t)
- }
- },
- type: {
- type: String, default: "default", validator: function (t) {
- return ["default", "number", "mobile"].includes(t)
- }
- },
- fixedBottomCenter: {type: Boolean, default: !1},
- rebind: {type: Boolean, default: !0}
- },
- watch: {
- ele: function () {
- this.init()
- }
- },
- data: function () {
- return {customClick: {}}
- },
- computed: {
- className: function () {
- return "avue-keyboard--".concat(this.theme)
- }
- },
- mounted: function () {
- this.init()
- },
- methods: {
- init: function () {
- var t = this;
- if (this.ele) {
- var e, n = {el: "#keyboard", style: {}, keys: this.keys, fixedBottomCenter: this.fixedBottomCenter};
- "default" == this.type ? e = new fe(n) : "number" == this.type ? e = new ve(n) : "mobile" == this.type && (e = new MobileKeyBoard(n));
- var i = 0 == this.ele.indexOf("#") ? this.ele.substring(1) : this.ele;
- e.inputOn("#".concat(i), "value", (function (e, n) {
- t.$emit("click", e, n)
- }), this.rebind ? this.customClick : null), this.keyboard = e
- }
- }, bindClick: function (t, e) {
- this.keyboard.onclick(t, e), this.customClick[t] = e
- }
- }
- }), ge = Object(c.a)(ye, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: [this.b(), this.className]}, [e("div", {attrs: {id: "keyboard"}})])
- }), [], !1, null, null, null).exports, _e = n(12);
- function xe(t) {
- return function (t) {
- if (Array.isArray(t)) return we(t)
- }(t) || function (t) {
- if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t)
- }(t) || function (t, e) {
- if (!t) return;
- if ("string" == typeof t) return we(t, e);
- var n = Object.prototype.toString.call(t).slice(8, -1);
- "Object" === n && t.constructor && (n = t.constructor.name);
- if ("Map" === n || "Set" === n) return Array.from(t);
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return we(t, e)
- }(t) || function () {
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
- }()
- }
- function we(t, e) {
- (null == e || e > t.length) && (e = t.length);
- for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n];
- return i
- }
- var Se = Object(i.a)({
- name: "tree",
- mixins: [G.a],
- directives: {permission: _e.a},
- props: {
- filterNodeMethod: Function,
- permission: {
- type: [Function, Object], default: function () {
- return {}
- }
- },
- iconClass: {type: String},
- loading: {type: Boolean, default: !1},
- expandOnClickNode: {type: Boolean, default: !1},
- option: {
- type: Object, default: function () {
- return {}
- }
- },
- data: {
- type: Array, default: function () {
- return []
- }
- },
- value: {
- type: Object, default: function () {
- return {}
- }
- }
- },
- data: function () {
- return {filterValue: "", client: {x: 0, y: 0, show: !1}, box: !1, type: "", node: {}, obj: {}, form: {}}
- },
- computed: {
- styleName: function () {
- return {top: this.setPx(this.client.y - 10), left: this.setPx(this.client.x - 10)}
- }, treeProps: function () {
- return Object.assign(this.props, {isLeaf: this.leafKey})
- }, menu: function () {
- return this.vaildData(this.option.menu, !0)
- }, title: function () {
- return this.option.title
- }, treeLoad: function () {
- return this.option.treeLoad
- }, checkStrictly: function () {
- return this.option.checkStrictly
- }, accordion: function () {
- return this.option.accordion
- }, multiple: function () {
- return this.option.multiple
- }, lazy: function () {
- return this.option.lazy
- }, addText: function () {
- return this.addFlag ? this.t("crud.addBtn") : this.t("crud.editBtn")
- }, addFlag: function () {
- return ["add", "parentAdd"].includes(this.type)
- }, size: function () {
- return this.option.size || "small"
- }, props: function () {
- return this.option.props || {}
- }, leafKey: function () {
- return this.props.leaf || F.e.leaf
- }, valueKey: function () {
- return this.props.value || F.e.value
- }, labelKey: function () {
- return this.props.label || F.e.label
- }, childrenKey: function () {
- return this.props.children || F.e.children
- }, nodeKey: function () {
- return this.option.nodeKey || F.e.nodeKey
- }, defaultExpandAll: function () {
- return this.option.defaultExpandAll
- }, defaultExpandedKeys: function () {
- return this.option.defaultExpandedKeys
- }, formColumnOption: function () {
- return (this.option.formOption || {}).column || []
- }, formOption: function () {
- var t, e = this;
- return Object.assign({
- submitText: this.addText,
- column: [{label: this.valueKey, prop: this.valueKey, display: !1}].concat(xe(this.formColumnOption))
- }, (delete (t = e.option.formOption || {}).column, t))
- }
- },
- mounted: function () {
- var t = this;
- document.addEventListener("click", (function (e) {
- t.$el.contains(e.target) || (t.client.show = !1)
- })), this.initFun()
- },
- watch: {
- filterValue: function (t) {
- this.$refs.tree.filter(t)
- }, value: function (t) {
- this.form = t
- }, form: function (t) {
- this.$emit("input", t)
- }
- },
- methods: {
- getPermission: function (t) {
- return "function" == typeof this.permission ? this.permission(t, this.node) : !!this.validatenull(this.permission[t]) || this.permission[t]
- }, initFun: function () {
- var t = this;
- ["filter", "updateKeyChildren", "getCheckedNodes", "setCheckedNodes", "getCheckedKeys", "setCheckedKeys", "setChecked", "getHalfCheckedNodes", "getHalfCheckedKeys", "getCurrentKey", "getCurrentNode", "setCurrentKey", "setCurrentNode", "getNode", "remove", "append", "insertBefore", "insertAfter"].forEach((function (e) {
- t[e] = t.$refs.tree[e]
- }))
- }, nodeContextmenu: function (t, e) {
- this.node = this.deepClone(e), this.client.x = t.clientX, this.client.y = t.clientY, this.client.show = !0
- }, handleCheckChange: function (t, e, n) {
- this.$emit("check-change", t, e, n)
- }, handleSubmit: function (t, e) {
- this.addFlag ? this.save(t, e) : this.update(t, e)
- }, nodeClick: function (t, e, n) {
- this.$emit("node-click", t, e, n)
- }, filterNode: function (t, e) {
- return "function" == typeof this.filterNodeMethod ? this.filterNodeMethod(t, e) : !t || -1 !== e[this.labelKey].indexOf(t)
- }, hide: function () {
- this.box = !1, this.node = {}, this.$refs.form.resetForm(), this.$refs.form.clearValidate()
- }, save: function (t, e) {
- var n = this;
- this.$emit("save", this.node, t, (function () {
- var t = n.deepClone(n.form);
- "add" === n.type ? n.$refs.tree.append(t, n.node[n.valueKey]) : "parentAdd" === n.type && n.$refs.tree.append(t), n.hide(), e()
- }), e)
- }, update: function (t, e) {
- var n = this;
- this.$emit("update", this.node, t, (function () {
- var t = n.$refs.tree.getNode(n.node[n.valueKey]), i = n.deepClone(n.form);
- t.data = i, n.hide(), e()
- }), e)
- }, rowEdit: function (t) {
- this.type = "edit", this.form = this.node, this.show()
- }, parentAdd: function () {
- this.type = "parentAdd", this.show()
- }, rowAdd: function () {
- this.type = "add", this.show()
- }, show: function () {
- this.client.show = !1, this.box = !0
- }, rowRemove: function () {
- var t = this;
- this.client.show = !1;
- this.$emit("del", this.node, (function () {
- t.$refs.tree.remove(t.node[t.valueKey])
- }))
- }
- }
- }), Oe = Object(c.a)(Se, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [t.vaildData(t.option.filter, !0) ? n("div", {class: t.b("filter")}, [n("el-input", {
- attrs: {
- placeholder: t.vaildData(t.option.filterText, "输入关键字进行过滤"),
- size: t.size
- }, model: {
- value: t.filterValue, callback: function (e) {
- t.filterValue = e
- }, expression: "filterValue"
- }
- }, [t.vaildData(t.option.addBtn, !0) && !t.$slots.addBtn ? n("el-button", {
- attrs: {
- slot: "append",
- size: t.size,
- icon: "el-icon-plus"
- }, on: {click: t.parentAdd}, slot: "append"
- }) : t._t("addBtn", null, {slot: "append"})], 2)], 1) : t._e(), t._v(" "), n("el-scrollbar", {class: t.b("content")}, [n("el-tree", {
- directives: [{
- name: "loading",
- rawName: "v-loading",
- value: t.loading,
- expression: "loading"
- }],
- ref: "tree",
- attrs: {
- data: t.data,
- lazy: t.lazy,
- load: t.treeLoad,
- props: t.treeProps,
- "icon-class": t.iconClass,
- "highlight-current": !t.multiple,
- "show-checkbox": t.multiple,
- accordion: t.accordion,
- "node-key": t.props.value,
- "check-strictly": t.checkStrictly,
- "filter-node-method": t.filterNode,
- "expand-on-click-node": t.expandOnClickNode,
- "default-expand-all": t.defaultExpandAll,
- "default-expanded-keys": t.defaultExpandedKeys
- },
- on: {"check-change": t.handleCheckChange, "node-click": t.nodeClick, "node-contextmenu": t.nodeContextmenu},
- scopedSlots: t._u([{
- key: "default", fn: function (e) {
- var i = e.node, o = e.data;
- return t.$scopedSlots.default ? n("span", {}, [t._t("default", null, {
- node: i,
- data: o
- })], 2) : n("span", {staticClass: "el-tree-node__label"}, [n("span", [t._v(t._s(i.label))])])
- }
- }], null, !0)
- })], 1), t._v(" "), t.client.show && t.menu ? n("div", {
- staticClass: "el-cascader-panel is-bordered",
- class: t.b("menu"),
- style: t.styleName,
- on: {
- click: function (e) {
- t.client.show = !1
- }
- }
- }, [t.vaildData(t.option.addBtn, !0) ? n("div", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.getPermission("addBtn"),
- expression: "getPermission('addBtn')"
- }], class: t.b("item"), on: {click: t.rowAdd}
- }, [t._v("新增")]) : t._e(), t._v(" "), t.vaildData(t.option.editBtn, !0) ? n("div", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.getPermission("editBtn"),
- expression: "getPermission('editBtn')"
- }], class: t.b("item"), on: {click: t.rowEdit}
- }, [t._v("修改")]) : t._e(), t._v(" "), t.vaildData(t.option.delBtn, !0) ? n("div", {
- directives: [{
- name: "permission",
- rawName: "v-permission",
- value: t.getPermission("delBtn"),
- expression: "getPermission('delBtn')"
- }], class: t.b("item"), on: {click: t.rowRemove}
- }, [t._v("删除")]) : t._e(), t._v(" "), t._t("menu", null, {node: t.node})], 2) : t._e(), t._v(" "), n("el-dialog", {
- staticClass: "avue-dialog",
- class: t.b("dialog"),
- attrs: {
- title: t.node[t.labelKey] || t.title,
- visible: t.box,
- "modal-append-to-body": "",
- "append-to-body": "",
- width: t.vaildData(t.option.dialogWidth, "50%")
- },
- on: {
- "update:visible": function (e) {
- t.box = e
- }, close: t.hide
- }
- }, [n("avue-form", {
- ref: "form",
- attrs: {option: t.formOption},
- on: {submit: t.handleSubmit},
- model: {
- value: t.form, callback: function (e) {
- t.form = e
- }, expression: "form"
- }
- })], 1)], 1)
- }), [], !1, null, null, null).exports, Ce = Object(i.a)({
- name: "title", mixins: [K(), H()], props: {
- styles: {
- type: Object, default: function () {
- return {}
- }
- }
- }, mounted: function () {
- }, methods: {}
- }), ke = Object(c.a)(Ce, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b()}, [e("p", {style: this.styles}, [this._v(this._s(this.text))])])
- }), [], !1, null, null, null).exports, je = n(18);
- function De(t) {
- return function (t) {
- if (Array.isArray(t)) return Ee(t)
- }(t) || function (t) {
- if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t)
- }(t) || function (t, e) {
- if (!t) return;
- if ("string" == typeof t) return Ee(t, e);
- var n = Object.prototype.toString.call(t).slice(8, -1);
- "Object" === n && t.constructor && (n = t.constructor.name);
- if ("Map" === n || "Set" === n) return Array.from(t);
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Ee(t, e)
- }(t) || function () {
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
- }()
- }
- function Ee(t, e) {
- (null == e || e > t.length) && (e = t.length);
- for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n];
- return i
- }
- var Me = Object(i.a)({
- name: "search", mixins: [Object(je.a)()], props: {value: {}}, computed: {
- isCard: function () {
- return this.parentOption.card
- }, parentOption: function () {
- return this.deepClone(this.tableOption)
- }, propOption: function () {
- var t = [];
- return this.columnOption.forEach((function (e) {
- return t.push(e)
- })), t
- }, columnOption: function () {
- return De(this.parentOption.column) || []
- }
- }, data: function () {
- return {form: {}}
- }, watch: {
- value: {
- handler: function () {
- this.setVal()
- }, deep: !0
- }
- }, created: function () {
- this.dataformat(), this.setVal()
- }, methods: {
- setVal: function () {
- var t = this;
- Object.keys(this.value).forEach((function (e) {
- t.$set(t.form, e, t.value[e])
- }))
- }, getKey: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
- e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
- n = arguments.length > 2 ? arguments[2] : void 0;
- return t[e[n] || (this.parentOption.props || {})[n] || n]
- }, dataformat: function () {
- var t = this;
- this.columnOption.forEach((function (e) {
- var n = e.prop;
- t.validatenull(t.form[n]) && (!1 === e.multiple ? t.$set(t.form, n, "") : t.$set(t.form, n, []))
- }))
- }, getActive: function (t, e) {
- var n = this.getKey(t, e.props, "value");
- return !1 === e.multiple ? this.form[e.prop] === n : this.form[e.prop].includes(n)
- }, handleClick: function (t, e) {
- var n = this.getKey(e, t.props, "value");
- if (!1 === t.multiple) this.form[t.prop] = n; else {
- var i = this.form[t.prop].indexOf(n);
- -1 === i ? this.form[t.prop].push(n) : this.form[t.prop].splice(i, 1)
- }
- this.$emit("change", this.form), this.$emit("input", this.form)
- }
- }
- }), Te = Object(c.a)(Me, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("el-row", {
- class: [t.b(), {"avue--card": t.isCard}],
- attrs: {span: 24}
- }, t._l(t.columnOption, (function (e, i) {
- return n("el-col", {
- key: e.prop,
- class: t.b("item"),
- attrs: {span: e.span || 24}
- }, [n("p", {class: t.b("title")}, [t._v(t._s(e.label) + ":")]), t._v(" "), n("div", {class: t.b("content")}, [e.slot ? t._t(e.prop, null, {dic: t.DIC[e.prop]}) : t._l(t.DIC[e.prop], (function (i) {
- return n("span", {
- key: t.getKey(i, e.props, "value"),
- class: [t.b("tags"), {"avue-search__tags--active": t.getActive(i, e)}],
- on: {
- click: function (n) {
- return t.handleClick(e, i)
- }
- }
- }, [t._v(t._s(t.getKey(i, e.props, "label")))])
- }))], 2)])
- })), 1)
- }), [], !1, null, null, null).exports;
- var Ae = Object(i.a)({
- name: "skeleton",
- props: {
- loading: {type: Boolean, default: !0},
- avatar: Boolean,
- active: {type: Boolean, default: !0},
- block: Boolean,
- number: {type: Number, default: 1},
- rows: {type: Number, default: 3}
- },
- computed: {
- styleName: function () {
- return this.block ? {width: "100%"} : {}
- }, className: function () {
- var t, e, n, i = this.active;
- return t = {}, e = "".concat("avue-skeleton", "__loading"), n = i, e in t ? Object.defineProperty(t, e, {
- value: n,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = n, t
- }
- }
- }), Ie = Object(c.a)(Ae, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, t._l(t.number, (function (e, i) {
- return t.loading ? n("div", {
- key: i,
- class: t.b("item")
- }, [n("div", {class: t.b("header")}, [t.avatar ? n("span", {class: [t.b("avatar"), t.className]}) : t._e()]), t._v(" "), n("div", {class: t.b("content")}, [n("h3", {class: [t.b("title"), t.className]}), t._v(" "), n("div", {class: t.b("list")}, t._l(t.rows, (function (e, i) {
- return n("li", {key: i, class: [t.b("li"), t.className], style: t.styleName})
- })), 0)])]) : n("div", [t._t("default")], 2)
- })), 0)
- }), [], !1, null, null, null).exports, Pe = Object(i.a)({
- name: "tabs", props: {
- option: {
- type: Object, required: !0, default: function () {
- return {}
- }
- }
- }, data: function () {
- return {active: "0"}
- }, watch: {
- active: function () {
- this.$emit("change", this.tabsObj)
- }
- }, computed: {
- tabsObj: function () {
- return this.columnOption[this.active]
- }, parentOption: function () {
- return this.option
- }, columnOption: function () {
- return this.parentOption.column || []
- }
- }, methods: {
- changeTabs: function (t) {
- this.active = t + ""
- }
- }
- }), $e = Object(c.a)(Pe, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("el-tabs", {
- attrs: {
- "tab-position": t.parentOption.position,
- type: t.parentOption.type
- }, model: {
- value: t.active, callback: function (e) {
- t.active = e
- }, expression: "active"
- }
- }, t._l(t.columnOption, (function (e, i) {
- return n("el-tab-pane", {
- key: i,
- attrs: {name: i + "", disabled: e.disabled}
- }, [n("span", {
- attrs: {slot: "label"},
- slot: "label"
- }, [n("i", {class: e.icon}), t._v(" \n " + t._s(e.label) + "\n ")])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, Le = Object(i.a)({
- name: "dynamic", mixins: [K(), H()], data: function () {
- return {hoverList: []}
- }, props: {
- columnSlot: {
- type: Array, default: function () {
- return []
- }
- }, children: {
- type: Object, default: function () {
- return {}
- }
- }
- }, computed: {
- showIndex: function () {
- return this.vaildData(this.children.index, !0)
- }, showType: function () {
- return this.children.type || "crud"
- }, isForm: function () {
- return "form" === this.showType
- }, isCrud: function () {
- return "crud" === this.showType
- }, selectionChange: function () {
- return this.children.selectionChange
- }, sortableChange: function () {
- return this.children.sortableChange
- }, rowAdd: function () {
- return this.children.rowAdd
- }, rowDel: function () {
- return this.children.rowDel
- }, viewBtn: function () {
- return !1 === this.children.viewBtn
- }, addBtn: function () {
- return !1 === this.children.addBtn
- }, delBtn: function () {
- return !1 === this.children.delBtn
- }, valueOption: function () {
- var t = {};
- return this.columnOption.forEach((function (e) {
- e.value && (t[e.prop] = e.value)
- })), t
- }, rulesOption: function () {
- var t = {};
- return this.columnOption.forEach((function (e) {
- e.rules && (t[e.prop] = e.rules)
- })), t
- }, columnOption: function () {
- return this.children.column || []
- }, option: function () {
- var t, e = this;
- return Object.assign({
- border: !0,
- header: !1,
- menu: !1,
- size: this.size,
- disabled: this.disabled,
- readonly: this.readonly,
- emptyBtn: !1,
- submitBtn: !1
- }, function () {
- var t = e.deepClone(e.children);
- return delete t.column, t
- }(), (t = [{
- label: e.children.indexLabel || "#",
- prop: "_index",
- display: e.showIndex,
- detail: !0,
- fixed: !0,
- align: "center",
- headerAlign: "center",
- span: 24,
- width: 50,
- renderHeader: function (t, n) {
- if (n.column, n.$index, !e.addBtn && !e.readonly) return t("el-button", {
- attrs: {
- size: "mini",
- type: "primary",
- icon: "el-icon-plus",
- disabled: e.disabled,
- circle: !0
- }, on: {click: e.addRow}
- })
- }
- }], e.columnOption.forEach((function (n) {
- t.push(Object.assign(n, {cell: e.vaildData(n.cell, !0)}))
- })), {column: t}))
- }
- }, mounted: function () {
- this.initData()
- }, watch: {
- textLen: function () {
- return this.text.length
- }, text: function () {
- this.initData()
- }
- }, methods: {
- handleSelectionChange: function (t) {
- this.selectionChange && this.selectionChange(t)
- }, handleSortableChange: function (t, e, n, i) {
- this.sortableChange && this.sortableChange(t, e, n, i)
- }, cellMouseenter: function (t) {
- var e = t.$index;
- this.mouseoverRow(e)
- }, cellMouseLeave: function (t, e, n, i) {
- var o = t.$index;
- this.mouseoutRow(o)
- }, initData: function () {
- this.text.forEach((function (t, e) {
- t = Object.assign(t, {$cellEdit: !0, $index: e})
- }))
- }, mouseoverRow: function (t) {
- this.delBtn || (this.flagList(), this.$set(this.hoverList, t, !0))
- }, mouseoutRow: function (t) {
- this.delBtn || (this.flagList(), this.$set(this.hoverList, t, !1))
- }, flagList: function () {
- this.hoverList.forEach((function (t, e) {
- !1
- }))
- }, delRow: function (t) {
- var e = this, n = function () {
- var n = e.deepClone(e.text);
- n.splice(t, 1), e.text = n
- };
- "function" == typeof this.rowDel ? this.rowDel(this.text[t], n) : n()
- }, addRow: function () {
- var t = this, e = function () {
- var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
- e = Object.assign(t.valueOption, e, {$index: t.textLen}), t.isCrud ? t.$refs.main.rowCellAdd(e) : t.isForm && t.text.push(e)
- };
- "function" == typeof this.rowAdd ? this.rowAdd(e) : e()
- }
- }
- }), Ne = Object(c.a)(Le, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [t.isForm ? [n("div", {class: t.b("header")}, [t.readonly || t.disabled || t.addBtn ? t._e() : n("el-button", {
- attrs: {
- size: "mini",
- circle: "",
- disabled: t.disabled,
- type: "primary",
- icon: "el-icon-plus"
- }, on: {click: t.addRow}
- })], 1), t._v(" "), n("div", t._l(t.text, (function (e, i) {
- return n("div", {
- key: i, class: t.b("row"), on: {
- mouseenter: function (e) {
- return t.cellMouseenter({$index: i})
- }, mouseleave: function (e) {
- return t.cellMouseLeave({$index: i})
- }
- }
- }, [t.readonly || t.disabled || t.delBtn || !t.hoverList[i] ? t._e() : n("el-button", {
- class: t.b("menu"),
- attrs: {type: "danger", size: "mini", disabled: t.disabled, icon: "el-icon-delete", circle: ""},
- on: {
- click: function (n) {
- return t.delRow(e.$index)
- }
- }
- }), t._v(" "), n("avue-form", {
- key: i,
- ref: "main",
- refInFor: !0,
- attrs: {option: t.option},
- scopedSlots: t._u([{
- key: "_index", fn: function (i) {
- return n("div", {}, [n("span", [t._v(t._s(e.$index + 1))])])
- }
- }, t._l(t.columnSlot, (function (e) {
- return {
- key: e.prop, fn: function (n) {
- return [t._t(e.prop, null, null, Object.assign(n, {row: t.text[i]}))]
- }
- }
- }))], null, !0),
- model: {
- value: t.text[i], callback: function (e) {
- t.$set(t.text, i, e)
- }, expression: "text[index]"
- }
- })], 1)
- })), 0)] : t.isCrud ? n("avue-crud", {
- ref: "main",
- attrs: {option: t.option, disabled: t.disabled, data: t.text},
- on: {
- "cell-mouse-enter": t.cellMouseenter,
- "cell-mouse-leave": t.cellMouseLeave,
- "selection-change": t.handleSelectionChange,
- "sortable-change": t.handleSortableChange
- },
- scopedSlots: t._u([{
- key: "_index", fn: function (e) {
- return [t.readonly || t.disabled || t.delBtn || !t.hoverList[e.row.$index] ? n("div", [t._v(t._s(e.row.$index + 1))]) : n("el-button", {
- attrs: {
- type: "danger",
- size: "mini",
- disabled: t.disabled,
- icon: "el-icon-delete",
- circle: ""
- }, on: {
- click: function (n) {
- return t.delRow(e.row.$index)
- }
- }
- })]
- }
- }, t._l(t.columnSlot, (function (e) {
- return {
- key: t.getSlotName(e, "F"), fn: function (n) {
- return [t._t(e.prop, null, null, n)]
- }
- }
- }))], null, !0)
- }) : t._e()], 2)
- }), [], !1, null, null, null).exports, ze = Object(i.a)({
- name: "queue",
- props: {
- enter: {type: String, default: "fadeInLeft"},
- leave: {type: String, default: "fadeOutRight"},
- block: {type: Boolean, default: !1},
- delay: {type: Number, default: 0}
- },
- data: function () {
- return {isFixed: 0, animate: []}
- },
- mounted: function () {
- var t = this;
- this.$nextTick((function () {
- addEventListener("scroll", t.handleAnimate), t.handleAnimate()
- }))
- },
- methods: {
- handleAnimate: function () {
- var t = this;
- (pageYOffset || document.documentElement.scrollTop || document.body.scrollTop) + document.documentElement.clientHeight > this.$refs.queue.offsetTop ? setTimeout((function () {
- t.animate = [t.enter, "avue-opacity--active"]
- }), this.delay) : this.animate = ["avue-opacity"]
- }
- },
- destroyed: function () {
- removeEventListener("scroll", this.handleAnimate)
- }
- }), Be = Object(c.a)(ze, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: [this.b(), {"avue-queue--block": this.block}]}, [e("div", {
- ref: "queue",
- staticClass: "animated",
- class: this.animate
- }, [this._t("default")], 2)])
- }), [], !1, null, null, null).exports;
- function Fe(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i)
- }
- }
- var Re, Ke = function () {
- function t(e) {
- !function (t, e) {
- if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
- }(this, t), this.video = e, this.mediaRecorder = null, this.chunks = []
- }
- var e, n, i;
- return e = t, (n = [{
- key: "init", value: function () {
- var t = this;
- return new Promise((function (e, n) {
- navigator.mediaDevices.getUserMedia({audio: !0, video: !0}).then((function (n) {
- "srcObject" in t.video ? t.video.srcObject = n : t.video.src = window.URL.createObjectURL(n), t.video.addEventListener("loadmetadata", (function () {
- t.video.play()
- })), t.mediaRecorder = new MediaRecorder(n), t.mediaRecorder.addEventListener("dataavailable", (function (e) {
- t.chunks.push(e.data)
- })), e()
- })).catch((function (t) {
- n(t)
- }))
- }))
- }
- }, {
- key: "startRecord", value: function () {
- "inactive" === this.mediaRecorder.state && this.mediaRecorder.start()
- }
- }, {
- key: "stopRecord", value: function () {
- "recording" === this.mediaRecorder.state && this.mediaRecorder.stop()
- }
- }, {
- key: "isSupport", value: function () {
- if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) return !0
- }
- }]) && Fe(e.prototype, n), i && Fe(e, i), t
- }(), We = Object(i.a)({
- name: "video",
- props: {background: {type: String}, width: {type: [String, Number], default: 500}},
- computed: {
- styleName: function () {
- return {width: this.setPx(this.width)}
- }, imgStyleName: function () {
- return {width: this.setPx(this.width / 2)}
- }, borderStyleName: function () {
- return {width: this.setPx(this.width / 15), height: this.setPx(this.width / 15), borderWidth: this.setPx(5)}
- }
- },
- data: function () {
- return {videoObj: null}
- },
- mounted: function () {
- this.init()
- },
- methods: {
- init: function () {
- var t = this;
- this.videoObj = new Ke(this.$refs.main), this.videoObj.init().then((function () {
- t.videoObj.mediaRecorder.addEventListener("stop", t.getData, !1)
- }))
- }, startRecord: function () {
- this.videoObj.startRecord()
- }, stopRecord: function () {
- this.videoObj.stopRecord()
- }, getData: function () {
- var t = this, e = new Blob(this.videoObj.chunks, {type: "video/mp4"}), n = new FileReader;
- n.readAsDataURL(e), n.addEventListener("loadend", (function () {
- var e = n.result;
- t.$emit("data-change", e)
- }))
- }
- }
- }), Ue = Object(c.a)(We, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- class: t.b(),
- style: t.styleName
- }, [n("div", {class: t.b("border")}, [n("span", {style: t.borderStyleName}), t._v(" "), n("span", {style: t.borderStyleName}), t._v(" "), n("span", {style: t.borderStyleName}), t._v(" "), n("span", {style: t.borderStyleName})]), t._v(" "), n("img", {
- class: t.b("img"),
- style: t.imgStyleName,
- attrs: {src: t.background}
- }), t._v(" "), n("video", {
- ref: "main",
- class: t.b("main"),
- attrs: {autoplay: "", muted: ""},
- domProps: {muted: !0}
- })])
- }), [], !1, null, null, null).exports, Ve = Object(i.a)({
- name: "login", props: {
- codesrc: {type: String}, option: {
- type: Object, default: function () {
- return {}
- }
- }
- }, computed: {
- labelWidth: function () {
- return this.option.labelWidth || 80
- }, time: function () {
- return this.option.time || 60
- }, isImg: function () {
- return "img" === this.codeType
- }, isPhone: function () {
- return "phone" === this.codeType
- }, codeType: function () {
- return this.option.codeType || "img"
- }, width: function () {
- return this.option.width || "100%"
- }, username: function () {
- return this.column.username || {}
- }, password: function () {
- return this.column.password || {}
- }, code: function () {
- return this.column.code || {}
- }, column: function () {
- return this.option.column || {}
- }, sendDisabled: function () {
- return !this.validatenull(this.check)
- }
- }, data: function () {
- return {text: "", nowtime: "", check: {}, flag: !1, form: {}}
- }, created: function () {
- this.text = "发送验证码"
- }, methods: {
- onSend: function () {
- var t = this;
- this.sendDisabled || this.$emit("send", (function () {
- t.nowtime = t.time, t.text = "{{time}}s后重获取".replace("{{time}}", t.nowtime), t.check = setInterval((function () {
- t.nowtime--, 0 === t.nowtime ? (t.text = "发送验证码", clearInterval(t.check), t.check = null) : t.text = "{{time}}s后重获取".replace("{{time}}", t.nowtime)
- }), 1e3)
- }))
- }, onRefresh: function () {
- this.$emit("refresh")
- }, onSubmit: function () {
- var t = this;
- this.$refs.form.validate((function (e) {
- e && t.$emit("submit", function () {
- var e = {};
- for (var n in t.form) {
- var i = n;
- t[n].prop && (i = t[n].prop), e[i] = t.form[n]
- }
- return e
- }())
- }))
- }
- }
- }), He = Object(c.a)(Ve, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b(), style: {width: t.setPx(t.width)}}, [n("el-form", {
- ref: "form",
- attrs: {model: t.form, "label-suffix": ":", "label-width": t.setPx(t.labelWidth)}
- }, [t.username.hide ? t._e() : n("el-form-item", {
- attrs: {
- label: t.username.label || "用户名",
- rules: t.username.rules,
- "label-width": t.setPx(t.username.labelWidth),
- prop: "username"
- }
- }, [n("el-tooltip", {
- attrs: {
- content: t.username.tip,
- disabled: void 0 === t.username.tip,
- placement: "top-start"
- }
- }, [n("el-input", {
- attrs: {
- size: "small",
- "prefix-icon": t.username.prefixIcon || "el-icon-user",
- placeholder: t.username.placeholder || "请输入用户名",
- autocomplete: t.username.autocomplete
- }, model: {
- value: t.form.username, callback: function (e) {
- t.$set(t.form, "username", e)
- }, expression: "form.username"
- }
- })], 1)], 1), t._v(" "), t.password.hide ? t._e() : n("el-form-item", {
- attrs: {
- label: t.password.label || "密码",
- rules: t.password.rules,
- "label-width": t.setPx(t.password.labelWidth),
- prop: "password"
- }
- }, [n("el-tooltip", {
- attrs: {
- content: t.password.tip,
- disabled: void 0 === t.password.tip,
- placement: "top-start"
- }
- }, [n("el-input", {
- attrs: {
- type: "password",
- size: "small",
- "prefix-icon": t.password.prefixIcon || "el-icon-unlock",
- placeholder: t.password.placeholder || "请输入密码",
- "show-password": "",
- autocomplete: t.password.autocomplete
- }, model: {
- value: t.form.password, callback: function (e) {
- t.$set(t.form, "password", e)
- }, expression: "form.password"
- }
- })], 1)], 1), t._v(" "), t.code.hide ? t._e() : n("el-form-item", {
- attrs: {
- label: t.code.label || "验证码",
- rules: t.code.rules,
- "label-width": t.setPx(t.code.labelWidth),
- prop: "code"
- }
- }, [n("el-tooltip", {
- attrs: {
- content: t.code.tip,
- disabled: void 0 === t.code.tip,
- placement: "top-start"
- }
- }, [n("el-input", {
- attrs: {
- size: "small",
- "prefix-icon": t.code.prefixIcon || "el-icon-c-scale-to-original",
- placeholder: t.code.placeholder || "请输入验证码",
- autocomplete: t.code.autocomplete
- }, model: {
- value: t.form.code, callback: function (e) {
- t.$set(t.form, "code", e)
- }, expression: "form.code"
- }
- }, [n("template", {slot: "append"}, [t.isPhone ? n("el-button", {
- class: t.b("send"),
- attrs: {type: "primary", disabled: t.sendDisabled},
- on: {click: t.onSend}
- }, [t._v(t._s(t.text))]) : t._e(), t._v(" "), t.isImg ? n("span", [n("img", {
- attrs: {
- src: t.codesrc,
- alt: "",
- width: "80",
- height: "25"
- }, on: {click: t.onRefresh}
- })]) : t._e()], 1)], 2)], 1)], 1), t._v(" "), n("el-form-item", [n("el-button", {
- class: t.b("submit"),
- attrs: {type: "primary"},
- on: {click: t.onSubmit}
- }, [t._v("登录")])], 1)], 1)], 1)
- }), [], !1, null, null, null).exports, qe = Object(i.a)({
- name: "array",
- mixins: [K(), H()],
- data: function () {
- return {text: []}
- },
- computed: {
- isImg: function () {
- return "img" === this.type
- }, isUrl: function () {
- return "url" === this.type
- }
- },
- props: {
- alone: Boolean,
- type: String,
- size: String,
- placeholder: String,
- readonly: Boolean,
- disabled: Boolean,
- value: [Array, String]
- },
- methods: {
- add: function () {
- this.text.push("")
- }, remove: function (t) {
- this.text.splice(t, 1)
- }, openImg: function (t) {
- var e = this.text.map((function (t) {
- return {thumbUrl: t, url: t}
- }));
- this.$ImagePreview(e, t)
- }
- }
- }), Ye = Object(c.a)(qe, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, t._l(t.text, (function (e, i) {
- return n("div", {
- key: i,
- class: t.b("item")
- }, [n("div", {class: t.b("input")}, [n("el-tooltip", {
- attrs: {
- placement: "bottom",
- disabled: !t.isImg && !t.isUrl || t.validatenull(e)
- }
- }, [n("div", {
- attrs: {slot: "content"},
- slot: "content"
- }, [t.isImg ? n("el-image", {
- staticStyle: {width: "150px"},
- attrs: {src: e, fit: "cover"},
- on: {
- click: function (e) {
- return t.openImg(i)
- }
- }
- }) : t.isUrl ? n("el-link", {
- attrs: {
- type: "primary",
- href: e,
- target: t.target
- }
- }, [t._v(t._s(e))]) : t._e()], 1), t._v(" "), n("el-input", {
- attrs: {
- placeholder: t.placeholder,
- disabled: t.disabled
- }, model: {
- value: t.text[i], callback: function (e) {
- t.$set(t.text, i, e)
- }, expression: "text[index]"
- }
- })], 1), t._v(" "), t.disabled || t.readonly || t.alone ? t._e() : [n("el-button", 0 === i ? {
- attrs: {
- type: "primary",
- icon: "el-icon-plus",
- circle: "",
- size: t.size
- }, on: {
- click: function (e) {
- return t.add()
- }
- }
- } : {
- attrs: {type: "danger", icon: "el-icon-minus", circle: "", size: t.size}, on: {
- click: function (e) {
- return t.remove(i)
- }
- }
- })]], 2)])
- })), 0)
- }), [], !1, null, null, null).exports, Ge = Object(i.a)({
- name: "text-ellipsis",
- props: {
- text: String,
- height: Number,
- width: Number,
- isLimitHeight: {type: Boolean, default: !0},
- useTooltip: {type: Boolean, default: !1},
- placement: String
- },
- data: function () {
- return {keyIndex: 0, oversize: !1, isHide: !1}
- },
- watch: {
- isLimitHeight: function () {
- this.init()
- }, text: function () {
- this.init()
- }, height: function () {
- this.init()
- }
- },
- mounted: function () {
- this.init()
- },
- methods: {
- init: function () {
- this.oversize = !1, this.keyIndex += 1, this.$refs.more.style.display = "none", this.isLimitHeight && this.limitShow()
- }, limitShow: function () {
- var t = this;
- this.$nextTick((function () {
- var e = t.$refs.text, n = t.$el, i = t.$refs.more, o = 1e3;
- if (e) if (n.offsetHeight > t.height) {
- i.style.display = "inline-block";
- for (var a = t.text; n.offsetHeight > t.height && o > 0;) n.offsetHeight > 3 * t.height ? e.innerText = a = a.substring(0, Math.floor(a.length / 2)) : e.innerText = a = a.substring(0, a.length - 1), o--;
- t.$emit("hide"), t.isHide = !0
- } else t.$emit("show"), t.isHide = !1
- }))
- }
- }
- }), Xe = Object(c.a)(Ge, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- class: t.b(),
- style: {width: t.setPx(t.width, "100%")}
- }, [t._t("before"), t._v(" "), n("el-tooltip", {
- attrs: {
- content: t.text,
- disabled: !(t.useTooltip && t.isHide),
- placement: t.placement
- }
- }, [n("span", [n("span", {
- key: t.keyIndex,
- ref: "text",
- class: t.b("text")
- }, [t._v(t._s(t.text))])])]), t._v(" "), n("span", {
- ref: "more",
- class: t.b("more")
- }, [t._t("more")], 2), t._v(" "), t._t("after")], 2)
- }), [], !1, null, null, null).exports, Qe = Object(i.a)({
- name: "data-tabs", data: function () {
- return {}
- }, computed: {
- animation: function () {
- return this.option.animation
- }, decimals: function () {
- return this.option.decimals || 0
- }, span: function () {
- return this.option.span || 8
- }, data: function () {
- return this.option.data || []
- }
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }
- }), Je = Object(c.a)(Qe, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "avue-data-tabs"}, [n("el-row", {attrs: {span: 24}}, t._l(t.data, (function (e, i) {
- return n("el-col", {key: i, attrs: {md: t.span, xs: 24, sm: 12}}, [n("div", {
- staticClass: "item",
- style: {background: e.color}
- }, [n("a", {
- attrs: {href: e.href ? e.href : "javascript:void(0);", target: e.target}, on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("div", {staticClass: "item-header"}, [n("p", [t._v(t._s(e.title))]), t._v(" "), n("span", [t._v(t._s(e.subtitle))])]), t._v(" "), n("div", {staticClass: "item-body"}, [n("avue-count-up", {
- staticClass: "h2",
- attrs: {decimals: t.decimals, animation: t.animation, end: e.count}
- })], 1), t._v(" "), n("div", {staticClass: "item-footer"}, [n("span", [t._v(t._s(e.allcount))]), t._v(" "), n("p", [t._v(t._s(e.text))])]), t._v(" "), n("p", {staticClass: "item-tip"}, [t._v(t._s(e.key))])])])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, Ze = Object(i.a)({
- name: "data-cardtext", data: function () {
- return {}
- }, computed: {
- icon: function () {
- return this.option.icon
- }, color: function () {
- return this.option.color || "#333"
- }, span: function () {
- return this.option.span || 8
- }, data: function () {
- return this.option.data || []
- }
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }
- }), tn = Object(c.a)(Ze, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "avue-data-cardText"}, [n("el-row", {attrs: {span: 24}}, t._l(t.data, (function (e, i) {
- return n("el-col", {
- key: i,
- attrs: {md: t.span, xs: 24, sm: 12}
- }, [n("div", {staticClass: "item"}, [n("a", {
- attrs: {href: e.href || "javascript:void(0);", target: e.target},
- on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("div", {staticClass: "item-header"}, [n("i", {
- class: e.icon || "el-icon-bell",
- style: {color: e.color || "red"}
- }), t._v(" "), n("a", {}, [t._v(t._s(e.title))])]), t._v(" "), n("div", {staticClass: "item-content"}, [t._v(t._s(e.content))]), t._v(" "), n("div", {staticClass: "item-footer"}, [n("span", [t._v(t._s(e.name))]), t._v(" "), n("span", [t._v(t._s(e.date))])])])])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, en = Object(i.a)({
- name: "data-box", data: function () {
- return {}
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }, computed: {
- animation: function () {
- return this.option.animation
- }, decimals: function () {
- return this.option.decimals || 0
- }, span: function () {
- return this.option.span || 8
- }, data: function () {
- return this.option.data || []
- }
- }, created: function () {
- }, mounted: function () {
- }, watch: {}, methods: {}
- }), nn = Object(c.a)(en, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "data-box"}, [n("el-row", {attrs: {span: 24}}, t._l(t.data, (function (e, i) {
- return n("el-col", {
- key: i,
- attrs: {md: t.span, xs: 24, sm: 12}
- }, [n("div", {staticClass: "item"}, [n("a", {
- attrs: {
- href: e.href ? e.href : "javascript:void(0);",
- target: e.target
- }, on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("div", {
- staticClass: "item-icon",
- style: {backgroundColor: e.color}
- }, [n("i", {class: e.icon})]), t._v(" "), n("div", {staticClass: "item-info"}, [n("avue-count-up", {
- staticClass: "title",
- style: {color: e.color},
- attrs: {animation: t.animation, decimals: t.decimals, end: e.count}
- }), t._v(" "), n("div", {staticClass: "info"}, [t._v(t._s(e.title))])], 1)])])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, on = Object(i.a)({
- name: "data-progress", data: function () {
- return {}
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }, computed: {
- animation: function () {
- return this.option.animation
- }, decimals: function () {
- return this.option.decimals || 0
- }, span: function () {
- return this.option.span || 8
- }, data: function () {
- return this.option.data || []
- }
- }, created: function () {
- }, mounted: function () {
- }, watch: {}, methods: {}
- }), an = Object(c.a)(on, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "data-progress"}, [n("el-row", {attrs: {span: 24}}, t._l(t.data, (function (e, i) {
- return n("el-col", {
- key: i,
- attrs: {md: t.span, xs: 24, sm: 12}
- }, [n("div", {staticClass: "item"}, [n("a", {
- attrs: {
- href: e.href ? e.href : "javascript:void(0);",
- target: e.target
- }, on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("div", {staticClass: "item-header"}, [n("avue-count-up", {
- staticClass: "item-count",
- attrs: {animation: t.animation, decimals: t.decimals, end: e.count}
- }), t._v(" "), n("div", {
- staticClass: "item-title",
- domProps: {textContent: t._s(e.title)}
- })], 1), t._v(" "), n("el-progress", {
- attrs: {
- "stroke-width": 15,
- percentage: e.count,
- color: e.color,
- "show-text": !1
- }
- })], 1)])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, rn = Object(i.a)({
- name: "data-icons", data: function () {
- return {}
- }, computed: {
- animation: function () {
- return this.option.animation
- }, decimals: function () {
- return this.option.decimals || 0
- }, span: function () {
- return this.option.span || 4
- }, data: function () {
- return this.option.data
- }, color: function () {
- return this.option.color || "rgb(63, 161, 255)"
- }, discount: function () {
- return this.option.discount || !1
- }
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }
- }), sn = Object(c.a)(rn, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "data-icons"}, [n("el-row", {attrs: {span: 24}}, [t._l(t.data, (function (e, i) {
- return [n("el-col", {key: i, attrs: {xs: 12, sm: 6, md: t.span}}, [n("div", {
- staticClass: "item",
- class: [{"item--easy": t.discount}]
- }, [n("a", {
- attrs: {href: e.href ? e.href : "javascript:void(0);", target: e.target}, on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("div", {
- staticClass: "item-icon",
- style: {color: t.color}
- }, [n("i", {class: e.icon})]), t._v(" "), n("div", {staticClass: "item-info"}, [n("span", [t._v(t._s(e.title))]), t._v(" "), n("avue-count-up", {
- staticClass: "count",
- style: {color: t.color},
- attrs: {animation: t.animation, decimals: t.decimals, end: e.count}
- })], 1)])])])]
- }))], 2)], 1)
- }), [], !1, null, null, null).exports, ln = Object(i.a)({
- name: "data-card", data: function () {
- return {}
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }, computed: {
- span: function () {
- return this.option.span || 6
- }, data: function () {
- return this.option.data || []
- }, colorText: function () {
- return this.option.colorText || "#fff"
- }, bgText: function () {
- return this.option.bgText || "#2e323f"
- }, borderColor: function () {
- return this.option.borderColor || "#2e323f"
- }
- }, created: function () {
- }, mounted: function () {
- }, watch: {}, methods: {}
- }), cn = Object(c.a)(ln, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "data-card"}, [n("el-row", {attrs: {span: 24}}, t._l(t.data, (function (e, i) {
- return n("el-col", {
- key: i,
- attrs: {md: t.span, xs: 24, sm: 12}
- }, [n("div", {staticClass: "item"}, [n("a", {
- attrs: {
- href: e.href ? e.href : "javascript:void(0);",
- target: e.target
- }, on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("img", {staticClass: "item-img", attrs: {src: e.src}}), t._v(" "), n("div", {
- staticClass: "item-text",
- style: {backgroundColor: t.bgText}
- }, [n("h3", {style: {color: t.colorText}}, [t._v(t._s(e.name))]), t._v(" "), n("p", {style: {color: t.colorText}}, [t._v(t._s(e.text))])])])])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, un = Object(i.a)({
- name: "data-display", data: function () {
- return {}
- }, computed: {
- animation: function () {
- return this.option.animation
- }, decimals: function () {
- return this.option.decimals || 0
- }, span: function () {
- return this.option.span || 6
- }, data: function () {
- return this.option.data || []
- }, color: function () {
- return this.option.color || "rgb(63, 161, 255)"
- }
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }, created: function () {
- }, methods: {}
- }), dn = Object(c.a)(un, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "avue-data-display"}, [n("el-row", {attrs: {span: 24}}, t._l(t.data, (function (e, i) {
- return n("el-col", {key: i, attrs: {md: t.span, xs: 12, sm: 12}}, [n("div", {
- staticClass: "item",
- style: {color: t.color}
- }, [n("a", {
- attrs: {href: e.href ? e.href : "javascript:void(0);", target: e.target}, on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("avue-count-up", {
- staticClass: "count",
- attrs: {animation: t.animation, decimals: t.decimals, end: e.count}
- }), t._v(" "), n("span", {staticClass: "splitLine"}), t._v(" "), n("div", {staticClass: "title"}, [t._v(t._s(e.title))])], 1)])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, pn = Object(i.a)({
- name: "data-imgtext", data: function () {
- return {}
- }, computed: {
- span: function () {
- return this.option.span || 6
- }, data: function () {
- return this.option.data || []
- }, color: function () {
- return this.option.color || "rgb(63, 161, 255)"
- }
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }, created: function () {
- }, methods: {}
- }), hn = Object(c.a)(pn, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "avue-data-imgtext"}, [n("el-row", {attrs: {span: 24}}, t._l(t.data, (function (e, i) {
- return n("el-col", {key: i, attrs: {md: t.span, xs: 24, sm: 12}}, [n("div", {
- staticClass: "item",
- style: {color: t.color}
- }, [n("a", {
- attrs: {href: e.href ? e.href : "javascript:void(0);", target: e.target}, on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("div", {staticClass: "item-header"}, [n("img", {
- attrs: {
- src: e.imgsrc,
- alt: ""
- }
- })]), t._v(" "), n("div", {staticClass: "item-content"}, [n("span", [t._v(t._s(e.title))]), t._v(" "), n("p", [t._v(t._s(e.content))])]), t._v(" "), n("div", {staticClass: "item-footer"}, [n("div", {staticClass: "time"}, [n("span", [t._v(t._s(e.time))])]), t._v(" "), n("div", {staticClass: "imgs"}, [n("ul", t._l(e.headimg, (function (t, e) {
- return n("li", {key: e}, [n("el-tooltip", {
- attrs: {
- effect: "dark",
- content: t.name,
- placement: "top-start"
- }
- }, [n("img", {attrs: {src: t.src, alt: ""}})])], 1)
- })), 0)])])])])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, fn = Object(i.a)({
- name: "data-operatext", data: function () {
- return {}
- }, computed: {
- span: function () {
- return this.option.span || 6
- }, data: function () {
- return this.option.data || []
- }
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }, created: function () {
- }, methods: {}
- }), mn = Object(c.a)(fn, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "avue-data-operatext"}, [n("el-row", {attrs: {span: 24}}, t._l(t.data, (function (e, i) {
- return n("el-col", {
- key: i,
- attrs: {md: t.span, xs: 24, sm: 12}
- }, [n("div", {staticClass: "item"}, [n("a", {
- attrs: {href: e.href ? e.href : "javascript:void(0);"},
- on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("div", {
- staticClass: "item-header",
- style: {backgroundColor: e.color, backgroundImage: "url(" + e.colorImg + ")"}
- }, [n("span", {staticClass: "item-title"}, [t._v(t._s(e.title))]), t._v(" "), n("span", {staticClass: "item-subtitle"}, [t._v(t._s(e.subtitle))])]), t._v(" "), n("div", {staticClass: "item-content"}, [n("div", {staticClass: "item-img"}, [n("img", {
- attrs: {
- src: e.img,
- alt: ""
- }
- })]), t._v(" "), n("div", {staticClass: "item-list"}, t._l(e.list, (function (e, i) {
- return n("div", {
- key: i,
- staticClass: "item-row"
- }, [n("span", {staticClass: "item-label"}, [t._v(t._s(e.label))]), t._v(" "), n("span", {staticClass: "item-value"}, [t._v(t._s(e.value))])])
- })), 0)])])])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, bn = Object(i.a)({
- name: "data-rotate", data: function () {
- return {}
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }, computed: {
- animation: function () {
- return this.option.animation
- }, decimals: function () {
- return this.option.decimals || 0
- }, span: function () {
- return this.option.span || 8
- }, data: function () {
- return this.option.data || []
- }
- }, created: function () {
- }, mounted: function () {
- }, watch: {}, methods: {}
- }), vn = Object(c.a)(bn, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "avue-data-rotate"}, [n("el-row", {attrs: {span: 24}}, t._l(t.data, (function (e, i) {
- return n("el-col", {key: i, attrs: {md: t.span, xs: 24, sm: 12}}, [n("div", {
- staticClass: "item",
- style: {backgroundColor: e.color}
- }, [n("div", {staticClass: "item-box"}, [n("avue-count-up", {
- staticClass: "item-count",
- attrs: {decimals: t.decimals, animation: t.animation, end: e.count}
- }), t._v(" "), n("span", {staticClass: "item-title"}, [t._v(t._s(e.title))]), t._v(" "), n("i", {
- staticClass: "item-icon",
- class: e.icon
- })], 1), t._v(" "), n("a", {
- attrs: {href: e.href ? e.href : "javascript:void(0);"}, on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("p", {staticClass: "item-more"}, [t._v("更多"), n("i", {staticClass: "el-icon-arrow-right"})])])])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, yn = Object(i.a)({
- name: "data-pay", props: {
- option: {
- type: Object, default: function () {
- }
- }
- }, computed: {
- animation: function () {
- return this.option.animation
- }, decimals: function () {
- return this.option.decimals || 0
- }, span: function () {
- return this.option.span || 6
- }, data: function () {
- return this.option.data || []
- }
- }
- }), gn = Object(c.a)(yn, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b()}, [n("el-row", {attrs: {span: 24}}, t._l(t.data, (function (e, i) {
- return n("el-col", {
- key: i,
- attrs: {md: t.span, xs: 24, sm: 12}
- }, [n("div", {staticClass: "item"}, [n("div", {
- staticClass: "top",
- style: {backgroundColor: e.color}
- }), t._v(" "), n("div", {staticClass: "header"}, [n("p", {staticClass: "title"}, [t._v(t._s(e.title))]), t._v(" "), n("img", {
- staticClass: "img",
- attrs: {src: e.src, alt: ""}
- }), t._v(" "), e.subtitle ? [n("p", {
- staticClass: "subtitle",
- style: {color: e.color}
- }, [t._v(t._s(e.subtitle))])] : t._e(), t._v(" "), e.money || e.dismoney ? [n("p", {
- staticClass: "money",
- style: {color: e.color}
- }, [n("span", [t._v("¥")]), t._v(" "), n("avue-count-up", {
- staticClass: "b",
- attrs: {decimals: t.decimals, animation: t.animation, end: e.dismoney}
- }), t._v(" "), n("s", [t._v(t._s(e.money))]), t._v(" "), n("em", [t._v(t._s(e.tip))])], 1)] : t._e(), t._v(" "), n("div", {staticClass: "line"}), t._v(" "), n("a", {
- staticClass: "btn",
- style: {backgroundColor: e.color},
- attrs: {href: e.href ? e.href : "javascript:void(0);"},
- on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [t._v(t._s(e.subtext))])], 2), t._v(" "), n("div", {staticClass: "list"}, t._l(e.list, (function (i, o) {
- return n("div", {staticClass: "list-item"}, [i.check ? n("i", {
- staticClass: "list-item-icon list-item--check",
- style: {color: e.color}
- }, [t._v("√")]) : n("i", {staticClass: "list-item-icon list-item--no"}, [t._v("x")]), t._v(" "), n("a", {attrs: {href: i.href ? i.href : "javascript:void(0);"}}, [n("el-tooltip", {
- attrs: {
- effect: "dark",
- disabled: !i.tip,
- placement: "top"
- }
- }, [n("div", {
- attrs: {slot: "content"},
- domProps: {innerHTML: t._s(i.tip)},
- slot: "content"
- }), t._v(" "), n("span", {class: {"list-item--link": i.href}}, [t._v(t._s(i.title))])])], 1)])
- })), 0)])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, _n = Object(i.a)({
- name: "data-price", data: function () {
- return {}
- }, computed: {
- span: function () {
- return this.option.span || 6
- }, data: function () {
- return this.option.data
- }
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }
- }), xn = Object(c.a)(_n, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "data-price"}, [n("el-row", {attrs: {span: 24}}, [t._l(t.data, (function (e, i) {
- return [n("el-col", {
- key: i,
- attrs: {xs: 12, sm: 6, md: t.span}
- }, [n("div", {staticClass: "item item--active"}, [n("a", {
- attrs: {
- href: e.href ? e.href : "javascript:void(0);",
- target: e.target
- }, on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("div", {staticClass: "title"}, [t._v("\n " + t._s(e.title) + "\n ")]), t._v(" "), n("div", {staticClass: "body"}, [n("span", {staticClass: "price"}, [t._v(t._s(e.price))]), t._v(" "), n("span", {staticClass: "append"}, [t._v(t._s(e.append))])]), t._v(" "), n("div", {staticClass: "list"}, t._l(e.list, (function (e, i) {
- return n("p", {key: i}, [t._v("\n " + t._s(e) + "\n ")])
- })), 0)])])])]
- }))], 2)], 1)
- }), [], !1, null, null, null).exports, wn = Object(i.a)({
- name: "data-panel", data: function () {
- return {}
- }, computed: {
- decimals: function () {
- return this.option.decimals || 0
- }, animation: function () {
- return this.option.animation
- }, span: function () {
- return this.option.span || 6
- }, data: function () {
- return this.option.data || []
- }
- }, props: {
- option: {
- type: Object, default: function () {
- }
- }
- }, created: function () {
- }, methods: {}
- }), Sn = {
- DataTabs: Je,
- DataCardText: tn,
- DataBox: nn,
- DataProgress: an,
- DataIcons: sn,
- DataCard: cn,
- DataDisplay: dn,
- DataImgText: hn,
- DataOperaText: mn,
- DataRotate: vn,
- DataPay: gn,
- DataPrice: xn,
- DataPanel: Object(c.a)(wn, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {staticClass: "avue-data-panel"}, [n("el-row", {attrs: {span: 24}}, t._l(t.data, (function (e, i) {
- return n("el-col", {
- key: i,
- attrs: {md: t.span, xs: 24, sm: 12}
- }, [n("a", {
- attrs: {href: e.href ? e.href : "javascript:void(0);"}, on: {
- click: function (t) {
- e.click && e.click(e)
- }
- }
- }, [n("div", {staticClass: "item"}, [n("div", {staticClass: "item-icon"}, [n("i", {
- class: e.icon,
- style: {color: e.color}
- })]), t._v(" "), n("div", {staticClass: "item-info"}, [n("div", {staticClass: "item-title"}, [t._v(t._s(e.title))]), t._v(" "), n("avue-count-up", {
- staticClass: "item-count",
- attrs: {animation: t.animation, decimals: t.decimals, end: e.count}
- })], 1)])])])
- })), 1)], 1)
- }), [], !1, null, null, null).exports
- }, On = {
- name: F.i + F.j,
- homeurl: "${HOME_URL}",
- echart: ["common", "map", "pictorialbar", "wordcloud", "scatter", "bar", "line", "pie", "gauge", "funnel", "radar"]
- }, Cn = {
- props: {
- click: Function,
- stylesFormatter: Function,
- dataFormatter: Function,
- titleFormatter: Function,
- labelFormatter: Function,
- clickFormatter: Function,
- sqlFormatter: Function,
- formatter: Function,
- echartFormatter: Function,
- width: {type: [Number, String], default: 600},
- height: {type: [Number, String], default: 600},
- theme: {type: String},
- animation: {type: Boolean, default: !0},
- child: {
- type: Object, default: function () {
- return {}
- }
- },
- sql: {type: String},
- time: {type: Number, default: 0},
- url: {type: String},
- disabled: {type: Boolean, default: !0},
- dataType: {type: Number, default: 0},
- dataQuery: {
- type: Object, default: function () {
- return {}
- }
- },
- homeUrl: {type: String},
- dataAppend: {type: Boolean, default: !1},
- dataMethod: {type: String, default: "get"},
- id: {type: String, default: "main_" + (new Date).getTime()},
- data: {type: [Object, String, Array]},
- component: {
- type: Object, default: function () {
- return {}
- }
- },
- option: {
- type: Object, default: function () {
- return {}
- }
- }
- }, data: function () {
- return {
- propQuery: {},
- dataCount: 0,
- headerHeight: "",
- checkChart: "",
- myChart: "",
- dataChart: [],
- dataUrl: "",
- key: !1,
- isChart: !1,
- styles: {}
- }
- }, watch: {
- echartFormatter: function () {
- this.updateChart()
- }, styleChartName: function () {
- var t = this;
- this.$nextTick((function () {
- t.myChart && t.myChart.resize()
- }))
- }, url: {
- handler: function (t) {
- this.dataUrl = t || ""
- }, deep: !0, immediate: !0
- }, data: {
- handler: function () {
- this.updateData()
- }, deep: !0, immediate: !0
- }, width: function () {
- this.updateData()
- }, height: function () {
- this.updateData()
- }, theme: function () {
- this.myChart.dispose(), this.init(), this.updateData()
- }, option: {
- handler: function () {
- this.myChart && this.isChart && this.updateData()
- }, deep: !0, immediate: !0
- }
- }, computed: {
- dataChartLen: function () {
- return (this.dataChart || []).length
- }, switchTheme: function () {
- return this.vaildData(this.option.switchTheme, !1)
- }, name: function () {
- return this.$el.className.replace(On.name, "")
- }, minWidth: function () {
- var t = this.option.minWidth;
- if (t > this.width) return t
- }, isApi: function () {
- return 1 === this.dataType
- }, isSql: function () {
- return 2 === this.dataType
- }, style: function () {
- return this.component.style || {}
- }, styleChartName: function () {
- return {width: Object(J.v)(this.minWidth || this.width), height: Object(J.v)(this.height)}
- }, styleSizeName: function () {
- var t = this;
- return Object.assign({
- width: Object(J.v)(this.width),
- height: Object(J.v)(this.height)
- }, t.minWidth ? {overflowX: "auto", overflowY: "hidden"} : {}, this.styles)
- }
- }, mounted: function () {
- this.init()
- }, methods: {
- init: function () {
- if (window.echarts) {
- var t = this.$refs[this.id];
- t && (this.isChart = On.echart.includes(this.name), this.isChart && (this.myChart = window.echarts.init(t, this.theme)), "datav" == this.name && (this.isChart = !0, this.updateData()))
- } else D.a.logs("echarts")
- }, updateUrl: function (t) {
- this.dataUrl = t, this.updateData()
- }, updateData: function () {
- var t = this;
- return new Promise((function (e, n) {
- if (t.resetData && t.resetData(), !t.key) {
- t.key = !0;
- var i = function () {
- t.key = !1;
- var n = function () {
- t.isChart && t.updateChart(), t.myChart && t.bindClick(), "function" == typeof t.stylesFormatter && (t.styles = t.stylesFormatter(t.dataChart) || {}), e(t.dataChart)
- };
- if (t.isApi) {
- var i = t.dataUrl.replace(On.homeurl, t.homeUrl), o = Object(J.p)(i), a = o.url,
- r = Object.assign(o.params, t.dataQuery, t.propQuery);
- if (!window.axios) return void D.a.logs("axios");
- t.$axios[t.dataMethod](a, "get" === t.dataMethod ? {params: r} : "post" === t.dataMethod ? r : void 0).then((function (e) {
- !function (e) {
- var i = "function" == typeof t.dataFormatter ? t.dataFormatter(e.data) : e.data || {};
- t.dataAppend ? i.forEach((function (e) {
- t.dataCount++, setTimeout((function () {
- t.dataChart.unshift(e)
- }), 1500 * t.dataCount)
- })) : t.dataChart = i, n()
- }(e)
- }))
- } else t.isSql ? t.sqlFormatter(t.sql).then((function (e) {
- "function" == typeof t.dataFormatter ? t.dataChart = t.dataFormatter(e.data.data) : t.dataChart = e.data.data, n()
- })) : ("function" == typeof t.dataFormatter ? t.dataChart = t.dataFormatter(t.data) : t.dataChart = t.data, n())
- };
- t.$nextTick((function () {
- i(), clearInterval(t.checkChart), 0 !== t.time && t.disabled && (t.checkChart = setInterval((function () {
- i()
- }), t.time))
- }))
- }
- }))
- }, getLabelFormatter: function (t) {
- return this.labelFormatter ? this.labelFormatter(t, this.dataChart) : t.value
- }, bindClick: function () {
- var t = this;
- this.myChart.off("click"), this.myChart.on("click", (function (e) {
- e.marker && t.clickFormatter && t.clickFormatter({
- type: t.name,
- name: e.name,
- value: e.value[2] || e.value,
- data: t.dataChart
- })
- }))
- }, getColor: function (t, e) {
- var n = this.option.barColor || [];
- if (n[t]) {
- var i = n[t].color1, o = n[t].color2, a = .01 * (n[t].postion || .9);
- return e ? i : o ? {
- type: "linear",
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [{offset: 0, color: i}, {offset: a, color: o}],
- global: !1
- } : i
- }
- }, ishasprop: function (t, e, n) {
- return Object.assign(t ? e : {}, n)
- }
- }
- }, kn = function (t) {
- return t.name = F.j + t.name, t.mixins = t.mixins || [], t.mixins.push(Cn), Object(i.a)(t)
- }, jn = kn({
- name: "bar", computed: {
- x2: function () {
- return this.option.gridX2 || 20
- }
- }, methods: {
- updateChart: function () {
- var t = this, e = this.deepClone(this.dataChart), n = {
- title: this.ishasprop(this.option.titleShow, {
- text: this.option.title,
- subtext: this.option.subtext || "",
- textStyle: {color: this.option.titleColor || "#333", fontSize: this.option.titleFontSize || 16},
- left: this.option.titlePostion || "auto",
- subtextStyle: {color: this.option.subTitleColor || "#aaa", fontSize: this.option.subTitleFontSize || 14}
- }, {}),
- tooltip: this.ishasprop(this.formatter, {
- formatter: function (e) {
- return t.formatter(e, t.dataChart)
- }
- }, {textStyle: {fontSize: this.option.tipFontSize, color: this.option.tipColor || "#fff"}}),
- grid: {
- left: this.option.gridX || 20,
- top: this.option.gridY || 60,
- right: this.x2,
- bottom: this.option.gridY2 || 60
- },
- legend: {
- show: this.vaildData(this.option.legend, !1),
- orient: this.option.legendOrient || "vertical",
- x: this.option.legendPostion || "left",
- top: 0,
- right: this.x2,
- textStyle: {fontSize: this.option.legendFontSize || 12},
- data: (e.series || []).map((function (e, n) {
- return {name: e.name, textStyle: t.ishasprop(!t.switchTheme, {color: t.getColor(n, !0)}, {})}
- }))
- },
- xAxis: {
- type: this.option.category ? "value" : "category",
- name: this.option.xAxisName,
- axisLine: {lineStyle: {color: this.option.lineColor || "#333"}},
- data: e.categories || [],
- inverse: this.vaildData(this.option.xAxisInverse, !1),
- show: this.vaildData(this.option.xAxisShow, !0),
- splitLine: {show: this.vaildData(this.option.xAxisSplitLineShow, !1)},
- axisLabel: {
- interval: this.option.xAxisinterval || "auto",
- rotate: this.option.xAxisRotate || 0,
- textStyle: {color: this.option.nameColor || "#333", fontSize: this.option.xNameFontSize || 14}
- }
- },
- yAxis: {
- type: this.option.category ? "category" : "value",
- name: this.option.yAxisName,
- data: e.categories || [],
- axisLabel: {
- textStyle: {
- color: this.option.nameColor || "#333",
- fontSize: this.option.yNameFontSize || 14
- }
- },
- axisLine: {lineStyle: {color: this.option.lineColor || "#333"}},
- inverse: this.vaildData(this.option.yAxisInverse, !1),
- show: this.vaildData(this.option.yAxisShow, !0),
- splitLine: {show: this.vaildData(this.option.yAxisSplitLineShow, !0)}
- },
- series: function () {
- t.option.barColor;
- return (e.series || []).map((function (e, n) {
- return Object.assign(e, {
- type: "bar",
- stack: e.stack,
- barWidth: t.option.barWidth || 16,
- barMinHeight: t.option.barMinHeight || 0,
- itemStyle: t.ishasprop(!t.switchTheme, {color: t.getColor(n)}, {barBorderRadius: t.option.barRadius || 0}),
- label: {
- show: t.vaildData(t.option.labelShow, !1),
- position: "top",
- formatter: function (e) {
- return t.getLabelFormatter(e)
- },
- textStyle: {
- fontSize: t.option.labelShowFontSize || 14,
- color: t.option.labelShowColor || "#333",
- fontWeight: t.option.labelShowFontWeight || 500
- }
- }
- })
- }))
- }()
- };
- this.myChart.resize(), this.myChart.setOption(n, !0)
- }
- }
- }), Dn = Object(c.a)(jn, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b(), style: this.styleSizeName}, [e("div", {
- ref: this.id,
- style: this.styleChartName
- })])
- }), [], !1, null, null, null).exports, En = kn({
- name: "pie", computed: {
- labelShow: function () {
- return this.vaildData(this.option.labelShow, !1)
- }, x2: function () {
- return this.option.gridX2 || 20
- }, fontSize: function () {
- return this.option.fontSize || 14
- }
- }, methods: {
- updateChart: function () {
- var t = this, e = this.deepClone(this.dataChart) || [], n = {
- title: this.ishasprop(this.option.titleShow, {
- text: this.option.title,
- subtext: this.option.subtext || "",
- textStyle: {color: this.option.titleColor || "#333", fontSize: this.option.titleFontSize || 16},
- left: this.option.titlePostion || "auto",
- subtextStyle: {color: this.option.subTitleColor || "#aaa", fontSize: this.option.subTitleFontSize || 14}
- }, {}),
- tooltip: Object.assign(t.formatter ? {
- formatter: function (e) {
- return t.formatter(e, t.dataChart)
- }
- } : {}, {textStyle: {fontSize: t.option.tipFontSize, color: t.option.tipColor || "#fff"}}),
- grid: {
- left: this.option.gridX || 20,
- top: this.option.gridY || 60,
- right: this.x2,
- bottom: this.option.gridY2 || 60
- },
- legend: {
- show: this.vaildData(this.option.legend, !1),
- orient: this.option.legendOrient || "vertical",
- x: this.option.legendPostion || "left",
- top: 0,
- right: this.x2,
- textStyle: {fontSize: this.option.legendFontSize || 12},
- data: e.map((function (e, n) {
- return {name: e.name, textStyle: t.ishasprop(!t.switchTheme, {color: t.getColor(n, !0)}, {})}
- }))
- },
- series: function () {
- t.option.barColor;
- return [{
- type: "pie",
- roseType: t.option.roseType ? "radius" : "",
- radius: t.option.radius ? ["40%", "55%"] : "50%",
- center: ["50%", "60%"],
- animationType: "scale",
- animationEasing: "elasticOut",
- animationDelay: function (t) {
- return 200 * Math.random()
- },
- label: {normal: {show: t.labelShow, formatter: "{b}:{c}({d}%)", textStyle: {fontSize: t.fontSize}}},
- data: function () {
- var n = e;
- return t.option.notCount && (n = n.filter((function (t) {
- if (0 !== t.value && t.value) return !0
- }))), t.option.sort && n.sort((function (t, e) {
- return t.value - e.value
- })), n
- }(),
- itemStyle: t.ishasprop(!t.switchTheme, {
- color: function (e) {
- return t.getColor(e.dataIndex)
- }
- }, {emphasis: {shadowBlur: 10, shadowOffsetX: 0, shadowColor: "rgba(0, 0, 0, 0.5)"}})
- }]
- }()
- };
- this.myChart.resize(), this.myChart.setOption(n, !0)
- }
- }
- }), Mn = Object(c.a)(En, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b(), style: t.styleSizeName}, [n("div", {
- class: t.b("title"),
- domProps: {innerHTML: t._s(t.titleFormatter && t.titleFormatter(t.dataChart))}
- }), t._v(" "), n("div", {ref: t.id, style: t.styleChartName})])
- }), [], !1, null, null, null).exports, Tn = kn({
- name: "line", computed: {
- x2: function () {
- return this.option.gridX2 || 20
- }
- }, methods: {
- updateChart: function () {
- var t = this, e = this.deepClone(this.dataChart), n = {
- title: this.ishasprop(this.option.titleShow, {
- text: this.option.title,
- subtext: this.option.subtext || "",
- textStyle: {color: this.option.titleColor || "#333", fontSize: this.option.titleFontSize || 16},
- left: this.option.titlePostion || "auto",
- subtextStyle: {color: this.option.subTitleColor || "#aaa", fontSize: this.option.subTitleFontSize || 14}
- }, {}),
- tooltip: Object.assign(t.formatter ? {
- formatter: function (e) {
- return t.formatter(e, t.dataChart)
- }
- } : {}, {
- backgroundColor: "rgba(0,0,0,1)",
- trigger: "axis",
- textStyle: {fontSize: t.option.tipFontSize, color: t.option.tipColor || "#fff"}
- }),
- grid: {
- left: this.option.gridX || 20,
- top: this.option.gridY || 60,
- right: this.x2,
- bottom: this.option.gridY2 || 60
- },
- legend: {
- show: this.vaildData(this.option.legend, !1),
- orient: this.option.legendOrient || "horizontal",
- x: this.option.legendPostion || "right",
- top: 0,
- right: this.x2,
- textStyle: {fontSize: this.option.legendFontSize || 12},
- data: (e.series || []).map((function (e, n) {
- return {name: e.name, textStyle: {color: t.getColor(n, !0)}}
- }))
- },
- xAxis: {
- type: this.option.category ? "value" : "category",
- name: this.option.xAxisName,
- axisLine: {lineStyle: {color: this.option.lineColor || "#333"}},
- data: e.categories || [],
- inverse: this.vaildData(this.option.xAxisInverse, !1),
- show: this.vaildData(this.option.xAxisShow, !0),
- splitLine: {show: this.vaildData(this.option.xAxisSplitLineShow, !1)},
- axisLabel: {
- textStyle: {
- color: this.option.nameColor || "#333",
- fontSize: this.option.xNameFontSize || 14
- }
- }
- },
- yAxis: {
- type: this.option.category ? "category" : "value",
- name: this.option.yAxisName,
- data: e.categories || [],
- axisLabel: {
- textStyle: {
- color: this.option.nameColor || "#333",
- fontSize: this.option.yNameFontSize || 14
- }
- },
- axisLine: {lineStyle: {color: this.option.lineColor || "#333"}},
- inverse: this.vaildData(this.option.yAxisInverse, !1),
- show: this.vaildData(this.option.yAxisShow, !0),
- splitLine: {show: this.vaildData(this.option.yAxisSplitLineShow, !0)}
- },
- series: (e.series || []).map((function (e, n) {
- return Object.assign(e, {
- type: "line",
- smooth: t.vaildData(t.option.smooth, !0),
- symbolSize: t.option.symbolSize || 10,
- areaStyle: function () {
- if (t.option.areaStyle) return {opacity: .7}
- }(),
- lineStyle: {width: t.option.lineWidth || 1},
- itemStyle: t.ishasprop(!t.switchTheme, {color: t.getColor(n)}, {}),
- label: {
- show: t.vaildData(t.option.labelShow, !1),
- position: "top",
- formatter: function (e) {
- return t.getLabelFormatter(e)
- },
- textStyle: {
- fontSize: t.option.labelShowFontSize || 14,
- color: t.option.labelShowColor || "#333",
- fontWeight: t.option.labelShowFontWeight || 500
- }
- }
- })
- }))
- };
- this.myChart.resize(), this.myChart.setOption(n, !0)
- }
- }
- }), An = Object(c.a)(Tn, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b(), style: this.styleSizeName}, [e("div", {
- ref: this.id,
- style: this.styleChartName
- })])
- }), [], !1, null, null, null).exports;
- function In(t, e, n) {
- return e in t ? Object.defineProperty(t, e, {
- value: n,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = n, t
- }
- var Pn = kn({
- name: "table", data: function () {
- return {
- visible: !1,
- listVisible: !1,
- columnData: [],
- indexWidth: 80,
- top: 0,
- prop: "",
- scrollCheck: "",
- activeIndex: 0,
- query: {}
- }
- }, watch: (Re = {
- columnOption: {
- handler: function () {
- var t = this;
- this.columnData = [], this.columnOption.forEach((function (e) {
- 1 != e.hide && t.columnData.push(e.prop)
- }))
- }, immediate: !0
- }, scrollCount: function () {
- this.setTime()
- }, count: function () {
- this.setTime()
- }, scrollTime: function () {
- this.setTime()
- }
- }, In(Re, "count", (function () {
- this.setTime()
- })), In(Re, "scroll", {
- handler: function (t) {
- this.setTime()
- }, immediate: !0
- }), Re), computed: {
- listOption: function () {
- var t = this;
- return Object.assign({
- align: "center",
- headerAlign: "center",
- size: "mini",
- menu: !1,
- header: !1,
- height: 500,
- sumText: "合计",
- showSummary: !0,
- column: this.option.column
- }, {
- sumColumnList: t.totalList.map((function (t) {
- return {name: t, type: "sum"}
- }))
- })
- }, totalList: function () {
- return this.option.totalList || []
- }, totalFlag: function () {
- return !this.validatenull(this.totalList)
- }, totalData: function () {
- var t = this, e = {};
- return this.totalList.forEach((function (n) {
- t.dataChart.forEach((function (t) {
- e[n] = (e[n] || 0) + Number(t[n]), e[n] = Number(e[n].toFixed(2))
- }))
- })), e
- }, columnShow: function () {
- return this.option.columnShow
- }, columnViews: function () {
- return this.option.columnViews
- }, columnShowWhite: function () {
- return this.option.columnShowWhite || []
- }, columnShowList: function () {
- return this.option.columnShowList || []
- }, dataTabelLen: function () {
- return this.dataChart.length
- }, dataTabel: function () {
- var t = this.dataChart;
- return this.validatenull(this.prop) || (t = this.sortArrys(t, this.prop)), t
- }, allHeight: function () {
- var t = this.count - (this.totalFlag ? 2 : 1);
- return (this.dataChartLen - t) * this.lineHeight
- }, count: function () {
- return (this.option.count || 10) + 1
- }, dataChartLen: function () {
- return (this.dataChart || []).length
- }, lineHeight: function () {
- return parseInt(this.height / this.count)
- }, index: function () {
- return this.option.index
- }, scroll: function () {
- return this.option.scroll
- }, scrollTime: function () {
- return this.option.scrollTime || 5e3
- }, fontSize: function () {
- return this.option.fontSize || 14
- }, scrollCount: function () {
- return this.option.scrollCount || this.count
- }, speed: function () {
- return this.scrollCount * this.lineHeight
- }, styleThName: function () {
- return {
- fontSize: this.setPx(this.fontSize),
- background: this.option.headerBackground || "rgba(0, 0, 0, 0.01)",
- color: this.option.headerColor || "rgba(154, 168, 212, 1)"
- }
- }, columnOption: function () {
- return this.crudOption.column || []
- }, styleTdName: function () {
- return {
- fontSize: this.setPx(this.fontSize),
- lineHeight: this.setPx(this.lineHeight),
- height: this.setPx(this.lineHeight),
- color: this.option.bodyColor || "rgba(154, 168, 212, 1)",
- borderColor: this.option.borderColor || "rgba(51, 65, 107, 1)"
- }
- }, styleMenuName: function () {
- return {lineHeight: this.setPx(this.lineHeight), color: this.option.headerColor || "rgba(154, 168, 212, 1)"}
- }, sortableProp: function () {
- return this.option.sortableProp || "order"
- }, crudOption: function () {
- return Object.assign(this.option, {menu: !1, align: "center", headerAlign: "center", header: !1})
- }
- }, props: {
- option: {
- type: Object, default: function () {
- return {}
- }
- }
- }, methods: {
- styleWidth: function (t) {
- return {width: this.setPx(t), flex: t ? "initial" : 1}
- }, resetData: function () {
- this.top = 0
- }, handleSortable: function (t) {
- this.propQuery[this.sortableProp] = t, this.updateData()
- }, setTime: function () {
- var t = this;
- this.top = 0, clearInterval(this.scrollCheck), setTimeout((function () {
- t.scroll && (t.scrollCheck = setInterval((function () {
- t.top <= -t.allHeight ? t.top = 0 : t.top = t.top - t.speed
- }), t.scrollTime))
- }), 2e3)
- }, styleTrName: function (t) {
- var e = {lineHeight: this.setPx(this.lineHeight)};
- return e.background = t % 2 == 0 ? this.option.othColor : this.option.nthColor, e
- }, rowClick: function (t, e) {
- this.clickFormatter && this.clickFormatter({type: e, value: t, data: this.dataChart})
- }, handleClick: function (t, e) {
- this.activeIndex = e, this.query.type = t, this.updateData()
- }
- }
- }), $n = Object(c.a)(Pn, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- class: t.b(),
- style: [t.styleSizeName, {overflow: t.scroll ? "hidden" : "inherit"}]
- }, [n("el-dialog", {
- attrs: {
- visible: t.visible,
- "modal-append-to-body": "",
- "append-to-body": "",
- title: "数据显隐",
- width: "30%"
- }, on: {
- "update:visible": function (e) {
- t.visible = e
- }
- }
- }, [n("avue-checkbox", {
- attrs: {dic: t.columnOption, props: {value: "prop"}},
- model: {
- value: t.columnData, callback: function (e) {
- t.columnData = e
- }, expression: "columnData"
- }
- })], 1), t._v(" "), n("el-dialog", {
- class: t.b("allview"),
- attrs: {visible: t.listVisible, "modal-append-to-body": "", title: "详细数据", "append-to-body": "", width: "80%"},
- on: {
- "update:visible": function (e) {
- t.listVisible = e
- }
- }
- }, [n("avue-crud", {
- attrs: {
- option: t.listOption,
- data: t.dataTabel
- }
- })], 1), t._v(" "), n("div", {
- class: t.b("table"),
- style: t.styleTdName
- }, [n("div", {class: t.b("tr")}, [t.index ? n("div", {
- class: t.b("td"),
- style: [t.styleThName, t.styleWidth(t.indexWidth)]
- }, [n("div", {class: t.b("menu"), style: t.styleMenuName}, [t.columnShow ? n("i", {
- staticClass: "el-icon-menu",
- on: {
- click: function (e) {
- t.visible = !0
- }
- }
- }) : t._e(), t._v(" "), t.columnViews ? n("i", {
- staticClass: "el-icon-view", on: {
- click: function (e) {
- t.listVisible = !0
- }
- }
- }) : t._e()])]) : t._e(), t._v(" "), t._l(t.columnOption, (function (e, i) {
- return [(t.columnData || []).includes(e.prop) ? n("div", {
- key: i,
- class: t.b("td"),
- style: [t.styleThName, t.styleWidth(e.width)],
- on: {
- click: function (n) {
- return t.handleSortable(e.prop)
- }
- }
- }, [t._v("\n " + t._s(e.label) + "\n ")]) : t._e()]
- }))], 2), t._v(" "), t.totalFlag ? n("div", {class: t.b("tr")}, [t.index ? n("div", {
- class: [t.b("td")],
- style: [t.styleWidth(t.indexWidth)]
- }, [t._v("\n 合计\n ")]) : t._e(), t._v(" "), t._l(t.columnOption, (function (e, i) {
- return [(t.columnData || []).includes(e.prop) ? n("div", {
- key: i,
- class: t.b("td"),
- style: [t.styleWidth(e.width)]
- }, [t._v("\n " + t._s(t.totalData[e.prop]) + "\n ")]) : t._e()]
- }))], 2) : t._e(), t._v(" "), n("div", {
- ref: "body",
- class: t.b("body"),
- style: t.styleSizeName
- }, [n("transition-group", {
- attrs: {
- "enter-active-class": t.option.enterActiveClass,
- "leave-active-class": t.option.leaveActiveClass,
- tag: "div"
- }
- }, t._l(t.dataTabel, (function (e, i) {
- return n("div", {
- key: t.dataTabelLen - i,
- class: t.b("tr", ["line"]),
- style: [t.styleTrName(i), {top: t.setPx(i * t.lineHeight + t.top)}],
- on: {
- click: function (n) {
- return t.rowClick(e, i)
- }
- }
- }, [t.index ? n("div", {
- key: t.index,
- class: t.b("td"),
- style: [t.styleWidth(t.indexWidth)]
- }, [n("div", {class: t.b("index", [i + 1 + ""])}, [t._v(" " + t._s(i + 1))])]) : t._e(), t._v(" "), t._l(t.columnOption, (function (i, o) {
- return [(t.columnData || []).includes(i.prop) ? n("div", {
- key: o,
- class: t.b("td"),
- style: [t.styleTdName, t.styleWidth(i.width)]
- }, [n("el-tooltip", {
- staticClass: "item",
- attrs: {effect: "dark", content: e[i.prop], placement: "top"}
- }, [n("span", {domProps: {innerHTML: t._s(e[i.prop])}})])], 1) : t._e()]
- }))], 2)
- })), 0)], 1)])], 1)
- }), [], !1, null, null, null).exports, Ln = kn({
- name: "flop", data: function () {
- return {statusDIC: [".", ","]}
- }, computed: {
- isArray: function () {
- return Array.isArray(this.dataChart)
- }, decimals: function () {
- return this.option.decimals || 0
- }, listData: function () {
- return this.isArray ? this.dataChart : [this.dataChart]
- }, isWhole: function () {
- return this.vaildData(this.option.whole, !1)
- }, type: function () {
- return this.option.type
- }, isBorder: function () {
- return "border" === this.type
- }, isImg: function () {
- return "img" === this.type
- }, span: function () {
- return this.option.span || 1
- }, prefixStyle: function () {
- return {
- display: this.option.prefixInline ? "inline-block" : "block",
- textAlign: this.option.prefixTextAlign,
- marginBottom: this.setPx(this.option.prefixSplity),
- marginRight: this.setPx(this.option.prefixSplitx),
- color: this.option.prefixColor || "#fff",
- fontSize: this.setPx(this.option.prefixFontSize || 24)
- }
- }, suffixStyle: function () {
- return {
- display: this.option.suffixInline ? "inline-block" : "block",
- textAlign: this.option.suffixTextAlign,
- marginTop: this.setPx(this.option.suffixSplity),
- marginLeft: this.setPx(this.option.suffixSplitx),
- color: this.option.suffixColor || "#fff",
- fontSize: this.setPx(this.option.suffixFontSize || 24)
- }
- }, styleParentSize: function () {
- var t = {boxSizing: "border-box", display: "inline-block", width: 100 / this.span - 1 + "%"};
- return this.option.splitx && (t.paddingRight = this.setPx(this.option.splitx)), this.option.splity && (t.paddingBottom = this.setPx(this.option.splity)), t
- }, styleParentName: function () {
- var t = {};
- return this.isImg || this.isBorder || (t = Object.assign(t, {
- backgroundImage: "url(".concat(this.option.backgroundImage, ")"),
- backgroundColor: this.option.backgroundColor
- })), this.option.padding && (t.padding = this.setPx(this.option.padding)), t
- }, styleName: function () {
- var t, e = this;
- return Object.assign((t = {}, e.option.splitx && (t.marginRight = e.setPx(e.option.splitx)), e.option.splity && (t.marginBottom = e.setPx(e.option.splity)), e.option.backgroundImage && (t = Object.assign(t, {
- backgroundImage: "url(".concat(e.option.backgroundImage, ")"),
- backgroundSize: "100% 100%"
- })), t), {
- textAlign: this.option.textAlign,
- backgroundColor: this.option.backgroundColor,
- color: this.option.color || "#fff",
- fontSize: this.setPx(this.option.fontSize || 64),
- fontWeight: this.option.fontWeight
- }, "img" === e.type ? {borderImageSource: "url(".concat(e.option.backgroundBorder, ")")} : "border" === e.type ? {
- borderColor: e.option.borderColor || "#fff",
- borderStyle: "solid",
- borderWidth: e.setPx(e.option.borderWidth)
- } : void 0)
- }
- }, props: {
- option: {
- type: Object, default: function () {
- return {}
- }
- }
- }, created: function () {
- }, methods: {
- handleClick: function (t, e) {
- this.clickFormatter && this.clickFormatter({type: e, value: t, data: this.dataChart})
- }, getValByArray: function (t, e) {
- return this.isArray ? t[e] : this.option[e]
- }
- }
- }), Nn = Object(c.a)(Ln, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b(), style: t.styleSizeName}, t._l(t.listData, (function (e, i) {
- return n("div", {
- key: i,
- style: t.styleParentSize
- }, [n("el-tooltip", {
- style: [t.styleParentName, {backgroundColor: e.backgroundColor || t.option.backgroundColor}],
- attrs: {disabled: !e.formatter, placement: "top-start"}
- }, [n("div", {
- attrs: {slot: "content"},
- domProps: {innerHTML: t._s(e.formatter && e.formatter())},
- slot: "content"
- }), t._v(" "), n("div", {
- class: t.b("item", {
- none: t.statusDIC.includes(e) || "" === t.type,
- whole: t.isWhole,
- img: t.isWhole && (t.isImg || t.isBorder)
- }), style: t.isWhole ? t.styleName : "", on: {
- click: function (n) {
- return t.handleClick(e, i)
- }
- }
- }, [t.getValByArray(e, "prefixText") ? n("div", {style: t.prefixStyle}, [t._v(t._s(t.getValByArray(e, "prefixText")))]) : t._e(), t._v(" "), t.isWhole ? n("avue-count-up", {
- attrs: {
- decimals: t.decimals,
- end: e.data || e.value
- }
- }) : n("div", {class: t.b("count")}, t._l((e.data || e.value) + "".split(","), (function (e, i) {
- return n("div", {
- key: i,
- class: t.b("item", {none: t.statusDIC.includes(e) || "" === t.type, img: t.isImg}),
- style: t.styleName,
- on: {
- click: function (n) {
- return t.handleClick(e, i)
- }
- }
- }, [t.statusDIC.includes(e) ? n("div", [t._v(t._s(e))]) : n("avue-count-up", {
- attrs: {
- decimals: t.decimals,
- end: e
- }
- })], 1)
- })), 0), t._v(" "), t.getValByArray(e, "suffixText") ? n("div", {style: t.suffixStyle}, [t._v(t._s(t.getValByArray(e, "suffixText")))]) : t._e()], 1)])], 1)
- })), 0)
- }), [], !1, null, null, null).exports, zn = n(19), Bn = n.n(zn), Fn = kn({
- name: "datetime", data: function () {
- return {date: new Date}
- }, computed: {
- nowDate: function () {
- if ("day" === this.option.format) return "星期" + Object(T.b)();
- var t = (this.option.format || "yyyy-MM-dd hh:mm:ss").replace("dd", "DD").replace("yyyy", "YYYY");
- return Bn()(this.date).format(t)
- }, styleName: function () {
- return {
- width: "100%",
- height: "100%",
- textAlign: this.option.textAlign,
- letterSpacing: this.setPx(this.option.split),
- textIndent: this.setPx(this.option.split),
- backgroundColor: this.option.backgroundColor,
- fontWeight: this.option.fontWeight || "normal",
- fontSize: (this.option.fontSize || 30) + "px",
- color: this.option.color || "#333"
- }
- }
- }, created: function () {
- var t = this;
- setInterval((function () {
- t.date = new Date
- }), 1e3)
- }, props: {
- option: {
- type: Object, default: function () {
- return {}
- }
- }
- }, methods: {
- handleClick: function () {
- this.clickFormatter && this.clickFormatter({data: this.dataChart})
- }
- }
- }), Rn = Object(c.a)(Fn, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {
- ref: "main",
- class: this.b(),
- style: this.styleSizeName,
- on: {click: this.handleClick}
- }, [e("p", {style: this.styleName}, [this._v(this._s(this.nowDate))])])
- }), [], !1, null, null, null).exports, Kn = kn({
- name: "text", data: function () {
- return {check: "", date: new Date, left: 0}
- }, computed: {
- scroll: function () {
- return this.vaildData(this.option.scroll, !1)
- }, linkHref: function () {
- return this.option.linkHref || "#"
- }, linkTarget: function () {
- return this.option.linkTarget || "_self"
- }, step: function () {
- return this.option.step || 5
- }, speed: function () {
- return this.option.speed || 100
- }, lineHeight: function () {
- return this.option.lineHeight || 40
- }, fontSize: function () {
- return this.option.fontSize || 30
- }, split: function () {
- return this.option.split
- }, textWidth: function () {
- return (this.dataChart.value || "").length * this.fontSize
- }, styleName: function () {
- return {
- width: this.scroll ? this.setPx(this.textWidth) : "auto",
- transform: "translateX(" + this.left + "px)",
- textAlign: this.option.textAlign,
- letterSpacing: this.setPx(this.split),
- textIndent: this.setPx(this.split),
- backgroundColor: this.option.backgroundColor,
- fontWeight: this.option.fontWeight || "normal",
- fontSize: this.fontSize + "px",
- lineHeight: this.lineHeight + "px",
- color: this.option.color || "#333"
- }
- }
- }, watch: {
- scroll: function () {
- this.move()
- }, speed: function () {
- this.move()
- }
- }, created: function () {
- var t = this;
- setInterval((function () {
- t.date = new Date
- }), 1e3)
- }, mounted: function () {
- this.move()
- }, methods: {
- handleClick: function () {
- this.clickFormatter && this.clickFormatter({data: this.dataChart})
- }, move: function () {
- var t = this;
- clearInterval(this.check), this.scroll ? this.check = setInterval((function () {
- t.left < -t.textWidth && (t.left = t.width), t.left = t.left - t.step
- }), this.speed) : this.left = 0
- }
- }, props: {
- option: {
- type: Object, default: function () {
- return {}
- }
- }
- }
- }), Wn = Object(c.a)(Kn, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- ref: "main",
- class: t.b(),
- style: t.styleSizeName,
- on: {click: t.handleClick}
- }, [n("div", {ref: "box", class: t.b("box")}, [n("a", {
- ref: "text",
- class: t.b("text"),
- style: t.styleName,
- attrs: {href: t.linkHref, target: t.linkTarget}
- }, [t._v(t._s(t.dataChart.value))])])])
- }), [], !1, null, null, null).exports, Un = kn({
- name: "swiper", data: function () {
- return {}
- }, computed: {
- styleName: function () {
- return {opacity: this.opacity}
- }, indicator: function () {
- return this.opacity.indicator || "none"
- }, opacity: function () {
- return .01 * (this.option.opacity || 100)
- }, type: function () {
- return this.option.type || ""
- }, interval: function () {
- return this.option.interval || 5e3
- }
- }, created: function () {
- }, mounted: function () {
- }, methods: {
- handleClick: function (t, e) {
- this.clickFormatter && this.clickFormatter({type: e, value: t, data: this.dataChart})
- }
- }, props: {
- option: {
- type: Object, default: function () {
- return {}
- }
- }
- }
- }), Vn = Object(c.a)(Un, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {ref: "main", class: t.b(), style: t.styleSizeName}, [n("el-carousel", {
- attrs: {
- type: t.type,
- "indicator-position": t.indicator,
- interval: t.interval,
- height: t.height
- }
- }, t._l(t.dataChart, (function (e) {
- return n("el-carousel-item", {
- key: e, on: {
- click: function (n) {
- return t.handleClick(e, t.index)
- }
- }
- }, [n("img", {style: t.styleName, attrs: {src: e.value, draggable: "false"}})])
- })), 1)], 1)
- }), [], !1, null, null, null).exports, Hn = kn({
- name: "iframe", data: function () {
- return {}
- }, computed: {}, created: function () {
- }, mounted: function () {
- }, methods: {
- handleClick: function () {
- this.clickFormatter && this.clickFormatter({data: this.dataChart})
- }
- }, props: {
- option: {
- type: Object, default: function () {
- return {}
- }
- }
- }
- }), qn = Object(c.a)(Hn, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {
- ref: "main",
- class: this.b(),
- style: this.styleSizeName,
- on: {click: this.handleClick}
- }, [e("iframe", {attrs: {src: this.dataChart.value, draggable: "false"}})])
- }), [], !1, null, null, null).exports, Yn = kn({
- name: "video", data: function () {
- return {}
- }, computed: {}, created: function () {
- }, mounted: function () {
- }, methods: {
- handleClick: function () {
- this.clickFormatter && this.clickFormatter({type: index, value: item, data: this.dataChart})
- }
- }, props: {
- option: {
- type: Object, default: function () {
- return {}
- }
- }
- }
- }), Gn = Object(c.a)(Yn, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {
- ref: "main",
- class: this.b(),
- style: this.styleSizeName,
- on: {click: this.handleClick}
- }, [e("video", {
- staticStyle: {"object-fit": "fill"},
- attrs: {controls: "", autoplay: "", loop: "", width: this.width, height: this.height}
- }, [e("source", {attrs: {src: this.dataChart.value}})])])
- }), [], !1, null, null, null).exports, Xn = kn({
- name: "wordcloud", methods: {
- updateChart: function () {
- var t = this, e = this.deepClone(this.dataChart) || [], n = {
- series: [{
- type: "wordCloud",
- left: "center",
- top: "center",
- width: "100%",
- height: "100%",
- right: null,
- bottom: null,
- sizeRange: [t.option.minFontSize || 12, t.option.maxFontSize || 60],
- rotationRange: t.option.rotate ? [-90, 90] : [0, 0],
- rotationStep: t.option.rotate ? 45 : 0,
- gridSize: this.option.split || 30,
- drawOutOfBound: !1,
- textStyle: {
- normal: {
- fontFamily: "sans-serif", fontWeight: "bold", color: function () {
- return "rgb(" + [Math.round(160 * Math.random()), Math.round(160 * Math.random()), Math.round(160 * Math.random())].join(",") + ")"
- }
- }, emphasis: {shadowBlur: 10, shadowColor: "#333"}
- },
- data: e
- }]
- };
- this.myChart.resize(), this.myChart.setOption(n, !0)
- }
- }
- }), Qn = Object(c.a)(Xn, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b(), style: this.styleSizeName}, [e("div", {
- ref: this.id,
- style: this.styleChartName
- })])
- }), [], !1, null, null, null).exports, Jn = kn({
- name: "gauge", computed: {
- x2: function () {
- return this.option.gridX2 || 20
- }
- }, methods: {
- updateChart: function () {
- var t, e = this, n = this.deepClone(this.dataChart), i = {
- title: this.ishasprop(this.option.titleShow, {
- text: this.option.title,
- subtext: this.option.subtext || "",
- textStyle: {color: this.option.titleColor || "#333", fontSize: this.option.titleFontSize || 16},
- left: this.option.titlePostion || "auto",
- subtextStyle: {color: this.option.subTitleColor || "#aaa", fontSize: this.option.subTitleFontSize || 14}
- }, {}),
- grid: {
- left: this.option.gridX || 20,
- top: this.option.gridY || 60,
- right: this.x2,
- bottom: this.option.gridY2 || 60
- },
- series: [{
- name: "业务指标",
- type: "gauge",
- detail: {fontSize: this.option.valueFontSize || 30, formatter: "{value}" + n.unit},
- min: n.min,
- max: n.max,
- axisLine: {
- lineStyle: {
- color: (t = [], (e.option.barColor || []).forEach((function (e) {
- t.push([e.postion, e.color1])
- })), e.validatenull(t) && (t = [[0, 2, "#91c7ae"], [.8, "#638693"], [1, "#c23531"]]), t),
- width: this.option.lineSize || 5
- }
- },
- axisLabel: {
- show: this.vaildData(this.option.axisLabelShow, !0),
- fontSize: this.option.axisLabelFontSize || 25
- },
- axisTick: {lineStyle: {color: this.option.lineColor || "#eee"}},
- title: {color: this.option.nameColor, fontSize: this.option.nameFontSize || 20},
- data: [n]
- }]
- };
- this.myChart.resize(), this.myChart.setOption(i, !0)
- }
- }
- }), Zn = Object(c.a)(Jn, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b(), style: this.styleSizeName}, [e("div", {
- ref: this.id,
- style: this.styleChartName
- })])
- }), [], !1, null, null, null).exports, ti = kn({
- name: "progress", computed: {
- styleSuffixName: function () {
- return {
- fontWeight: this.option.suffixFontWeight || "normal",
- fontSize: (this.option.suffixFontSize || 40) + "px",
- color: this.option.suffixColor || "#333"
- }
- }, styleName: function () {
- return {
- marginBottom: this.option.split + "px",
- fontWeight: this.option.fontWeight || "normal",
- fontSize: (this.option.fontSize || 40) + "px",
- color: this.option.color || "#333"
- }
- }, type: function () {
- return this.option.type || "line"
- }, color: function () {
- return this.option.borderColor || "#333"
- }, strokeWidth: function () {
- return this.option.strokeWidth || 14
- }
- }, props: {
- option: {
- type: Object, default: function () {
- return {}
- }
- }
- }, methods: {
- handleClick: function () {
- this.clickFormatter && this.clickFormatter({data: this.dataChart})
- }
- }
- }), ei = Object(c.a)(ti, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- ref: "main",
- class: t.b(),
- style: t.styleSizeName,
- on: {click: t.handleClick}
- }, [n("div", {
- class: t.b("text", {
- line: "line" === t.type,
- circle: "circle" === t.type
- })
- }, [n("p", {style: t.styleSuffixName}, [t._v(t._s(t.dataChart.label))]), t._v(" "), n("p", {style: t.styleName}, [t.dataChart.value ? n("avue-count-up", {attrs: {end: Number(t.dataChart.value)}}) : t._e()], 1)]), t._v(" "), n("avue-progress", {
- attrs: {
- color: t.color,
- width: t.width,
- showText: !1,
- strokeWidth: t.strokeWidth,
- percentage: t.dataChart.data,
- type: t.type
- }
- })], 1)
- }), [], !1, null, null, null).exports;
- function ni(t, e, n) {
- return e in t ? Object.defineProperty(t, e, {
- value: n,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = n, t
- }
- var ii = kn({
- name: "map", data: function () {
- return {
- bannerCount: 0,
- bannerCheck: "",
- move: !1,
- step: 1,
- startLeft: 0,
- startTop: 0,
- baseScale: 0,
- left: 0,
- top: 0,
- centerData: [],
- zoomData: 1
- }
- }, watch: {
- mapData: function () {
- this.updateChart()
- }, dataChartLen: function () {
- this.setBanner()
- }, bannerTime: function () {
- this.setBanner()
- }, banner: {
- handler: function () {
- this.setBanner()
- }, immediate: !0
- }, type: function () {
- var t = this;
- this.isEchart && this.$nextTick((function () {
- t.init(), t.updateData()
- }))
- }, width: function () {
- this.updateData()
- }, height: function () {
- this.updateData()
- }, zoom: {
- handler: function () {
- this.zoomData = this.zoom
- }, immediate: !0
- }, scale: {
- handler: function (t) {
- this.baseScale = t
- }, immediate: !0
- }
- }, computed: {
- zoomShow: function () {
- return this.option.zoomShow || 1
- }, zoom: function () {
- return this.option.zoom || 1
- }, mapData: function () {
- return this.option.mapData || {}
- }, borderWidth: function () {
- return this.option.borderWidth || 3
- }, borderColor: function () {
- return this.option.borderColor || "#389BB7"
- }, areaColor: function () {
- return this.option.areaColor || "#0c162f"
- }, empColor: function () {
- return this.option.empColor || "#fff"
- }, empAreaColor: function () {
- return this.option.empAreaColor || "yellow"
- }, color: function () {
- return this.option.color || "#fff"
- }, roam: function () {
- return this.vaildData(this.option.roam, !0)
- }, fontSize: function () {
- return this.option.fontSize || 24
- }, isEchart: function () {
- return 0 === this.type
- }, bannerTime: function () {
- return this.option.bannerTime || 3e3
- }, banner: function () {
- return this.option.banner
- }, scale: function () {
- return this.option.scale || 100
- }, styleImgName: function () {
- return {
- marginLeft: this.setPx(this.left),
- marginTop: this.setPx(this.top),
- transform: "scale(".concat(this.baseScale / 100, ", ").concat(this.baseScale / 100, ")")
- }
- }, location: function () {
- return this.option.location || []
- }, img: function () {
- return this.option.img
- }, type: function () {
- return this.option.type
- }, locationData: function () {
- var t = this;
- return (this.dataChart || []).map((function (e) {
- e.zoom = e.zoom || 1;
- var n = t.zoomData < 1 ? 1 : t.zoomData;
- return Object.assign(e.zoom <= n ? {name: e.name} : {}, {value: [e.lng, e.lat, e.value]})
- }))
- }
- }, methods: {
- docMouseUp: function () {
- var t = this;
- window.document.onmouseup = function (e) {
- window.document.onmousemove = void 0, t.move = !1
- }
- }, handleMouseDown: function (t) {
- this.move = !0, this.startLeft = t.clientX, this.startTop = t.clientY, this.docMouseUp()
- }, handleMouseMove: function (t) {
- var e = this;
- this.move && (window.document.onmousemove = function (t) {
- var n = t.clientX, i = t.clientY;
- e.left = e.left + (n - e.startLeft) * e.step, e.top = e.top + (i - e.startTop) * e.step, e.startLeft = n, e.startTop = i
- })
- }, handleMouseUp: function () {
- this.move = !1
- }, handleMousewheel: function (t) {
- var e = t.deltaY;
- this.baseScale = e > 0 ? this.baseScale + 10 : this.baseScale - 10
- }, resetBanner: function () {
- var t = this;
- this.$nextTick((function () {
- t.myChart.dispatchAction({type: "hideTip"})
- }))
- }, setBanner: function () {
- var t = this;
- clearInterval(this.bannerCheck), this.banner && (this.bannerCheck = setInterval((function () {
- var e = t.bannerCount % t.dataChartLen;
- t.myChart.dispatchAction({
- type: "showTip",
- seriesIndex: "0",
- dataIndex: e
- }), t.myChart.dispatchAction({type: "downplay"}), t.myChart.dispatchAction({
- type: "highlight",
- dataIndex: e
- }), t.bannerCount += 1
- }), this.bannerTime))
- }, updateChart: function () {
- var t = this;
- window.axios ? this.$axios(this.mapData).then((function (e) {
- var n, i = e.data, o = t.deepClone(i);
- window.echarts.registerMap("HK", o);
- var a = {
- tooltip: Object.assign(t.formatter ? {
- formatter: function (e) {
- return t.formatter(e, t.dataChart)
- }
- } : {}, {
- backgroundColor: t.option.tipBackgroundColor || "rgba(0,0,0,1)",
- textStyle: {fontSize: t.option.tipFontSize, color: t.option.tipColor || "red"}
- }),
- geo: Object.assign(t.validatenull(t.centerData) ? {} : {center: t.centerData}, (n = {
- map: "HK",
- label: {emphasis: {show: !1}},
- zoom: t.zoomData,
- layoutCenter: ["50%", "50%"],
- layoutSize: 1200,
- roam: t.roam
- }, ni(n, "label", {
- show: !0,
- fontSize: t.fontSize,
- color: t.color
- }), ni(n, "left", t.option.gridX), ni(n, "top", t.option.gridY), ni(n, "right", t.option.gridX2), ni(n, "bottom", t.option.gridY2), ni(n, "emphasis", {
- label: {color: t.empColor},
- itemStyle: {areaColor: t.empAreaColor}
- }), ni(n, "itemStyle", {
- borderWidth: t.borderWidth,
- borderColor: t.borderColor,
- areaColor: t.areaColor
- }), n)),
- series: [{
- type: "effectScatter",
- coordinateSystem: "geo",
- showEffectOn: "emphasis",
- rippleEffect: {brushType: "fill", scale: 4},
- symbolSize: t.fontSize,
- hoverAnimation: !0,
- data: t.locationData,
- label: {
- show: !0,
- position: ["130%", "0"],
- fontSize: t.fontSize,
- color: t.color,
- formatter: function (t) {
- return t.name
- }
- },
- itemStyle: {color: t.color},
- emphasis: {
- label: {show: !0, fontSize: t.fontSize + 20, color: t.option.empColor},
- itemStyle: {color: t.option.empColor}
- }
- }]
- };
- t.myChart.off("mouseover"), t.myChart.off("mouseout"), t.myChart.off("georoam"), t.myChart.on("mouseover", (function () {
- clearInterval(t.bannerCheck), t.resetBanner()
- })), t.myChart.on("mouseout", (function () {
- t.bannerCount = 0, t.setBanner()
- })), t.myChart.on("georoam", (function (e) {
- var n = t.myChart.getOption().geo[0];
- t.centerData = n.center, t.zoomData = n.zoom, t.zoomData < 1 && (t.zoomData = 1)
- })), t.myChart.resize(), t.myChart.setOption(a, !0)
- })) : D.a.logs("axios")
- }
- }
- }), oi = Object(c.a)(ii, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- class: t.b(), style: t.styleSizeName, on: {
- mousewheel: function (e) {
- return e.preventDefault(), t.handleMousewheel(e)
- }
- }
- }, [t.isEchart ? n("div", {
- ref: t.id,
- style: t.styleChartName
- }) : n("div", {class: t.b("map")}, [n("div", {
- class: t.b("box"),
- style: t.styleImgName,
- on: {
- mousedown: function (e) {
- !t.disabled && t.handleMouseDown(e)
- }, mousemove: function (e) {
- !t.disabled && t.handleMouseMove(e)
- }, mouseup: function (e) {
- !t.disabled && t.handleMouseUp(e)
- }
- }
- }, [n("img", {
- ref: "img",
- class: t.b("bg"),
- attrs: {src: t.img, draggable: "false"}
- }), t._v(" "), t._l(t.location, (function (e, i) {
- return n("span", {class: t.b("location"), style: {left: t.setPx(e.x), top: t.setPx(e.y)}})
- }))], 2)])])
- }), [], !1, null, null, null).exports, ai = kn({
- name: "img", computed: {
- styleImgName: function () {
- var t = this;
- return Object.assign(t.rotate ? {animationDuration: t.duration / 1e3 + "s"} : {}, {opacity: this.option.opacity || 1})
- }, duration: function () {
- return this.option.duration || 3e3
- }, rotate: function () {
- return this.option.rotate
- }
- }, methods: {
- handleClick: function () {
- this.clickFormatter && this.clickFormatter({data: this.dataChart})
- }
- }
- }), ri = Object(c.a)(ai, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- class: t.b(),
- style: t.styleSizeName,
- on: {click: t.handleClick}
- }, [n("img", {
- class: t.b({rotate: t.rotate}),
- style: [t.styleImgName, t.styleSizeName],
- attrs: {src: t.dataChart.value, draggable: "false"}
- })])
- }), [], !1, null, null, null).exports, si = kn({
- name: "imgborder", computed: {
- styleImgName: function () {
- var t = this;
- return Object.assign({
- width: "100%",
- height: "100%",
- backgroundColor: this.option.backgroundColor || "rgba(180, 181, 198, 0.1)",
- backgroundClip: "padding-box",
- opacity: this.option.opacity || 1,
- filter: "blur(0px)"
- }, t.validatenull(t.dataChart) ? {} : {
- borderImageSource: "url(" + t.dataChart + ")",
- borderImageSlice: "10 16 15 10 fill",
- borderWidth: "10px 16px 15px 10px",
- borderStyle: "solid",
- boxSizing: "border-box"
- })
- }
- }, methods: {}
- }), li = Object(c.a)(si, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b(), style: this.styleSizeName}, [e("div", {style: this.styleImgName})])
- }), [], !1, null, null, null).exports, ci = kn({
- name: "tabs", data: function () {
- return {active: ""}
- }, watch: {
- active: function (t) {
- t && this.handleClick(t)
- }, dataChart: {
- handler: function (t) {
- 0 !== t.length && (this.active = t[0].value)
- }, immediate: !0
- }
- }, computed: {
- isSelect: function () {
- return "select" === this.type
- }, type: function () {
- return this.option.type
- }, paramName: function () {
- return this.option.paramName
- }, iconSize: function () {
- return this.option.iconSize || 20
- }, styleSelectName: function () {
- return Object.assign({fontSize: this.setPx(this.option.fontSize || 30)}, this.styleSizeName)
- }, styleIconName: function () {
- return Object.assign({
- marginRight: this.setPx(this.option.iconSplit),
- width: this.setPx(this.option.iconSize),
- height: this.setPx(this.option.iconSize)
- })
- }, styleName: function () {
- var t = this;
- return Object.assign(t.option.backgroundImage ? {
- backgroundImage: "url(".concat(t.option.backgroundImage, ")"),
- backgroundSize: "100% 100%"
- } : {}, {
- borderColor: this.option.borderColor || "#fff",
- borderStyle: "solid",
- borderWidth: this.setPx(this.option.borderWidth || 0),
- margin: "0 ".concat(this.setPx(this.option.split)),
- backgroundColor: this.option.backgroundColor,
- fontSize: this.setPx(this.option.fontSize || 30),
- color: this.option.color
- })
- }
- }, created: function () {
- }, mounted: function () {
- }, methods: {
- styleIconBgName: function (t) {
- if (t.icon) return {backgroundImage: "url(".concat(t.icon, ")"), backgroundSize: "100% 100%"}
- }, styleIconActiveName: function (t) {
- if (this.active == t.value && t.empIcon) return {
- backgroundImage: "url(".concat(t.empIcon, ")"),
- backgroundSize: "100% 100%"
- }
- }, styleActiveName: function (t) {
- var e = this;
- if (this.active == t.value) return Object.assign(e.option.empBackgroundImage ? {
- backgroundImage: "url(".concat(e.option.empBackgroundImage, ")"),
- backgroundSize: "100% 100%"
- } : {}, {
- borderColor: this.option.empBorderColor || "#fff",
- borderStyle: "solid",
- borderWidth: this.setPx(this.option.empBorderWidth || 0),
- color: this.option.empColor
- })
- }, handleClick: function (t) {
- this.active = t, this.click({type: this.name, child: this.child, value: this.active})
- }
- }, props: {
- option: {
- type: Object, default: function () {
- return {}
- }
- }
- }
- }), ui = Object(c.a)(ci, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {
- ref: "main",
- class: t.b(),
- style: t.styleSizeName
- }, [t.isSelect ? n("avue-select", {
- style: t.styleSelectName,
- attrs: {dic: "string" == typeof t.dataChart ? [] : t.dataChart},
- model: {
- value: t.active, callback: function (e) {
- t.active = e
- }, expression: "active"
- }
- }) : n("div", {class: t.b("list")}, t._l(t.dataChart, (function (e, i) {
- return n("div", {
- key: i,
- class: t.b("item"),
- style: [t.styleName, t.styleActiveName(e)],
- on: {
- click: function (n) {
- return t.handleClick(e.value)
- }
- }
- }, [e.icon ? n("div", {
- class: t.b("icon"),
- style: [t.styleIconName, t.styleIconBgName(e), t.styleIconActiveName(e)]
- }) : t._e(), t._v(" "), n("span", [t._v(t._s(e.label))])])
- })), 0)], 1)
- }), [], !1, null, null, null).exports, di = kn({
- name: "slide", data: function () {
- return {reload: !0}
- }, mounted: function () {
- this.init()
- }, computed: {
- delay: function () {
- return this.option.delay || 3e3
- }, autoplay: function () {
- return this.vaildData(this.option.autoplay, !1)
- }
- }, watch: {
- option: {
- handler: function () {
- var t = this;
- this.reload = !1, this.$nextTick((function () {
- t.reload = !0, t.init()
- }))
- }, deep: !0
- }
- }, methods: {
- init: function () {
- var t = this;
- new Swiper(".swiper-container", Object.assign(t.autoplay ? {
- autoplay: {
- delay: t.delay,
- disableOnInteraction: !1
- }
- } : {}, {
- spaceBetween: 80,
- pagination: {el: ".swiper-pagination", clickable: !0},
- observer: !0,
- observeParents: !0
- }))
- }
- }
- }), pi = Object(c.a)(di, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {
- class: this.b(),
- style: this.styleSizeName
- }, [e("div", {staticClass: "swiper-container"}, [this.reload ? e("div", {staticClass: "swiper-wrapper"}, [this._t("default")], 2) : this._e(), this._v(" "), e("div", {staticClass: "swiper-pagination"})])])
- }), [], !1, null, null, null).exports, hi = kn({
- name: "pictorialbar", methods: {
- updateChart: function () {
- var t = this, e = this.deepClone(this.dataChart),
- n = this.validatenull(this.option.symbol) ? "" : "image://" + this.option.symbol,
- i = this.option.color || "#fff", o = this.option.fontSize || 20, a = 0;
- e.forEach((function (t) {
- t.value > a && (a = t.value)
- }));
- var r = {
- tooltip: Object.assign(t.formatter ? {
- formatter: function (e) {
- return t.formatter(e, t.dataChart)
- }
- } : {}, {textStyle: {fontSize: t.option.tipFontSize, color: t.option.tipColor || "#fff"}}),
- xAxis: {
- show: this.vaildData(this.option.xAxisShow, !0),
- max: a,
- splitLine: {show: !1},
- offset: 10,
- axisTick: {show: !1},
- axisLine: {show: !1},
- axisLabel: {
- margin: 10,
- textStyle: {color: this.option.nameColor || "#333", fontSize: this.option.xNameFontSize || 14}
- }
- },
- yAxis: {
- data: e.map((function (t) {
- return t.name
- })),
- show: this.vaildData(this.option.yAxisShow, !0),
- inverse: !0,
- axisTick: {show: !1},
- axisLine: {show: !1},
- axisLabel: {
- margin: 10,
- textStyle: {color: this.option.nameColor || "#333", fontSize: this.option.yNameFontSize || 14}
- }
- },
- grid: {
- top: "center",
- height: 10 * Number(this.option.split),
- left: this.option.gridX || 70,
- right: this.option.gridX2 || 100
- },
- series: [{
- type: "pictorialBar",
- symbol: n,
- symbolRepeat: "fixed",
- symbolMargin: "5%",
- symbolClip: !0,
- symbolSize: this.option.symbolSize || 30,
- symbolBoundingData: a,
- data: e.map((function (t) {
- return t.value
- }))
- }, {
- type: "pictorialBar",
- itemStyle: {normal: {opacity: .2}},
- label: {normal: {show: !0, position: "right", offset: [10, 0], textStyle: {color: i, fontSize: o}}},
- animationDuration: 0,
- symbol: n,
- symbolRepeat: "fixed",
- symbolMargin: "5%",
- symbolSize: 30,
- symbolBoundingData: a,
- data: e.map((function (t) {
- return t.value
- }))
- }]
- };
- this.myChart.resize(), this.myChart.setOption(r, !0)
- }
- }
- }), fi = Object(c.a)(hi, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b(), style: this.styleSizeName}, [e("div", {
- ref: this.id,
- style: this.styleChartName
- })])
- }), [], !1, null, null, null).exports, mi = kn({
- name: "radar", x2: function () {
- return this.option.gridX2 || "80%"
- }, methods: {
- updateChart: function () {
- var t = this, e = this.deepClone(this.dataChart), n = {
- title: this.ishasprop(this.option.titleShow, {
- text: this.option.title,
- subtext: this.option.subtext || "",
- textStyle: {color: this.option.titleColor || "#333", fontSize: this.option.titleFontSize || 16},
- left: this.option.titlePostion || "auto",
- subtextStyle: {color: this.option.subTitleColor || "#aaa", fontSize: this.option.subTitleFontSize || 14}
- }, {}),
- tooltip: Object.assign(t.formatter ? {
- formatter: function (e) {
- return t.formatter(e, t.dataChart)
- }
- } : {}, {
- backgroundColor: t.option.tipBackgroundColor || "rgba(50,50,50,0.7)",
- textStyle: {fontSize: t.option.tipFontSize || 14, color: t.option.tipColor || "#fff"}
- }),
- grid: {
- left: this.option.gridX || 20,
- top: this.option.gridY || 60,
- right: this.x2,
- bottom: this.option.gridY2 || 60
- },
- legend: {
- show: this.vaildData(this.option.legend, !1),
- top: 0,
- x: this.option.legendPostion || "right",
- right: this.x2,
- textStyle: {fontSize: this.option.legendFontSize || 12},
- data: (e.series[0].data || []).map((function (e, n) {
- return {name: e.name, textStyle: t.ishasprop(!t.option.switchTheme, {color: t.getColor(n, !0)}, {})}
- }))
- },
- radar: {
- name: {fontSize: this.option.radarNameSize || 12, color: this.option.radarNameColor || "#333"},
- indicator: e.indicator || [],
- shape: this.option.shape || "polygon",
- radius: this.option.radius || "75%"
- },
- series: function () {
- t.option.barColor;
- return [{
- type: "radar",
- barWidth: t.option.barWidth || 16,
- barMinHeight: t.option.barMinHeight || 0,
- itemStyle: {barBorderRadius: t.option.barRadius || 0},
- data: (e.series[0].data || []).map((function (e, n) {
- return {
- name: e.name,
- value: e.value,
- label: {
- show: t.vaildData(t.option.labelShow, !1),
- textStyle: {
- fontSize: t.option.fontSize || 14,
- color: t.getColor(n),
- fontWeight: t.option.labelShowFontWeight || 500
- }
- },
- areaStyle: {color: t.getColor(n), opacity: t.option.areaOpacity || .9}
- }
- }))
- }]
- }()
- };
- this.myChart.resize(), this.myChart.setOption(n, !0)
- }
- }
- }), bi = Object(c.a)(mi, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b(), style: this.styleSizeName}, [e("div", {
- ref: this.id,
- style: this.styleChartName
- })])
- }), [], !1, null, null, null).exports, vi = kn({
- name: "funnel", computed: {
- x2: function () {
- return this.option.gridX2 || 20
- }, fontSize: function () {
- return this.option.fontSize || 14
- }
- }, methods: {
- updateChart: function () {
- var t = this, e = this.deepClone(this.dataChart), n = {
- title: this.ishasprop(this.option.titleShow, {
- text: this.option.title,
- subtext: this.option.subtext || "",
- textStyle: {color: this.option.titleColor || "#333", fontSize: this.option.titleFontSize || 16},
- left: this.option.titlePostion || "auto",
- subtextStyle: {color: this.option.subTitleColor || "#aaa", fontSize: this.option.subTitleFontSize || 14}
- }, {}),
- tooltip: this.ishasprop(this.formatter, {
- formatter: function (e) {
- return t.formatter(e, t.dataChart)
- }
- }, {
- backgroundColor: this.option.tipBackgroundColor || "rgba(50,50,50,0.7)",
- textStyle: {fontSize: this.option.tipFontSize, color: this.option.tipColor || "#fff"}
- }),
- grid: {
- left: this.option.gridX || 20,
- top: this.option.gridY || 60,
- right: this.x2,
- bottom: this.option.gridY2 || 60
- },
- legend: {
- show: this.vaildData(this.option.legend, !1),
- orient: this.option.legendOrient || "horizontal",
- top: 0,
- x: this.option.legendPostion || "right",
- right: this.x2,
- textStyle: {fontSize: this.option.legendFontSize || 12},
- data: e.map((function (t, e) {
- return t.name
- }))
- },
- series: function () {
- t.option.barColor;
- return [{
- type: "funnel", animationDelay: function (t) {
- return 200 * Math.random()
- }, label: {show: t.vaildData(t.option.labelShow, !1), fontSize: t.fontSize}, data: function () {
- var n = e;
- return t.option.notCount && (n = n.filter((function (t) {
- if (0 !== t.value && t.value) return !0
- }))), t.option.sort && n.sort((function (t, e) {
- return t.value - e.value
- })), n
- }(), itemStyle: t.ishasprop(!t.switchTheme, {
- normal: {
- color: function (e) {
- return t.getColor(e.dataIndex)
- }
- }
- }, {emphasis: {shadowBlur: 10, shadowOffsetX: 0, shadowColor: "rgba(0, 0, 0, 0.5)"}})
- }]
- }()
- };
- this.myChart.resize(), this.myChart.setOption(n, !0)
- }
- }
- }), yi = Object(c.a)(vi, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b(), style: this.styleSizeName}, [e("div", {
- ref: this.id,
- style: this.styleChartName
- })])
- }), [], !1, null, null, null).exports, gi = kn({
- name: "scatter", computed: {
- x2: function () {
- return this.option.gridX2 || 20
- }
- }, methods: {
- updateChart: function () {
- var t = this, e = this.deepClone(this.dataChart), n = {
- title: this.ishasprop(this.option.titleShow, {
- text: this.option.title,
- subtext: this.option.subtext || "",
- textStyle: {color: this.option.titleColor || "#333", fontSize: this.option.titleFontSize || 16},
- left: this.option.titlePostion || "auto",
- subtextStyle: {color: this.option.subTitleColor || "#aaa", fontSize: this.option.subTitleFontSize || 14}
- }, {}),
- tooltip: {
- formatter: this.option.formatter || "",
- backgroundColor: this.option.tipBackgroundColor || "rgba(50,50,50,0.7)",
- textStyle: {fontSize: this.option.tipFontSize, color: this.option.tipColor || "#fff"}
- },
- grid: {
- left: this.option.gridX || 20,
- top: this.option.gridY || 60,
- right: this.x2,
- bottom: this.option.gridY2 || 60
- },
- xAxis: {splitLine: {lineStyle: {type: "dashed"}}},
- yAxis: {splitLine: {lineStyle: {type: "dashed"}}},
- series: function () {
- t.option.barColor;
- return (e || []).map((function (e, n) {
- return Object.assign(e, {
- type: "scatter",
- itemStyle: {color: t.getColor(n)},
- label: {
- show: t.vaildData(t.option.labelShow, !1),
- position: "top",
- textStyle: {
- fontSize: t.option.fontSize || 14,
- color: t.option.labelShowColor || "#333",
- fontWeight: t.option.labelShowFontWeight || 500
- }
- }
- })
- }))
- }()
- };
- this.myChart.resize(), this.myChart.setOption(n, !0)
- }
- }
- }), _i = Object(c.a)(gi, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b(), style: this.styleSizeName}, [e("div", {
- ref: this.id,
- style: this.styleChartName
- })])
- }), [], !1, null, null, null).exports, xi = kn({
- name: "common", methods: {
- updateChart: function () {
- var t = this.deepClone(this.dataChart) || [], e = this.echartFormatter(t);
- this.myChart.resize(), this.myChart.setOption(e, !0)
- }
- }
- }), wi = Object(c.a)(xi, (function () {
- var t = this.$createElement, e = this._self._c || t;
- return e("div", {class: this.b(), style: this.styleSizeName}, [e("div", {
- ref: this.id,
- style: this.styleChartName
- })])
- }), [], !1, null, null, null).exports, Si = kn({
- name: "datav", data: function () {
- return {reload: !0, config: {}}
- }, methods: {
- updateChart: function () {
- var t = this, e = this.deepClone(this.dataChart) || [];
- this.config = this.echartFormatter(e), this.reload = !1, this.$nextTick((function () {
- t.reload = !0
- }))
- }
- }
- }), Oi = {
- EchartRadar: bi,
- EchartScatter: _i,
- EchartFunnel: yi,
- EchartSlide: pi,
- EchartTabs: ui,
- EchartVideo: Gn,
- EchartWordCloud: Qn,
- EchartPictorialBar: fi,
- EchartMaps: oi,
- EchartImg: ri,
- EchartImgBorder: li,
- EchartBar: Dn,
- EchartGauge: Zn,
- EchartIframe: qn,
- EchartSwiper: Vn,
- EchartTable: $n,
- EchartPie: Mn,
- EchartText: Wn,
- EchartLine: An,
- EchartFlop: Nn,
- EchartDatetime: Rn,
- EchartProgress: ei,
- EchartCommon: wi,
- EchartDatav: Object(c.a)(Si, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return n("div", {class: t.b(), style: t.styleSizeName}, [t.reload ? n(t.option.is, t._b({
- ref: t.id,
- tag: "component",
- style: t.styleChartName
- }, "component", t.config, !1)) : t._e()], 1)
- }), [], !1, null, null, null).exports
- };
- window.Element || D.a.logs("element-ui");
- var Ci = Object.assign(Sn, Oi, {
- Arrays: Ye,
- Affix: u,
- Avatar: v,
- Article: _,
- Carousel: w,
- Crud: O,
- Code: M,
- Card: j,
- Chat: P,
- Comment: N,
- Form: B,
- Checkbox: Y,
- Date: Q,
- CountUp: f,
- Draggable: tt,
- Empty: nt,
- Flow: rt,
- Notice: ct,
- License: dt,
- Progress: ht,
- Time: mt,
- Input: _t,
- Radio: wt,
- Select: Ct,
- Cascader: Dt,
- InputColor: Mt,
- InputNumber: At,
- InputTree: Pt,
- InputIcon: zt,
- InputMap: Lt,
- InputTable: Ft,
- Switchs: Ut,
- Rate: Ht,
- Upload: se,
- Slider: de,
- Keyboard: ge,
- Tree: Oe,
- Title: ke,
- Search: Te,
- Tabs: $e,
- Queue: Be,
- Dynamic: Ne,
- Video: Ue,
- Verifys: Kt,
- textEllipsis: Xe,
- Skeleton: Ie,
- Sign: ce,
- Login: He
- }), ki = {is: "$isEle", name: "element-ui", type: "el"}, ji = {
- bind: function (t, e, n, i) {
- if (0 != e.value) {
- var o = t.querySelector(".el-dialog__header"), a = t.querySelector(".el-dialog");
- o.style.cursor = "move";
- var r = a.currentStyle || window.getComputedStyle(a, null);
- a.style.position = "absolute", a.style.top = "".concat(a.style.marginTop), a.style.marginTop = 0;
- var s = a.style.width;
- s = s.includes("%") ? +document.body.clientWidth * (+s.replace(/\%/g, "") / 100) : +s.replace(/\px/g, ""), a.style.left = "".concat((document.body.clientWidth - s) / 2, "px"), o.onmousedown = function (t) {
- var e, n, i = t.clientX - o.offsetLeft, s = t.clientY - o.offsetTop;
- r.left.includes("%") ? (e = +document.body.clientWidth * (+r.left.replace(/\%/g, "") / 100), n = +document.body.clientHeight * (+r.top.replace(/\%/g, "") / 100)) : (e = +r.left.replace(/\px/g, ""), n = +r.top.replace(/\px/g, "")), document.onmousemove = function (t) {
- var o = t.clientX - i, r = t.clientY - s, l = o + e, c = r + n;
- a.style.left = "".concat(l, "px"), a.style.top = "".concat(c, "px")
- }, document.onmouseup = function (t) {
- document.onmousemove = null, document.onmouseup = null
- }
- }
- }
- }
- }, Di = (n(62), window.saveAs), Ei = window.XLSX;
- function Mi(t, e) {
- for (var n, i = {}, o = {
- s: {c: 1e7, r: 1e7},
- e: {c: 0, r: 0}
- }, a = 0; a != t.length; ++a) for (var r = 0; r != t[a].length; ++r) {
- o.s.r > a && (o.s.r = a), o.s.c > r && (o.s.c = r), o.e.r < a && (o.e.r = a), o.e.c < r && (o.e.c = r);
- var s = {v: t[a][r]};
- if (null != s.v) {
- var l = Ei.utils.encode_cell({c: r, r: a});
- "number" == typeof s.v ? s.t = "n" : "boolean" == typeof s.v ? s.t = "b" : s.v instanceof Date ? (s.t = "n", s.z = Ei.SSF._table[14], s.v = (n = s.v, void 0 && (n += 1462), (Date.parse(n) - new Date(Date.UTC(1899, 11, 30))) / 864e5)) : s.t = "s", i[l] = s
- }
- }
- return o.s.c < 1e7 && (i["!ref"] = Ei.utils.encode_range(o)), i
- }
- function Ti() {
- if (!(this instanceof Ti)) return new Ti;
- this.SheetNames = [], this.Sheets = {}
- }
- function Ai(t) {
- for (var e = new ArrayBuffer(t.length), n = new Uint8Array(e), i = 0; i != t.length; ++i) n[i] = 255 & t.charCodeAt(i);
- return e
- }
- var Ii = {
- install: function (t, e) {
- t.prototype.$export = {
- excel: function (t) {
- return window.saveAs && window.XLSX ? new Promise((function (e, n) {
- var i = Object.assign({}, {columns: [], data: [], title: "table", header: null, merges: []}, t);
- !function (t, e, n) {
- var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {merges: [], header: null},
- o = e;
- o.unshift(t), i.header && o.unshift([i.header]);
- var a = "SheetJS", r = new Ti, s = Mi(o), l = i.merges;
- "string" == typeof l[0] && 2 == l.length && (l = [l]), l = l.map((function (t) {
- return t instanceof Array ? {s: t[0], e: t[1]} : t
- })), s["!merges"] = l, r.SheetNames.push(a), r.Sheets[a] = s;
- var c = Ei.write(r, {bookType: "xlsx", bookSST: !1, type: "binary"}), u = n || "列表";
- Di(new Blob([Ai(c)], {type: "application/octet-stream"}), u + ".xlsx")
- }(i.columns.map((function (t) {
- return t.label
- })), i.data.map((function (t) {
- return i.columns.map((function (e) {
- var n = t[e.prop];
- return Object(J.r)(n) && (n = JSON.stringify(n)), n
- }))
- })), i.title, {merges: i.merges, header: i.header}), e()
- })) : (D.a.logs("file-saver"), void D.a.logs("xlsx"))
- }, xlsx: function (t) {
- if (!window.saveAs || !window.XLSX) return D.a.logs("file-saver"), void D.a.logs("xlsx");
- var e = window.XLSX;
- return new Promise((function (n, i) {
- var o = new FileReader;
- o.onload = function (t) {
- var i = function (t) {
- for (var e = "", n = 0, i = 10240; n < t.byteLength / i; ++n) e += String.fromCharCode.apply(null, new Uint8Array(t.slice(n * i, n * i + i)));
- return e += String.fromCharCode.apply(null, new Uint8Array(t.slice(n * i)))
- }(t.target.result), o = e.read(btoa(i), {type: "base64"}), a = o.SheetNames[0], r = o.Sheets[a],
- s = function (t) {
- var n, i = [], o = e.utils.decode_range(t["!ref"]), a = o.s.r;
- for (n = o.s.c; n <= o.e.c; ++n) {
- var r = t[e.utils.encode_cell({c: n, r: a})], s = "UNKNOWN " + n;
- r && r.t && (s = e.utils.format_cell(r)), i.push(s)
- }
- return i
- }(r), l = e.utils.sheet_to_json(r);
- n({header: s, results: l})
- }, o.readAsArrayBuffer(t)
- }))
- }
- }
- }
- }, Pi = n(17), $i = n(13);
- var Li, Ni = n(29), zi = n.n(Ni).a, Bi = Object(i.a)({
- name: "image-preview", data: function () {
- return {left: 0, top: 0, scale: 1, datas: [], rotate: 0, isShow: !1, index: 0, onClose: null}
- }, computed: {
- carouselName: function () {
- return this.$isVan ? "".concat(this.$AVUE.ui.type, "Swipe") : "".concat(this.$AVUE.ui.type, "Carousel")
- }, carouselItemName: function () {
- return this.$isVan ? "".concat(this.$AVUE.ui.type, "SwipeItem") : "".concat(this.$AVUE.ui.type, "CarouselItem")
- }, styleBoxName: function () {
- return {marginLeft: this.setPx(this.left), marginTop: this.setPx(this.top)}
- }, styleName: function () {
- return {
- transform: "scale(".concat(this.scale, ") rotate(").concat(this.rotate, "deg)"),
- maxWidth: "100%",
- maxHeight: "100%"
- }
- }, isRrrow: function () {
- return 1 != this.imgLen
- }, imgLen: function () {
- return this.imgList.length
- }, imgList: function () {
- return this.datas.map((function (t) {
- return t.url
- }))
- }
- }, methods: {
- getIsVideo: function (t) {
- return this.$typeList.video.test(t.url) || "video" == t.type ? {is: "video"} : {}
- }, subScale: function () {
- .2 != this.scale && (this.scale = parseFloat((this.scale - .2).toFixed(2)))
- }, addScale: function () {
- this.scale = parseFloat((this.scale + .2).toFixed(2))
- }, handleChange: function () {
- this.scale = 1, this.rotate = 0
- }, move: function (t) {
- var e = this, n = t.clientX, i = t.clientY;
- document.onmousemove = function (t) {
- var o = t.clientX - n, a = t.clientY - i;
- n = t.clientX, i = t.clientY, e.left = e.left + o, e.top = e.top + a
- }, document.onmouseup = function (t) {
- document.onmousemove = null, document.onmouseup = null
- }
- }, close: function () {
- this.isShow = !1, "function" == typeof this.onClose && this.onClose(this)
- }
- }
- }), Fi = Object(c.a)(Bi, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return t.isShow ? n("div", {class: t.b()}, [n("div", {class: t.b("mask")}), t._v(" "), n("span", {
- staticClass: "el-image-viewer__btn el-image-viewer__close",
- on: {click: t.close}
- }, [n("i", {staticClass: "el-icon-circle-close"})]), t._v(" "), t.isRrrow ? n("span", {
- staticClass: "el-image-viewer__btn el-image-viewer__prev",
- on: {
- click: function (e) {
- return t.$refs.carousel.prev()
- }
- }
- }, [n("i", {staticClass: "el-icon-arrow-left"})]) : t._e(), t._v(" "), t.isRrrow ? n("span", {
- staticClass: "el-image-viewer__btn el-image-viewer__next",
- on: {
- click: function (e) {
- return t.$refs.carousel.next()
- }
- }
- }, [n("i", {staticClass: "el-icon-arrow-right"})]) : t._e(), t._v(" "), n("div", {
- ref: "box",
- class: t.b("box"),
- style: t.styleBoxName
- }, [n(t.carouselName, {
- ref: "carousel",
- tag: "component",
- attrs: {
- "show-indicators": !1,
- "initial-index": t.index,
- "initial-swipe": t.index,
- interval: 0,
- arrow: "never",
- "indicator-position": "none",
- height: t.height
- },
- on: {change: t.handleChange}
- }, t._l(t.datas, (function (e, i) {
- return n(t.carouselItemName, {key: i, tag: "component"}, [n("img", t._b({
- style: t.styleName,
- attrs: {src: e.url, controls: "controls", ondragstart: "return false"},
- on: {mousedown: t.move}
- }, "img", t.getIsVideo(e), !1))])
- })), 1)], 1), t._v(" "), n("div", {staticClass: "el-image-viewer__btn el-image-viewer__actions"}, [n("div", {staticClass: "el-image-viewer__actions__inner"}, [n("i", {
- staticClass: "el-icon-zoom-out",
- on: {click: t.subScale}
- }), t._v(" "), n("i", {
- staticClass: "el-icon-zoom-in",
- on: {click: t.addScale}
- }), t._v(" "), n("i", {
- staticClass: "el-icon-refresh-left", on: {
- click: function (e) {
- t.rotate = t.rotate - 90
- }
- }
- }), t._v(" "), n("i", {
- staticClass: "el-icon-refresh-right", on: {
- click: function (e) {
- t.rotate = t.rotate + 90
- }
- }
- })])])]) : t._e()
- }), [], !1, null, null, null).exports, Ri = [], Ki = 1, Wi = function (t) {
- var e = t.extend(Fi), n = function t() {
- var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
- i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, o = "imagePreview_" + Ki++,
- a = {datas: n, index: i}, s = a.onClose;
- return Li = new e({data: a}), a.onClose = function () {
- t.close(o, s)
- }, Li.id = o, r(Li.message) && (Li.$slots.default = [Li.message], Li.message = null), Li.vm = Li.$mount(), document.body.appendChild(Li.vm.$el), Li.vm.isShow = !0, Li.dom = Li.vm.$el, Ri.push(Li), Li.vm
- };
- return n.close = function (t, e) {
- for (var n = 0, i = Ri.length; n < i; n++) if (t === Ri[n].id) {
- "function" == typeof e && e(Ri[n]), Ri.splice(n, 1);
- break
- }
- }, n
- }, Ui = Object(i.a)({
- name: "group",
- data: function () {
- return {activeName: ""}
- },
- props: {
- arrow: {type: Boolean, default: !0},
- collapse: {type: Boolean, default: !0},
- header: {type: Boolean, default: !0},
- icon: {type: String},
- display: {type: Boolean, default: !0},
- card: {type: Boolean, default: !1},
- label: {type: String}
- },
- watch: {
- text: function (t) {
- this.activeName = [t]
- }
- },
- computed: {
- collapseName: function () {
- return "".concat(this.$AVUE.ui.type, "Collapse")
- }, collapseItemName: function () {
- return "".concat(this.$AVUE.ui.type, "CollapseItem")
- }, text: function () {
- return this.collapse ? 1 : 0
- }, isHeader: function () {
- return this.$slots.header && this.header || (this.label || this.icon) && this.header
- }
- },
- created: function () {
- this.activeName = [this.text]
- },
- methods: {
- handleChange: function (t) {
- this.$emit("change", t)
- }
- }
- }), Vi = Object(c.a)(Ui, (function () {
- var t = this, e = t.$createElement, n = t._self._c || e;
- return t.display ? n("div", {
- class: [t.b({
- header: !t.isHeader,
- arrow: !t.arrow
- })]
- }, [t._t("tabs"), t._v(" "), n(t.collapseName, {
- tag: "component",
- attrs: {value: t.text},
- on: {change: t.handleChange},
- model: {
- value: t.activeName, callback: function (e) {
- t.activeName = e
- }, expression: "activeName"
- }
- }, [n(t.collapseItemName, {
- tag: "component",
- attrs: {name: 1, disabled: !t.arrow}
- }, [t.$slots.header && t.header ? n("div", {
- class: [t.b("header"), t.b({none: t.$isVan})],
- attrs: {slot: "title"},
- slot: "title"
- }, [t._t("header")], 2) : (t.label || t.icon) && t.header ? n("div", {
- class: [t.b("header"), t.b({none: t.$isVan})],
- attrs: {slot: "title"},
- slot: "title"
- }, [t.icon ? n("i", {class: [t.$isVan ? "van-icon" : "", t.icon, t.b("icon")]}) : t._e(), t._v(" "), t.label ? n("h1", {class: t.b("title")}, [t._v(t._s(t.label))]) : t._e()]) : t._e(), t._v(" "), t._t("default")], 2)], 1)], 2) : t._e()
- }), [], !1, null, null, null).exports, Hi = {
- $Print: function (t) {
- var e = t.id, n = t.html, i = "", o = document.documentElement.innerHTML, a = o.substr(0, o.indexOf("<body"));
- a += "<body >\n <style>\n body{\n min-width:1000px;\n }\n .avue-form__menu,.el-table__fixed-right,.avue-crud__search,.avue-crud__menu, .avue-crud__pagination,.avue-crud__tip{\n display: none;\n }\n .el-select,\n .el-date-editor.el-input,\n .el-date-editor.el-input__inner,\n .el-cascader,\n .avue-input-number {\n width: 100% !important;\n }\n </style >\n ";
- if (e) {
- if (!document.getElementById(e)) return !1;
- i = a + document.getElementById(e).innerHTML + "</body>"
- } else n && (i = a + n + "</body>");
- var r = window.open("", "Avue打印插件");
- r.document.open(), r.document.write(i), setTimeout((function () {
- r.window.print(), r.close()
- }), 100)
- },
- $Clipboard: function (t) {
- var e = t.text;
- return new Promise((function (t, n) {
- var i = document.body, o = "rtl" == document.documentElement.getAttribute("dir"),
- a = document.createElement("textarea");
- a.style.fontSize = "12pt", a.style.border = "0", a.style.padding = "0", a.style.margin = "0", a.style.position = "absolute", a.style[o ? "right" : "left"] = "-9999px";
- var r = window.pageYOffset || document.documentElement.scrollTop;
- a.style.top = "".concat(r, "px"), a.setAttribute("readonly", ""), a.value = e, i.appendChild(a), function (t) {
- var e;
- if ("SELECT" === t.nodeName) t.focus(), e = t.value; else if ("INPUT" === t.nodeName || "TEXTAREA" === t.nodeName) {
- var n = t.hasAttribute("readonly");
- n || t.setAttribute("readonly", ""), t.select(), t.setSelectionRange(0, t.value.length), n || t.removeAttribute("readonly"), e = t.value
- } else {
- t.hasAttribute("contenteditable") && t.focus();
- var i = window.getSelection(), o = document.createRange();
- o.selectNodeContents(t), i.removeAllRanges(), i.addRange(o), e = i.toString()
- }
- }(a);
- try {
- document.execCommand("copy"), t()
- } catch (t) {
- !1, n()
- }
- }))
- },
- $Log: Pi.a,
- $NProgress: zi,
- $Screenshot: function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- if (window.html2canvas) return window.html2canvas(t, e);
- D.a.logs("Screenshot")
- },
- deepClone: J.d,
- dataURLtoFile: J.c,
- isJson: J.r,
- setPx: J.v,
- vaildData: J.y,
- sortArrys: J.w,
- findArray: J.i,
- validatenull: bt.b,
- downFile: J.g,
- loadScript: J.s,
- watermark: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
- return new Qt(t)
- },
- asyncValidator: bt.a,
- findObject: J.k
- }, qi = function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- t.use(Ii), t.directive("dialogdrag", ji), Object.keys(Ci).map((function (e) {
- var n = Ci[e], i = n.name || "";
- i = "-" === i.substr(i.length - 1, 1) ? i.substr(0, i.length - 1) + e : i, t.component(i, n)
- })), Object.keys(Hi).forEach((function (e) {
- t.prototype[e] = Hi[e]
- })), $i.a.use(e.locale), $i.a.i18n(e.i18n), t.prototype.$axios = e.axios || window.axios, t.prototype.$typeList = {
- img: /\.(gif|jpg|jpeg|png|GIF|JPG|PNG)/,
- video: /\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|ogg|mp4)/
- }, t.component(Vi.name, Vi), t.prototype.$ImagePreview = Wi(t), "dark" === e.theme && (document.documentElement.className = "avue-theme--dark"), t.prototype.$uploadFun = function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
- e = arguments.length > 1 ? arguments[1] : void 0;
- e = e || this;
- var n = ["uploadPreview", "uploadBefore", "uploadAfter", "uploadDelete", "uploadError", "uploadExceed"], i = {};
- return "upload" === t.type ? n.forEach((function (n) {
- t[n] || (i[n] = e[n])
- })) : n.forEach((function (t) {
- i[t] = e[t]
- })), i
- }, t.prototype.$AVUE = {
- ui: (t.prototype[ki.is] = !0, ki),
- size: e.size || "small",
- calcHeight: e.calcHeight || 0,
- tableSize: e.tableSize,
- formSize: e.formSize,
- menuType: e.menuType || "text",
- canvas: Object.assign({
- text: "avuejs.com",
- fontFamily: "microsoft yahei",
- color: "#999",
- fontSize: 16,
- opacity: 100,
- bottom: 10,
- right: 10,
- ratio: 1
- }, e.canvas),
- qiniu: Object.assign({
- AK: "",
- SK: "",
- scope: "",
- url: "",
- bucket: "https://upload.qiniup.com",
- deadline: 1
- }, e.qiniu || {}),
- ali: Object.assign({
- region: "",
- endpoint: "",
- stsToken: "",
- accessKeyId: "",
- accessKeySecret: "",
- bucket: ""
- }, e.ali || {})
- }
- };
- "undefined" != typeof window && window.Vue && qi(window.Vue);
- var Yi = Object.assign({version: "2.8.5", locale: $i.a.locale, $Echart: Cn, install: qi}, Ci);
- e.default = Yi
- }]).default
- }));
|