1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447 |
- /*!
- * Avue.js v2.13.2
- * (c) 2017-2024 Smallwei
- * Released under the MIT License.
- *
- */
- !(function (t, e) {
- 'object' == typeof exports && 'object' == typeof module
- ? (module.exports = e(require('vue'), require('axios')))
- : 'function' == typeof define && define.amd
- ? define('AVUE', ['vue', 'axios'], e)
- : 'object' == typeof exports
- ? (exports.AVUE = e(require('vue'), require('axios')))
- : (t.AVUE = e(t.Vue, t.axios));
- })(this, function (t, e) {
- 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 = 52))
- );
- })([
- function (t, e, n) {
- var i = n(27),
- o = 'object' == typeof self && self && self.Object === Object && self,
- r = i || o || Function('return this')();
- t.exports = r;
- },
- function (t, e, n) {
- t.exports = (function () {
- 'use strict';
- var t = 6e4,
- e = 36e5,
- n = 'millisecond',
- i = 'second',
- o = 'minute',
- r = 'hour',
- a = 'day',
- s = 'week',
- l = 'month',
- c = 'quarter',
- u = 'year',
- d = 'date',
- p = 'Invalid Date',
- h = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,
- f = /\[([^\]]+)]|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,
- m = {
- 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('_'),
- ordinal: function (t) {
- var e = ['th', 'st', 'nd', 'rd'],
- n = t % 100;
- return '[' + t + (e[(n - 20) % 10] || e[n] || e[0]) + ']';
- }
- },
- v = function (t, e, n) {
- var i = String(t);
- return !i || i.length >= e ? t : '' + Array(e + 1 - i.length).join(n) + t;
- },
- b = {
- s: v,
- z: function (t) {
- var e = -t.utcOffset(),
- n = Math.abs(e),
- i = Math.floor(n / 60),
- o = n % 60;
- return (e <= 0 ? '+' : '-') + v(i, 2, '0') + ':' + v(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, l),
- r = n - o < 0,
- a = e.clone().add(i + (r ? -1 : 1), l);
- return +(-(i + (n - o) / (r ? o - a : a - o)) || 0);
- },
- a: function (t) {
- return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
- },
- p: function (t) {
- return (
- { M: l, y: u, w: s, d: a, D: d, h: r, m: o, s: i, ms: n, Q: c }[t] ||
- String(t || '')
- .toLowerCase()
- .replace(/s$/, '')
- );
- },
- u: function (t) {
- return void 0 === t;
- }
- },
- y = 'en',
- g = {};
- g[y] = m;
- var x = '$isDayjsObject',
- w = function (t) {
- return t instanceof k || !(!t || !t[x]);
- },
- _ = function t(e, n, i) {
- var o;
- if (!e) return y;
- if ('string' == typeof e) {
- var r = e.toLowerCase();
- g[r] && (o = r), n && ((g[r] = n), (o = r));
- var a = e.split('-');
- if (!o && a.length > 1) return t(a[0]);
- } else {
- var s = e.name;
- (g[s] = e), (o = s);
- }
- return !i && o && (y = o), o || (!i && y);
- },
- S = function (t, e) {
- if (w(t)) return t.clone();
- var n = 'object' == typeof e ? e : {};
- return (n.date = t), (n.args = arguments), new k(n);
- },
- C = b;
- (C.l = _),
- (C.i = w),
- (C.w = function (t, e) {
- return S(t, { locale: e.$L, utc: e.$u, x: e.$x, $offset: e.$offset });
- });
- var k = (function () {
- function m(t) {
- (this.$L = _(t.locale, null, !0)), this.parse(t), (this.$x = this.$x || t.x || {}), (this[x] = !0);
- }
- var v = m.prototype;
- return (
- (v.parse = function (t) {
- (this.$d = (function (t) {
- var e = t.date,
- n = t.utc;
- if (null === e) return new Date(NaN);
- if (C.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(h);
- if (i) {
- var o = i[2] - 1 || 0,
- r = (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, r)) : new Date(i[1], o, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, r);
- }
- }
- return new Date(e);
- })(t)),
- this.init();
- }),
- (v.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());
- }),
- (v.$utils = function () {
- return C;
- }),
- (v.isValid = function () {
- return !(this.$d.toString() === p);
- }),
- (v.isSame = function (t, e) {
- var n = S(t);
- return this.startOf(e) <= n && n <= this.endOf(e);
- }),
- (v.isAfter = function (t, e) {
- return S(t) < this.startOf(e);
- }),
- (v.isBefore = function (t, e) {
- return this.endOf(e) < S(t);
- }),
- (v.$g = function (t, e, n) {
- return C.u(t) ? this[e] : this.set(n, t);
- }),
- (v.unix = function () {
- return Math.floor(this.valueOf() / 1e3);
- }),
- (v.valueOf = function () {
- return this.$d.getTime();
- }),
- (v.startOf = function (t, e) {
- var n = this,
- c = !!C.u(e) || e,
- p = C.p(t),
- h = function (t, e) {
- var i = C.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);
- return c ? i : i.endOf(a);
- },
- f = function (t, e) {
- return C.w(n.toDate()[t].apply(n.toDate('s'), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), n);
- },
- m = this.$W,
- v = this.$M,
- b = this.$D,
- y = 'set' + (this.$u ? 'UTC' : '');
- switch (p) {
- case u:
- return c ? h(1, 0) : h(31, 11);
- case l:
- return c ? h(1, v) : h(0, v + 1);
- case s:
- var g = this.$locale().weekStart || 0,
- x = (m < g ? m + 7 : m) - g;
- return h(c ? b - x : b + (6 - x), v);
- case a:
- case d:
- return f(y + 'Hours', 0);
- case r:
- return f(y + 'Minutes', 1);
- case o:
- return f(y + 'Seconds', 2);
- case i:
- return f(y + 'Milliseconds', 3);
- default:
- return this.clone();
- }
- }),
- (v.endOf = function (t) {
- return this.startOf(t, !1);
- }),
- (v.$set = function (t, e) {
- var s,
- c = C.p(t),
- p = 'set' + (this.$u ? 'UTC' : ''),
- h = ((s = {}),
- (s[a] = p + 'Date'),
- (s[d] = p + 'Date'),
- (s[l] = p + 'Month'),
- (s[u] = p + 'FullYear'),
- (s[r] = p + 'Hours'),
- (s[o] = p + 'Minutes'),
- (s[i] = p + 'Seconds'),
- (s[n] = p + 'Milliseconds'),
- s)[c],
- f = c === a ? this.$D + (e - this.$W) : e;
- if (c === l || c === u) {
- var m = this.clone().set(d, 1);
- m.$d[h](f), m.init(), (this.$d = m.set(d, Math.min(this.$D, m.daysInMonth())).$d);
- } else h && this.$d[h](f);
- return this.init(), this;
- }),
- (v.set = function (t, e) {
- return this.clone().$set(t, e);
- }),
- (v.get = function (t) {
- return this[C.p(t)]();
- }),
- (v.add = function (n, c) {
- var d,
- p = this;
- n = Number(n);
- var h = C.p(c),
- f = function (t) {
- var e = S(p);
- return C.w(e.date(e.date() + Math.round(t * n)), p);
- };
- if (h === l) return this.set(l, this.$M + n);
- if (h === u) return this.set(u, this.$y + n);
- if (h === a) return f(1);
- if (h === s) return f(7);
- var m = ((d = {}), (d[o] = t), (d[r] = e), (d[i] = 1e3), d)[h] || 1,
- v = this.$d.getTime() + n * m;
- return C.w(v, this);
- }),
- (v.subtract = function (t, e) {
- return this.add(-1 * t, e);
- }),
- (v.format = function (t) {
- var e = this,
- n = this.$locale();
- if (!this.isValid()) return n.invalidDate || p;
- var i = t || 'YYYY-MM-DDTHH:mm:ssZ',
- o = C.z(this),
- r = this.$H,
- a = this.$m,
- s = this.$M,
- l = n.weekdays,
- c = n.months,
- u = n.meridiem,
- d = function (t, n, o, r) {
- return (t && (t[n] || t(e, i))) || o[n].slice(0, r);
- },
- h = function (t) {
- return C.s(r % 12 || 12, t, '0');
- },
- m =
- u ||
- function (t, e, n) {
- var i = t < 12 ? 'AM' : 'PM';
- return n ? i.toLowerCase() : i;
- };
- return i.replace(f, function (t, i) {
- return (
- i ||
- (function (t) {
- switch (t) {
- case 'YY':
- return String(e.$y).slice(-2);
- case 'YYYY':
- return C.s(e.$y, 4, '0');
- case 'M':
- return s + 1;
- case 'MM':
- return C.s(s + 1, 2, '0');
- case 'MMM':
- return d(n.monthsShort, s, c, 3);
- case 'MMMM':
- return d(c, s);
- case 'D':
- return e.$D;
- case 'DD':
- return C.s(e.$D, 2, '0');
- case 'd':
- return String(e.$W);
- case 'dd':
- return d(n.weekdaysMin, e.$W, l, 2);
- case 'ddd':
- return d(n.weekdaysShort, e.$W, l, 3);
- case 'dddd':
- return l[e.$W];
- case 'H':
- return String(r);
- case 'HH':
- return C.s(r, 2, '0');
- case 'h':
- return h(1);
- case 'hh':
- return h(2);
- case 'a':
- return m(r, a, !0);
- case 'A':
- return m(r, a, !1);
- case 'm':
- return String(a);
- case 'mm':
- return C.s(a, 2, '0');
- case 's':
- return String(e.$s);
- case 'ss':
- return C.s(e.$s, 2, '0');
- case 'SSS':
- return C.s(e.$ms, 3, '0');
- case 'Z':
- return o;
- }
- return null;
- })(t) ||
- o.replace(':', '')
- );
- });
- }),
- (v.utcOffset = function () {
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
- }),
- (v.diff = function (n, d, p) {
- var h,
- f = this,
- m = C.p(d),
- v = S(n),
- b = (v.utcOffset() - this.utcOffset()) * t,
- y = this - v,
- g = function () {
- return C.m(f, v);
- };
- switch (m) {
- case u:
- h = g() / 12;
- break;
- case l:
- h = g();
- break;
- case c:
- h = g() / 3;
- break;
- case s:
- h = (y - b) / 6048e5;
- break;
- case a:
- h = (y - b) / 864e5;
- break;
- case r:
- h = y / e;
- break;
- case o:
- h = y / t;
- break;
- case i:
- h = y / 1e3;
- break;
- default:
- h = y;
- }
- return p ? h : C.a(h);
- }),
- (v.daysInMonth = function () {
- return this.endOf(l).$D;
- }),
- (v.$locale = function () {
- return g[this.$L];
- }),
- (v.locale = function (t, e) {
- if (!t) return this.$L;
- var n = this.clone(),
- i = _(t, e, !0);
- return i && (n.$L = i), n;
- }),
- (v.clone = function () {
- return C.w(this.$d, this);
- }),
- (v.toDate = function () {
- return new Date(this.valueOf());
- }),
- (v.toJSON = function () {
- return this.isValid() ? this.toISOString() : null;
- }),
- (v.toISOString = function () {
- return this.$d.toISOString();
- }),
- (v.toString = function () {
- return this.$d.toUTCString();
- }),
- m
- );
- })(),
- O = k.prototype;
- return (
- (S.prototype = O),
- [
- ['$ms', n],
- ['$s', i],
- ['$m', o],
- ['$H', r],
- ['$W', a],
- ['$M', l],
- ['$y', u],
- ['$D', d]
- ].forEach(function (t) {
- O[t[1]] = function (e) {
- return this.$g(e, t[0], t[1]);
- };
- }),
- (S.extend = function (t, e) {
- return t.$i || (t(e, k, S), (t.$i = !0)), S;
- }),
- (S.locale = _),
- (S.isDayjs = w),
- (S.unix = function (t) {
- return S(1e3 * t);
- }),
- (S.en = g[y]),
- (S.Ls = g),
- (S.p = {}),
- S
- );
- })();
- },
- function (e, n) {
- e.exports = t;
- },
- function (t, e, n) {
- var i = n(64),
- o = n(67);
- t.exports = function (t, e) {
- var n = o(t, e);
- return i(n) ? n : void 0;
- };
- },
- function (t, e) {
- var n = Array.isArray;
- t.exports = n;
- },
- function (t, e) {
- t.exports = function (t) {
- return null != t && 'object' == typeof t;
- };
- },
- function (t, e) {
- t.exports = function (t) {
- var e = typeof t;
- return null != t && ('object' == e || 'function' == e);
- };
- },
- function (t, e, n) {
- var i = n(8),
- o = n(56),
- r = n(57),
- a = i ? i.toStringTag : void 0;
- t.exports = function (t) {
- return null == t ? (void 0 === t ? '[object Undefined]' : '[object Null]') : a && a in Object(t) ? o(t) : r(t);
- };
- },
- function (t, e, n) {
- var i = n(0).Symbol;
- t.exports = i;
- },
- function (t, e, n) {
- var i = n(3)(Object, 'create');
- t.exports = i;
- },
- function (t, e, n) {
- var i = n(72),
- o = n(73),
- r = n(74),
- a = n(75),
- s = n(76);
- function l(t) {
- var e = -1,
- n = null == t ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var i = t[e];
- this.set(i[0], i[1]);
- }
- }
- (l.prototype.clear = i), (l.prototype.delete = o), (l.prototype.get = r), (l.prototype.has = a), (l.prototype.set = s), (t.exports = l);
- },
- function (t, e, n) {
- var i = n(31);
- t.exports = function (t, e) {
- for (var n = t.length; n--; ) if (i(t[n][0], e)) return n;
- return -1;
- };
- },
- function (t, e, n) {
- var i = n(78);
- t.exports = function (t, e) {
- var n = t.__data__;
- return i(e) ? n['string' == typeof e ? 'string' : 'hash'] : n.map;
- };
- },
- function (t, e, n) {
- var i = n(16),
- o = n(33);
- t.exports = function (t, e, n, r) {
- var a = !n;
- n || (n = {});
- for (var s = -1, l = e.length; ++s < l; ) {
- var c = e[s],
- u = r ? r(n[c], t[c], c, n, t) : void 0;
- void 0 === u && (u = t[c]), a ? o(n, c, u) : i(n, c, u);
- }
- return n;
- };
- },
- function (t, e, n) {
- var i = n(7),
- o = n(5);
- t.exports = function (t) {
- return 'symbol' == typeof t || (o(t) && '[object Symbol]' == i(t));
- };
- },
- function (t, e, n) {
- var i = n(3)(n(0), 'Map');
- t.exports = i;
- },
- function (t, e, n) {
- var i = n(33),
- o = n(31),
- r = Object.prototype.hasOwnProperty;
- t.exports = function (t, e, n) {
- var a = t[e];
- (r.call(t, e) && o(a, n) && (void 0 !== n || e in t)) || i(t, e, n);
- };
- },
- function (t, e, n) {
- var i = n(35),
- o = n(102),
- r = n(39);
- t.exports = function (t) {
- return r(t) ? i(t) : o(t);
- };
- },
- function (t, e) {
- t.exports = function (t) {
- return (
- t.webpackPolyfill ||
- ((t.deprecate = function () {}),
- (t.paths = []),
- t.children || (t.children = []),
- Object.defineProperty(t, 'loaded', {
- enumerable: !0,
- get: function () {
- return t.l;
- }
- }),
- Object.defineProperty(t, 'id', {
- enumerable: !0,
- get: function () {
- return t.i;
- }
- }),
- (t.webpackPolyfill = 1)),
- t
- );
- };
- },
- function (t, e) {
- t.exports = function (t) {
- return function (e) {
- return t(e);
- };
- };
- },
- function (t, e, n) {
- (function (t) {
- var i = n(27),
- o = e && !e.nodeType && e,
- r = o && 'object' == typeof t && t && !t.nodeType && t,
- a = r && r.exports === o && i.process,
- s = (function () {
- try {
- var t = r && r.require && r.require('util').types;
- return t || (a && a.binding && a.binding('util'));
- } catch (t) {}
- })();
- t.exports = s;
- }).call(this, n(18)(t));
- },
- function (t, e) {
- var n = Object.prototype;
- t.exports = function (t) {
- var e = t && t.constructor;
- return t === (('function' == typeof e && e.prototype) || n);
- };
- },
- function (t, e, n) {
- var i = n(35),
- o = n(105),
- r = n(39);
- t.exports = function (t) {
- return r(t) ? i(t, !0) : o(t);
- };
- },
- function (t, e, n) {
- var i = n(110),
- o = n(40),
- r = Object.prototype.propertyIsEnumerable,
- a = Object.getOwnPropertySymbols,
- s = a
- ? function (t) {
- return null == t
- ? []
- : ((t = Object(t)),
- i(a(t), function (e) {
- return r.call(t, e);
- }));
- }
- : o;
- t.exports = s;
- },
- function (t, e, n) {
- var i = n(114),
- o = n(15),
- r = n(115),
- a = n(116),
- s = n(117),
- l = n(7),
- c = n(30),
- u = c(i),
- d = c(o),
- p = c(r),
- h = c(a),
- f = c(s),
- m = l;
- ((i && '[object DataView]' != m(new i(new ArrayBuffer(1)))) ||
- (o && '[object Map]' != m(new o())) ||
- (r && '[object Promise]' != m(r.resolve())) ||
- (a && '[object Set]' != m(new a())) ||
- (s && '[object WeakMap]' != m(new s()))) &&
- (m = function (t) {
- var e = l(t),
- n = '[object Object]' == e ? t.constructor : void 0,
- i = n ? c(n) : '';
- if (i)
- switch (i) {
- case u:
- return '[object DataView]';
- case d:
- return '[object Map]';
- case p:
- return '[object Promise]';
- case h:
- return '[object Set]';
- case f:
- return '[object WeakMap]';
- }
- return e;
- }),
- (t.exports = m);
- },
- function (t, e, n) {
- var i = n(120);
- t.exports = function (t) {
- var e = new t.constructor(t.byteLength);
- return new i(e).set(new i(t)), e;
- };
- },
- function (t, e, n) {
- var i = n(4),
- o = n(54),
- r = n(58),
- a = n(82);
- t.exports = function (t, e) {
- return i(t) ? t : o(t, e) ? [t] : r(a(t));
- };
- },
- function (t, e, n) {
- (function (e) {
- var n = 'object' == typeof e && e && e.Object === Object && e;
- t.exports = n;
- }).call(this, n(55));
- },
- function (t, e, n) {
- var i = n(61),
- o = n(77),
- r = n(79),
- a = n(80),
- s = n(81);
- function l(t) {
- var e = -1,
- n = null == t ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var i = t[e];
- this.set(i[0], i[1]);
- }
- }
- (l.prototype.clear = i), (l.prototype.delete = o), (l.prototype.get = r), (l.prototype.has = a), (l.prototype.set = s), (t.exports = l);
- },
- function (t, e, n) {
- var i = n(7),
- o = n(6);
- t.exports = function (t) {
- if (!o(t)) return !1;
- var e = i(t);
- return '[object Function]' == e || '[object GeneratorFunction]' == e || '[object AsyncFunction]' == e || '[object Proxy]' == e;
- };
- },
- function (t, e) {
- var n = Function.prototype.toString;
- t.exports = function (t) {
- if (null != t) {
- try {
- return n.call(t);
- } catch (t) {}
- try {
- return t + '';
- } catch (t) {}
- }
- return '';
- };
- },
- function (t, e) {
- t.exports = function (t, e) {
- return t === e || (t != t && e != e);
- };
- },
- function (t, e, n) {
- var i = n(14);
- t.exports = function (t) {
- if ('string' == typeof t || i(t)) return t;
- var e = t + '';
- return '0' == e && 1 / t == -1 / 0 ? '-0' : e;
- };
- },
- function (t, e, n) {
- var i = n(86);
- t.exports = function (t, e, n) {
- '__proto__' == e && i ? i(t, e, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : (t[e] = n);
- };
- },
- function (t, e) {
- var n = /^(?:0|[1-9]\d*)$/;
- t.exports = function (t, e) {
- var i = typeof t;
- return !!(e = null == e ? 9007199254740991 : e) && ('number' == i || ('symbol' != i && n.test(t))) && t > -1 && t % 1 == 0 && t < e;
- };
- },
- function (t, e, n) {
- var i = n(96),
- o = n(97),
- r = n(4),
- a = n(36),
- s = n(34),
- l = n(100),
- c = Object.prototype.hasOwnProperty;
- t.exports = function (t, e) {
- var n = r(t),
- u = !n && o(t),
- d = !n && !u && a(t),
- p = !n && !u && !d && l(t),
- h = n || u || d || p,
- f = h ? i(t.length, String) : [],
- m = f.length;
- for (var v in t)
- (!e && !c.call(t, v)) ||
- (h && ('length' == v || (d && ('offset' == v || 'parent' == v)) || (p && ('buffer' == v || 'byteLength' == v || 'byteOffset' == v)) || s(v, m))) ||
- f.push(v);
- return f;
- };
- },
- function (t, e, n) {
- (function (t) {
- var i = n(0),
- o = n(99),
- r = e && !e.nodeType && e,
- a = r && 'object' == typeof t && t && !t.nodeType && t,
- s = a && a.exports === r ? i.Buffer : void 0,
- l = (s ? s.isBuffer : void 0) || o;
- t.exports = l;
- }).call(this, n(18)(t));
- },
- function (t, e) {
- t.exports = function (t) {
- return 'number' == typeof t && t > -1 && t % 1 == 0 && t <= 9007199254740991;
- };
- },
- function (t, e) {
- t.exports = function (t, e) {
- return function (n) {
- return t(e(n));
- };
- };
- },
- function (t, e, n) {
- var i = n(29),
- o = n(37);
- t.exports = function (t) {
- return null != t && o(t.length) && !i(t);
- };
- },
- function (t, e) {
- t.exports = function () {
- return [];
- };
- },
- function (t, e, n) {
- var i = n(42),
- o = n(43),
- r = n(23),
- a = n(40),
- s = Object.getOwnPropertySymbols
- ? function (t) {
- for (var e = []; t; ) i(e, r(t)), (t = o(t));
- return e;
- }
- : a;
- t.exports = s;
- },
- function (t, e) {
- t.exports = function (t, e) {
- for (var n = -1, i = e.length, o = t.length; ++n < i; ) t[o + n] = e[n];
- return t;
- };
- },
- function (t, e, n) {
- var i = n(38)(Object.getPrototypeOf, Object);
- t.exports = i;
- },
- function (t, e, n) {
- var i = n(42),
- o = n(4);
- t.exports = function (t, e, n) {
- var r = e(t);
- return o(t) ? r : i(r, n(t));
- };
- },
- function (t, e, n) {
- var i, o;
- void 0 ===
- (o =
- 'function' ==
- typeof (i = function (t, e, n) {
- return function (t, e, n, i, o, r) {
- function a(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,
- r,
- a,
- 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 = '', r = 0, a = n.length; r < a; ++r) 0 !== r && r % 3 == 0 && (o = s.options.separator + o), (o = n[a - r - 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: []
- }),
- r && 'object' == typeof r)
- )
- for (var l in s.options) r.hasOwnProperty(l) && null !== r[l] && (s.options[l] = r[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)),
- a(s.startVal) && a(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 (!a((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) {
- var i = n(53);
- t.exports = function (t, e, n) {
- var o = null == t ? void 0 : i(t, e);
- return void 0 === o ? n : o;
- };
- },
- function (t, e, n) {
- var i = n(85);
- t.exports = function (t, e, n) {
- return null == t ? t : i(t, e, n);
- };
- },
- function (t, e, n) {
- var i = n(87);
- t.exports = function (t) {
- return i(t, 5);
- };
- },
- function (t, n) {
- t.exports = 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: 0.08,
- easing: 'ease',
- positionUsing: '',
- speed: 200,
- trickle: !0,
- trickleRate: 0.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 r(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,
- a(function (e) {
- '' === i.positionUsing && (i.positionUsing = n.getPositioningCSS()),
- s(
- c,
- (function (t, e, n) {
- var o;
- return (
- ((o =
- 'translate3d' === i.positionUsing
- ? { transform: 'translate3d(' + r(t) + '%,0,0)' }
- : 'translate' === i.positionUsing
- ? { transform: 'translate(' + r(t) + '%,0)' }
- : { 'margin-left': r(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(0.3 + 0.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, 0.1, 0.95)), (e = o(e + t, 0, 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,
- a = e.querySelector(i.barSelector),
- l = t ? '-100' : r(n.status || 0),
- u = document.querySelector(i.parent);
- return (
- s(a, { 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 a = (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, r = e.charAt(0).toUpperCase() + e.slice(1); o--; ) if ((i = t[o] + r) 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,
- r = arguments;
- if (2 == r.length) for (n in e) void 0 !== (o = e[n]) && e.hasOwnProperty(n) && i(t, n, o);
- else i(t, r[1], r[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) {
- var i;
- self,
- (i = () =>
- (() => {
- var t = {
- 173: (t, e, n) => {
- (t.exports = n(252)(!1)).push([
- t.id,
- '\n.vue-cropper[data-v-8ed66ddc] {\n position: relative;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n direction: ltr;\n touch-action: none;\n text-align: left;\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC");\n}\n.cropper-box[data-v-8ed66ddc],\n.cropper-box-canvas[data-v-8ed66ddc],\n.cropper-drag-box[data-v-8ed66ddc],\n.cropper-crop-box[data-v-8ed66ddc],\n.cropper-face[data-v-8ed66ddc] {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n user-select: none;\n}\n.cropper-box-canvas img[data-v-8ed66ddc] {\n position: relative;\n text-align: left;\n user-select: none;\n transform: none;\n max-width: none;\n max-height: none;\n}\n.cropper-box[data-v-8ed66ddc] {\n overflow: hidden;\n}\n.cropper-move[data-v-8ed66ddc] {\n cursor: move;\n}\n.cropper-crop[data-v-8ed66ddc] {\n cursor: crosshair;\n}\n.cropper-modal[data-v-8ed66ddc] {\n background: rgba(0, 0, 0, 0.5);\n}\n.cropper-crop-box[data-v-8ed66ddc] {\n /*border: 2px solid #39f;*/\n}\n.cropper-view-box[data-v-8ed66ddc] {\n display: block;\n overflow: hidden;\n width: 100%;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 0.75);\n user-select: none;\n}\n.cropper-view-box img[data-v-8ed66ddc] {\n user-select: none;\n text-align: left;\n max-width: none;\n max-height: none;\n}\n.cropper-face[data-v-8ed66ddc] {\n top: 0;\n left: 0;\n background-color: #fff;\n opacity: 0.1;\n}\n.crop-info[data-v-8ed66ddc] {\n position: absolute;\n left: 0px;\n min-width: 65px;\n text-align: center;\n color: white;\n line-height: 20px;\n background-color: rgba(0, 0, 0, 0.8);\n font-size: 12px;\n}\n.crop-line[data-v-8ed66ddc] {\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n opacity: 0.1;\n}\n.line-w[data-v-8ed66ddc] {\n top: -3px;\n left: 0;\n height: 5px;\n cursor: n-resize;\n}\n.line-a[data-v-8ed66ddc] {\n top: 0;\n left: -3px;\n width: 5px;\n cursor: w-resize;\n}\n.line-s[data-v-8ed66ddc] {\n bottom: -3px;\n left: 0;\n height: 5px;\n cursor: s-resize;\n}\n.line-d[data-v-8ed66ddc] {\n top: 0;\n right: -3px;\n width: 5px;\n cursor: e-resize;\n}\n.crop-point[data-v-8ed66ddc] {\n position: absolute;\n width: 8px;\n height: 8px;\n opacity: 0.75;\n background-color: #39f;\n border-radius: 100%;\n}\n.point1[data-v-8ed66ddc] {\n top: -4px;\n left: -4px;\n cursor: nw-resize;\n}\n.point2[data-v-8ed66ddc] {\n top: -5px;\n left: 50%;\n margin-left: -3px;\n cursor: n-resize;\n}\n.point3[data-v-8ed66ddc] {\n top: -4px;\n right: -4px;\n cursor: ne-resize;\n}\n.point4[data-v-8ed66ddc] {\n top: 50%;\n left: -4px;\n margin-top: -3px;\n cursor: w-resize;\n}\n.point5[data-v-8ed66ddc] {\n top: 50%;\n right: -4px;\n margin-top: -3px;\n cursor: e-resize;\n}\n.point6[data-v-8ed66ddc] {\n bottom: -5px;\n left: -4px;\n cursor: sw-resize;\n}\n.point7[data-v-8ed66ddc] {\n bottom: -5px;\n left: 50%;\n margin-left: -3px;\n cursor: s-resize;\n}\n.point8[data-v-8ed66ddc] {\n bottom: -5px;\n right: -4px;\n cursor: se-resize;\n}\n@media screen and (max-width: 500px) {\n.crop-point[data-v-8ed66ddc] {\n position: absolute;\n width: 20px;\n height: 20px;\n opacity: 0.45;\n background-color: #39f;\n border-radius: 100%;\n}\n.point1[data-v-8ed66ddc] {\n top: -10px;\n left: -10px;\n}\n.point2[data-v-8ed66ddc],\n .point4[data-v-8ed66ddc],\n .point5[data-v-8ed66ddc],\n .point7[data-v-8ed66ddc] {\n display: none;\n}\n.point3[data-v-8ed66ddc] {\n top: -10px;\n right: -10px;\n}\n.point4[data-v-8ed66ddc] {\n top: 0;\n left: 0;\n}\n.point6[data-v-8ed66ddc] {\n bottom: -10px;\n left: -10px;\n}\n.point8[data-v-8ed66ddc] {\n bottom: -10px;\n right: -10px;\n}\n}\n',
- ''
- ]);
- },
- 252: (t) => {
- t.exports = function (t) {
- var e = [];
- return (
- (e.toString = function () {
- return this.map(function (e) {
- var n = (function (t, e) {
- var n,
- i = t[1] || '',
- o = t[3];
- if (!o) return i;
- if (e && 'function' == typeof btoa) {
- var r = ((n = o), '/*# sourceMappingURL=data:application/json;charset=utf-8;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(n)))) + ' */'),
- a = o.sources.map(function (t) {
- return '/*# sourceURL=' + o.sourceRoot + t + ' */';
- });
- return [i].concat(a).concat([r]).join('\n');
- }
- return [i].join('\n');
- })(e, t);
- return e[2] ? '@media ' + e[2] + '{' + n + '}' : n;
- }).join('');
- }),
- (e.i = function (t, n) {
- 'string' == typeof t && (t = [[null, t, '']]);
- for (var i = {}, o = 0; o < this.length; o++) {
- var r = this[o][0];
- 'number' == typeof r && (i[r] = !0);
- }
- for (o = 0; o < t.length; o++) {
- var a = t[o];
- ('number' == typeof a[0] && i[a[0]]) || (n && !a[2] ? (a[2] = n) : n && (a[2] = '(' + a[2] + ') and (' + n + ')'), e.push(a));
- }
- }),
- e
- );
- };
- },
- 125: (t, e, n) => {
- var i = n(173);
- 'string' == typeof i && (i = [[t.id, i, '']]), n(723)(i, { hmr: !0, transform: void 0, insertInto: void 0 }), i.locals && (t.exports = i.locals);
- },
- 723: (t, e, n) => {
- var i,
- o,
- r = {},
- a =
- ((i = function () {
- return window && document && document.all && !window.atob;
- }),
- function () {
- return void 0 === o && (o = i.apply(this, arguments)), o;
- }),
- s = function (t, e) {
- return e ? e.querySelector(t) : document.querySelector(t);
- },
- l = (function (t) {
- var e = {};
- return function (t, n) {
- if ('function' == typeof t) return t();
- if (void 0 === e[t]) {
- var i = s.call(this, t, n);
- if (window.HTMLIFrameElement && i instanceof window.HTMLIFrameElement)
- try {
- i = i.contentDocument.head;
- } catch (t) {
- i = null;
- }
- e[t] = i;
- }
- return e[t];
- };
- })(),
- c = null,
- u = 0,
- d = [],
- p = n(947);
- function h(t, e) {
- for (var n = 0; n < t.length; n++) {
- var i = t[n],
- o = r[i.id];
- if (o) {
- o.refs++;
- for (var a = 0; a < o.parts.length; a++) o.parts[a](i.parts[a]);
- for (; a < i.parts.length; a++) o.parts.push(g(i.parts[a], e));
- } else {
- var s = [];
- for (a = 0; a < i.parts.length; a++) s.push(g(i.parts[a], e));
- r[i.id] = { id: i.id, refs: 1, parts: s };
- }
- }
- }
- function f(t, e) {
- for (var n = [], i = {}, o = 0; o < t.length; o++) {
- var r = t[o],
- a = e.base ? r[0] + e.base : r[0],
- s = { css: r[1], media: r[2], sourceMap: r[3] };
- i[a] ? i[a].parts.push(s) : n.push((i[a] = { id: a, parts: [s] }));
- }
- return n;
- }
- function m(t, e) {
- var n = l(t.insertInto);
- if (!n) throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
- var i = d[d.length - 1];
- if ('top' === t.insertAt) i ? (i.nextSibling ? n.insertBefore(e, i.nextSibling) : n.appendChild(e)) : n.insertBefore(e, n.firstChild), d.push(e);
- else if ('bottom' === t.insertAt) n.appendChild(e);
- else {
- if ('object' != typeof t.insertAt || !t.insertAt.before)
- throw new Error(
- "[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n"
- );
- var o = l(t.insertAt.before, n);
- n.insertBefore(e, o);
- }
- }
- function v(t) {
- if (null === t.parentNode) return !1;
- t.parentNode.removeChild(t);
- var e = d.indexOf(t);
- e >= 0 && d.splice(e, 1);
- }
- function b(t) {
- var e = document.createElement('style');
- if ((void 0 === t.attrs.type && (t.attrs.type = 'text/css'), void 0 === t.attrs.nonce)) {
- var i = n.nc;
- i && (t.attrs.nonce = i);
- }
- return y(e, t.attrs), m(t, e), e;
- }
- function y(t, e) {
- Object.keys(e).forEach(function (n) {
- t.setAttribute(n, e[n]);
- });
- }
- function g(t, e) {
- var n, i, o, r;
- if (e.transform && t.css) {
- if (!(r = 'function' == typeof e.transform ? e.transform(t.css) : e.transform.default(t.css))) return function () {};
- t.css = r;
- }
- if (e.singleton) {
- var a = u++;
- (n = c || (c = b(e))), (i = _.bind(null, n, a, !1)), (o = _.bind(null, n, a, !0));
- } else
- t.sourceMap &&
- 'function' == typeof URL &&
- 'function' == typeof URL.createObjectURL &&
- 'function' == typeof URL.revokeObjectURL &&
- 'function' == typeof Blob &&
- 'function' == typeof btoa
- ? ((n = (function (t) {
- var e = document.createElement('link');
- return void 0 === t.attrs.type && (t.attrs.type = 'text/css'), (t.attrs.rel = 'stylesheet'), y(e, t.attrs), m(t, e), e;
- })(e)),
- (i = C.bind(null, n, e)),
- (o = function () {
- v(n), n.href && URL.revokeObjectURL(n.href);
- }))
- : ((n = b(e)),
- (i = S.bind(null, n)),
- (o = function () {
- v(n);
- }));
- return (
- i(t),
- function (e) {
- if (e) {
- if (e.css === t.css && e.media === t.media && e.sourceMap === t.sourceMap) return;
- i((t = e));
- } else o();
- }
- );
- }
- t.exports = function (t, e) {
- if ('undefined' != typeof DEBUG && DEBUG && 'object' != typeof document) throw new Error('The style-loader cannot be used in a non-browser environment');
- ((e = e || {}).attrs = 'object' == typeof e.attrs ? e.attrs : {}),
- e.singleton || 'boolean' == typeof e.singleton || (e.singleton = a()),
- e.insertInto || (e.insertInto = 'head'),
- e.insertAt || (e.insertAt = 'bottom');
- var n = f(t, e);
- return (
- h(n, e),
- function (t) {
- for (var i = [], o = 0; o < n.length; o++) {
- var a = n[o];
- (s = r[a.id]).refs--, i.push(s);
- }
- for (t && h(f(t, e), e), o = 0; o < i.length; o++) {
- var s;
- if (0 === (s = i[o]).refs) {
- for (var l = 0; l < s.parts.length; l++) s.parts[l]();
- delete r[s.id];
- }
- }
- }
- );
- };
- var x,
- w =
- ((x = []),
- function (t, e) {
- return (x[t] = e), x.filter(Boolean).join('\n');
- });
- function _(t, e, n, i) {
- var o = n ? '' : i.css;
- if (t.styleSheet) t.styleSheet.cssText = w(e, o);
- else {
- var r = document.createTextNode(o),
- a = t.childNodes;
- a[e] && t.removeChild(a[e]), a.length ? t.insertBefore(r, a[e]) : t.appendChild(r);
- }
- }
- function S(t, e) {
- var n = e.css,
- i = e.media;
- if ((i && t.setAttribute('media', i), t.styleSheet)) t.styleSheet.cssText = n;
- else {
- for (; t.firstChild; ) t.removeChild(t.firstChild);
- t.appendChild(document.createTextNode(n));
- }
- }
- function C(t, e, n) {
- var i = n.css,
- o = n.sourceMap,
- r = void 0 === e.convertToAbsoluteUrls && o;
- (e.convertToAbsoluteUrls || r) && (i = p(i)),
- o && (i += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(o)))) + ' */');
- var a = new Blob([i], { type: 'text/css' }),
- s = t.href;
- (t.href = URL.createObjectURL(a)), s && URL.revokeObjectURL(s);
- }
- },
- 947: (t) => {
- t.exports = function (t) {
- var e = 'undefined' != typeof window && window.location;
- if (!e) throw new Error('fixUrls requires window.location');
- if (!t || 'string' != typeof t) return t;
- var n = e.protocol + '//' + e.host,
- i = n + e.pathname.replace(/\/[^\/]*$/, '/');
- return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function (t, e) {
- var o,
- r = e
- .trim()
- .replace(/^"(.*)"$/, function (t, e) {
- return e;
- })
- .replace(/^'(.*)'$/, function (t, e) {
- return e;
- });
- return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)
- ? t
- : ((o = 0 === r.indexOf('//') ? r : 0 === r.indexOf('/') ? n + r : i + r.replace(/^\.\//, '')), 'url(' + JSON.stringify(o) + ')');
- });
- };
- }
- },
- e = {};
- function n(i) {
- var o = e[i];
- if (void 0 !== o) return o.exports;
- var r = (e[i] = { id: i, exports: {} });
- return t[i](r, r.exports, n), r.exports;
- }
- (n.d = (t, e) => {
- for (var i in e) n.o(e, i) && !n.o(t, i) && Object.defineProperty(t, i, { enumerable: !0, get: e[i] });
- }),
- (n.o = (t, e) => Object.prototype.hasOwnProperty.call(t, e)),
- (n.r = (t) => {
- 'undefined' != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: 'Module' }),
- Object.defineProperty(t, '__esModule', { value: !0 });
- }),
- (n.nc = void 0);
- var i = {};
- return (
- (() => {
- 'use strict';
- n.r(i), n.d(i, { VueCropper: () => l, default: () => u });
- var t = function () {
- var t = this,
- e = t._self._c;
- return e('div', { ref: 'cropper', staticClass: 'vue-cropper', on: { mouseover: t.scaleImg, mouseout: t.cancelScale } }, [
- t.imgs
- ? e('div', { staticClass: 'cropper-box' }, [
- e(
- 'div',
- {
- directives: [{ name: 'show', rawName: 'v-show', value: !t.loading, expression: '!loading' }],
- staticClass: 'cropper-box-canvas',
- style: {
- width: t.trueWidth + 'px',
- height: t.trueHeight + 'px',
- transform: 'scale(' + t.scale + ',' + t.scale + ') translate3d(' + t.x / t.scale + 'px,' + t.y / t.scale + 'px,0)rotateZ(' + 90 * t.rotate + 'deg)'
- }
- },
- [e('img', { ref: 'cropperImg', attrs: { src: t.imgs, alt: 'cropper-img' } })]
- )
- ])
- : t._e(),
- t._v(' '),
- e('div', {
- staticClass: 'cropper-drag-box',
- class: { 'cropper-move': t.move && !t.crop, 'cropper-crop': t.crop, 'cropper-modal': t.cropping },
- on: { mousedown: t.startMove, touchstart: t.startMove }
- }),
- t._v(' '),
- e(
- 'div',
- {
- directives: [{ name: 'show', rawName: 'v-show', value: t.cropping, expression: 'cropping' }],
- staticClass: 'cropper-crop-box',
- style: { width: t.cropW + 'px', height: t.cropH + 'px', transform: 'translate3d(' + t.cropOffsertX + 'px,' + t.cropOffsertY + 'px,0)' }
- },
- [
- e('span', { staticClass: 'cropper-view-box' }, [
- e('img', {
- style: {
- width: t.trueWidth + 'px',
- height: t.trueHeight + 'px',
- transform:
- 'scale(' +
- t.scale +
- ',' +
- t.scale +
- ') translate3d(' +
- (t.x - t.cropOffsertX) / t.scale +
- 'px,' +
- (t.y - t.cropOffsertY) / t.scale +
- 'px,0)rotateZ(' +
- 90 * t.rotate +
- 'deg)'
- },
- attrs: { src: t.imgs, alt: 'cropper-img' }
- })
- ]),
- t._v(' '),
- e('span', { staticClass: 'cropper-face cropper-move', on: { mousedown: t.cropMove, touchstart: t.cropMove } }),
- t._v(' '),
- t.info ? e('span', { staticClass: 'crop-info', style: { top: t.cropInfo.top } }, [t._v(t._s(t.cropInfo.width) + ' × ' + t._s(t.cropInfo.height))]) : t._e(),
- t._v(' '),
- t.fixedBox
- ? t._e()
- : e('span', [
- e('span', {
- staticClass: 'crop-line line-w',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !1, !0, 0, 1);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !1, !0, 0, 1);
- }
- }
- }),
- t._v(' '),
- e('span', {
- staticClass: 'crop-line line-a',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !0, !1, 1, 0);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !0, !1, 1, 0);
- }
- }
- }),
- t._v(' '),
- e('span', {
- staticClass: 'crop-line line-s',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !1, !0, 0, 2);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !1, !0, 0, 2);
- }
- }
- }),
- t._v(' '),
- e('span', {
- staticClass: 'crop-line line-d',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !0, !1, 2, 0);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !0, !1, 2, 0);
- }
- }
- }),
- t._v(' '),
- e('span', {
- staticClass: 'crop-point point1',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !0, !0, 1, 1);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !0, !0, 1, 1);
- }
- }
- }),
- t._v(' '),
- e('span', {
- staticClass: 'crop-point point2',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !1, !0, 0, 1);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !1, !0, 0, 1);
- }
- }
- }),
- t._v(' '),
- e('span', {
- staticClass: 'crop-point point3',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !0, !0, 2, 1);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !0, !0, 2, 1);
- }
- }
- }),
- t._v(' '),
- e('span', {
- staticClass: 'crop-point point4',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !0, !1, 1, 0);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !0, !1, 1, 0);
- }
- }
- }),
- t._v(' '),
- e('span', {
- staticClass: 'crop-point point5',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !0, !1, 2, 0);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !0, !1, 2, 0);
- }
- }
- }),
- t._v(' '),
- e('span', {
- staticClass: 'crop-point point6',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !0, !0, 1, 2);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !0, !0, 1, 2);
- }
- }
- }),
- t._v(' '),
- e('span', {
- staticClass: 'crop-point point7',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !1, !0, 0, 2);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !1, !0, 0, 2);
- }
- }
- }),
- t._v(' '),
- e('span', {
- staticClass: 'crop-point point8',
- on: {
- mousedown: function (e) {
- return t.changeCropSize(e, !0, !0, 2, 2);
- },
- touchstart: function (e) {
- return t.changeCropSize(e, !0, !0, 2, 2);
- }
- }
- })
- ])
- ]
- )
- ]);
- };
- function e(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;
- }
- function o(t, n) {
- return (
- (function (t) {
- if (Array.isArray(t)) return t;
- })(t) ||
- (function (t, e) {
- var n = null == t ? null : ('undefined' != typeof Symbol && t[Symbol.iterator]) || t['@@iterator'];
- if (null != n) {
- var i,
- o,
- r,
- a,
- s = [],
- l = !0,
- c = !1;
- try {
- if (((r = (n = n.call(t)).next), 0 === e)) {
- if (Object(n) !== n) return;
- l = !1;
- } else for (; !(l = (i = r.call(n)).done) && (s.push(i.value), s.length !== e); l = !0);
- } catch (t) {
- (c = !0), (o = t);
- } finally {
- try {
- if (!l && null != n.return && ((a = n.return()), Object(a) !== a)) return;
- } finally {
- if (c) throw o;
- }
- }
- return s;
- }
- })(t, n) ||
- (function (t, n) {
- if (t) {
- if ('string' == typeof t) return e(t, n);
- var i = Object.prototype.toString.call(t).slice(8, -1);
- return (
- 'Object' === i && t.constructor && (i = t.constructor.name),
- 'Map' === i || 'Set' === i ? Array.from(t) : 'Arguments' === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i) ? e(t, n) : void 0
- );
- }
- })(t, n) ||
- (function () {
- throw new TypeError(
- 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
- );
- })()
- );
- }
- t._withStripped = !0;
- var r = {
- getData: function (t) {
- return new Promise(function (e, n) {
- var i = {};
- (function (t) {
- var e = null;
- return new Promise(function (n, i) {
- if (t.src)
- if (/^data\:/i.test(t.src))
- (e = (function (t) {
- t = t.replace(/^data\:([^\;]+)\;base64,/gim, '');
- for (var e = atob(t), n = e.length, i = new ArrayBuffer(n), o = new Uint8Array(i), r = 0; r < n; r++) o[r] = e.charCodeAt(r);
- return i;
- })(t.src)),
- n(e);
- else if (/^blob\:/i.test(t.src)) {
- var o = new FileReader();
- (o.onload = function (t) {
- (e = t.target.result), n(e);
- }),
- (function (t, e) {
- var n = new XMLHttpRequest();
- n.open('GET', t, !0),
- (n.responseType = 'blob'),
- (n.onload = function (t) {
- var e;
- (200 != this.status && 0 !== this.status) || ((e = this.response), o.readAsArrayBuffer(e));
- }),
- n.send();
- })(t.src);
- } else {
- var r = new XMLHttpRequest();
- (r.onload = function () {
- if (200 != this.status && 0 !== this.status) throw 'Could not load image';
- (e = r.response), n(e), (r = null);
- }),
- r.open('GET', t.src, !0),
- (r.responseType = 'arraybuffer'),
- r.send(null);
- }
- else i('img error');
- });
- })(t)
- .then(function (t) {
- (i.arrayBuffer = t),
- (i.orientation = (function (t) {
- var e,
- n,
- i,
- o,
- r,
- a,
- s,
- l,
- c,
- u = new DataView(t),
- d = u.byteLength;
- if (255 === u.getUint8(0) && 216 === u.getUint8(1))
- for (l = 2; l < d; ) {
- if (255 === u.getUint8(l) && 225 === u.getUint8(l + 1)) {
- a = l;
- break;
- }
- l++;
- }
- if (
- (a &&
- ((n = a + 10),
- 'Exif' ===
- (function (t, e, n) {
- var i,
- o = '';
- for (i = e, n += e; i < n; i++) o += String.fromCharCode(t.getUint8(i));
- return o;
- })(u, a + 4, 4) &&
- ((o = 18761 === (r = u.getUint16(n))) || 19789 === r) &&
- 42 === u.getUint16(n + 2, o) &&
- (i = u.getUint32(n + 4, o)) >= 8 &&
- (s = n + i)),
- s)
- )
- for (d = u.getUint16(s, o), c = 0; c < d; c++)
- if (((l = s + 12 * c + 2), 274 === u.getUint16(l, o))) {
- (l += 8), (e = u.getUint16(l, o));
- break;
- }
- return e;
- })(t)),
- e(i);
- })
- .catch(function (t) {
- n(t);
- });
- });
- }
- };
- const a = r,
- s = {
- data: function () {
- return {
- w: 0,
- h: 0,
- scale: 1,
- x: 0,
- y: 0,
- loading: !0,
- trueWidth: 0,
- trueHeight: 0,
- move: !0,
- moveX: 0,
- moveY: 0,
- crop: !1,
- cropping: !1,
- cropW: 0,
- cropH: 0,
- cropOldW: 0,
- cropOldH: 0,
- canChangeX: !1,
- canChangeY: !1,
- changeCropTypeX: 1,
- changeCropTypeY: 1,
- cropX: 0,
- cropY: 0,
- cropChangeX: 0,
- cropChangeY: 0,
- cropOffsertX: 0,
- cropOffsertY: 0,
- support: '',
- touches: [],
- touchNow: !1,
- rotate: 0,
- isIos: !1,
- orientation: 0,
- imgs: '',
- coe: 0.2,
- scaling: !1,
- scalingSet: '',
- coeStatus: '',
- isCanShow: !0
- };
- },
- props: {
- img: { type: [String, Blob, null, File], default: '' },
- outputSize: { type: Number, default: 1 },
- outputType: { type: String, default: 'jpeg' },
- info: { type: Boolean, default: !0 },
- canScale: { type: Boolean, default: !0 },
- autoCrop: { type: Boolean, default: !1 },
- autoCropWidth: { type: [Number, String], default: 0 },
- autoCropHeight: { type: [Number, String], default: 0 },
- fixed: { type: Boolean, default: !1 },
- fixedNumber: {
- type: Array,
- default: function () {
- return [1, 1];
- }
- },
- fixedBox: { type: Boolean, default: !1 },
- full: { type: Boolean, default: !1 },
- canMove: { type: Boolean, default: !0 },
- canMoveBox: { type: Boolean, default: !0 },
- original: { type: Boolean, default: !1 },
- centerBox: { type: Boolean, default: !1 },
- high: { type: Boolean, default: !0 },
- infoTrue: { type: Boolean, default: !1 },
- maxImgSize: { type: [Number, String], default: 2e3 },
- enlarge: { type: [Number, String], default: 1 },
- preW: { type: [Number, String], default: 0 },
- mode: { type: String, default: 'contain' },
- limitMinSize: {
- type: [Number, Array, String],
- default: function () {
- return 10;
- },
- validator: function (t) {
- return Array.isArray(t) ? Number(t[0]) >= 0 && Number(t[1]) >= 0 : Number(t) >= 0;
- }
- }
- },
- computed: {
- cropInfo: function () {
- var t = {};
- if (
- ((t.top = this.cropOffsertY > 21 ? '-21px' : '0px'),
- (t.width = this.cropW > 0 ? this.cropW : 0),
- (t.height = this.cropH > 0 ? this.cropH : 0),
- this.infoTrue)
- ) {
- var e = 1;
- this.high && !this.full && (e = window.devicePixelRatio),
- (1 !== this.enlarge) & !this.full && (e = Math.abs(Number(this.enlarge))),
- (t.width = t.width * e),
- (t.height = t.height * e),
- this.full && ((t.width = t.width / this.scale), (t.height = t.height / this.scale));
- }
- return (t.width = t.width.toFixed(0)), (t.height = t.height.toFixed(0)), t;
- },
- isIE: function () {
- return navigator.userAgent, !!window.ActiveXObject || 'ActiveXObject' in window;
- },
- passive: function () {
- return this.isIE ? null : { passive: !1 };
- }
- },
- watch: {
- img: function () {
- this.checkedImg();
- },
- imgs: function (t) {
- '' !== t && this.reload();
- },
- cropW: function () {
- this.showPreview();
- },
- cropH: function () {
- this.showPreview();
- },
- cropOffsertX: function () {
- this.showPreview();
- },
- cropOffsertY: function () {
- this.showPreview();
- },
- scale: function (t, e) {
- this.showPreview();
- },
- x: function () {
- this.showPreview();
- },
- y: function () {
- this.showPreview();
- },
- autoCrop: function (t) {
- t && this.goAutoCrop();
- },
- autoCropWidth: function () {
- this.autoCrop && this.goAutoCrop();
- },
- autoCropHeight: function () {
- this.autoCrop && this.goAutoCrop();
- },
- mode: function () {
- this.checkedImg();
- },
- rotate: function () {
- this.showPreview(), (this.autoCrop || this.cropW > 0 || this.cropH > 0) && this.goAutoCrop(this.cropW, this.cropH);
- }
- },
- methods: {
- getVersion: function (t) {
- for (var e = navigator.userAgent.split(' '), n = '', i = new RegExp(t, 'i'), o = 0; o < e.length; o++) i.test(e[o]) && (n = e[o]);
- return n ? n.split('/')[1].split('.') : ['0', '0', '0'];
- },
- checkOrientationImage: function (t, e, n, i) {
- var o = this;
- if (this.getVersion('chrome')[0] >= 81) e = -1;
- else if (this.getVersion('safari')[0] >= 605) {
- var r = this.getVersion('version');
- r[0] > 13 && r[1] > 1 && (e = -1);
- } else {
- var a = navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);
- if (a) {
- var s = a[1];
- ((s = s.split('_'))[0] > 13 || (s[0] >= 13 && s[1] >= 4)) && (e = -1);
- }
- }
- var l = document.createElement('canvas'),
- c = l.getContext('2d');
- switch ((c.save(), e)) {
- case 2:
- (l.width = n), (l.height = i), c.translate(n, 0), c.scale(-1, 1);
- break;
- case 3:
- (l.width = n), (l.height = i), c.translate(n / 2, i / 2), c.rotate((180 * Math.PI) / 180), c.translate(-n / 2, -i / 2);
- break;
- case 4:
- (l.width = n), (l.height = i), c.translate(0, i), c.scale(1, -1);
- break;
- case 5:
- (l.height = n), (l.width = i), c.rotate(0.5 * Math.PI), c.scale(1, -1);
- break;
- case 6:
- (l.width = i), (l.height = n), c.translate(i / 2, n / 2), c.rotate((90 * Math.PI) / 180), c.translate(-n / 2, -i / 2);
- break;
- case 7:
- (l.height = n), (l.width = i), c.rotate(0.5 * Math.PI), c.translate(n, -i), c.scale(-1, 1);
- break;
- case 8:
- (l.height = n), (l.width = i), c.translate(i / 2, n / 2), c.rotate((-90 * Math.PI) / 180), c.translate(-n / 2, -i / 2);
- break;
- default:
- (l.width = n), (l.height = i);
- }
- c.drawImage(t, 0, 0, n, i),
- c.restore(),
- l.toBlob(
- function (t) {
- var e = URL.createObjectURL(t);
- URL.revokeObjectURL(o.imgs), (o.imgs = e);
- },
- 'image/' + this.outputType,
- 1
- );
- },
- checkedImg: function () {
- var t = this;
- if (null === this.img || '' === this.img) return (this.imgs = ''), void this.clearCrop();
- (this.loading = !0), (this.scale = 1), (this.rotate = 0), this.clearCrop();
- var e = new Image();
- if (
- ((e.onload = function () {
- if ('' === t.img) return t.$emit('imgLoad', 'error'), t.$emit('img-load', 'error'), !1;
- var n = e.width,
- i = e.height;
- a.getData(e).then(function (o) {
- t.orientation = o.orientation || 1;
- var r = Number(t.maxImgSize);
- !t.orientation && (n < r) & (i < r)
- ? (t.imgs = t.img)
- : (n > r && ((i = (i / n) * r), (n = r)), i > r && ((n = (n / i) * r), (i = r)), t.checkOrientationImage(e, t.orientation, n, i));
- });
- }),
- (e.onerror = function () {
- t.$emit('imgLoad', 'error'), t.$emit('img-load', 'error');
- }),
- 'data' !== this.img.substr(0, 4) && (e.crossOrigin = ''),
- this.isIE)
- ) {
- var n = new XMLHttpRequest();
- (n.onload = function () {
- var t = URL.createObjectURL(this.response);
- e.src = t;
- }),
- n.open('GET', this.img, !0),
- (n.responseType = 'blob'),
- n.send();
- } else e.src = this.img;
- },
- startMove: function (t) {
- if ((t.preventDefault(), this.move && !this.crop)) {
- if (!this.canMove) return !1;
- (this.moveX = ('clientX' in t ? t.clientX : t.touches[0].clientX) - this.x),
- (this.moveY = ('clientY' in t ? t.clientY : t.touches[0].clientY) - this.y),
- t.touches
- ? (window.addEventListener('touchmove', this.moveImg),
- window.addEventListener('touchend', this.leaveImg),
- 2 == t.touches.length &&
- ((this.touches = t.touches), window.addEventListener('touchmove', this.touchScale), window.addEventListener('touchend', this.cancelTouchScale)))
- : (window.addEventListener('mousemove', this.moveImg), window.addEventListener('mouseup', this.leaveImg)),
- this.$emit('imgMoving', { moving: !0, axis: this.getImgAxis() }),
- this.$emit('img-moving', { moving: !0, axis: this.getImgAxis() });
- } else
- (this.cropping = !0),
- window.addEventListener('mousemove', this.createCrop),
- window.addEventListener('mouseup', this.endCrop),
- window.addEventListener('touchmove', this.createCrop),
- window.addEventListener('touchend', this.endCrop),
- (this.cropOffsertX = t.offsetX ? t.offsetX : t.touches[0].pageX - this.$refs.cropper.offsetLeft),
- (this.cropOffsertY = t.offsetY ? t.offsetY : t.touches[0].pageY - this.$refs.cropper.offsetTop),
- (this.cropX = 'clientX' in t ? t.clientX : t.touches[0].clientX),
- (this.cropY = 'clientY' in t ? t.clientY : t.touches[0].clientY),
- (this.cropChangeX = this.cropOffsertX),
- (this.cropChangeY = this.cropOffsertY),
- (this.cropW = 0),
- (this.cropH = 0);
- },
- touchScale: function (t) {
- var e = this;
- t.preventDefault();
- var n = this.scale,
- i = this.touches[0].clientX,
- o = this.touches[0].clientY,
- r = t.touches[0].clientX,
- a = t.touches[0].clientY,
- s = this.touches[1].clientX,
- l = this.touches[1].clientY,
- c = t.touches[1].clientX,
- u = t.touches[1].clientY,
- d = Math.sqrt(Math.pow(i - s, 2) + Math.pow(o - l, 2)),
- p = Math.sqrt(Math.pow(r - c, 2) + Math.pow(a - u, 2)) - d,
- h = 1,
- f = (h = (h = h / this.trueWidth > h / this.trueHeight ? h / this.trueHeight : h / this.trueWidth) > 0.1 ? 0.1 : h) * p;
- if (!this.touchNow) {
- if (
- ((this.touchNow = !0),
- p > 0 ? (n += Math.abs(f)) : p < 0 && n > Math.abs(f) && (n -= Math.abs(f)),
- (this.touches = t.touches),
- setTimeout(function () {
- e.touchNow = !1;
- }, 8),
- !this.checkoutImgAxis(this.x, this.y, n))
- )
- return !1;
- this.scale = n;
- }
- },
- cancelTouchScale: function (t) {
- window.removeEventListener('touchmove', this.touchScale);
- },
- moveImg: function (t) {
- var e = this;
- if ((t.preventDefault(), t.touches && 2 === t.touches.length))
- return (
- (this.touches = t.touches),
- window.addEventListener('touchmove', this.touchScale),
- window.addEventListener('touchend', this.cancelTouchScale),
- window.removeEventListener('touchmove', this.moveImg),
- !1
- );
- var n,
- i,
- o = 'clientX' in t ? t.clientX : t.touches[0].clientX,
- r = 'clientY' in t ? t.clientY : t.touches[0].clientY;
- (n = o - this.moveX),
- (i = r - this.moveY),
- this.$nextTick(function () {
- if (e.centerBox) {
- var t,
- o,
- r,
- a,
- s = e.getImgAxis(n, i, e.scale),
- l = e.getCropAxis(),
- c = e.trueHeight * e.scale,
- u = e.trueWidth * e.scale;
- switch (e.rotate) {
- case 1:
- case -1:
- case 3:
- case -3:
- (t = e.cropOffsertX - (e.trueWidth * (1 - e.scale)) / 2 + (c - u) / 2),
- (o = e.cropOffsertY - (e.trueHeight * (1 - e.scale)) / 2 + (u - c) / 2),
- (r = t - c + e.cropW),
- (a = o - u + e.cropH);
- break;
- default:
- (t = e.cropOffsertX - (e.trueWidth * (1 - e.scale)) / 2),
- (o = e.cropOffsertY - (e.trueHeight * (1 - e.scale)) / 2),
- (r = t - u + e.cropW),
- (a = o - c + e.cropH);
- }
- s.x1 >= l.x1 && (n = t), s.y1 >= l.y1 && (i = o), s.x2 <= l.x2 && (n = r), s.y2 <= l.y2 && (i = a);
- }
- (e.x = n), (e.y = i), e.$emit('imgMoving', { moving: !0, axis: e.getImgAxis() }), e.$emit('img-moving', { moving: !0, axis: e.getImgAxis() });
- });
- },
- leaveImg: function (t) {
- window.removeEventListener('mousemove', this.moveImg),
- window.removeEventListener('touchmove', this.moveImg),
- window.removeEventListener('mouseup', this.leaveImg),
- window.removeEventListener('touchend', this.leaveImg),
- this.$emit('imgMoving', { moving: !1, axis: this.getImgAxis() }),
- this.$emit('img-moving', { moving: !1, axis: this.getImgAxis() });
- },
- scaleImg: function () {
- this.canScale && window.addEventListener(this.support, this.changeSize, this.passive);
- },
- cancelScale: function () {
- this.canScale && window.removeEventListener(this.support, this.changeSize);
- },
- changeSize: function (t) {
- var e = this;
- t.preventDefault();
- var n = this.scale,
- i = t.deltaY || t.wheelDelta;
- (i = navigator.userAgent.indexOf('Firefox') > 0 ? 30 * i : i), this.isIE && (i = -i);
- var o = this.coe,
- r = (o = o / this.trueWidth > o / this.trueHeight ? o / this.trueHeight : o / this.trueWidth) * i;
- r < 0 ? (n += Math.abs(r)) : n > Math.abs(r) && (n -= Math.abs(r));
- var a = r < 0 ? 'add' : 'reduce';
- if (
- (a !== this.coeStatus && ((this.coeStatus = a), (this.coe = 0.2)),
- this.scaling ||
- (this.scalingSet = setTimeout(function () {
- (e.scaling = !1), (e.coe = e.coe += 0.01);
- }, 50)),
- (this.scaling = !0),
- !this.checkoutImgAxis(this.x, this.y, n))
- )
- return !1;
- this.scale = n;
- },
- changeScale: function (t) {
- var e = this.scale;
- t = t || 1;
- var n = 20;
- if (
- ((t *= n = n / this.trueWidth > n / this.trueHeight ? n / this.trueHeight : n / this.trueWidth) > 0
- ? (e += Math.abs(t))
- : e > Math.abs(t) && (e -= Math.abs(t)),
- !this.checkoutImgAxis(this.x, this.y, e))
- )
- return !1;
- this.scale = e;
- },
- createCrop: function (t) {
- var e = this;
- t.preventDefault();
- var n = 'clientX' in t ? t.clientX : t.touches ? t.touches[0].clientX : 0,
- i = 'clientY' in t ? t.clientY : t.touches ? t.touches[0].clientY : 0;
- this.$nextTick(function () {
- var t = n - e.cropX,
- o = i - e.cropY;
- if (
- (t > 0
- ? ((e.cropW = t + e.cropChangeX > e.w ? e.w - e.cropChangeX : t), (e.cropOffsertX = e.cropChangeX))
- : ((e.cropW = e.w - e.cropChangeX + Math.abs(t) > e.w ? e.cropChangeX : Math.abs(t)),
- (e.cropOffsertX = e.cropChangeX + t > 0 ? e.cropChangeX + t : 0)),
- e.fixed)
- ) {
- var r = (e.cropW / e.fixedNumber[0]) * e.fixedNumber[1];
- r + e.cropOffsertY > e.h
- ? ((e.cropH = e.h - e.cropOffsertY),
- (e.cropW = (e.cropH / e.fixedNumber[1]) * e.fixedNumber[0]),
- (e.cropOffsertX = t > 0 ? e.cropChangeX : e.cropChangeX - e.cropW))
- : (e.cropH = r),
- (e.cropOffsertY = e.cropOffsertY);
- } else o > 0 ? ((e.cropH = o + e.cropChangeY > e.h ? e.h - e.cropChangeY : o), (e.cropOffsertY = e.cropChangeY)) : ((e.cropH = e.h - e.cropChangeY + Math.abs(o) > e.h ? e.cropChangeY : Math.abs(o)), (e.cropOffsertY = e.cropChangeY + o > 0 ? e.cropChangeY + o : 0));
- });
- },
- changeCropSize: function (t, e, n, i, o) {
- t.preventDefault(),
- window.addEventListener('mousemove', this.changeCropNow),
- window.addEventListener('mouseup', this.changeCropEnd),
- window.addEventListener('touchmove', this.changeCropNow),
- window.addEventListener('touchend', this.changeCropEnd),
- (this.canChangeX = e),
- (this.canChangeY = n),
- (this.changeCropTypeX = i),
- (this.changeCropTypeY = o),
- (this.cropX = 'clientX' in t ? t.clientX : t.touches[0].clientX),
- (this.cropY = 'clientY' in t ? t.clientY : t.touches[0].clientY),
- (this.cropOldW = this.cropW),
- (this.cropOldH = this.cropH),
- (this.cropChangeX = this.cropOffsertX),
- (this.cropChangeY = this.cropOffsertY),
- this.fixed && this.canChangeX && this.canChangeY && (this.canChangeY = 0),
- this.$emit('changeCropSize', { width: this.cropW, height: this.cropH }),
- this.$emit('change-crop-size', { width: this.cropW, height: this.cropH });
- },
- changeCropNow: function (t) {
- var e = this;
- t.preventDefault();
- var n = 'clientX' in t ? t.clientX : t.touches ? t.touches[0].clientX : 0,
- i = 'clientY' in t ? t.clientY : t.touches ? t.touches[0].clientY : 0,
- r = this.w,
- a = this.h,
- s = 0,
- l = 0;
- if (this.centerBox) {
- var c = this.getImgAxis(),
- u = c.x2,
- d = c.y2;
- (s = c.x1 > 0 ? c.x1 : 0), (l = c.y1 > 0 ? c.y1 : 0), r > u && (r = u), a > d && (a = d);
- }
- var p = o(this.checkCropLimitSize(), 2),
- h = p[0],
- f = p[1];
- this.$nextTick(function () {
- var t = n - e.cropX,
- o = i - e.cropY;
- if (
- (e.canChangeX &&
- (1 === e.changeCropTypeX
- ? e.cropOldW - t < h
- ? ((e.cropW = h), (e.cropOffsertX = e.cropOldW + e.cropChangeX - s - h))
- : e.cropOldW - t > 0
- ? ((e.cropW = r - e.cropChangeX - t <= r - s ? e.cropOldW - t : e.cropOldW + e.cropChangeX - s),
- (e.cropOffsertX = r - e.cropChangeX - t <= r - s ? e.cropChangeX + t : s))
- : ((e.cropW = Math.abs(t) + e.cropChangeX <= r ? Math.abs(t) - e.cropOldW : r - e.cropOldW - e.cropChangeX),
- (e.cropOffsertX = e.cropChangeX + e.cropOldW))
- : 2 === e.changeCropTypeX &&
- (e.cropOldW + t < h
- ? (e.cropW = h)
- : e.cropOldW + t > 0
- ? ((e.cropW = e.cropOldW + t + e.cropOffsertX <= r ? e.cropOldW + t : r - e.cropOffsertX), (e.cropOffsertX = e.cropChangeX))
- : ((e.cropW = r - e.cropChangeX + Math.abs(t + e.cropOldW) <= r - s ? Math.abs(t + e.cropOldW) : e.cropChangeX - s),
- (e.cropOffsertX = r - e.cropChangeX + Math.abs(t + e.cropOldW) <= r - s ? e.cropChangeX - Math.abs(t + e.cropOldW) : s)))),
- e.canChangeY &&
- (1 === e.changeCropTypeY
- ? e.cropOldH - o < f
- ? ((e.cropH = f), (e.cropOffsertY = e.cropOldH + e.cropChangeY - l - f))
- : e.cropOldH - o > 0
- ? ((e.cropH = a - e.cropChangeY - o <= a - l ? e.cropOldH - o : e.cropOldH + e.cropChangeY - l),
- (e.cropOffsertY = a - e.cropChangeY - o <= a - l ? e.cropChangeY + o : l))
- : ((e.cropH = Math.abs(o) + e.cropChangeY <= a ? Math.abs(o) - e.cropOldH : a - e.cropOldH - e.cropChangeY),
- (e.cropOffsertY = e.cropChangeY + e.cropOldH))
- : 2 === e.changeCropTypeY &&
- (e.cropOldH + o < f
- ? (e.cropH = f)
- : e.cropOldH + o > 0
- ? ((e.cropH = e.cropOldH + o + e.cropOffsertY <= a ? e.cropOldH + o : a - e.cropOffsertY), (e.cropOffsertY = e.cropChangeY))
- : ((e.cropH = a - e.cropChangeY + Math.abs(o + e.cropOldH) <= a - l ? Math.abs(o + e.cropOldH) : e.cropChangeY - l),
- (e.cropOffsertY = a - e.cropChangeY + Math.abs(o + e.cropOldH) <= a - l ? e.cropChangeY - Math.abs(o + e.cropOldH) : l)))),
- e.canChangeX && e.fixed)
- ) {
- var c = (e.cropW / e.fixedNumber[0]) * e.fixedNumber[1];
- c < f
- ? ((e.cropH = f),
- (e.cropW = (e.fixedNumber[0] * f) / e.fixedNumber[1]),
- 1 === e.changeCropTypeX && (e.cropOffsertX = e.cropChangeX + (e.cropOldW - e.cropW)))
- : c + e.cropOffsertY > a
- ? ((e.cropH = a - e.cropOffsertY),
- (e.cropW = (e.cropH / e.fixedNumber[1]) * e.fixedNumber[0]),
- 1 === e.changeCropTypeX && (e.cropOffsertX = e.cropChangeX + (e.cropOldW - e.cropW)))
- : (e.cropH = c);
- }
- if (e.canChangeY && e.fixed) {
- var u = (e.cropH / e.fixedNumber[1]) * e.fixedNumber[0];
- u < h
- ? ((e.cropW = h), (e.cropH = (e.fixedNumber[1] * h) / e.fixedNumber[0]))
- : u + e.cropOffsertX > r
- ? ((e.cropW = r - e.cropOffsertX), (e.cropH = (e.cropW / e.fixedNumber[0]) * e.fixedNumber[1]))
- : (e.cropW = u);
- }
- e.$emit('cropSizing', { cropW: e.cropW, cropH: e.cropH }), e.$emit('crop-sizing', { cropW: e.cropW, cropH: e.cropH });
- });
- },
- checkCropLimitSize: function () {
- this.cropW, this.cropH;
- var t = this.limitMinSize,
- e = new Array();
- return (e = Array.isArray(t) ? t : [t, t]), [parseFloat(e[0]), parseFloat(e[1])];
- },
- changeCropEnd: function (t) {
- window.removeEventListener('mousemove', this.changeCropNow),
- window.removeEventListener('mouseup', this.changeCropEnd),
- window.removeEventListener('touchmove', this.changeCropNow),
- window.removeEventListener('touchend', this.changeCropEnd);
- },
- calculateSize: function (t, e, n, i, o, r) {
- var a = t / e,
- s = o,
- l = r;
- return (
- s < n && ((s = n), (l = Math.ceil(s / a))),
- l < i && ((l = i), (s = Math.ceil(l * a)) < n && ((s = n), (l = Math.ceil(s / a)))),
- s < o && ((s = o), (l = Math.ceil(s / a))),
- l < r && ((l = r), (s = Math.ceil(l * a))),
- { width: s, height: l }
- );
- },
- endCrop: function () {
- 0 === this.cropW && 0 === this.cropH && (this.cropping = !1);
- var t = o(this.checkCropLimitSize(), 2),
- e = t[0],
- n = t[1],
- i = this.fixed ? this.calculateSize(this.fixedNumber[0], this.fixedNumber[1], e, n, this.cropW, this.cropH) : { width: e, height: n },
- r = i.width,
- a = i.height;
- r > this.cropW && ((this.cropW = r), this.cropOffsertX + r > this.w && (this.cropOffsertX = this.w - r)),
- a > this.cropH && ((this.cropH = a), this.cropOffsertY + a > this.h && (this.cropOffsertY = this.h - a)),
- window.removeEventListener('mousemove', this.createCrop),
- window.removeEventListener('mouseup', this.endCrop),
- window.removeEventListener('touchmove', this.createCrop),
- window.removeEventListener('touchend', this.endCrop);
- },
- startCrop: function () {
- this.crop = !0;
- },
- stopCrop: function () {
- this.crop = !1;
- },
- clearCrop: function () {
- (this.cropping = !1), (this.cropW = 0), (this.cropH = 0);
- },
- cropMove: function (t) {
- if ((t.preventDefault(), !this.canMoveBox)) return (this.crop = !1), this.startMove(t), !1;
- if (t.touches && 2 === t.touches.length) return (this.crop = !1), this.startMove(t), this.leaveCrop(), !1;
- window.addEventListener('mousemove', this.moveCrop),
- window.addEventListener('mouseup', this.leaveCrop),
- window.addEventListener('touchmove', this.moveCrop),
- window.addEventListener('touchend', this.leaveCrop);
- var e,
- n,
- i = 'clientX' in t ? t.clientX : t.touches[0].clientX,
- o = 'clientY' in t ? t.clientY : t.touches[0].clientY;
- (e = i - this.cropOffsertX),
- (n = o - this.cropOffsertY),
- (this.cropX = e),
- (this.cropY = n),
- this.$emit('cropMoving', { moving: !0, axis: this.getCropAxis() }),
- this.$emit('crop-moving', { moving: !0, axis: this.getCropAxis() });
- },
- moveCrop: function (t, e) {
- var n = this,
- i = 0,
- o = 0;
- t && (t.preventDefault(), (i = 'clientX' in t ? t.clientX : t.touches[0].clientX), (o = 'clientY' in t ? t.clientY : t.touches[0].clientY)),
- this.$nextTick(function () {
- var t,
- r,
- a = i - n.cropX,
- s = o - n.cropY;
- if (
- (e && ((a = n.cropOffsertX), (s = n.cropOffsertY)),
- (t = a <= 0 ? 0 : a + n.cropW > n.w ? n.w - n.cropW : a),
- (r = s <= 0 ? 0 : s + n.cropH > n.h ? n.h - n.cropH : s),
- n.centerBox)
- ) {
- var l = n.getImgAxis();
- t <= l.x1 && (t = l.x1), t + n.cropW > l.x2 && (t = l.x2 - n.cropW), r <= l.y1 && (r = l.y1), r + n.cropH > l.y2 && (r = l.y2 - n.cropH);
- }
- (n.cropOffsertX = t),
- (n.cropOffsertY = r),
- n.$emit('cropMoving', { moving: !0, axis: n.getCropAxis() }),
- n.$emit('crop-moving', { moving: !0, axis: n.getCropAxis() });
- });
- },
- getImgAxis: function (t, e, n) {
- (t = t || this.x), (e = e || this.y), (n = n || this.scale);
- var i = { x1: 0, x2: 0, y1: 0, y2: 0 },
- o = this.trueWidth * n,
- r = this.trueHeight * n;
- switch (this.rotate) {
- case 0:
- (i.x1 = t + (this.trueWidth * (1 - n)) / 2),
- (i.x2 = i.x1 + this.trueWidth * n),
- (i.y1 = e + (this.trueHeight * (1 - n)) / 2),
- (i.y2 = i.y1 + this.trueHeight * n);
- break;
- case 1:
- case -1:
- case 3:
- case -3:
- (i.x1 = t + (this.trueWidth * (1 - n)) / 2 + (o - r) / 2),
- (i.x2 = i.x1 + this.trueHeight * n),
- (i.y1 = e + (this.trueHeight * (1 - n)) / 2 + (r - o) / 2),
- (i.y2 = i.y1 + this.trueWidth * n);
- break;
- default:
- (i.x1 = t + (this.trueWidth * (1 - n)) / 2),
- (i.x2 = i.x1 + this.trueWidth * n),
- (i.y1 = e + (this.trueHeight * (1 - n)) / 2),
- (i.y2 = i.y1 + this.trueHeight * n);
- }
- return i;
- },
- getCropAxis: function () {
- var t = { x1: 0, x2: 0, y1: 0, y2: 0 };
- return (t.x1 = this.cropOffsertX), (t.x2 = t.x1 + this.cropW), (t.y1 = this.cropOffsertY), (t.y2 = t.y1 + this.cropH), t;
- },
- leaveCrop: function (t) {
- window.removeEventListener('mousemove', this.moveCrop),
- window.removeEventListener('mouseup', this.leaveCrop),
- window.removeEventListener('touchmove', this.moveCrop),
- window.removeEventListener('touchend', this.leaveCrop),
- this.$emit('cropMoving', { moving: !1, axis: this.getCropAxis() }),
- this.$emit('crop-moving', { moving: !1, axis: this.getCropAxis() });
- },
- getCropChecked: function (t) {
- var e = this,
- n = document.createElement('canvas'),
- i = new Image(),
- o = this.rotate,
- r = this.trueWidth,
- a = this.trueHeight,
- s = this.cropOffsertX,
- l = this.cropOffsertY;
- function c(t, e) {
- (n.width = Math.round(t)), (n.height = Math.round(e));
- }
- (i.onload = function () {
- if (0 !== e.cropW) {
- var u = n.getContext('2d'),
- d = 1;
- e.high & !e.full && (d = window.devicePixelRatio), (1 !== e.enlarge) & !e.full && (d = Math.abs(Number(e.enlarge)));
- var p = e.cropW * d,
- h = e.cropH * d,
- f = r * e.scale * d,
- m = a * e.scale * d,
- v = (e.x - s + (e.trueWidth * (1 - e.scale)) / 2) * d,
- b = (e.y - l + (e.trueHeight * (1 - e.scale)) / 2) * d;
- switch ((c(p, h), u.save(), o)) {
- case 0:
- e.full ? (c(p / e.scale, h / e.scale), u.drawImage(i, v / e.scale, b / e.scale, f / e.scale, m / e.scale)) : u.drawImage(i, v, b, f, m);
- break;
- case 1:
- case -3:
- e.full
- ? (c(p / e.scale, h / e.scale),
- (v = v / e.scale + (f / e.scale - m / e.scale) / 2),
- (b = b / e.scale + (m / e.scale - f / e.scale) / 2),
- u.rotate((90 * o * Math.PI) / 180),
- u.drawImage(i, b, -v - m / e.scale, f / e.scale, m / e.scale))
- : ((v += (f - m) / 2), (b += (m - f) / 2), u.rotate((90 * o * Math.PI) / 180), u.drawImage(i, b, -v - m, f, m));
- break;
- case 2:
- case -2:
- e.full
- ? (c(p / e.scale, h / e.scale),
- u.rotate((90 * o * Math.PI) / 180),
- (v /= e.scale),
- (b /= e.scale),
- u.drawImage(i, -v - f / e.scale, -b - m / e.scale, f / e.scale, m / e.scale))
- : (u.rotate((90 * o * Math.PI) / 180), u.drawImage(i, -v - f, -b - m, f, m));
- break;
- case 3:
- case -1:
- e.full
- ? (c(p / e.scale, h / e.scale),
- (v = v / e.scale + (f / e.scale - m / e.scale) / 2),
- (b = b / e.scale + (m / e.scale - f / e.scale) / 2),
- u.rotate((90 * o * Math.PI) / 180),
- u.drawImage(i, -b - f / e.scale, v, f / e.scale, m / e.scale))
- : ((v += (f - m) / 2), (b += (m - f) / 2), u.rotate((90 * o * Math.PI) / 180), u.drawImage(i, -b - f, v, f, m));
- break;
- default:
- e.full ? (c(p / e.scale, h / e.scale), u.drawImage(i, v / e.scale, b / e.scale, f / e.scale, m / e.scale)) : u.drawImage(i, v, b, f, m);
- }
- u.restore();
- } else {
- var y = r * e.scale,
- g = a * e.scale,
- x = n.getContext('2d');
- switch ((x.save(), o)) {
- case 0:
- c(y, g), x.drawImage(i, 0, 0, y, g);
- break;
- case 1:
- case -3:
- c(g, y), x.rotate((90 * o * Math.PI) / 180), x.drawImage(i, 0, -g, y, g);
- break;
- case 2:
- case -2:
- c(y, g), x.rotate((90 * o * Math.PI) / 180), x.drawImage(i, -y, -g, y, g);
- break;
- case 3:
- case -1:
- c(g, y), x.rotate((90 * o * Math.PI) / 180), x.drawImage(i, -y, 0, y, g);
- break;
- default:
- c(y, g), x.drawImage(i, 0, 0, y, g);
- }
- x.restore();
- }
- t(n);
- }),
- 'data' !== this.img.substr(0, 4) && (i.crossOrigin = 'Anonymous'),
- (i.src = this.imgs);
- },
- getCropData: function (t) {
- var e = this;
- this.getCropChecked(function (n) {
- t(n.toDataURL('image/' + e.outputType, e.outputSize));
- });
- },
- getCropBlob: function (t) {
- var e = this;
- this.getCropChecked(function (n) {
- n.toBlob(
- function (e) {
- return t(e);
- },
- 'image/' + e.outputType,
- e.outputSize
- );
- });
- },
- showPreview: function () {
- var t = this;
- if (!this.isCanShow) return !1;
- (this.isCanShow = !1),
- setTimeout(function () {
- t.isCanShow = !0;
- }, 16);
- var e = this.cropW,
- n = this.cropH,
- i = this.scale,
- o = {};
- o.div = { width: ''.concat(e, 'px'), height: ''.concat(n, 'px') };
- var r = (this.x - this.cropOffsertX) / i,
- a = (this.y - this.cropOffsertY) / i;
- (o.w = e),
- (o.h = n),
- (o.url = this.imgs),
- (o.img = {
- width: ''.concat(this.trueWidth, 'px'),
- height: ''.concat(this.trueHeight, 'px'),
- transform: 'scale('
- .concat(i, ')translate3d(')
- .concat(r, 'px, ')
- .concat(a, 'px, ')
- .concat(0, 'px)rotateZ(')
- .concat(90 * this.rotate, 'deg)')
- }),
- (o.html = '\n <div class="show-preview" style="width: '
- .concat(o.w, 'px; height: ')
- .concat(o.h, 'px; overflow: hidden">\n <div style="width: ')
- .concat(e, 'px; height: ')
- .concat(n, 'px">\n <img src=')
- .concat(o.url, ' style="width: ')
- .concat(this.trueWidth, 'px; height: ')
- .concat(this.trueHeight, 'px; transform:\n scale(')
- .concat(i, ')translate3d(')
- .concat(r, 'px, ')
- .concat(a, 'px, ')
- .concat(0, 'px)rotateZ(')
- .concat(90 * this.rotate, 'deg)">\n </div>\n </div>')),
- this.$emit('realTime', o),
- this.$emit('real-time', o);
- },
- reload: function () {
- var t = this,
- e = new Image();
- (e.onload = function () {
- (t.w = parseFloat(window.getComputedStyle(t.$refs.cropper).width)),
- (t.h = parseFloat(window.getComputedStyle(t.$refs.cropper).height)),
- (t.trueWidth = e.width),
- (t.trueHeight = e.height),
- t.original ? (t.scale = 1) : (t.scale = t.checkedMode()),
- t.$nextTick(function () {
- (t.x = -(t.trueWidth - t.trueWidth * t.scale) / 2 + (t.w - t.trueWidth * t.scale) / 2),
- (t.y = -(t.trueHeight - t.trueHeight * t.scale) / 2 + (t.h - t.trueHeight * t.scale) / 2),
- (t.loading = !1),
- t.autoCrop && t.goAutoCrop(),
- t.$emit('img-load', 'success'),
- t.$emit('imgLoad', 'success'),
- setTimeout(function () {
- t.showPreview();
- }, 20);
- });
- }),
- (e.onerror = function () {
- t.$emit('imgLoad', 'error'), t.$emit('img-load', 'error');
- }),
- (e.src = this.imgs);
- },
- checkedMode: function () {
- var t = 1,
- e = (this.trueWidth, this.trueHeight),
- n = this.mode.split(' ');
- switch (n[0]) {
- case 'contain':
- this.trueWidth > this.w && (t = this.w / this.trueWidth), this.trueHeight * t > this.h && (t = this.h / this.trueHeight);
- break;
- case 'cover':
- (e *= t = this.w / this.trueWidth) < this.h && (t = (e = this.h) / this.trueHeight);
- break;
- default:
- try {
- var i = n[0];
- if (-1 !== i.search('px')) {
- i = i.replace('px', '');
- var o = parseFloat(i) / this.trueWidth,
- r = 1,
- a = n[1];
- -1 !== a.search('px') && ((a = a.replace('px', '')), (r = (e = parseFloat(a)) / this.trueHeight)), (t = Math.min(o, r));
- }
- if ((-1 !== i.search('%') && ((i = i.replace('%', '')), (t = ((parseFloat(i) / 100) * this.w) / this.trueWidth)), 2 === n.length && 'auto' === i)) {
- var s = n[1];
- -1 !== s.search('px') && ((s = s.replace('px', '')), (t = (e = parseFloat(s)) / this.trueHeight)),
- -1 !== s.search('%') && ((s = s.replace('%', '')), (t = (e = (parseFloat(s) / 100) * this.h) / this.trueHeight));
- }
- } catch (e) {
- t = 1;
- }
- }
- return t;
- },
- goAutoCrop: function (t, e) {
- if ('' !== this.imgs && null !== this.imgs) {
- this.clearCrop(), (this.cropping = !0);
- var n = this.w,
- i = this.h;
- if (this.centerBox) {
- var o = Math.abs(this.rotate) % 2 > 0,
- r = (o ? this.trueHeight : this.trueWidth) * this.scale,
- a = (o ? this.trueWidth : this.trueHeight) * this.scale;
- (n = r < n ? r : n), (i = a < i ? a : i);
- }
- var s = t || parseFloat(this.autoCropWidth),
- l = e || parseFloat(this.autoCropHeight);
- (0 !== s && 0 !== l) || ((s = 0.8 * n), (l = 0.8 * i)),
- (s = s > n ? n : s),
- (l = l > i ? i : l),
- this.fixed && (l = (s / this.fixedNumber[0]) * this.fixedNumber[1]),
- l > this.h && (s = ((l = this.h) / this.fixedNumber[1]) * this.fixedNumber[0]),
- this.changeCrop(s, l);
- }
- },
- changeCrop: function (t, e) {
- var n = this;
- if (this.centerBox) {
- var i = this.getImgAxis();
- t > i.x2 - i.x1 && (e = ((t = i.x2 - i.x1) / this.fixedNumber[0]) * this.fixedNumber[1]),
- e > i.y2 - i.y1 && (t = ((e = i.y2 - i.y1) / this.fixedNumber[1]) * this.fixedNumber[0]);
- }
- (this.cropW = t),
- (this.cropH = e),
- this.checkCropLimitSize(),
- this.$nextTick(function () {
- (n.cropOffsertX = (n.w - n.cropW) / 2), (n.cropOffsertY = (n.h - n.cropH) / 2), n.centerBox && n.moveCrop(null, !0);
- });
- },
- refresh: function () {
- var t = this;
- this.img,
- (this.imgs = ''),
- (this.scale = 1),
- (this.crop = !1),
- (this.rotate = 0),
- (this.w = 0),
- (this.h = 0),
- (this.trueWidth = 0),
- (this.trueHeight = 0),
- this.clearCrop(),
- this.$nextTick(function () {
- t.checkedImg();
- });
- },
- rotateLeft: function () {
- this.rotate = this.rotate <= -3 ? 0 : this.rotate - 1;
- },
- rotateRight: function () {
- this.rotate = this.rotate >= 3 ? 0 : this.rotate + 1;
- },
- rotateClear: function () {
- this.rotate = 0;
- },
- checkoutImgAxis: function (t, e, n) {
- (t = t || this.x), (e = e || this.y), (n = n || this.scale);
- var i = !0;
- if (this.centerBox) {
- var o = this.getImgAxis(t, e, n),
- r = this.getCropAxis();
- o.x1 >= r.x1 && (i = !1), o.x2 <= r.x2 && (i = !1), o.y1 >= r.y1 && (i = !1), o.y2 <= r.y2 && (i = !1);
- }
- return i;
- }
- },
- mounted: function () {
- this.support = 'onwheel' in document.createElement('div') ? 'wheel' : void 0 !== document.onmousewheel ? 'mousewheel' : 'DOMMouseScroll';
- var t = this,
- e = navigator.userAgent;
- (this.isIOS = !!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)),
- HTMLCanvasElement.prototype.toBlob ||
- Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
- value: function (e, n, i) {
- for (var o = atob(this.toDataURL(n, i).split(',')[1]), r = o.length, a = new Uint8Array(r), s = 0; s < r; s++) a[s] = o.charCodeAt(s);
- e(new Blob([a], { type: t.type || 'image/png' }));
- }
- }),
- this.showPreview(),
- this.checkedImg();
- },
- destroyed: function () {
- window.removeEventListener('mousemove', this.moveCrop),
- window.removeEventListener('mouseup', this.leaveCrop),
- window.removeEventListener('touchmove', this.moveCrop),
- window.removeEventListener('touchend', this.leaveCrop),
- this.cancelScale();
- }
- };
- n(125);
- const l = (function (t, e, n, i, o, r, a, s) {
- var l = 'function' == typeof t ? t.options : t;
- return e && ((l.render = e), (l.staticRenderFns = []), (l._compiled = !0)), (l._scopeId = 'data-v-' + r), { exports: t, options: l };
- })(s, t, 0, 0, 0, '8ed66ddc').exports;
- var c = function (t) {
- t.component('VueCropper', l);
- };
- 'undefined' != typeof window && window.Vue && c(window.Vue);
- const u = { version: '0.5.11', install: c, VueCropper: l, vueCropper: l };
- })(),
- i
- );
- })()),
- (t.exports = i());
- },
- function (t, e, n) {
- t.exports = n(131);
- },
- function (t, e, n) {
- var i = n(26),
- o = n(32);
- t.exports = function (t, e) {
- for (var n = 0, r = (e = i(e, t)).length; null != t && n < r; ) t = t[o(e[n++])];
- return n && n == r ? t : void 0;
- };
- },
- function (t, e, n) {
- var i = n(4),
- o = n(14),
- r = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
- a = /^\w*$/;
- t.exports = function (t, e) {
- if (i(t)) return !1;
- var n = typeof t;
- return !('number' != n && 'symbol' != n && 'boolean' != n && null != t && !o(t)) || a.test(t) || !r.test(t) || (null != e && t in Object(e));
- };
- },
- function (t, e) {
- var n;
- n = (function () {
- return this;
- })();
- try {
- n = n || new Function('return this')();
- } catch (t) {
- 'object' == typeof window && (n = window);
- }
- t.exports = n;
- },
- function (t, e, n) {
- var i = n(8),
- o = Object.prototype,
- r = o.hasOwnProperty,
- a = o.toString,
- s = i ? i.toStringTag : void 0;
- t.exports = function (t) {
- var e = r.call(t, s),
- n = t[s];
- try {
- t[s] = void 0;
- var i = !0;
- } catch (t) {}
- var o = a.call(t);
- return i && (e ? (t[s] = n) : delete t[s]), o;
- };
- },
- function (t, e) {
- var n = Object.prototype.toString;
- t.exports = function (t) {
- return n.call(t);
- };
- },
- function (t, e, n) {
- var i = n(59),
- o = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
- r = /\\(\\)?/g,
- a = i(function (t) {
- var e = [];
- return (
- 46 === t.charCodeAt(0) && e.push(''),
- t.replace(o, function (t, n, i, o) {
- e.push(i ? o.replace(r, '$1') : n || t);
- }),
- e
- );
- });
- t.exports = a;
- },
- function (t, e, n) {
- var i = n(60);
- t.exports = function (t) {
- var e = i(t, function (t) {
- return 500 === n.size && n.clear(), t;
- }),
- n = e.cache;
- return e;
- };
- },
- function (t, e, n) {
- var i = n(28);
- function o(t, e) {
- if ('function' != typeof t || (null != e && 'function' != typeof e)) throw new TypeError('Expected a function');
- var n = function () {
- var i = arguments,
- o = e ? e.apply(this, i) : i[0],
- r = n.cache;
- if (r.has(o)) return r.get(o);
- var a = t.apply(this, i);
- return (n.cache = r.set(o, a) || r), a;
- };
- return (n.cache = new (o.Cache || i)()), n;
- }
- (o.Cache = i), (t.exports = o);
- },
- function (t, e, n) {
- var i = n(62),
- o = n(10),
- r = n(15);
- t.exports = function () {
- (this.size = 0), (this.__data__ = { hash: new i(), map: new (r || o)(), string: new i() });
- };
- },
- function (t, e, n) {
- var i = n(63),
- o = n(68),
- r = n(69),
- a = n(70),
- s = n(71);
- function l(t) {
- var e = -1,
- n = null == t ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var i = t[e];
- this.set(i[0], i[1]);
- }
- }
- (l.prototype.clear = i), (l.prototype.delete = o), (l.prototype.get = r), (l.prototype.has = a), (l.prototype.set = s), (t.exports = l);
- },
- function (t, e, n) {
- var i = n(9);
- t.exports = function () {
- (this.__data__ = i ? i(null) : {}), (this.size = 0);
- };
- },
- function (t, e, n) {
- var i = n(29),
- o = n(65),
- r = n(6),
- a = n(30),
- s = /^\[object .+?Constructor\]$/,
- l = Function.prototype,
- c = Object.prototype,
- u = l.toString,
- d = c.hasOwnProperty,
- p = RegExp(
- '^' +
- u
- .call(d)
- .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') +
- '$'
- );
- t.exports = function (t) {
- return !(!r(t) || o(t)) && (i(t) ? p : s).test(a(t));
- };
- },
- function (t, e, n) {
- var i,
- o = n(66),
- r = (i = /[^.]+$/.exec((o && o.keys && o.keys.IE_PROTO) || '')) ? 'Symbol(src)_1.' + i : '';
- t.exports = function (t) {
- return !!r && r in t;
- };
- },
- function (t, e, n) {
- var i = n(0)['__core-js_shared__'];
- t.exports = i;
- },
- function (t, e) {
- t.exports = function (t, e) {
- return null == t ? void 0 : t[e];
- };
- },
- function (t, e) {
- t.exports = function (t) {
- var e = this.has(t) && delete this.__data__[t];
- return (this.size -= e ? 1 : 0), e;
- };
- },
- function (t, e, n) {
- var i = n(9),
- o = Object.prototype.hasOwnProperty;
- t.exports = function (t) {
- var e = this.__data__;
- if (i) {
- var n = e[t];
- return '__lodash_hash_undefined__' === n ? void 0 : n;
- }
- return o.call(e, t) ? e[t] : void 0;
- };
- },
- function (t, e, n) {
- var i = n(9),
- o = Object.prototype.hasOwnProperty;
- t.exports = function (t) {
- var e = this.__data__;
- return i ? void 0 !== e[t] : o.call(e, t);
- };
- },
- function (t, e, n) {
- var i = n(9);
- t.exports = function (t, e) {
- var n = this.__data__;
- return (this.size += this.has(t) ? 0 : 1), (n[t] = i && void 0 === e ? '__lodash_hash_undefined__' : e), this;
- };
- },
- function (t, e) {
- t.exports = function () {
- (this.__data__ = []), (this.size = 0);
- };
- },
- function (t, e, n) {
- var i = n(11),
- o = Array.prototype.splice;
- t.exports = function (t) {
- var e = this.__data__,
- n = i(e, t);
- return !(n < 0) && (n == e.length - 1 ? e.pop() : o.call(e, n, 1), --this.size, !0);
- };
- },
- function (t, e, n) {
- var i = n(11);
- t.exports = function (t) {
- var e = this.__data__,
- n = i(e, t);
- return n < 0 ? void 0 : e[n][1];
- };
- },
- function (t, e, n) {
- var i = n(11);
- t.exports = function (t) {
- return i(this.__data__, t) > -1;
- };
- },
- function (t, e, n) {
- var i = n(11);
- t.exports = function (t, e) {
- var n = this.__data__,
- o = i(n, t);
- return o < 0 ? (++this.size, n.push([t, e])) : (n[o][1] = e), this;
- };
- },
- function (t, e, n) {
- var i = n(12);
- t.exports = function (t) {
- var e = i(this, t).delete(t);
- return (this.size -= e ? 1 : 0), e;
- };
- },
- function (t, e) {
- t.exports = function (t) {
- var e = typeof t;
- return 'string' == e || 'number' == e || 'symbol' == e || 'boolean' == e ? '__proto__' !== t : null === t;
- };
- },
- function (t, e, n) {
- var i = n(12);
- t.exports = function (t) {
- return i(this, t).get(t);
- };
- },
- function (t, e, n) {
- var i = n(12);
- t.exports = function (t) {
- return i(this, t).has(t);
- };
- },
- function (t, e, n) {
- var i = n(12);
- t.exports = function (t, e) {
- var n = i(this, t),
- o = n.size;
- return n.set(t, e), (this.size += n.size == o ? 0 : 1), this;
- };
- },
- function (t, e, n) {
- var i = n(83);
- t.exports = function (t) {
- return null == t ? '' : i(t);
- };
- },
- function (t, e, n) {
- var i = n(8),
- o = n(84),
- r = n(4),
- a = n(14),
- s = i ? i.prototype : void 0,
- l = s ? s.toString : void 0;
- t.exports = function t(e) {
- if ('string' == typeof e) return e;
- if (r(e)) return o(e, t) + '';
- if (a(e)) return l ? l.call(e) : '';
- var n = e + '';
- return '0' == n && 1 / e == -1 / 0 ? '-0' : n;
- };
- },
- function (t, e) {
- t.exports = function (t, e) {
- for (var n = -1, i = null == t ? 0 : t.length, o = Array(i); ++n < i; ) o[n] = e(t[n], n, t);
- return o;
- };
- },
- function (t, e, n) {
- var i = n(16),
- o = n(26),
- r = n(34),
- a = n(6),
- s = n(32);
- t.exports = function (t, e, n, l) {
- if (!a(t)) return t;
- for (var c = -1, u = (e = o(e, t)).length, d = u - 1, p = t; null != p && ++c < u; ) {
- var h = s(e[c]),
- f = n;
- if ('__proto__' === h || 'constructor' === h || 'prototype' === h) return t;
- if (c != d) {
- var m = p[h];
- void 0 === (f = l ? l(m, h, p) : void 0) && (f = a(m) ? m : r(e[c + 1]) ? [] : {});
- }
- i(p, h, f), (p = p[h]);
- }
- return t;
- };
- },
- function (t, e, n) {
- var i = n(3),
- o = (function () {
- try {
- var t = i(Object, 'defineProperty');
- return t({}, '', {}), t;
- } catch (t) {}
- })();
- t.exports = o;
- },
- function (t, e, n) {
- var i = n(88),
- o = n(94),
- r = n(16),
- a = n(95),
- s = n(104),
- l = n(107),
- c = n(108),
- u = n(109),
- d = n(111),
- p = n(112),
- h = n(113),
- f = n(24),
- m = n(118),
- v = n(119),
- b = n(125),
- y = n(4),
- g = n(36),
- x = n(127),
- w = n(6),
- _ = n(129),
- S = n(17),
- C = n(22),
- k = {};
- (k['[object Arguments]'] =
- k['[object Array]'] =
- k['[object ArrayBuffer]'] =
- k['[object DataView]'] =
- k['[object Boolean]'] =
- k['[object Date]'] =
- k['[object Float32Array]'] =
- k['[object Float64Array]'] =
- k['[object Int8Array]'] =
- k['[object Int16Array]'] =
- k['[object Int32Array]'] =
- k['[object Map]'] =
- k['[object Number]'] =
- k['[object Object]'] =
- k['[object RegExp]'] =
- k['[object Set]'] =
- k['[object String]'] =
- k['[object Symbol]'] =
- k['[object Uint8Array]'] =
- k['[object Uint8ClampedArray]'] =
- k['[object Uint16Array]'] =
- k['[object Uint32Array]'] =
- !0),
- (k['[object Error]'] = k['[object Function]'] = k['[object WeakMap]'] = !1),
- (t.exports = function t(e, n, O, $, P, T) {
- var j,
- B = 1 & n,
- A = 2 & n,
- D = 4 & n;
- if ((O && (j = P ? O(e, $, P, T) : O(e)), void 0 !== j)) return j;
- if (!w(e)) return e;
- var I = y(e);
- if (I) {
- if (((j = m(e)), !B)) return c(e, j);
- } else {
- var E = f(e),
- M = '[object Function]' == E || '[object GeneratorFunction]' == E;
- if (g(e)) return l(e, B);
- if ('[object Object]' == E || '[object Arguments]' == E || (M && !P)) {
- if (((j = A || M ? {} : b(e)), !B)) return A ? d(e, s(j, e)) : u(e, a(j, e));
- } else {
- if (!k[E]) return P ? e : {};
- j = v(e, E, B);
- }
- }
- T || (T = new i());
- var L = T.get(e);
- if (L) return L;
- T.set(e, j),
- _(e)
- ? e.forEach(function (i) {
- j.add(t(i, n, O, i, e, T));
- })
- : x(e) &&
- e.forEach(function (i, o) {
- j.set(o, t(i, n, O, o, e, T));
- });
- var N = I ? void 0 : (D ? (A ? h : p) : A ? C : S)(e);
- return (
- o(N || e, function (i, o) {
- N && (i = e[(o = i)]), r(j, o, t(i, n, O, o, e, T));
- }),
- j
- );
- });
- },
- function (t, e, n) {
- var i = n(10),
- o = n(89),
- r = n(90),
- a = n(91),
- s = n(92),
- l = n(93);
- function c(t) {
- var e = (this.__data__ = new i(t));
- this.size = e.size;
- }
- (c.prototype.clear = o), (c.prototype.delete = r), (c.prototype.get = a), (c.prototype.has = s), (c.prototype.set = l), (t.exports = c);
- },
- function (t, e, n) {
- var i = n(10);
- t.exports = function () {
- (this.__data__ = new i()), (this.size = 0);
- };
- },
- function (t, e) {
- t.exports = function (t) {
- var e = this.__data__,
- n = e.delete(t);
- return (this.size = e.size), n;
- };
- },
- function (t, e) {
- t.exports = function (t) {
- return this.__data__.get(t);
- };
- },
- function (t, e) {
- t.exports = function (t) {
- return this.__data__.has(t);
- };
- },
- function (t, e, n) {
- var i = n(10),
- o = n(15),
- r = n(28);
- t.exports = function (t, e) {
- var n = this.__data__;
- if (n instanceof i) {
- var a = n.__data__;
- if (!o || a.length < 199) return a.push([t, e]), (this.size = ++n.size), this;
- n = this.__data__ = new r(a);
- }
- return n.set(t, e), (this.size = n.size), this;
- };
- },
- function (t, e) {
- t.exports = function (t, e) {
- for (var n = -1, i = null == t ? 0 : t.length; ++n < i && !1 !== e(t[n], n, t); );
- return t;
- };
- },
- function (t, e, n) {
- var i = n(13),
- o = n(17);
- t.exports = function (t, e) {
- return t && i(e, o(e), t);
- };
- },
- function (t, e) {
- t.exports = function (t, e) {
- for (var n = -1, i = Array(t); ++n < t; ) i[n] = e(n);
- return i;
- };
- },
- function (t, e, n) {
- var i = n(98),
- o = n(5),
- r = Object.prototype,
- a = r.hasOwnProperty,
- s = r.propertyIsEnumerable,
- l = i(
- (function () {
- return arguments;
- })()
- )
- ? i
- : function (t) {
- return o(t) && a.call(t, 'callee') && !s.call(t, 'callee');
- };
- t.exports = l;
- },
- function (t, e, n) {
- var i = n(7),
- o = n(5);
- t.exports = function (t) {
- return o(t) && '[object Arguments]' == i(t);
- };
- },
- function (t, e) {
- t.exports = function () {
- return !1;
- };
- },
- function (t, e, n) {
- var i = n(101),
- o = n(19),
- r = n(20),
- a = r && r.isTypedArray,
- s = a ? o(a) : i;
- t.exports = s;
- },
- function (t, e, n) {
- var i = n(7),
- o = n(37),
- r = n(5),
- a = {};
- (a['[object Float32Array]'] =
- a['[object Float64Array]'] =
- a['[object Int8Array]'] =
- a['[object Int16Array]'] =
- a['[object Int32Array]'] =
- a['[object Uint8Array]'] =
- a['[object Uint8ClampedArray]'] =
- a['[object Uint16Array]'] =
- a['[object Uint32Array]'] =
- !0),
- (a['[object Arguments]'] =
- a['[object Array]'] =
- a['[object ArrayBuffer]'] =
- a['[object Boolean]'] =
- a['[object DataView]'] =
- a['[object Date]'] =
- a['[object Error]'] =
- a['[object Function]'] =
- a['[object Map]'] =
- a['[object Number]'] =
- a['[object Object]'] =
- a['[object RegExp]'] =
- a['[object Set]'] =
- a['[object String]'] =
- a['[object WeakMap]'] =
- !1),
- (t.exports = function (t) {
- return r(t) && o(t.length) && !!a[i(t)];
- });
- },
- function (t, e, n) {
- var i = n(21),
- o = n(103),
- r = Object.prototype.hasOwnProperty;
- t.exports = function (t) {
- if (!i(t)) return o(t);
- var e = [];
- for (var n in Object(t)) r.call(t, n) && 'constructor' != n && e.push(n);
- return e;
- };
- },
- function (t, e, n) {
- var i = n(38)(Object.keys, Object);
- t.exports = i;
- },
- function (t, e, n) {
- var i = n(13),
- o = n(22);
- t.exports = function (t, e) {
- return t && i(e, o(e), t);
- };
- },
- function (t, e, n) {
- var i = n(6),
- o = n(21),
- r = n(106),
- a = Object.prototype.hasOwnProperty;
- t.exports = function (t) {
- if (!i(t)) return r(t);
- var e = o(t),
- n = [];
- for (var s in t) ('constructor' != s || (!e && a.call(t, s))) && n.push(s);
- return n;
- };
- },
- function (t, e) {
- t.exports = function (t) {
- var e = [];
- if (null != t) for (var n in Object(t)) e.push(n);
- return e;
- };
- },
- function (t, e, n) {
- (function (t) {
- var i = n(0),
- o = e && !e.nodeType && e,
- r = o && 'object' == typeof t && t && !t.nodeType && t,
- a = r && r.exports === o ? i.Buffer : void 0,
- s = a ? a.allocUnsafe : void 0;
- t.exports = function (t, e) {
- if (e) return t.slice();
- var n = t.length,
- i = s ? s(n) : new t.constructor(n);
- return t.copy(i), i;
- };
- }).call(this, n(18)(t));
- },
- function (t, e) {
- t.exports = function (t, e) {
- var n = -1,
- i = t.length;
- for (e || (e = Array(i)); ++n < i; ) e[n] = t[n];
- return e;
- };
- },
- function (t, e, n) {
- var i = n(13),
- o = n(23);
- t.exports = function (t, e) {
- return i(t, o(t), e);
- };
- },
- function (t, e) {
- t.exports = function (t, e) {
- for (var n = -1, i = null == t ? 0 : t.length, o = 0, r = []; ++n < i; ) {
- var a = t[n];
- e(a, n, t) && (r[o++] = a);
- }
- return r;
- };
- },
- function (t, e, n) {
- var i = n(13),
- o = n(41);
- t.exports = function (t, e) {
- return i(t, o(t), e);
- };
- },
- function (t, e, n) {
- var i = n(44),
- o = n(23),
- r = n(17);
- t.exports = function (t) {
- return i(t, r, o);
- };
- },
- function (t, e, n) {
- var i = n(44),
- o = n(41),
- r = n(22);
- t.exports = function (t) {
- return i(t, r, o);
- };
- },
- function (t, e, n) {
- var i = n(3)(n(0), 'DataView');
- t.exports = i;
- },
- function (t, e, n) {
- var i = n(3)(n(0), 'Promise');
- t.exports = i;
- },
- function (t, e, n) {
- var i = n(3)(n(0), 'Set');
- t.exports = i;
- },
- function (t, e, n) {
- var i = n(3)(n(0), 'WeakMap');
- t.exports = i;
- },
- function (t, e) {
- var n = Object.prototype.hasOwnProperty;
- t.exports = function (t) {
- var e = t.length,
- i = new t.constructor(e);
- return e && 'string' == typeof t[0] && n.call(t, 'index') && ((i.index = t.index), (i.input = t.input)), i;
- };
- },
- function (t, e, n) {
- var i = n(25),
- o = n(121),
- r = n(122),
- a = n(123),
- s = n(124);
- t.exports = function (t, e, n) {
- var l = t.constructor;
- switch (e) {
- case '[object ArrayBuffer]':
- return i(t);
- case '[object Boolean]':
- case '[object Date]':
- return new l(+t);
- case '[object DataView]':
- return o(t, n);
- case '[object Float32Array]':
- case '[object Float64Array]':
- case '[object Int8Array]':
- case '[object Int16Array]':
- case '[object Int32Array]':
- case '[object Uint8Array]':
- case '[object Uint8ClampedArray]':
- case '[object Uint16Array]':
- case '[object Uint32Array]':
- return s(t, n);
- case '[object Map]':
- return new l();
- case '[object Number]':
- case '[object String]':
- return new l(t);
- case '[object RegExp]':
- return r(t);
- case '[object Set]':
- return new l();
- case '[object Symbol]':
- return a(t);
- }
- };
- },
- function (t, e, n) {
- var i = n(0).Uint8Array;
- t.exports = i;
- },
- function (t, e, n) {
- var i = n(25);
- t.exports = function (t, e) {
- var n = e ? i(t.buffer) : t.buffer;
- return new t.constructor(n, t.byteOffset, t.byteLength);
- };
- },
- function (t, e) {
- var n = /\w*$/;
- t.exports = function (t) {
- var e = new t.constructor(t.source, n.exec(t));
- return (e.lastIndex = t.lastIndex), e;
- };
- },
- function (t, e, n) {
- var i = n(8),
- o = i ? i.prototype : void 0,
- r = o ? o.valueOf : void 0;
- t.exports = function (t) {
- return r ? Object(r.call(t)) : {};
- };
- },
- function (t, e, n) {
- var i = n(25);
- t.exports = function (t, e) {
- var n = e ? i(t.buffer) : t.buffer;
- return new t.constructor(n, t.byteOffset, t.length);
- };
- },
- function (t, e, n) {
- var i = n(126),
- o = n(43),
- r = n(21);
- t.exports = function (t) {
- return 'function' != typeof t.constructor || r(t) ? {} : i(o(t));
- };
- },
- function (t, e, n) {
- var i = n(6),
- o = Object.create,
- r = (function () {
- function t() {}
- return function (e) {
- if (!i(e)) return {};
- if (o) return o(e);
- t.prototype = e;
- var n = new t();
- return (t.prototype = void 0), n;
- };
- })();
- t.exports = r;
- },
- function (t, e, n) {
- var i = n(128),
- o = n(19),
- r = n(20),
- a = r && r.isMap,
- s = a ? o(a) : i;
- t.exports = s;
- },
- function (t, e, n) {
- var i = n(24),
- o = n(5);
- t.exports = function (t) {
- return o(t) && '[object Map]' == i(t);
- };
- },
- function (t, e, n) {
- var i = n(130),
- o = n(19),
- r = n(20),
- a = r && r.isSet,
- s = a ? o(a) : i;
- t.exports = s;
- },
- function (t, e, n) {
- var i = n(24),
- o = n(5);
- t.exports = function (t) {
- return o(t) && '[object Set]' == i(t);
- };
- },
- function (t, e, n) {
- 'use strict';
- n.r(e);
- 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
- );
- },
- r = {
- 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;
- }
- }
- },
- a = {
- rowKey: 'id',
- rowParentKey: 'parentId',
- nodeKey: 'id',
- label: 'label',
- value: 'value',
- type: 'type',
- desc: 'desc',
- groups: 'groups',
- title: 'title',
- leaf: 'leaf',
- children: 'children',
- hasChildren: 'hasChildren',
- labelText: '名称',
- disabled: 'disabled'
- },
- s = { name: 'name', url: 'url', fileType: 'type', fileName: 'file', res: '' },
- l = ['dates', 'date', 'datetime', 'datetimerange', 'daterange', 'time', 'timerange', 'week', 'month', 'monthrange', 'year'],
- c = ['table', 'dynamic'],
- u = ['tree', 'number', 'icon', 'color', 'table', 'map'],
- d = ['img', 'array', 'url'],
- p = ['cascader', 'tree', 'select', 'table'],
- h = ['slider'],
- f = d.concat(['upload', 'dynamic', 'map', 'checkbox', 'cascader', 'timerange', 'monthrange', 'daterange', 'datetimerange', 'dates']),
- m = l.concat(['select', 'checkbox', 'radio', 'cascader', 'tree', 'color', 'icon', 'map']),
- v = {
- img: /(\.|^)(gif|jpg|jpeg|png|webp|svg|GIF|JPG|JPEG|PNG|WEBP|SVG)/,
- video: /(\.|^)(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|ogg|mp4)/,
- audio: /(\.|^)(mp3|wav|MP3|WAV)/
- },
- b = function (t) {
- return (t.name = 'avue-' + (t.name || '')), (t.mixins = t.mixins || []), t.mixins.push(r), t;
- };
- function y(t, e, n, i, o, r, a, 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),
- r && (c._scopeId = 'data-v-' + r),
- a
- ? ((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(a);
- }),
- (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 };
- }
- var g = y(
- b({
- name: 'affix',
- props: { target: String, offsetTop: { type: Number, default: 0 }, offsetBottom: { type: Number } },
- data: function () {
- return { container: null, affix: !1, styles: {}, slot: !1, slotStyle: {} };
- },
- computed: {
- offsetType: function () {
- var t = 'top';
- return this.offsetBottom >= 0 && (t = 'bottom'), t;
- }
- },
- mounted: function () {
- this.target ? (this.container = document.querySelector(this.target)) : (this.container = document),
- this.container.addEventListener('scroll', this.handleScroll, !1),
- this.container.addEventListener('resize', this.handleScroll, !1);
- },
- methods: {
- getScroll: function (t, e) {
- var n = e ? 'scrollTop' : 'scrollLeft',
- i = t[e ? 'pageYOffset' : 'pageXOffset'];
- return 'number' != typeof i && (i = document.documentElement[n]), i;
- },
- getOffset: function (t) {
- var e = t.getBoundingClientRect(),
- n = this.getScroll(this.container, !0),
- i = this.getScroll(this.container),
- o = document.body,
- r = o.clientTop || 0,
- a = o.clientLeft || 0;
- return { top: e.top + n - r, left: e.left + i - a };
- },
- handleScroll: function () {
- var t = this.affix,
- e = this.getScroll(this.container, !0),
- n = this.getOffset(this.$el),
- i = this.container.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));
- }
- },
- beforeDestroy: function () {
- this.container.removeEventListener('scroll', this.handleScroll, !1), this.container.removeEventListener('resize', this.handleScroll, !1);
- }
- }),
- function () {
- var t = this._self._c;
- this._self._setupProxy;
- return t('div', [
- t('div', { ref: 'point', class: { 'avue-affix': this.affix }, style: this.styles }, [this._t('default')], 2),
- this._v(' '),
- t('div', { directives: [{ name: 'show', rawName: 'v-show', value: this.slot, expression: 'slot' }], style: this.slotStyle })
- ]);
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- x = n(45),
- w = n.n(x),
- _ = y(
- b({
- 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 w.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);
- }
- }),
- function () {
- var t = this._self._c;
- this._self._setupProxy;
- return t('span', [this._v(this._s(this.end))]);
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- 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);
- }
- function C(t, e, n) {
- var i;
- return (
- (i = (function (t, e) {
- if ('object' != S(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != S(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(e, 'string')),
- (e = 'symbol' == S(i) ? i : String(i)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n),
- t
- );
- }
- var k = y(
- b({
- name: 'avatar',
- props: C(
- C(
- C(
- {
- src: String,
- shape: {
- validator: function (t) {
- return ['circle', 'square'].includes(t);
- },
- default: 'circle'
- }
- },
- 'shape',
- String
- ),
- 'size',
- {
- validator: function (t) {
- return 'number' == typeof t || ['small', 'large', 'default'].includes(t);
- },
- default: 'default'
- }
- ),
- 'icon',
- String
- ),
- 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 () {
- return C(
- C(C({}, ''.concat('avue-avatar', '--').concat(this.shape), this.shape), ''.concat('avue-avatar', '--lg'), 'large' === this.size),
- ''.concat('avue-avatar', '--sm'),
- 'small' === this.size
- );
- },
- 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;
- }
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e('span', { class: [t.b(), t.sizeCls, t.b('icon')], style: t.sizeStyle }, [
- t.src
- ? e('img', { class: t.b('images'), attrs: { src: t.src, alt: '' } })
- : t.icon
- ? e('i', { class: t.icon })
- : e('span', { ref: 'avatarChildren', class: t.b('string'), style: t.sizeChildrenStyle }, [t._t('default')], 2)
- ]);
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- O = { title: 'title', meta: 'meta', lead: 'lead', body: 'body' },
- $ = y(
- b({
- name: 'article',
- props: {
- data: {
- type: Object,
- default: function () {
- return {};
- }
- },
- props: {
- type: Object,
- default: function () {
- return O;
- }
- }
- },
- computed: {
- titleKey: function () {
- return this.props.title || O.title;
- },
- metaKey: function () {
- return this.props.meta || O.meta;
- },
- leadKey: function () {
- return this.props.lead || O.lead;
- },
- bodyKey: function () {
- return this.props.body || O.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 () {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e('div', { class: t.b() }, [
- e('div', { class: t.b('header') }, [
- t.title ? e('div', { class: t.b('title'), domProps: { textContent: t._s(t.title) } }) : t._e(),
- t._v(' '),
- t.meta ? e('small', { class: t.b('meta'), domProps: { textContent: t._s(t.meta) } }) : t._e()
- ]),
- t._v(' '),
- t.lead ? e('div', { class: t.b('lead'), domProps: { textContent: t._s(t.lead) } }) : t._e(),
- t._v(' '),
- t.body ? e('div', { class: t.b('body'), domProps: { innerHTML: t._s(t.body) } }) : t._e()
- ]);
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- function P(t) {
- return (
- (function (t) {
- if (Array.isArray(t)) return T(t);
- })(t) ||
- (function (t) {
- if (('undefined' != typeof Symbol && null != t[Symbol.iterator]) || null != t['@@iterator']) return Array.from(t);
- })(t) ||
- (function (t, e) {
- if (!t) return;
- if ('string' == typeof t) return T(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 T(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 T(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 j = {};
- function B() {
- 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;
- }
- (j.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(B(n), '; padding: 1px; border-radius: 0 3px 3px 0; color: #fff;'),
- 'background:transparent'
- );
- }),
- (j.colorful = function (t) {
- var e;
- (e = console).log.apply(
- e,
- [
- '%c'.concat(
- t
- .map(function (t) {
- return t.text || '';
- })
- .join('%c')
- )
- ].concat(
- P(
- t.map(function (t) {
- return 'color: '.concat(B(t.type), ';');
- })
- )
- )
- );
- }),
- (j.default = function (t) {
- j.colorful([{ text: t }]);
- }),
- (j.primary = function (t) {
- j.colorful([{ text: t, type: 'primary' }]);
- }),
- (j.success = function (t) {
- j.colorful([{ text: t, type: 'success' }]);
- }),
- (j.warning = function (t) {
- j.colorful([{ text: t, type: 'warning' }]);
- }),
- (j.danger = function (t) {
- j.colorful([{ text: t, type: 'danger' }]);
- });
- var A = j,
- D = {
- AliOSS: {
- url: 'https://cdn.staticfile.org/ali-oss/6.17.1/aliyun-oss-sdk.min.js',
- title: '阿里云云图片上传,需引入OSS的sdk',
- github: 'https://github.com/ali-sdk/ali-oss/'
- },
- 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' },
- MapUi: { url: 'https://webapi.amap.com/ui/1.0/main.js?v=1.0.11', title: '地图组件,需引入高德UISDK' },
- Sortable: { url: 'https://cdn.staticfile.org/Sortable/1.10.0-rc2/Sortable.min.js', title: '拖拽,需引入sortableJs', github: 'https://github.com/SortableJS/Sortable' },
- Screenshot: {
- url: 'https://cdn.staticfile.org/html2canvas/0.5.0-beta4/html2canvas.min.js',
- title: '需引入html2canvas依赖包',
- github: 'https://github.com/niklasvh/html2canvas/'
- },
- COS: { url: 'https://avuejs.com/cdn/cos-js-sdk-v5.min.js', title: '腾讯云云图片上传,需引入COS' },
- CryptoJS: { url: 'https://avuejs.com/cdn/CryptoJS.js', title: '七牛云图片上传,需引入CryptoJS' },
- hljs: {
- url: 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js',
- title: '需引入hljs框架包',
- github: 'https://github.com/highlightjs/highlight.js'
- },
- 'file-saver': {
- url: 'https://cdn.staticfile.org/FileSaver.js/2014-11-29/FileSaver.min.js',
- title: '需引入文件操作包',
- github: 'https://github.com/eligrey/FileSaver.js'
- },
- xlsx: { url: 'https://cdn.staticfile.org/xlsx/0.18.2/xlsx.full.min.js', title: '需引入excel操作包', github: 'https://github.com/protobi/js-xlsx' },
- mock: { url: 'https://cdn.staticfile.org/Mock.js/1.0.1-beta3/mock-min.js', title: '需要引入mock模拟数据包', github: 'https://github.com/Colingo/mock' }
- },
- I = {
- logs: function (t) {
- var e = D[t];
- A.capsule(t, e.title, 'warning'), A.warning('CDN:' + (e.url || '-')), A.warning('GITHUB:' + (e.github || '-'));
- }
- },
- E = (function () {
- function t(t, e) {
- var n = e.value;
- t.style.display = !1 === n ? 'none' : '';
- }
- return {
- bind: function (e, n) {
- t(e, n);
- },
- update: function (e, n) {
- t(e, n);
- }
- };
- })();
- function M(t) {
- 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) return !1;
- return !0;
- }
- return 'null' === t || null == t || 'undefined' === t || void 0 === t || '' === t;
- }
- return 0 === t.length;
- }
- var L = n(46),
- N = n.n(L),
- F = n(47),
- z = n.n(F),
- H = n(48),
- K = n.n(H);
- function R(t, e) {
- var n = Object.keys(t);
- if (Object.getOwnPropertySymbols) {
- var i = Object.getOwnPropertySymbols(t);
- e &&
- (i = i.filter(function (e) {
- return Object.getOwnPropertyDescriptor(t, e).enumerable;
- })),
- n.push.apply(n, i);
- }
- return n;
- }
- function V(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = null != arguments[e] ? arguments[e] : {};
- e % 2
- ? R(Object(n), !0).forEach(function (e) {
- W(t, e, n[e]);
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
- : R(Object(n)).forEach(function (e) {
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e));
- });
- }
- return t;
- }
- function W(t, e, n) {
- var i;
- return (
- (i = (function (t, e) {
- if ('object' != U(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != U(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(e, 'string')),
- (e = 'symbol' == U(i) ? i : String(i)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n),
- t
- );
- }
- function U(t) {
- return (U =
- '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 X = function (t, e) {
- return M(t)
- ? null
- : v.audio.test(t) || v.audio.test(e) || 'audio' == e
- ? 'audio'
- : v.video.test(t) || v.video.test(e) || 'video' == e
- ? 'video'
- : v.img.test(t) || v.img.test(e) || 'img' == e
- ? 'img'
- : null;
- },
- Y = function () {
- for (var t = [], e = 0; e < 36; e++) t[e] = '0123456789abcdef'.substr(Math.floor(16 * Math.random()), 1);
- (t[14] = '4'), (t[19] = '0123456789abcdef'.substr((3 & t[19]) | 8, 1)), (t[8] = t[13] = t[18] = t[23] = '-');
- var n = t.join('');
- return n;
- };
- function q() {
- 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 G(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : '',
- n = it(t);
- return M(e) ? n : N()(t, e);
- }
- function J(t, e) {
- 'object' === U(t) && t instanceof Blob && (t = URL.createObjectURL(t));
- var n,
- i = document.createElement('a');
- (i.href = t),
- (i.download = e || ''),
- window.MouseEvent
- ? (n = new MouseEvent('click'))
- : (n = document.createEvent('MouseEvents')).initMouseEvent('click', !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null),
- i.dispatchEvent(n);
- }
- function Q(t, e) {
- var n = e.split('.'),
- i = n.splice(0, 1)[0],
- o = {};
- if (((o[i] = {}), n.length >= 2)) {
- var r = '';
- n.forEach(function (t) {
- r = ''.concat(r).concat('{', '"').concat(t, '":');
- }),
- (r = ''.concat(r, '""'));
- for (var a = 0; a < n.length; a++) r = ''.concat(r).concat('}');
- (r = JSON.parse(r)), (o[i] = r);
- }
- return (t = (function t() {
- var e,
- n,
- i,
- o,
- r = arguments[0] || {},
- a = !1,
- s = Array.prototype.slice.call(arguments),
- l = 1,
- c = !1;
- for ('boolean' == typeof r && ((a = r), l++, (r = arguments[1])); l < s.length; l++)
- if (null != (e = s[l]))
- for (i in e)
- (o = e[i]),
- (n = r[i]),
- a && ('[object Object]' === toString.call(o) || (c = '[object Array]' == toString.call(o)))
- ? ((n = c ? ('[object Array]' === toString.call(n) ? n : []) : '[object Object]' === toString.call(n) ? n : {}), (r[i] = t(a, n, o)))
- : void 0 !== o && o !== n && (r[i] = o);
- return r;
- })(!0, t, o));
- }
- function Z(t, e) {
- for (var n = t.split(','), i = n[0].match(/:(.*?);/)[1], o = atob(n[1]), r = o.length, a = new Uint8Array(r); r--; ) a[r] = o.charCodeAt(r);
- return new File([a], e, { type: i });
- }
- function tt() {
- var t,
- e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
- n = arguments.length > 1 ? arguments[1] : void 0,
- i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 'prop';
- return (
- (t = lt(e, { value: i }, n)) ||
- e.forEach(function (e) {
- e.column ? t || (t = lt(e.column, { value: i }, n)) : e.children && c.includes(e.type) && (t || (t = lt(e.children.column, { value: i }, n)));
- }),
- t
- );
- }
- function et() {
- for (var t = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', e = t.length, n = '', i = 0; i < 16; i++) n += t.charAt(Math.floor(Math.random() * e));
- return n;
- }
- var nt = function (t) {
- return Array.isArray(t) ? t[0] instanceof Object : t instanceof Object;
- },
- it = function (t) {
- return K()(t);
- },
- ot = function (t) {
- var e = [];
- if (Array.isArray(t)) e = t;
- else
- for (var n in t) {
- var i = V(V({}, t[n]), { prop: n });
- e.push(i);
- }
- return e;
- },
- rt = function (t, e) {
- return M(t) ? t : 'number' === e ? Number(t) : 'string' === e ? t + '' : t;
- },
- at = function (t, e) {
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
- if (M(t)) return e;
- var i = Array.isArray(e);
- e = i ? e : [e];
- var o = [],
- r = n[a.label] || a.label,
- s = n[a.groups] || a.groups,
- l = it(t);
- return (
- l.forEach(function (t) {
- t[s] && ((l = l.concat(t[s])), delete t[s]);
- }),
- e.forEach(function (t) {
- if (Array.isArray(t)) {
- var e = [];
- t.forEach(function (t) {
- var i = lt(l, n, t) || {};
- e.push(i[r] || t);
- }),
- o.push(e);
- } else {
- var i = lt(l, n, t) || {};
- o.push(i[r] || t);
- }
- }),
- i ? o : o.join('')
- );
- },
- st = function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : ['', '$'],
- n = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2],
- i = n ? it(t) : t;
- for (var o in i) e.includes('') && M(i[o]) && delete i[o], e.includes('$') && -1 !== o.indexOf('$') && delete i[o];
- return i;
- },
- lt = function t() {
- for (
- 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 || a.value,
- r = n.children || a.children,
- s = 0;
- s < e.length;
- s++
- ) {
- var l = e[s];
- if (l[o] == i) {
- if (0 !== i && 0 !== l[o]) return l;
- if (l[o] === i) return l;
- } else if (l[r] && Array.isArray(l[r])) {
- var c = t(l[r], n, i);
- if (c) return c;
- }
- }
- },
- ct = 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;
- },
- ut = function (t) {
- if (M(t)) return t;
- var e = (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)];
- })(t);
- return (t = 'array' === e ? [] : 'object' === e ? {} : ['number', 'boolean'].includes(e) ? void 0 : '');
- },
- dt = function (t, e) {
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : [];
- return t
- ? (e.forEach(function (e) {
- n.includes(e) || (e.includes('$') ? delete t[e] : M(t[e]) || (t[e] = ut(t[e])));
- }),
- t)
- : {};
- },
- pt = function (t, e) {
- return 'boolean' == typeof t ? t : M(t) ? e : t;
- };
- function ht(t) {
- return (ht =
- '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 ft(t, e) {
- var n = Object.keys(t);
- if (Object.getOwnPropertySymbols) {
- var i = Object.getOwnPropertySymbols(t);
- e &&
- (i = i.filter(function (e) {
- return Object.getOwnPropertyDescriptor(t, e).enumerable;
- })),
- n.push.apply(n, i);
- }
- return n;
- }
- function mt(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = null != arguments[e] ? arguments[e] : {};
- e % 2
- ? ft(Object(n), !0).forEach(function (e) {
- vt(t, e, n[e]);
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
- : ft(Object(n)).forEach(function (e) {
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e));
- });
- }
- return t;
- }
- function vt(t, e, n) {
- var i;
- return (
- (i = (function (t, e) {
- if ('object' != ht(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != ht(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(e, 'string')),
- (e = 'symbol' == ht(i) ? i : String(i)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n),
- t
- );
- }
- function bt() {
- 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,
- i = e.value || a.value,
- o = e.children || a.children;
- return (
- t.forEach(function (t) {
- (t[i] = rt(t[i], n)), t[o] && bt(t[o], e, n);
- }),
- t
- );
- }
- var yt = function (t) {
- var e = t.url,
- n = t.query,
- i = t.method,
- o = t.props,
- r = t.formatter,
- a = t.headers,
- s = t.value,
- l = t.column,
- c = void 0 === l ? {} : l,
- u = t.form,
- d = void 0 === u ? {} : u,
- p = t.dataType;
- (e = c.dicUrl || e),
- (i = (c.dicMethod || i || 'get').toLowerCase()),
- (a = c.dicHeaders || a || {}),
- (n = c.dicQuery || n || {}),
- (r = c.dicFormatter || r),
- (o = c.props || o || {}),
- (e.match(/[^\{\}]+(?=\})/g) || []).forEach(function (t) {
- var n = 'key' === t ? s : d[t];
- M(n) && (n = ''), (e = e.replace('{{'.concat(t, '}}'), n));
- });
- var h = function (t) {
- var e = {};
- return (
- Object.keys(t).forEach(function (n) {
- var i = t[n];
- if ('string' == typeof i && i.match(/\{{|}}/g)) {
- var o = i.replace(/\{{|}}/g, '');
- e[n] = 'key' == o ? s : d[o];
- } else e[n] = i;
- }),
- e
- );
- };
- return new Promise(function (t, s) {
- e || t([]);
- var l,
- c = function (e) {
- var n = [];
- (e = e.data || {}),
- (n =
- 'function' == typeof r
- ? r(e, d)
- : (function (t, e, n) {
- var i = e.res,
- o = t,
- r = t.data;
- return i ? (o = G(o, i)) : r && (o = Array.isArray(r) ? r : [r]), n && (o = bt(o, e, n)), o;
- })(e, o, p)),
- t(n);
- };
- window
- .axios(Object.assign({ url: e, method: i, headers: h(a) }, ((l = h(n)), 'get' == i ? { params: l } : { data: l })))
- .then(function (t) {
- c(t);
- })
- .catch(function (t) {
- return [s(t)];
- });
- });
- },
- gt = {
- 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 = arguments.length > 2 ? arguments[2] : void 0,
- i = { F: 'Form', H: 'Header', E: 'Error', L: 'Label', S: 'Search', T: 'Type', D: '' },
- o = t.prop + i[e];
- return n ? n[o] : o;
- },
- getSlotList: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
- e = arguments.length > 1 ? arguments[1] : void 0,
- n = arguments.length > 2 ? arguments[2] : void 0;
- return (
- (n = n.map(function (t) {
- return t.prop;
- })),
- Object.keys(e).filter(function (e) {
- var i = !1;
- return (
- n.includes(e) ||
- t.forEach(function (t) {
- e.includes(t) && (i = !0);
- }),
- i
- );
- })
- );
- }
- }
- };
- function xt(t) {
- return (xt =
- '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 wt(t, e) {
- var n = Object.keys(t);
- if (Object.getOwnPropertySymbols) {
- var i = Object.getOwnPropertySymbols(t);
- e &&
- (i = i.filter(function (e) {
- return Object.getOwnPropertyDescriptor(t, e).enumerable;
- })),
- n.push.apply(n, i);
- }
- return n;
- }
- function _t(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = null != arguments[e] ? arguments[e] : {};
- e % 2
- ? wt(Object(n), !0).forEach(function (e) {
- St(t, e, n[e]);
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
- : wt(Object(n)).forEach(function (e) {
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e));
- });
- }
- return t;
- }
- function St(t, e, n) {
- var i;
- return (
- (i = (function (t, e) {
- if ('object' != xt(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != xt(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(e, 'string')),
- (e = 'symbol' == xt(i) ? i : String(i)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n),
- t
- );
- }
- var Ct = function (t) {
- return {
- mixins: [gt],
- props: {
- tableData: {
- type: Object,
- default: function () {
- return {};
- }
- },
- defaults: {
- type: Object,
- default: function () {
- return {};
- }
- },
- option: {
- type: Object,
- required: !0,
- default: function () {
- return {};
- }
- }
- },
- watch: {
- defaults: {
- handler: function (t) {
- this.objectOption = t;
- },
- deep: !0
- },
- objectOption: {
- handler: function (t) {
- this.$emit('update:defaults', t);
- },
- deep: !0
- },
- propOption: {
- handler: function (t) {
- var e = {};
- t.forEach(function (t) {
- e[t.prop] = t;
- }),
- this.$set(this, 'objectOption', e);
- },
- deep: !0
- },
- option: {
- handler: function () {
- this.init(!1);
- },
- deep: !0
- }
- },
- data: function () {
- return { DIC: {}, cascaderDIC: {}, tableOption: {}, isMobile: '', objectOption: {} };
- },
- created: function () {
- this.init();
- },
- computed: {
- resultOption: function () {
- return _t(_t({}, this.tableOption), { column: this.propOption });
- },
- rowKey: function () {
- return this.tableOption.rowKey || a.rowKey;
- },
- 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;
- }
- },
- methods: {
- init: function (e) {
- var n = _t(_t({}, this.deepClone(this.$AVUE[''.concat(t, 'Option')])), this.option);
- (this.tableOption = n), this.getIsMobile(), this.handleLocalDic(), !1 !== e && this.handleLoadDic();
- },
- dicInit: function (t) {
- 'cascader' === t ? this.handleLoadCascaderDic() : this.handleLoadDic();
- },
- getIsMobile: function () {
- this.isMobile = document.body.clientWidth <= 768;
- },
- updateDic: function (t, e) {
- var n = this,
- i = this.findObject(this.propOption, t);
- this.validatenull(e) && this.validatenull(t)
- ? this.handleLoadDic()
- : this.validatenull(e) && !this.validatenull(i.dicUrl)
- ? yt({ column: i }).then(function (e) {
- n.$set(n.DIC, t, e);
- })
- : this.$set(this.DIC, t, e);
- },
- handleLocalDic: function () {
- !(function (t, e) {
- var n = {},
- i = t.dicData || {};
- t.column.forEach(function (t) {
- var i = t.dicData,
- o = t.prop;
- if (i instanceof Function) {
- var r = i(t);
- r instanceof Promise
- ? r.then(function (n) {
- e.DIC[o] = bt(n, t.props, t.dataType);
- })
- : (n[o] = bt(r, t.props, t.dataType));
- } else i instanceof Array && (n[o] = bt(i, t.props, t.dataType));
- });
- var o = mt(mt({}, i), n);
- Object.keys(o).forEach(function (t) {
- e.$set(e.DIC, t, o[t]);
- });
- })(this.resultOption, this);
- },
- handleLoadDic: function () {
- var t, e;
- (t = this.resultOption),
- (e = this),
- new Promise(function (n) {
- var i = [],
- o = {},
- r = [],
- a = [];
- (t.column || []).forEach(function (t) {
- var n = t.dicUrl,
- o = t.prop,
- a = t.parentProp;
- r = r.concat(t.cascader || []);
- var s = !1 === t.dicFlag || !0 === t.lazy || r.includes(o);
- !n ||
- a ||
- s ||
- i.push(
- new Promise(function (i) {
- yt({
- url: n,
- name: o,
- method: t.dicMethod,
- headers: t.dicHeaders,
- formatter: t.dicFormatter,
- props: t.props,
- dataType: t.dataType,
- query: t.dicQuery
- }).then(function (t) {
- e.$set(e.DIC, o, t), i(t);
- });
- })
- );
- }),
- Promise.all(i).then(function (t) {
- a.forEach(function (e, n) {
- o[e] = t[n];
- }),
- n(o);
- });
- });
- },
- handleLoadCascaderDic: function () {
- var t, e;
- (t = this.propOption),
- (e = this),
- new Promise(function (n) {
- var i = [],
- o = {},
- r = t.filter(function (t) {
- return t.parentProp;
- });
- e.data.forEach(function (t, n) {
- e.cascaderDIC[n] || e.$set(e.cascaderDIC, n, {}),
- r.forEach(function (o) {
- !0 !== o.hide &&
- !1 !== o.dicFlag &&
- i.push(
- new Promise(function (i) {
- if (t[o.parentProp])
- yt({
- url: o.dicUrl,
- props: o.props,
- method: o.dicMethod,
- headers: o.dicHeaders,
- formatter: o.dicFormatter,
- query: o.dicQuery,
- dataType: o.dataType,
- form: t,
- value: t[o.parentProp]
- }).then(function (t) {
- var r = { prop: o.prop, data: t, index: n };
- e.$set(e.cascaderDIC[n], r.prop, r.data), i(r);
- });
- else {
- var r = { prop: o.prop, data: [], index: n };
- e.$set(e.cascaderDIC[n], r.prop, r.data), i(r);
- }
- })
- );
- });
- }),
- Promise.all(i).then(function (t) {
- t.forEach(function (t) {
- o[t.index] || (o[t.index] = {}), (o[t.index][t.prop] = t.data);
- }),
- n(o);
- });
- });
- }
- }
- };
- },
- kt = n(2),
- Ot = n.n(kt);
- function $t(t) {
- return ($t =
- '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 Pt = Object.prototype.hasOwnProperty;
- function Tt(t, e) {
- return Pt.call(t, e);
- }
- var jt = /(%|)\{([0-9a-zA-Z_]+)\}/g,
- Bt =
- (Ot.a,
- 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' === $t(n[0]) && (n = n[0]),
- (n && n.hasOwnProperty) || (n = {}),
- t.replace(jt, function (e, i, o, r) {
- var a;
- return '{' === t[r - 1] && '}' === t[r + e.length] ? o : null == (a = Tt(n, o) ? n[o] : null) ? '' : a;
- })
- );
- }),
- At = {
- common: { submitBtn: '确 定', cancelBtn: '取 消', condition: '条件', display: '显示', hide: '隐藏' },
- tip: { select: '请选择', input: '请输入' },
- check: { checkAll: '全选' },
- upload: { upload: '点击上传', tip: '将文件拖到此处,或' },
- time: { start: '开始', end: '结束' },
- date: { start: '开始', end: '结束', t: '今日', y: '昨日', n: '近7天', a: '全部' },
- form: { printBtn: '打 印', mockBtn: '模 拟', submitBtn: '提 交', emptyBtn: '清 空' },
- crud: {
- excel: {
- name: '文件名',
- type: '数据',
- typeDic: { true: '当前数据(当前页全部的数据)', false: '选中的数据(当前页选中的数据)' },
- prop: '字段',
- params: '参数',
- paramsDic: { header: '表头', data: '数据源', headers: '复杂表头', sum: '合计统计' }
- },
- filter: { addBtn: '新增条件', clearBtn: '清空数据', resetBtn: '清空条件', cancelBtn: '取 消', submitBtn: '确 定' },
- column: { name: '列名', hide: '隐藏', fixed: '冻结', filters: '过滤', sortable: '排序', index: '顺序', width: '宽度' },
- emptyText: '暂无数据',
- tipStartTitle: '当前表格已选择',
- tipEndTitle: '项',
- editTitle: '编 辑',
- copyTitle: '复 制',
- addTitle: '新 增',
- viewTitle: '查 看',
- filterTitle: '过滤条件',
- showTitle: '列显隐',
- menu: '操作',
- addBtn: '新 增',
- show: '显 示',
- hide: '隐 藏',
- open: '展 开',
- shrink: '收 缩',
- printBtn: '打 印',
- mockBtn: '模 拟',
- excelBtn: '导 出',
- updateBtn: '修 改',
- cancelBtn: '取 消',
- searchBtn: '搜 索',
- emptyBtn: '清 空',
- menuBtn: '功 能',
- saveBtn: '保 存',
- viewBtn: '查 看',
- editBtn: '编 辑',
- copyBtn: '复 制',
- delBtn: '删 除'
- }
- },
- Dt = !1,
- It = function () {
- var t = Object.getPrototypeOf(this || Ot.a || {}).$t;
- if ('function' == typeof t && Ot.a.locale)
- return Dt || ((Dt = !0), Ot.a.locale(Ot.a.config.lang, Object.assign(At, Ot.a.locale(Ot.a.config.lang) || {}, { clone: !0 }))), t.apply(this, arguments);
- },
- Et = function (t, e) {
- var n = It.apply(this, arguments);
- if (null != n) return n;
- for (var i = t.split('.'), o = At, r = 0, a = i.length; r < a; r++) {
- var s = i[r];
- if (((n = o[s]), r === a - 1)) return Bt(n, e);
- if (!n) return '';
- o = n;
- }
- return '';
- },
- Mt = {
- use: function (t) {
- At = t || At;
- },
- t: Et,
- i18n: function (t) {
- It = t || It;
- }
- },
- Lt = {
- methods: {
- t: function () {
- for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
- return Et.apply(this, e);
- }
- }
- },
- Nt = y(
- {
- name: 'row',
- props: { row: Object, column: Object, index: Number, content: Function },
- render: function (t) {
- if (this.content) return t('span', {}, this.content({ row: this.row, $index: this.index, column: this.column }));
- }
- },
- void 0,
- void 0,
- !1,
- null,
- null,
- null
- ),
- Ft = y(
- b({
- name: 'crud__grid',
- inject: ['crud'],
- mixins: [Lt],
- components: { rowItem: Nt.exports },
- props: { cellClassName: Function, rowClassName: Function, height: [String, Number], data: Array },
- data: function () {
- return { checkList: [], span: 8, xsSpan: 12, id: 'crud-grid', column: [] };
- },
- computed: {
- styleName: function () {
- return { height: this.crud.tableHeight + 'px' };
- }
- },
- methods: {
- doLayout: function () {},
- clearSelection: function () {
- (this.checkList = []), this.checkListChange(this.checkList);
- },
- toggleAllSelection: function () {
- this.checkList.length === this.crud.data.length
- ? (this.checkList = [])
- : (this.checkList = this.crud.data.map(function (t, e) {
- return e;
- })),
- this.checkListChange(this.checkList);
- },
- toggleRowSelection: function (t, e) {
- var n = this.crud.data.findIndex(function (e) {
- return JSON.stringify(e) == JSON.stringify(t);
- });
- if (e && -1 != n) this.checkList.push(n);
- else {
- var i = this.checkList.findIndex(function (t) {
- return t == n;
- });
- this.checkList.splice(i, 1);
- }
- this.checkListChange(this.checkList);
- },
- checkListChange: function (t) {
- var e = [],
- n = this.crud.data;
- t.forEach(function (t) {
- e.push(n[t]);
- }),
- this.$emit('selection-change', e);
- },
- handleRowDblClick: function (t, e) {
- this.$emit('row-dblclick', t, e);
- },
- handleRowClick: function (t, e) {
- this.$emit('row-click', t, e);
- },
- handleCellDblClick: function (t, e) {
- this.$emit('cell-dblclick', t, e);
- },
- handleCellClick: function (t, e) {
- this.$emit('cell-click', t, e);
- },
- getGradientColor: function (t, e) {
- var n = {};
- return (
- 'function' == typeof this.crud.tableOption.gridBackground
- ? (n.background = this.crud.tableOption.gridBackground(t, e))
- : this.crud.tableOption.gridBackgroundImage
- ? (n.backgroundImage = 'url('.concat(this.crud.tableOption.gridBackgroundImage, ')'))
- : (n.background = this.crud.tableOption.gridBackground || 'linear-gradient(to bottom, rgba(88, 159, 248, 0.1), white)'),
- n
- );
- },
- getCellStyle: function (t, e, n, i) {
- if (this.cellStyle) return this.cellStyle({ row: t, rowIndex: e, column: n, columnIndex: i });
- },
- getRowStyle: function (t, e) {
- if (this.rowStyle) return this.rowStyle({ row: t, rowIndex: e });
- },
- getRowClass: function (t, e) {
- if (this.rowClassName) return this.rowClassName({ row: t, rowIndex: e });
- },
- getClass: function (t, e, n) {
- var i = [],
- o = this.crud.columnOption || [];
- return (
- this.cellClassName && i.push(this.cellClassName({ row: t, rowIndex: e, column: n })),
- n.prop == (o[0] || {}).prop && i.push('title'),
- n.row && i.push('row'),
- n.showOverflowTooltip && i.push('overHidden'),
- i
- );
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b(), style: t.styleName },
- [
- e('div', { class: t.b('hide') }, [t._t('default')], 2),
- t._v(' '),
- 0 !== t.data.length
- ? e(
- 'el-checkbox-group',
- {
- on: { change: t.checkListChange },
- model: {
- value: t.checkList,
- callback: function (e) {
- t.checkList = e;
- },
- expression: 'checkList'
- }
- },
- [
- e(
- 'el-row',
- t._l(t.data, function (n, i) {
- return e(
- 'el-col',
- {
- key: i,
- class: t.getRowClass(n, i),
- attrs: {
- span: t.crud.tableOption.gridSpan || t.span,
- md: t.crud.tableOption.gridSpan || t.span,
- sm: t.crud.tableOption.gridSpan || t.span,
- xs: t.crud.tableOption.gridXsSpan || t.xsSpan
- },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.handleRowClick(n, i);
- },
- dblclick: function (e) {
- return e.stopPropagation(), t.handleRowDblClick(n, i);
- }
- }
- },
- [
- e(
- 'div',
- { class: t.b('content'), style: [t.getGradientColor(n, i), t.getRowStyle(n, i)] },
- t._l(t.column, function (o, r) {
- return e(
- 'div',
- {
- key: r,
- class: [t.b('item'), o.type || o.prop, t.getClass(n, i, o)],
- style: t.getCellStyle(n, i, o, r),
- on: {
- click: function (e) {
- return t.handleCellClick(n, o);
- },
- dblclick: function (e) {
- return t.handleCellDblClick(n, o);
- }
- }
- },
- [
- 'selection' == o.type
- ? e('span', [e('el-checkbox', { attrs: { label: i } }, [t._v(' ')])], 1)
- : [
- e('row-item', { class: [t.b('label'), o.labelClassName], attrs: { content: o.header, row: n, column: o, index: i } }),
- t._v(' '),
- e('row-item', { class: [t.b('value'), o.className], attrs: { content: o.default, row: n, column: o, index: i } })
- ]
- ],
- 2
- );
- }),
- 0
- )
- ]
- );
- }),
- 1
- )
- ],
- 1
- )
- : e('el-empty', { attrs: { 'image-size': 100, description: t.crud.tableOption.emptyText || t.t('crud.emptyText') } })
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- zt = {
- menuWidth: 220,
- 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',
- mockBtnIcon: 'el-icon-edit',
- 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',
- gridBtnIcon: 'el-icon-s-grid',
- refreshBtnIcon: 'el-icon-refresh',
- viewBtn: !1,
- editBtn: !0,
- copyBtn: !1,
- cancelBtn: !0,
- addBtn: !0,
- addRowBtn: !1,
- printBtn: !1,
- mockBtn: !1,
- excelBtn: !1,
- delBtn: !0,
- cellBtn: !1,
- dateBtn: !1,
- updateBtn: !0,
- saveBtn: !0,
- refreshBtn: !0,
- columnBtn: !0,
- filterBtn: !1,
- gridBtn: !0,
- queryBtn: !0,
- menuBtn: !1,
- searchBtn: !0,
- clearBtn: !0,
- selectClearBtn: !0,
- searchShow: !0,
- tip: !0,
- dialogWidth: '60%',
- dialogDrag: !1,
- formFullscreen: !1,
- pageBackground: !0,
- page: !0,
- menu: !0,
- indexLabel: '#',
- indexWidth: 50,
- indexFixed: 'left',
- selectionWidth: 50,
- selectionFixed: 'left',
- expandWidth: 60,
- expandFixed: 'left',
- filterMultiple: !0,
- calcHeight: 300,
- width: '100%',
- searchLabelWidth: 80,
- searchSpan: 6,
- dropRowClass: '.el-table__body-wrapper > table > tbody',
- dropColClass: '.el-table__header-wrapper tr',
- ghostClass: 'avue-crud__ghost'
- },
- Ht = y(
- b({
- name: 'crud',
- inject: ['crud'],
- data: function () {
- return {
- config: zt,
- defaultPage: {
- single: !1,
- 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.crud.isMobile && (this.defaultPage.layout = 'total, sizes, prev, pager, next'), this.pageInit(), this.crud.$emit('on-load', this.defaultPage);
- },
- watch: {
- 'crud.page': {
- handler: function () {
- this.pageInit();
- },
- deep: !0
- },
- pageFlag: function () {
- this.crud.getTableHeight();
- }
- },
- computed: {
- pageFlag: function () {
- return 0 != this.defaultPage.total;
- }
- },
- methods: {
- pageInit: function () {
- (this.defaultPage = Object.assign(this.defaultPage, this.crud.page)), 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);
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return t.pageFlag && t.vaildData(t.crud.tableOption.page, !0)
- ? e(
- 'el-card',
- { class: t.b('pagination'), attrs: { shadow: t.crud.isCard } },
- [
- t._t('page'),
- t._v(' '),
- e('el-pagination', {
- attrs: {
- small: 'mini' == t.crud.size,
- disabled: t.defaultPage.disabled,
- 'hide-on-single-page': t.defaultPage.single,
- 'pager-count': t.defaultPage.pagerCount,
- 'current-page': t.defaultPage.currentPage,
- background: t.defaultPage.background,
- '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
- )
- : t._e();
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Kt = function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
- return (
- t.forEach(function (e) {
- var n = e.cascader;
- if (!M(n)) {
- var i = e.prop;
- n.forEach(function (e) {
- var n = tt(t, e);
- n && (n.parentProp = i);
- });
- }
- }),
- t
- );
- },
- Rt = 0,
- Vt = function (t) {
- var e = t.type,
- n = t.searchRange,
- i = e;
- if (t.searchType) return t.searchType;
- if (['radio', 'checkbox', 'switch'].includes(e)) i = 'select';
- else if (l.includes(e)) {
- i = n ? (e.includes('range') ? e : e + 'range') : e.replace('range', '');
- } else ['textarea'].includes(e) && (i = 'input');
- return i;
- },
- Wt = function (t, e) {
- var n = t || 'input';
- return M(e)
- ? (d.includes(t)
- ? (n = 'array')
- : ['time', 'timerange'].includes(t)
- ? (n = 'time')
- : l.includes(t)
- ? (n = 'date')
- : ['password', 'textarea', 'search'].includes(t)
- ? (n = 'input')
- : u.includes(t) && (n = 'input-' + t),
- 'avue-' + n)
- : e;
- },
- Ut = function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
- e = {};
- return (
- t.forEach(function (t) {
- (f.includes(t.type) && !1 !== t.emitPath && 'json' != t.dataType) || (p.includes(t.type) && t.multiple) || 'array' === t.dataType
- ? (e[t.prop] = [])
- : h.includes(t.type) && 1 == t.range
- ? (e[t.prop] = [0, 0])
- : ['rate', 'slider', 'number'].includes(t.type) || 'number' === t.dataType
- ? (e[t.prop] = void 0)
- : (e[t.prop] = ''),
- t.bind && (e = Q(e, t.bind)),
- M(t.value) || (e[t.prop] = t.value);
- }),
- { tableForm: e }
- );
- },
- Xt = function (t) {
- var e = t.placeholder,
- n = t.label;
- return M(e) ? (m.includes(t.type) ? ''.concat(Et('tip.select'), ' ').concat(n) : ''.concat(Et('tip.input'), ' ').concat(n)) : e;
- },
- Yt = y(
- b({
- name: 'crud__search',
- inject: ['crud'],
- mixins: [Lt, gt],
- data: function () {
- return { show: !1, searchIndex: 2, searchShow: !0 };
- },
- props: { search: Object },
- watch: {
- show: function () {
- this.crud.getTableHeight();
- },
- searchShow: function () {
- this.crud.getTableHeight();
- }
- },
- created: function () {
- (this.searchShow = this.vaildData(this.crud.tableOption.searchShow, zt.searchShow)), this.initFun();
- },
- computed: {
- searchForm: {
- get: function () {
- return this.crud.search;
- },
- set: function (t) {
- this.crud.$emit('update:search', t);
- }
- },
- option: function () {
- var t = this,
- e = this.crud.tableOption;
- this.searchIndex = e.searchIndex || 2;
- var n, i, o;
- return (
- (n = e),
- (i = t.deepClone(n)),
- (o = {}),
- Object.keys(i).forEach(function (t) {
- if (t.includes('search')) {
- var e = t.replace('search', '');
- if (0 == e.length) return;
- (e = e.replace(e[0], e[0].toLowerCase())), (o[e] = i[t]);
- }
- }),
- (i.column = (function () {
- var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
- n = t.deepClone(n);
- var i = [],
- o = 0;
- return (
- (n = n.sort(function (t, e) {
- return (e.searchOrder || 0) - (t.searchOrder || 0);
- })).forEach(function (n) {
- if (n.search) {
- var r = o < t.searchIndex,
- a = {};
- Object.keys(n).forEach(function (t) {
- if ('searchProp' != t && t.includes('search')) {
- var e = t.replace('search', '');
- if (0 == e.length) return;
- (e = e.replace(e[0], e[0].toLowerCase())), (a[e] = n[t]);
- }
- }),
- (n = Object.assign(n, a, {
- type: Vt(n),
- detail: !1,
- dicFlag: !!n.cascader || t.vaildData(n.dicFlag, !1),
- span: n.searchSpan || e.searchSpan || zt.searchSpan,
- control: n.searchControl,
- labelWidth: n.searchLabelWidth || e.searchLabelWidth || zt.searchLabelWidth,
- labelPosition: n.searchLabelPosition || e.searchLabelPosition,
- size: n.searchSize || e.searchSize,
- value: n.searchValue,
- rules: n.searchRules,
- row: n.searchRow,
- bind: n.searchBin,
- disabled: n.searchDisabled,
- readonly: n.searchReadonly,
- display: !t.isSearchIcon || !!t.show || r
- })),
- i.push(n),
- (o += 1);
- }
- }),
- i
- );
- })(t.crud.propOption)),
- (i = Object.assign(i, o, {
- rowKey: e.searchRowKey || 'null',
- tabs: !1,
- group: !1,
- printBtn: !1,
- mockBtn: !1,
- submitText: e.searchBtnText || t.t('crud.searchBtn'),
- submitBtn: t.vaildData(e.searchBtn, zt.searchSubBtn),
- submitIcon: t.crud.getBtnIcon('searchBtn'),
- emptyText: e.emptyBtnText || t.t('crud.emptyBtn'),
- emptyBtn: t.vaildData(e.emptyBtn, zt.emptyBtn),
- emptyIcon: t.crud.getBtnIcon('emptyBtn'),
- menuSpan: t.show || !t.isSearchIcon ? e.searchMenuSpan || e.searchSpan : e.searchMenuSpan || 6,
- menuPosition: e.searchMenuPosition || 'center',
- dicFlag: !1,
- dicData: t.crud.DIC
- }))
- );
- },
- isSearchIcon: function () {
- return this.vaildData(this.crud.tableOption.searchIcon, this.$AVUE.searchIcon) && this.searchLen > this.searchIndex;
- },
- searchLen: function () {
- var t = 0;
- return (
- this.crud.propOption.forEach(function (e) {
- e.search && t++;
- }),
- t
- );
- },
- searchFlag: function () {
- return !!this.crud.$scopedSlots.search || 0 !== this.searchLen;
- }
- },
- methods: {
- initFun: function () {
- var t = this;
- ['searchReset', 'searchChange'].forEach(function (e) {
- return (t.crud[e] = t[e]);
- });
- },
- getSlotName: function (t) {
- return t.replace('Search', '');
- },
- searchChange: function (t, e) {
- (t = st(t)),
- this.crud.propOption.forEach(function (e) {
- e.searchProp && ((t[e.searchProp] = t[e.prop]), delete t[e.prop]);
- }),
- this.crud.$emit('search-change', t, e);
- },
- resetChange: function () {
- this.crud.$emit('search-reset', this.searchForm);
- },
- searchReset: function () {
- this.$refs.form.resetForm();
- },
- handleSearchIconShow: function () {
- (this.show = !this.show), this.crud.$emit('search-icon-change', this.show);
- },
- handleSearchShow: function () {
- this.searchShow = !this.searchShow;
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return t.searchFlag
- ? e(
- 'el-card',
- {
- directives: [{ name: 'show', rawName: 'v-show', value: t.searchShow && t.searchFlag, expression: 'searchShow && searchFlag' }],
- class: t.b(),
- attrs: { shadow: t.crud.isCard }
- },
- [
- t._t('search', null, { row: t.searchForm, search: t.searchForm, size: t.crud.controlSize }),
- t._v(' '),
- e('avue-form', {
- ref: 'form',
- attrs: { option: t.option },
- on: { submit: t.searchChange, 'reset-change': t.resetChange },
- scopedSlots: t._u(
- [
- {
- key: 'menuForm',
- fn: function (n) {
- return [
- t._t('searchMenu', null, null, Object.assign(n, { search: t.searchForm, row: t.searchForm })),
- t._v(' '),
- t.isSearchIcon
- ? [
- !1 === t.show
- ? e('el-button', { attrs: { type: 'text', icon: 'el-icon-arrow-down' }, on: { click: t.handleSearchIconShow } }, [
- t._v(t._s(t.t('crud.open')))
- ])
- : t._e(),
- t._v(' '),
- !0 === t.show
- ? e('el-button', { attrs: { type: 'text', icon: 'el-icon-arrow-up' }, on: { click: t.handleSearchIconShow } }, [
- t._v(t._s(t.t('crud.shrink')))
- ])
- : t._e()
- ]
- : t._e()
- ];
- }
- },
- t._l(t.crud.searchSlot, function (e) {
- return {
- key: t.getSlotName(e),
- fn: function (n) {
- return [t._t(e, null, null, Object.assign(n, { search: t.searchForm, row: t.searchForm }))];
- }
- };
- })
- ],
- null,
- !0
- ),
- model: {
- value: t.searchForm,
- callback: function (e) {
- t.searchForm = e;
- },
- expression: 'searchForm'
- }
- })
- ],
- 2
- )
- : t._e();
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- qt = n(1),
- Gt = n.n(qt);
- function Jt(t, e) {
- return (
- (function (t) {
- if (Array.isArray(t)) return t;
- })(t) ||
- (function (t, e) {
- var n = null == t ? null : ('undefined' != typeof Symbol && t[Symbol.iterator]) || t['@@iterator'];
- if (null != n) {
- var i,
- o,
- r,
- a,
- s = [],
- l = !0,
- c = !1;
- try {
- if (((r = (n = n.call(t)).next), 0 === e)) {
- if (Object(n) !== n) return;
- l = !1;
- } else for (; !(l = (i = r.call(n)).done) && (s.push(i.value), s.length !== e); l = !0);
- } catch (t) {
- (c = !0), (o = t);
- } finally {
- try {
- if (!l && null != n.return && ((a = n.return()), Object(a) !== a)) return;
- } finally {
- if (c) throw o;
- }
- }
- return s;
- }
- })(t, e) ||
- (function (t, e) {
- if (!t) return;
- if ('string' == typeof t) return Qt(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 Qt(t, e);
- })(t, e) ||
- (function () {
- throw new TypeError('Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
- })()
- );
- }
- function Qt(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 Zt = 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 && void 0 !== arguments[2] ? arguments[2] : {},
- i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : [],
- o = t[e.prop],
- r = e.type,
- a = e.separator;
- if ((e.bind && (o = G(t, e.bind)), !M(o))) {
- var s = p.includes(e.type) && e.multiple,
- c = f.includes(e.type) && !1 !== e.emitPath;
- if (
- ((!s && !c) || Array.isArray(o) || e.dataType || (e.dataType = 'string'),
- e.dataType &&
- (s || c
- ? (Array.isArray(o) || (o = 'json' == e.dataType ? JSON.parse(o) : o.split(a || ',')),
- o.forEach(function (t) {
- t = rt(t, e.dataType);
- }))
- : (o = rt(o, e.dataType))),
- 'password' === r)
- )
- o = ct(o, '*');
- else if (l.includes(r) && e.format) {
- var u = e.format.replace('dd', 'DD').replace('yyyy', 'YYYY'),
- d = Gt()().format('YYYY-MM-DD');
- if (-1 !== r.indexOf('range')) {
- var h = o,
- m = Jt(h, 2),
- v = m[0],
- b = void 0 === v ? '' : v,
- y = m[1],
- g = void 0 === y ? '' : y;
- 'timerange' === r && ((b = ''.concat(d, ' ').concat(b)), (g = ''.concat(d, ' ').concat(g))), (o = [Gt()(b).format(u), Gt()(g).format(u)].join(e.separator || '~'));
- } else 'time' === r && (o = ''.concat(d, ' ').concat(o)), (o = Gt()(o).format(u));
- }
- }
- return (
- M(i) || (o = at(i, o, e.props || n.props)),
- 'function' == typeof e.formatter ? (o = e.formatter(t, t[e.prop], o, e)) : Array.isArray(o) && !M(i) && (o = o.join(a || ' | ')),
- o
- );
- },
- te = {
- props: {
- render: Function,
- row: Object,
- index: [String, Number],
- column: {
- type: Object,
- default: function () {
- return {};
- }
- },
- params: {
- type: Object,
- default: function () {
- return {};
- }
- },
- event: {
- type: Object,
- default: function () {
- return {};
- }
- }
- },
- render: function (t) {
- return this.render.call(this._renderProxy, t, { column: this.column, params: this.params, event: this.event, row: this.row, index: this.index });
- }
- },
- ee = y(
- {
- name: 'form-temp',
- mixins: [gt],
- components: { custom: te },
- props: {
- value: {},
- uploadSized: Function,
- uploadBefore: Function,
- uploadDelete: Function,
- uploadAfter: Function,
- uploadPreview: Function,
- uploadError: Function,
- uploadExceed: Function,
- boxType: String,
- row: Object,
- render: Function,
- index: [String, Number],
- columnSlot: {
- type: Array,
- default: function () {
- return [];
- }
- },
- tableData: {
- type: Object,
- default: function () {
- return {};
- }
- },
- clearable: { type: Boolean },
- enter: { type: Boolean, default: !1 },
- type: { type: String },
- propsHttp: {
- type: Object,
- default: function () {
- return {};
- }
- },
- props: { type: Object },
- dic: { type: Array },
- placeholder: { type: String },
- size: { type: String },
- disabled: { type: Boolean },
- readonly: { type: Boolean },
- column: {
- type: Object,
- default: function () {
- return {};
- }
- }
- },
- computed: {
- params: function () {
- return this.column.params || {};
- },
- event: function () {
- return this.column.event || {};
- },
- text: {
- get: function () {
- return this.value;
- },
- set: function (t) {
- this.$emit('input', t), this.$emit('change', t);
- }
- }
- },
- methods: {
- getComponent: function (t) {
- return Wt(t.type, t.component);
- },
- getPlaceholder: Xt,
- enterChange: function () {
- 'function' == typeof this.column.enter ? this.column.enter({ value: this.text, column: this.column }) : this.enter && this.$emit('enter');
- }
- }
- },
- function () {
- var t = this,
- e = t._self._c;
- return t.render
- ? e('custom', { attrs: { render: t.render, index: t.index, row: t.row, params: t.params, event: t.event } })
- : e(
- t.getComponent(t.column),
- t._g(
- t._b(
- {
- ref: 'temp',
- tag: 'component',
- attrs: {
- column: Object.assign(t.column, t.params),
- dic: t.dic,
- 'box-type': t.boxType,
- 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,
- 'table-data': t.tableData,
- type: t.type || t.column.type,
- 'column-slot': t.columnSlot
- },
- nativeOn: {
- keyup: function (e) {
- return !e.type.indexOf('key') && t._k(e.keyCode, 'enter', 13, e.key, 'Enter') ? null : t.enterChange.apply(null, arguments);
- }
- },
- scopedSlots: t._u(
- [
- t._l(t.getSlotName(t.column, 'T', t.$scopedSlots) ? [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,
- fn: function (n) {
- return [t._t(e, null, null, n)];
- }
- };
- })
- ],
- null,
- !0
- ),
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- },
- 'component',
- Object.assign(t.column, t.params, t.$uploadFun(t.column)),
- !1
- ),
- t.event
- ),
- [t.params.html ? e('span', { domProps: { innerHTML: t._s(t.params.html) } }) : t._e()]
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- ne = y(
- { name: 'icon-temp', props: { small: Boolean, text: { type: String, default: '' } } },
- function () {
- var t = this._self._c;
- return this.text
- ? t('span', { staticClass: 'avue-icon', class: { 'avue-icon--small': this.small } }, [
- this.text.includes('#') ? t('svg', { attrs: { 'aria-hidden': 'true' } }, [t('use', { attrs: { 'xlink:href': this.text } })]) : t('i', { class: this.text })
- ])
- : this._e();
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- ie = y(
- {
- props: { className: String, labeClassName: String, showOverflowTooltip: Boolean, gridRow: Boolean, prop: String, type: String, label: String },
- computed: {
- parent: function () {
- for (var t = this.$parent; t.$parent && !t.id; ) t = t.$parent;
- return t;
- }
- },
- mounted: function () {
- this.parent.column.push({
- className: this.className,
- labeClassName: this.labeClassName,
- showOverflowTooltip: this.showOverflowTooltip,
- row: this.gridRow,
- label: this.label,
- prop: this.prop,
- type: this.type,
- header: this.$scopedSlots.header,
- default: this.$scopedSlots.default
- });
- }
- },
- function () {
- return (0, this._self._c)('div');
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- function oe(t) {
- return (
- (function (t) {
- if (Array.isArray(t)) return re(t);
- })(t) ||
- (function (t) {
- if (('undefined' != typeof Symbol && null != t[Symbol.iterator]) || null != t['@@iterator']) return Array.from(t);
- })(t) ||
- (function (t, e) {
- if (!t) return;
- if ('string' == typeof t) return re(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 re(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 re(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 ae = {},
- se = y(
- {
- name: 'column-slot',
- inject: ['dynamic', 'crud'],
- components: { custom: te, tableGridColumn: ie, formTemp: ee, iconTemp: ne },
- props: { column: Object, columnOption: Array },
- created: function () {
- var t = this,
- e = ['getColumnProp', 'handleFilterMethod', 'handleFilters'];
- Object.keys(this.dynamic).forEach(function (n) {
- e.includes(n) && (t[n] = t.dynamic[n]);
- });
- },
- methods: {
- isMediaType: function (t, e) {
- return X(t, e);
- },
- vaildLabel: function (t, e, n) {
- if (t.rules && e.$cellEdit) return n;
- },
- columnChange: function (t, e, n) {
- var i = ''.concat(n, '-').concat(e.prop);
- ae[i] || (this.handleChange(e, t), 'function' == typeof e.change && 1 == e.cell && e.change({ row: t, column: e, index: n, value: t[e.prop] })),
- (ae[i] = !0),
- this.$nextTick(function () {
- return (ae[i] = !1);
- });
- },
- handleChange: function (t, e) {
- var n = this;
- t.cascader &&
- this.$nextTick(function () {
- oe(n.crud.propOption);
- var i = t.cascader;
- i.join(',');
- i.forEach(function (o) {
- var r = o,
- s = e[t.prop],
- l = e.$index,
- c = n.findObject(n.columnOption, r);
- n.validatenull(c) ||
- (n.validatenull(n.crud.cascaderDIC[l]) && n.$set(n.crud.cascaderDIC, l, {}),
- n.crud.cascaderIndexList.includes(l) &&
- i.forEach(function (t) {
- n.$set(n.crud.cascaderDIC[l], t, []),
- i.forEach(function (t) {
- e[t] = ut(e[t]);
- });
- }),
- n.validatenull(i) ||
- n.validatenull(s) ||
- n.validatenull(c) ||
- yt({ column: c, value: s, form: e }).then(function (t) {
- var i = t || [];
- n.crud.cascaderIndexList.includes(l) || n.crud.cascaderIndexList.push(l),
- n.crud.cascaderDicList[l] || n.$set(n.crud.cascaderDicList, l, {}),
- n.crud.cascaderDicList[l][r] || n.$set(n.crud.cascaderDicList[l], r, i),
- n.$set(n.crud.cascaderDIC[l], r, i),
- n.validatenull(i[c.cascaderIndex]) ||
- n.validatenull(i) ||
- n.validatenull(c.cascaderIndex) ||
- (e[r] = i[c.cascaderIndex][(c.props || {}).value || a.value]);
- }));
- });
- });
- },
- handleDetail: function (t, e) {
- var n,
- i = e.parentProp ? (this.crud.cascaderDIC[t.$index] || {})[e.prop] : this.crud.DIC[e.prop];
- return (n = Zt(t, e, this.crud.tableOption, i)), this.validatenull(i) || !0 === this.crud.tableOption.filterDic || (t['$' + e.prop] = n), n;
- },
- corArray: function (t, e) {
- var n = this.handleDetail(t, e);
- return Array.isArray(n) || (n = this.validatenull(n) ? [] : n.split(' | ')), this.deepClone(n);
- },
- openImg: function (t, e, n) {
- var i = this.getImgList(t, e);
- (i = i.map(function (t) {
- return { thumbUrl: t, url: t, type: e.fileType };
- })),
- this.$ImagePreview(i, n);
- },
- getImgList: function (t, e) {
- var n,
- i,
- o = (null === (n = e.propsHttp) || void 0 === n ? void 0 : n.home) || '',
- r = (null === (i = e.props) || void 0 === i ? void 0 : i.value) || a.value,
- s = this.corArray(t, e);
- return (
- s.forEach(function (t, e) {
- s[e] = o + (t[r] ? t[r] : t);
- }),
- s
- );
- }
- }
- },
- function () {
- var t = this,
- e = t._self._c;
- return t.getColumnProp(t.column, 'hide')
- ? e(t.crud.tableColumnName, {
- key: t.column.prop,
- tag: 'component',
- attrs: {
- prop: t.column.prop,
- 'grid-row': t.column.gridRow,
- label: t.column.label,
- 'class-name': t.column.className,
- 'label-class-name': t.column.labelClassName,
- 'column-key': t.column.prop,
- 'filter-placement': 'bottom-end',
- filters: t.getColumnProp(t.column, 'filters'),
- 'filter-method': t.getColumnProp(t.column, 'filterMethod') ? t.handleFilterMethod : void 0,
- 'filter-multiple': t.vaildData(t.column.filterMultiple, !0),
- 'show-overflow-tooltip': t.column.showOverflowTooltip || t.column.overHidden,
- 'min-width': t.column.minWidth,
- sortable: t.getColumnProp(t.column, 'sortable'),
- 'sort-method': t.column.sortMethod,
- 'sort-orders': t.column.sortOrders,
- 'sort-by': t.column.sortBy,
- resizable: t.column.resizable,
- 'render-header': t.column.renderHeader,
- align: t.column.align || t.crud.tableOption.align,
- 'header-align': t.column.headerAlign || t.crud.tableOption.headerAlign,
- width: t.getColumnProp(t.column, 'width'),
- fixed: t.getColumnProp(t.column, 'fixed')
- },
- scopedSlots: t._u(
- [
- {
- key: 'header',
- fn: function ({ $index: n }) {
- return [
- t.crud.getSlotName(t.column, 'H', t.crud.$scopedSlots)
- ? t._t(t.crud.getSlotName(t.column, 'H'), null, null, { column: t.column, $index: n })
- : e('span', [t._v(t._s(t.column.label))])
- ];
- }
- },
- {
- key: 'default',
- fn: function ({ row: n, column: i, $index: o }) {
- return [
- n.$cellEdit && t.column.cell
- ? e(
- 'el-form-item',
- {
- attrs: {
- prop: t.crud.isTree ? '' : `list.${o}.${t.column.prop}`,
- label: t.vaildLabel(t.column, n, ' '),
- 'label-width': t.vaildLabel(t.column, n, '1px'),
- rules: t.column.rules
- }
- },
- [
- e(
- 'el-tooltip',
- {
- attrs: {
- content: (t.crud.listError[`list.${o}.${t.column.prop}`] || {}).msg,
- disabled: !(t.crud.listError[`list.${o}.${t.column.prop}`] || {}).valid,
- placement: 'top'
- }
- },
- [
- t.crud.getSlotName(t.column, 'F', t.crud.$scopedSlots)
- ? t._t(t.crud.getSlotName(t.column, 'F'), null, null, {
- row: n,
- tableColumn: i,
- column: t.column,
- dic: t.crud.DIC[t.column.prop],
- size: t.crud.isMediumSize,
- index: o,
- disabled: t.crud.btnDisabledList[o],
- label: t.handleDetail(n, t.column),
- $cell: n.$cellEdit
- })
- : e(
- 'form-temp',
- t._b(
- {
- attrs: {
- column: t.column,
- size: t.crud.isMediumSize,
- 'table-data': { index: o, row: n, label: t.handleDetail(n, t.column) },
- dic: (t.crud.cascaderDIC[o] || {})[t.column.prop] || t.crud.DIC[t.column.prop],
- props: t.column.props || t.crud.tableOption.props,
- readonly: t.column.readonly,
- row: n,
- index: o,
- render: t.column.renderForm,
- disabled: t.crud.disabled || t.crud.tableOption.disabled || t.column.disabled || t.crud.btnDisabledList[o],
- clearable: t.vaildData(t.column.clearable, !1),
- 'column-slot': t.crud.mainSlot
- },
- on: {
- change: function (e) {
- return t.columnChange(n, t.column, o);
- }
- },
- scopedSlots: t._u(
- [
- t._l(t.crud.mainSlot, function (e) {
- return {
- key: e,
- fn: function (n) {
- return [t._t(e, null, null, n)];
- }
- };
- })
- ],
- null,
- !0
- ),
- model: {
- value: n[t.column.prop],
- callback: function (e) {
- t.$set(n, t.column.prop, e);
- },
- expression: 'row[column.prop]'
- }
- },
- 'form-temp',
- t.$uploadFun(t.column, t.crud),
- !1
- )
- )
- ],
- 2
- )
- ],
- 1
- )
- : t.column.render
- ? e('custom', { attrs: { column: t.column, row: n, index: o, render: t.column.render, event: t.column.event, params: t.column.params } })
- : t.crud.$scopedSlots[t.column.prop]
- ? t._t(t.column.prop, null, {
- row: n,
- tableColumn: i,
- column: t.column,
- index: o,
- dic: t.crud.DIC[t.column.prop],
- size: t.crud.isMediumSize,
- label: t.handleDetail(n, t.column)
- })
- : [
- ['img', 'upload'].includes(t.column.type)
- ? e(
- 'span',
- { staticClass: 'avue-crud__img' },
- [
- t._l(t.getImgList(n, t.column), function (i, o) {
- return [
- t.isMediaType(i, t.column.fileType)
- ? e(t.isMediaType(i, t.column.fileType), {
- key: o,
- tag: 'component',
- attrs: { src: i },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.openImg(n, t.column, o);
- }
- }
- })
- : e('i', {
- key: o,
- staticClass: 'el-icon-document',
- attrs: { src: i },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.openImg(n, t.column, o);
- }
- }
- })
- ];
- })
- ],
- 2
- )
- : 'url' === t.column.type
- ? e(
- 'span',
- t._l(t.corArray(n, t.column), function (n, i) {
- return e('el-link', { key: i, attrs: { type: 'primary', href: n, target: t.column.target || '_blank' } }, [t._v(t._s(n))]);
- }),
- 1
- )
- : 'rate' === t.column.type
- ? e(
- 'span',
- [
- e('avue-rate', {
- attrs: { disabled: '' },
- model: {
- value: n[t.column.prop],
- callback: function (e) {
- t.$set(n, t.column.prop, e);
- },
- expression: 'row[column.prop]'
- }
- })
- ],
- 1
- )
- : 'color' === t.column.type
- ? e('i', { staticClass: 'avue-crud__color', style: { backgroundColor: n[t.column.prop] } })
- : 'icon' === t.column.type
- ? e('icon-temp', { attrs: { text: n[t.column.prop] } })
- : t.column.html
- ? e('span', { domProps: { innerHTML: t._s(t.handleDetail(n, t.column)) } })
- : e('span', { domProps: { textContent: t._s(t.handleDetail(n, t.column)) } })
- ]
- ];
- }
- }
- ],
- null,
- !0
- )
- })
- : t._e();
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- le = y(
- {
- name: 'column-dynamic',
- components: { tableGridColumn: ie, columnSlot: se },
- inject: ['dynamic', 'crud'],
- props: { columnOption: Object },
- created: function () {
- var t = this,
- e = ['getColumnProp', 'handleFilterMethod', 'handleFilters'];
- Object.keys(this.dynamic).forEach(function (n) {
- e.includes(n) && (t[n] = t.dynamic[n]);
- });
- }
- },
- function () {
- var t = this,
- e = t._self._c;
- return t.getColumnProp(t.columnOption, 'hide')
- ? e(
- t.crud.tableColumnName,
- {
- key: t.columnOption.prop,
- tag: 'component',
- attrs: {
- prop: t.columnOption.prop,
- label: t.columnOption.label,
- 'class-name': t.columnOption.className,
- 'label-class-name': t.columnOption.labelClassName,
- 'filter-placement': 'bottom-end',
- filters: t.getColumnProp(t.columnOption, 'filters'),
- 'filter-method': t.getColumnProp(t.columnOption, 'filterMethod') ? t.handleFilterMethod : void 0,
- 'filter-multiple': t.vaildData(t.columnOption.filterMultiple, !0),
- 'show-overflow-tooltip': t.columnOption.showOverflowTooltip || t.columnOption.overHidden,
- 'min-width': t.columnOption.minWidth,
- sortable: t.getColumnProp(t.columnOption, 'sortable'),
- 'render-header': t.columnOption.renderHeader,
- align: t.columnOption.align || t.crud.tableOption.align,
- 'header-align': t.columnOption.headerAlign || t.crud.tableOption.headerAlign,
- width: t.getColumnProp(t.columnOption, 'width'),
- fixed: t.getColumnProp(t.columnOption, 'fixed')
- }
- },
- [
- t._l(t.columnOption.children, function (n) {
- return [
- n.children && n.children.length > 0
- ? e('column-dynamic', {
- key: n.label,
- attrs: { columnOption: n },
- scopedSlots: t._u(
- [
- t._l(t.crud.mainSlot, function (e) {
- return {
- key: e,
- fn: function (n) {
- return [t._t(e, null, null, n)];
- }
- };
- })
- ],
- null,
- !0
- )
- })
- : e('column-slot', {
- attrs: { column: n, 'column-option': t.columnOption.children },
- scopedSlots: t._u(
- [
- t._l(t.crud.mainSlot, function (e) {
- return {
- key: e,
- fn: function (n) {
- return [t._t(e, null, null, n)];
- }
- };
- })
- ],
- null,
- !0
- )
- })
- ];
- })
- ],
- 2
- )
- : t._e();
- },
- [],
- !1,
- null,
- null,
- null
- );
- function ce(t) {
- return (
- (function (t) {
- if (Array.isArray(t)) return ue(t);
- })(t) ||
- (function (t) {
- if (('undefined' != typeof Symbol && null != t[Symbol.iterator]) || null != t['@@iterator']) return Array.from(t);
- })(t) ||
- (function (t, e) {
- if (!t) return;
- if ('string' == typeof t) return ue(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 ue(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 ue(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 de = y(
- b({
- name: 'crud',
- data: function () {
- return {};
- },
- components: { columnSlot: se, columnDynamic: le.exports },
- inject: ['crud'],
- provide: function () {
- return { crud: this.crud, dynamic: this };
- },
- props: { columnOption: Array },
- computed: {
- list: function () {
- var t = this,
- e = ce(this.columnOption);
- return (e = (function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
- e = arguments.length > 1 ? arguments[1] : void 0,
- n = arguments.length > 2 ? arguments[2] : void 0;
- return t
- .filter(function (t) {
- return !M(t[e]);
- })
- .sort(function (t, e) {
- return n(t, e);
- })
- .concat(
- t.filter(function (t) {
- return M(t[e]);
- })
- );
- })(e, 'index', function (e, n) {
- var i, o;
- return (
- (null === (i = t.crud.objectOption[e.prop]) || void 0 === i ? void 0 : i.index) -
- (null === (o = t.crud.objectOption[n.prop]) || void 0 === o ? void 0 : o.index)
- );
- }));
- }
- },
- methods: {
- handleFilterMethod: function (t, e, n) {
- var i = this.columnOption.filter(function (t) {
- return t.prop === n.property;
- })[0];
- return 'function' == typeof i.filterMethod ? i.filterMethod(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.crud.tableOption.props || {};
- o.push({ text: e[i.label || a.label], value: e[i.value || a.value] });
- }),
- o
- );
- }
- },
- getColumnProp: function (t, e) {
- var n = this.crud.objectOption[t.prop] || {};
- if ('filterMethod' === e) return null == n ? void 0 : n.filters;
- if (this.crud.isMobile && ['fixed'].includes(e)) return !1;
- var i = null == n ? void 0 : n[e];
- return 'width' != e || 0 != i ? ('filters' == e ? this.handleFilters(t, i) : 'hide' == e ? !0 !== (null == n ? void 0 : n.hide) : i) : void 0;
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- [
- t._t('header'),
- t._v(' '),
- t._l(t.list, function (n, i) {
- return [
- n.children && n.children.length > 0
- ? e('column-dynamic', {
- key: n.label,
- attrs: { columnOption: n },
- scopedSlots: t._u(
- [
- t._l(t.crud.mainSlot, function (e) {
- return {
- key: e,
- fn: function (n) {
- return [t._t(e, null, null, n)];
- }
- };
- })
- ],
- null,
- !0
- )
- })
- : e('column-slot', {
- attrs: { column: n, 'column-option': t.columnOption },
- scopedSlots: t._u(
- [
- t._l(t.crud.mainSlot, function (e) {
- return {
- key: e,
- fn: function (n) {
- return [t._t(e, null, null, n)];
- }
- };
- })
- ],
- null,
- !0
- )
- })
- ];
- }),
- t._v(' '),
- t._t('footer')
- ],
- 2
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- pe = y(
- b({
- name: 'crud',
- mixins: [Lt],
- directives: { permission: E },
- 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: zt
- };
- },
- created: function () {
- this.initFun();
- },
- methods: {
- dateChange: function (t) {
- this.dateCreate ? this.crud.$emit('date-change', t) : (this.dateCreate = !0);
- },
- initFun: function () {
- (this.vaildData = pt), (this.crud.rowExcel = this.rowExcel), (this.crud.rowPrint = this.rowPrint);
- },
- rowExcel: function () {
- this.crud.$refs.dialogExcel.handleShow();
- },
- rowPrint: function () {
- this.$Print(this.crud.$refs.table);
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e('div', { class: t.b('header') }, [
- t.vaildData(t.crud.tableOption.menuLeft, !0)
- ? e(
- 'div',
- { class: t.b('left') },
- [
- t.vaildData(t.crud.tableOption.addBtn, t.config.addBtn)
- ? e(
- 'el-button',
- {
- directives: [{ name: 'permission', rawName: 'v-permission', value: t.crud.getPermission('addBtn'), expression: "crud.getPermission('addBtn')" }],
- class: t.b('addBtn'),
- attrs: { type: 'primary', icon: t.crud.getBtnIcon('addBtn'), 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)
- ? e(
- 'el-button',
- {
- directives: [
- { name: 'permission', rawName: 'v-permission', value: t.crud.getPermission('addRowBtn'), expression: "crud.getPermission('addRowBtn')" }
- ],
- class: t.b('addBtn'),
- attrs: { type: 'primary', icon: t.crud.getBtnIcon('addBtn'), 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._t('menuLeft', null, { size: t.crud.isMediumSize })
- ],
- 2
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.menuRight, !0)
- ? e(
- 'div',
- { class: t.b('right') },
- [
- t.vaildData(t.crud.tableOption.dateBtn, t.config.dateBtn)
- ? e('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(' '),
- t._t('menuRight', null, { size: t.crud.isMediumSize }),
- t._v(' '),
- t.vaildData(t.crud.tableOption.excelBtn, t.config.excelBtn)
- ? e('el-button', {
- directives: [{ name: 'permission', rawName: 'v-permission', value: t.crud.getPermission('excelBtn'), expression: "crud.getPermission('excelBtn')" }],
- class: t.b('excelBtn'),
- attrs: { icon: t.crud.getBtnIcon('excelBtn'), circle: '', size: t.crud.isMediumSize },
- on: { click: t.rowExcel }
- })
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.printBtn, t.config.printBtn)
- ? e('el-button', {
- directives: [{ name: 'permission', rawName: 'v-permission', value: t.crud.getPermission('printBtn'), expression: "crud.getPermission('printBtn')" }],
- class: t.b('printBtn'),
- attrs: { icon: t.crud.getBtnIcon('printBtn'), circle: '', size: t.crud.isMediumSize },
- on: { click: t.rowPrint }
- })
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.refreshBtn, t.config.refreshBtn)
- ? e('el-button', {
- directives: [
- { name: 'permission', rawName: 'v-permission', value: t.crud.getPermission('refreshBtn'), expression: "crud.getPermission('refreshBtn')" }
- ],
- class: t.b('refreshBtn'),
- attrs: { icon: t.crud.getBtnIcon('refreshBtn'), circle: '', size: t.crud.isMediumSize },
- on: { click: t.crud.refreshChange }
- })
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.columnBtn, t.config.columnBtn)
- ? e('el-button', {
- directives: [{ name: 'permission', rawName: 'v-permission', value: t.crud.getPermission('columnBtn'), expression: "crud.getPermission('columnBtn')" }],
- class: t.b('columnBtn'),
- attrs: { icon: t.crud.getBtnIcon('columnBtn'), circle: '', size: t.crud.isMediumSize },
- on: {
- click: function (e) {
- return t.crud.$refs.dialogColumn.handleShow();
- }
- }
- })
- : t._e(),
- t._v(' '),
- (t.crud.$refs.headerSearch || {}).searchFlag && t.vaildData(t.crud.tableOption.searchShowBtn, !0)
- ? e('el-button', {
- class: t.b('searchShowBtn'),
- attrs: { icon: t.crud.getBtnIcon('searchBtn'), circle: '', size: t.crud.isMediumSize },
- on: {
- click: function (e) {
- return t.crud.$refs.headerSearch.handleSearchShow();
- }
- }
- })
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.filterBtn, t.config.filterBtn)
- ? e('el-button', {
- directives: [{ name: 'permission', rawName: 'v-permission', value: t.crud.getPermission('filterBtn'), expression: "crud.getPermission('filterBtn')" }],
- class: t.b('filterBtn'),
- attrs: { icon: t.crud.getBtnIcon('filterBtn'), circle: '', size: t.crud.isMediumSize },
- on: {
- click: function (e) {
- return t.crud.$refs.dialogFilter.handleShow();
- }
- }
- })
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.gridBtn, t.config.gridBtn)
- ? e('el-button', {
- directives: [{ name: 'permission', rawName: 'v-permission', value: t.crud.getPermission('gridBtn'), expression: "crud.getPermission('gridBtn')" }],
- class: t.b('gridBtn'),
- attrs: { icon: t.crud.getBtnIcon('gridBtn'), circle: '', size: t.crud.isMediumSize },
- on: {
- click: function (e) {
- return t.crud.handleGridShow();
- }
- }
- })
- : t._e()
- ],
- 2
- )
- : t._e()
- ]);
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- he = y(
- b({
- name: 'crud',
- mixins: [Lt],
- inject: ['crud'],
- data: function () {
- return { data: [], columnBox: !1 };
- },
- computed: {
- defaultColumn: function () {
- return [
- { label: this.t('crud.column.hide'), prop: 'hide' },
- { label: this.t('crud.column.fixed'), prop: 'fixed' },
- { label: this.t('crud.column.filters'), prop: 'filters' },
- { label: this.t('crud.column.sortable'), prop: 'sortable' },
- { label: this.t('crud.column.index'), prop: 'index', hide: !0 },
- { label: this.t('crud.column.width'), prop: 'width', hide: !0 }
- ];
- }
- },
- methods: {
- handleShow: function () {
- var t = this;
- (this.data = []),
- this.crud.propOption.forEach(function (e) {
- 0 != e.showColumn && t.data.push(e);
- }),
- (this.columnBox = !0),
- this.$nextTick(function () {
- return t.rowDrop();
- });
- },
- handleChange: function (t) {
- ['hide', 'filters'].includes(t) && this.crud.refreshTable();
- },
- rowDrop: function () {
- var t = this,
- e = this.$refs.table.$el.querySelectorAll(zt.dropRowClass)[0];
- this.crud.tableDrop('column', e, function (e) {
- var n = e.oldIndex,
- i = e.newIndex;
- t.crud.headerSort(n, i),
- t.crud.refreshTable(function () {
- return t.rowDrop();
- });
- });
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return t.columnBox
- ? e(
- 'div',
- [
- e(
- 'el-drawer',
- {
- staticClass: 'avue-dialog',
- class: [t.b('dialog'), t.b('column')],
- attrs: {
- 'lock-scroll': '',
- 'modal-append-to-body': t.$AVUE.modalAppendToBody,
- 'append-to-body': t.$AVUE.appendToBody,
- title: t.t('crud.showTitle'),
- size: t.crud.isMobile ? '100%' : '40%',
- visible: t.columnBox
- },
- on: {
- 'update:visible': function (e) {
- t.columnBox = e;
- }
- }
- },
- [
- e(
- 'el-table',
- { ref: 'table', attrs: { data: t.data, height: '100%', size: 'small', border: '' } },
- [
- e('el-table-column', {
- key: 'label',
- attrs: { align: 'center', width: '100', 'header-align': 'center', prop: 'label', label: t.t('crud.column.name') }
- }),
- t._v(' '),
- t._l(t.defaultColumn, function (n, i) {
- return [
- !0 !== n.hide
- ? e('el-table-column', {
- key: i,
- attrs: { label: n.label, prop: n.prop, align: 'center', 'header-align': 'center' },
- scopedSlots: t._u(
- [
- {
- key: 'default',
- fn: function ({ row: i }) {
- return [
- e('el-checkbox', {
- on: {
- change: function (e) {
- return t.handleChange(n.prop);
- }
- },
- model: {
- value: t.crud.objectOption[i.prop][n.prop],
- callback: function (e) {
- t.$set(t.crud.objectOption[i.prop], n.prop, e);
- },
- expression: 'crud.objectOption[row.prop][item.prop]'
- }
- })
- ];
- }
- }
- ],
- null,
- !0
- )
- })
- : t._e()
- ];
- })
- ],
- 2
- )
- ],
- 1
- )
- ],
- 1
- )
- : t._e();
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- fe = y(
- b({
- name: 'crud',
- mixins: [Lt],
- inject: ['crud'],
- data: function () {
- return {
- box: !1,
- columnObj: {},
- symbolDic: [
- { label: '=', value: '=' },
- { label: '≠', value: '≠' },
- { label: 'like', value: 'like' },
- { label: '>', value: '>' },
- { label: '≥', value: '≥' },
- { label: '<', value: '<' },
- { label: '≤', value: '≤' },
- { label: '∈', value: '∈' }
- ],
- list: [],
- columnOption: {}
- };
- },
- methods: {
- handleShow: function () {
- this.getColumnOption(), (this.box = !0);
- },
- getColumnOption: function () {
- var t = [];
- this.deepClone(this.crud.propOption).forEach(function (e) {
- !1 !== e.showColumn && t.push(Object.assign(e, { value: e.prop }));
- }),
- (this.columnOption = t),
- (this.columnObj = this.columnOption[0]);
- },
- handleDelete: function (t) {
- this.list.splice(t, 1);
- },
- handleClear: function () {
- this.list = [];
- },
- handleValueClear: function () {
- this.list.forEach(function (t, e) {
- return (t.value = '');
- });
- },
- handleSubmit: function () {
- var t = [];
- this.list.forEach(function (e) {
- t.push([e.text, e.symbol, e.value]);
- }),
- this.crud.$emit('filter', t),
- (this.box = !1);
- },
- handleChange: function (t) {
- this.list[t].value = '';
- },
- handleAdd: function () {
- var t = this.columnObj.prop;
- this.list.push({ text: t, value: '', symbol: this.symbolDic[0].value });
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return t.box
- ? e(
- 'div',
- [
- e(
- 'el-drawer',
- {
- staticClass: 'avue-dialog',
- class: [t.b('dialog'), t.b('filter')],
- attrs: {
- 'lock-scroll': '',
- 'modal-append-to-body': t.$AVUE.modalAppendToBody,
- 'append-to-body': t.$AVUE.appendToBody,
- title: t.t('crud.filterTitle'),
- size: t.crud.isMobile ? '100%' : '60%',
- visible: t.box
- },
- on: {
- 'update:visible': function (e) {
- t.box = e;
- }
- }
- },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- [
- e(
- 'div',
- { class: t.b('filter-menu') },
- [
- e(
- 'el-button-group',
- [
- e('el-button', { attrs: { type: 'primary', size: t.crud.isMediumSize }, on: { click: t.handleAdd } }, [t._v(t._s(t.t('crud.filter.addBtn')))]),
- t._v(' '),
- e('el-button', { attrs: { type: 'primary', size: t.crud.isMediumSize }, on: { click: t.handleClear } }, [
- t._v(t._s(t.t('crud.filter.resetBtn')))
- ]),
- t._v(' '),
- e('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 (n, i) {
- return e(
- 'el-col',
- { key: i, class: t.b('filter-item'), attrs: { md: 12, xs: 24, sm: 12 } },
- [
- e('avue-select', {
- class: t.b('filter-label'),
- attrs: { dic: t.columnOption, clearable: !1, size: t.crud.isMediumSize },
- on: {
- change: function (e) {
- return t.handleChange(i);
- }
- },
- model: {
- value: n.text,
- callback: function (e) {
- t.$set(n, 'text', e);
- },
- expression: 'column.text'
- }
- }),
- t._v(' '),
- e('avue-select', {
- class: t.b('filter-symbol'),
- attrs: { dic: t.symbolDic, clearable: !1, size: t.crud.isMediumSize },
- model: {
- value: n.symbol,
- callback: function (e) {
- t.$set(n, 'symbol', e);
- },
- expression: 'column.symbol'
- }
- }),
- t._v(' '),
- e('avue-input', {
- class: t.b('filter-value'),
- attrs: { size: t.crud.isMediumSize },
- model: {
- value: n.value,
- callback: function (e) {
- t.$set(n, 'value', e);
- },
- expression: 'column.value'
- }
- }),
- t._v(' '),
- e('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(' '),
- e(
- 'el-col',
- { staticClass: 'avue-form__menu avue-form__menu--right', attrs: { span: 24 } },
- [
- e('el-button', { attrs: { type: 'primary', size: t.crud.isMediumSize }, on: { click: t.handleSubmit } }, [
- t._v(t._s(t.t('crud.filter.submitBtn')))
- ]),
- t._v(' '),
- e(
- '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
- )
- : t._e();
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- me = y(
- b({
- name: 'crud',
- mixins: [Lt],
- inject: ['crud'],
- data: function () {
- return { loading: !1, disabled: !1, config: zt, boxType: '', fullscreen: !1, size: null, boxVisible: !1 };
- },
- props: {
- value: {
- type: Object,
- default: function () {
- return {};
- }
- }
- },
- computed: {
- option: function () {
- var t = this,
- e = this.deepClone(this.crud.tableOption);
- return (
- (e.boxType = this.boxType),
- (e.column = this.deepClone(this.crud.propOption)),
- e.column.forEach(function (t) {
- delete t.render, t.renderForm && (t.render = t.renderForm);
- }),
- (e.menuBtn = !1),
- this.isAdd
- ? ((e.submitBtn = e.saveBtn), (e.submitText = this.crud.menuIcon('saveBtn')), (e.submitIcon = this.crud.getBtnIcon('saveBtn')))
- : this.isEdit
- ? ((e.submitBtn = e.updateBtn), (e.submitText = this.crud.menuIcon('updateBtn')), (e.submitIcon = this.crud.getBtnIcon('updateBtn')))
- : this.isView && (e.detail = !0),
- (e.mockIcon = this.crud.getBtnIcon('mockBtn')),
- (e.mockText = this.crud.menuIcon('mockBtn')),
- (e.emptyBtn = e.cancelBtn),
- (e.emptyText = this.crud.menuIcon('cancelBtn')),
- (e.emptyIcon = this.crud.getBtnIcon('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
- );
- },
- 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%' : zt.dialogWidth + '');
- },
- dialogType: function () {
- return this.isDrawer ? 'elDrawer' : 'elDialog';
- },
- dialogTop: function () {
- return this.isDrawer || this.fullscreen ? '0' : this.crud.tableOption.dialogTop;
- },
- isDrawer: function () {
- return 'drawer' === this.crud.tableOption.dialogType;
- },
- params: function () {
- return this.isDrawer
- ? { size: this.fullscreen ? '100%' : this.setPx(this.width), direction: this.crud.tableOption.dialogDirection }
- : { width: this.setPx(this.width), fullscreen: this.fullscreen };
- },
- dialogTitle: function () {
- var t = ''.concat(this.boxType);
- if (!this.validatenull(this.boxType)) return this.crud.tableOption[t + 'Title'] || this.t('crud.'.concat(t, 'Title'));
- },
- dialogMenuPosition: function () {
- return this.crud.tableOption.dialogMenuPosition || 'right';
- }
- },
- methods: {
- menuParams: function () {
- return { disabled: this.disabled, size: this.crud.controlSize, type: this.boxType };
- },
- submit: function () {
- this.$refs.tableForm.submit();
- },
- reset: function () {
- this.$refs.tableForm.resetForm(!1);
- },
- getSlotName: function (t) {
- return t.replace('Form', '');
- },
- initFun: function () {
- var t = this;
- ['clearValidate', 'validate', 'resetForm', 'validateField'].forEach(function (e) {
- t.crud[e] = t.$refs.tableForm[e];
- });
- },
- handleChange: function () {
- this.crud.setVal();
- },
- 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);
- },
- rowSave: function (t) {
- this.crud.$emit('row-save', st(this.crud.tableForm, ['$']), this.closeDialog, t);
- },
- rowUpdate: function (t) {
- this.crud.$emit('row-update', st(this.crud.tableForm, ['$']), this.crud.tableIndex, this.closeDialog, t);
- },
- closeDialog: function (t) {
- var e = this;
- (t = this.deepClone(t)) &&
- (function () {
- if (e.isEdit) {
- var n = e.crud.findData(t[e.crud.rowKey]),
- i = n.parentList,
- o = n.index;
- if (i) {
- var r = i.splice(o, 1)[0];
- (t[e.crud.childrenKey] = r[e.crud.childrenKey]), i.splice(o, 0, t);
- }
- } else if (e.isAdd) {
- var a = e.crud.findData(t[e.crud.rowParentKey]).item;
- a
- ? (a[e.crud.childrenKey] || e.$set(a, e.crud.childrenKey, []),
- e.crud.tableOption.lazy && e.$set(a, e.crud.hasChildrenKey, !0),
- a[e.crud.childrenKey].push(t))
- : e.crud.list.push(t);
- }
- })(),
- this.hide();
- },
- hide: function (t) {
- var e = this,
- n = function () {
- t && t(), (e.crud.tableIndex = -1), (e.crud.tableForm = {}), e.crud.setVal(), (e.boxVisible = !1);
- };
- 'function' == typeof this.crud.beforeClose ? this.crud.beforeClose(n, this.boxType) : n();
- },
- show: function (t) {
- var e = this;
- this.boxType = t;
- var n = function (t) {
- (e.fullscreen = e.crud.tableOption.dialogFullscreen),
- (e.boxVisible = !0),
- (e.loading = !1),
- e.$nextTick(function () {
- e.initFun(), t && t();
- });
- };
- 'function' == typeof this.crud.beforeOpen
- ? this.crud.beforeOpen(n, this.boxType, function () {
- n(function () {
- e.loading = !0;
- });
- })
- : n();
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return t.boxVisible
- ? e(
- 'div',
- [
- e(
- t.dialogType,
- t._b(
- {
- 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',
- class: ['avue-dialog', t.b('dialog'), { 'avue-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.crud.tableOption.dialogCustomClass,
- 'modal-append-to-body': t.vaildData(t.crud.tableOption.dialogModalAppendToBody, t.$AVUE.modalAppendToBody),
- 'append-to-body': t.vaildData(t.crud.tableOption.appendToBody, t.$AVUE.appendToBody),
- top: t.dialogTop,
- title: t.dialogTitle,
- 'close-on-press-escape': t.crud.tableOption.dialogEscape,
- 'close-on-click-modal': t.vaildData(t.crud.tableOption.dialogClickModal, !1),
- modal: t.crud.tableOption.dialogModal,
- 'show-close': t.crud.tableOption.dialogCloseBtn,
- visible: t.boxVisible,
- 'before-close': t.hide
- },
- on: {
- 'update:visible': function (e) {
- t.boxVisible = e;
- }
- }
- },
- 'component',
- t.params,
- !1
- ),
- [
- e('div', { class: t.b('dialog__header'), attrs: { slot: 'title' }, slot: 'title' }, [
- e('span', { staticClass: 'el-dialog__title' }, [t._v(t._s(t.dialogTitle))]),
- t._v(' '),
- e('div', { class: t.b('dialog__menu') }, [
- e('i', { staticClass: 'el-dialog__close', class: t.fullscreen ? 'el-icon-news' : 'el-icon-full-screen', on: { click: t.handleFullScreen } })
- ])
- ]),
- t._v(' '),
- e(
- 'avue-form',
- t._b(
- {
- directives: [{ name: 'loading', rawName: 'v-loading', value: t.loading, expression: 'loading' }],
- ref: 'tableForm',
- attrs: {
- status: t.disabled,
- 'element-loading-text': t.crud.tableOption.loadingText,
- 'element-loading-spinner': t.crud.tableOption.loadingSpinner,
- 'element-loading-svg': t.crud.tableOption.loadingSvg,
- 'element-loading-background': t.crud.tableOption.loadingBackground,
- option: t.option
- },
- on: {
- 'update:status': function (e) {
- t.disabled = e;
- },
- change: t.handleChange,
- submit: t.handleSubmit,
- 'reset-change': t.hide,
- 'tab-click': t.handleTabClick,
- error: t.handleError
- },
- scopedSlots: t._u(
- [
- t._l(t.crud.formSlot, function (e) {
- return {
- key: t.getSlotName(e),
- fn: function (n) {
- return [t._t(e, null, null, Object.assign(n, { type: t.boxType }))];
- }
- };
- })
- ],
- null,
- !0
- ),
- model: {
- value: t.crud.tableForm,
- callback: function (e) {
- t.$set(t.crud, 'tableForm', e);
- },
- expression: 'crud.tableForm'
- }
- },
- 'avue-form',
- t.$uploadFun(null, t.crud),
- !1
- )
- ),
- t._v(' '),
- e(
- 'span',
- { staticClass: 'avue-dialog__footer', class: 'avue-dialog__footer--' + t.dialogMenuPosition },
- [
- t.vaildData(t.option.mockBtn, !1) && !t.isView
- ? e(
- 'el-button',
- {
- attrs: { type: 'primary', loading: t.disabled || t.loading, size: t.crud.size, icon: t.option.mockIcon },
- on: {
- click: function (e) {
- (t.$refs.tableForm || {}).handleMock;
- }
- }
- },
- [t._v('\n ' + t._s(t.option.mockText) + '\n ')]
- )
- : t._e(),
- t._v(' '),
- t._t('menuFormBefore', null, null, t.menuParams()),
- t._v(' '),
- t.vaildData(t.option.submitBtn, !0) && !t.isView
- ? e(
- 'el-button',
- { attrs: { loading: t.disabled || t.loading, size: t.crud.controlSize, icon: t.option.submitIcon, type: 'primary' }, on: { click: t.submit } },
- [t._v(t._s(t.option.submitText))]
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.option.emptyBtn, !0) && !t.isView
- ? e('el-button', { attrs: { loading: t.disabled || t.loading, size: t.crud.controlSize, icon: t.option.emptyIcon }, on: { click: t.reset } }, [
- t._v(t._s(t.option.emptyText))
- ])
- : t._e(),
- t._v(' '),
- t._t('menuForm', null, null, t.menuParams())
- ],
- 2
- )
- ],
- 1
- )
- ],
- 1
- )
- : t._e();
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- ve = y(
- {
- name: 'crud',
- mixins: [Lt],
- inject: ['crud'],
- data: function () {
- return { option: {}, columnOption: {}, box: !1, form: { name: this.crud.tableOption.title } };
- },
- methods: {
- handleShow: function () {
- this.getColumnOption(), this.getOption(), (this.box = !0);
- },
- handleSubmit: function () {
- this.$Export.excel({ title: this.form.name, columns: this.getColumn(), data: this.handleSum() }), (this.box = !1);
- },
- handleSum: function () {
- var t = this,
- e = this.crud.tableOption,
- n = this.crud.propOption,
- i = this.form.type ? this.crud.list : this.crud.tableSelect,
- o = [];
- return (
- this.form.params.includes('data') &&
- i.forEach(function (i) {
- var r = t.deepClone(i);
- n.forEach(function (n) {
- var i = n.parentProp ? (t.crud.cascaderDIC[r.$index] || {})[n.prop] : t.crud.DIC[n.prop];
- r[n.prop] = Zt(r, n, e, i);
- }),
- o.push(r);
- }),
- this.form.params.includes('sum') && e.showSummary && o.push(this.crud.sumsList),
- o
- );
- },
- getOption: function () {
- var t,
- e = this;
- (this.option = {
- submitBtn: !1,
- emptyBtn: !1,
- column: [
- { label: this.t('crud.excel.name'), prop: 'name', span: 24 },
- {
- label: this.t('crud.excel.type'),
- prop: 'type',
- span: 24,
- type: 'select',
- dicData: [
- { label: this.t('crud.excel.typeDic.true'), value: !0 },
- { label: this.t('crud.excel.typeDic.false'), disabled: 1 != this.crud.tableOption.selection, value: !1 }
- ]
- },
- {
- label: this.t('crud.excel.prop'),
- prop: 'prop',
- type: 'tree',
- multiple: !0,
- checkStrictly: !0,
- span: 24,
- props: { value: 'prop' },
- dicData: this.columnOption
- },
- {
- label: this.t('crud.excel.params'),
- prop: 'params',
- type: 'checkbox',
- span: 24,
- value: ['header', 'data'].concat(((t = []), e.crud.isHeader && t.push('headers'), e.crud.isShowSummary && t.push('sum'), t)),
- dicData: [
- { label: this.t('crud.excel.paramsDic.header'), disabled: !0, value: 'header' },
- { label: this.t('crud.excel.paramsDic.data'), value: 'data' }
- ].concat(
- (function () {
- var t = [];
- return (
- t.push({ label: e.t('crud.excel.paramsDic.headers'), value: 'headers', disabled: !e.crud.isHeader }),
- t.push({ label: e.t('crud.excel.paramsDic.sum'), value: 'sum', disabled: !e.crud.isShowSummary }),
- t
- );
- })()
- )
- }
- ]
- }),
- (this.form.type = 0 == this.crud.selectLen);
- },
- getColumnOption: function () {
- var t = this.deepClone(this.crud.columnOption),
- e = [];
- !(function t() {
- var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
- i = [];
- n.forEach(function (n, o) {
- var r = n.children;
- r && !Array.isArray(r) ? delete n.children : !1 === n.showColumn ? i.push(o) : ((n.prop = n.prop || Y()), e.push(n.prop), n.children && t(r));
- });
- for (var o = i.length - 1; o >= 0; o--) n.splice(i[o], 1);
- })(t),
- (this.columnOption = t),
- (this.form.prop = e);
- },
- getColumn: function () {
- var t = this.deepClone(this.columnOption),
- e = this.$refs.form.getPropRef('prop').$refs.temp.getHalfList();
- if (!this.form.params) return [];
- if (this.form.params.includes('headers')) {
- return (
- (function t() {
- var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
- n.forEach(function (i, o) {
- e.includes(i.prop) ? i.children && t(i.children) : n.splice(o, 1);
- });
- })(t),
- t
- );
- }
- var n = [];
- return (
- (function t() {
- var i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
- i.forEach(function (i, o) {
- i.children ? t(i.children) : e.includes(i.prop) && n.push(i);
- });
- })(t),
- n
- );
- }
- }
- },
- function () {
- var t = this,
- e = t._self._c;
- return t.box
- ? e(
- 'div',
- [
- e(
- 'el-dialog',
- {
- staticClass: 'avue-dialog',
- attrs: {
- title: t.t('crud.excelBtn'),
- 'lock-scroll': '',
- 'modal-append-to-body': t.$AVUE.modalAppendToBody,
- 'append-to-body': t.$AVUE.appendToBody,
- visible: t.box,
- width: t.crud.isMobile ? '100%' : '30%'
- },
- on: {
- 'update:visible': function (e) {
- t.box = e;
- }
- }
- },
- [
- e('avue-form', {
- ref: 'form',
- attrs: { option: t.option },
- model: {
- value: t.form,
- callback: function (e) {
- t.form = e;
- },
- expression: 'form'
- }
- }),
- t._v(' '),
- e(
- 'span',
- { staticClass: 'dialog-footer', attrs: { slot: 'footer' }, slot: 'footer' },
- [
- e('el-button', { attrs: { type: 'primary', size: t.crud.isMediumSize }, on: { click: t.handleSubmit } }, [t._v(t._s(t.t('crud.filter.submitBtn')))]),
- t._v(' '),
- e(
- 'el-button',
- {
- attrs: { size: t.crud.isMediumSize },
- on: {
- click: function (e) {
- t.box = !1;
- }
- }
- },
- [t._v(t._s(t.t('crud.filter.cancelBtn')))]
- )
- ],
- 1
- )
- ],
- 1
- )
- ],
- 1
- )
- : t._e();
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- be = y(
- b({
- name: 'crud',
- components: { tableGridColumn: ie },
- data: function () {
- return { config: zt };
- },
- mixins: [Lt],
- inject: ['crud'],
- directives: { permission: E },
- computed: {
- menuType: function () {
- return this.crud.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;
- },
- menuParams: function (t) {
- var e = t.row,
- n = t.column,
- i = t.$index,
- o = this.crud;
- return { row: e, column: n, type: this.menuText('primary'), disabled: o.btnDisabled, size: o.isMediumSize, index: i };
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return t.vaildData(t.crud.tableOption.menu, t.config.menu) && t.crud.getPermission('menu')
- ? e(t.crud.tableColumnName, {
- key: 'menu',
- tag: 'component',
- attrs: {
- prop: 'menu',
- 'class-name': t.crud.tableOption.menuClassName,
- 'label-class-name': t.crud.tableOption.menuLabelClassName,
- fixed: t.vaildData(t.crud.tableOption.menuFixed, t.config.menuFixed),
- label: t.crud.tableOption.menuTitle || t.t('crud.menu'),
- align: t.crud.tableOption.menuAlign || t.config.menuAlign,
- 'header-align': t.crud.tableOption.menuHeaderAlign || t.config.menuHeaderAlign,
- width: t.crud.isMobile ? t.crud.tableOption.menuXsWidth || t.config.menuXsWidth : t.crud.tableOption.menuWidth || t.config.menuWidth
- },
- scopedSlots: t._u(
- [
- {
- key: 'header',
- fn: function (n) {
- return [
- t.crud.getSlotName({ prop: 'menu' }, 'H', t.crud.$scopedSlots)
- ? t._t('menuHeader', null, { size: t.crud.isMediumSize }, n)
- : e('span', [t._v(t._s(t.crud.tableOption.menuTitle || t.t('crud.menu')))])
- ];
- }
- },
- {
- key: 'default',
- fn: function ({ row: n, column: i, $index: o }) {
- return [
- e(
- 'div',
- { class: t.b('menu') },
- [
- t._t('menuBefore', null, null, t.menuParams({ row: n, column: i, $index: o })),
- t._v(' '),
- t.isMenu
- ? e(
- 'el-dropdown',
- { attrs: { size: t.crud.isMediumSize } },
- [
- e('el-button', { attrs: { type: 'text', size: t.crud.isMediumSize } }, [
- t._v('\n ' + t._s(t.crud.tableOption.menuBtnTitle || t.t('crud.menuBtn')) + '\n '),
- e('i', { staticClass: 'el-icon-arrow-down el-icon--right' })
- ]),
- t._v(' '),
- e(
- 'el-dropdown-menu',
- { attrs: { slot: 'dropdown' }, slot: 'dropdown' },
- [
- t._t('menuBtnBefore', null, null, t.menuParams({ row: n, column: i, $index: o })),
- t._v(' '),
- t.vaildData(t.crud.tableOption.viewBtn, t.config.viewBtn)
- ? e(
- 'el-dropdown-item',
- {
- directives: [
- {
- name: 'permission',
- rawName: 'v-permission',
- value: t.crud.getPermission('viewBtn', n, o),
- expression: "crud.getPermission('viewBtn',row,$index)"
- }
- ],
- class: t.b('viewBtn'),
- attrs: { icon: t.crud.getBtnIcon('viewBtn') },
- nativeOn: {
- click: function (e) {
- return t.crud.rowView(n, o);
- }
- }
- },
- [t._v(t._s(t.crud.menuIcon('viewBtn')))]
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.copyBtn, t.config.copyBtn)
- ? e(
- 'el-dropdown-item',
- {
- directives: [
- {
- name: 'permission',
- rawName: 'v-permission',
- value: t.crud.getPermission('copyBtn', n, o),
- expression: "crud.getPermission('copyBtn',row,$index)"
- }
- ],
- class: t.b('copyBtn'),
- attrs: { icon: t.crud.getBtnIcon('copyBtn') },
- nativeOn: {
- click: function (e) {
- return t.crud.rowCopy(n);
- }
- }
- },
- [t._v(t._s(t.crud.menuIcon('copyBtn')))]
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.editBtn, t.config.editBtn)
- ? e(
- 'el-dropdown-item',
- {
- directives: [
- {
- name: 'permission',
- rawName: 'v-permission',
- value: t.crud.getPermission('editBtn', n, o),
- expression: "crud.getPermission('editBtn',row,$index)"
- }
- ],
- class: t.b('editBtn'),
- attrs: { icon: t.crud.getBtnIcon('editBtn') },
- nativeOn: {
- click: function (e) {
- return t.crud.rowEdit(n, o);
- }
- }
- },
- [t._v(t._s(t.crud.menuIcon('editBtn')))]
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.delBtn, t.config.delBtn)
- ? e(
- 'el-dropdown-item',
- {
- directives: [
- {
- name: 'permission',
- rawName: 'v-permission',
- value: t.crud.getPermission('delBtn', n, o),
- expression: "crud.getPermission('delBtn',row,$index)"
- }
- ],
- class: t.b('delBtn'),
- attrs: { icon: t.crud.getBtnIcon('delBtn') },
- nativeOn: {
- click: function (e) {
- return t.crud.rowDel(n, o);
- }
- }
- },
- [t._v(t._s(t.crud.menuIcon('delBtn')))]
- )
- : t._e(),
- t._v(' '),
- t._t('menuBtn', null, null, t.menuParams({ row: n, column: i, $index: o }))
- ],
- 2
- )
- ],
- 1
- )
- : ['button', 'text', 'icon'].includes(t.menuType)
- ? [
- t.vaildData(t.crud.tableOption.cellBtn, t.config.cellBtn)
- ? [
- t.vaildData(t.crud.tableOption.editBtn, t.config.editBtn) && !n.$cellEdit
- ? e(
- 'el-button',
- {
- directives: [
- {
- name: 'permission',
- rawName: 'v-permission',
- value: t.crud.getPermission('editBtn', n, o),
- expression: "crud.getPermission('editBtn',row,$index)"
- }
- ],
- class: t.b('editBtn'),
- attrs: {
- type: t.menuText('primary'),
- icon: t.crud.getBtnIcon('editBtn'),
- size: t.crud.isMediumSize,
- disabled: t.crud.btnDisabledList[o]
- },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowCell(n, o);
- }
- }
- },
- [t.isIconMenu ? t._e() : [t._v('\n ' + t._s(t.crud.menuIcon('editBtn')) + '\n ')]],
- 2
- )
- : t.vaildData(t.crud.tableOption.saveBtn, t.config.saveBtn) && n.$cellEdit
- ? e(
- 'el-button',
- {
- directives: [
- {
- name: 'permission',
- rawName: 'v-permission',
- value: t.crud.getPermission('saveBtn', n, o),
- expression: "crud.getPermission('saveBtn',row,$index)"
- }
- ],
- class: t.b('saveBtn'),
- attrs: {
- type: t.menuText('primary'),
- icon: t.crud.getBtnIcon('saveBtn'),
- size: t.crud.isMediumSize,
- disabled: t.crud.btnDisabledList[o]
- },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowCell(n, o);
- }
- }
- },
- [t.isIconMenu ? t._e() : [t._v('\n ' + t._s(t.crud.menuIcon('saveBtn')) + '\n ')]],
- 2
- )
- : t._e(),
- t._v(' '),
- n.$cellEdit && t.vaildData(t.crud.tableOption.cancelBtn, t.config.cancelBtn)
- ? e(
- 'el-button',
- {
- directives: [
- {
- name: 'permission',
- rawName: 'v-permission',
- value: t.crud.getPermission('cancelBtn', n, o),
- expression: "crud.getPermission('cancelBtn',row,$index)"
- }
- ],
- class: t.b('cancelBtn'),
- attrs: {
- type: t.menuText('danger'),
- icon: t.crud.getBtnIcon('cancelBtn'),
- size: t.crud.isMediumSize,
- disabled: t.crud.btnDisabledList[o]
- },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowCancel(n, 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.crud.tableOption.viewBtn, t.config.viewBtn)
- ? e(
- 'el-button',
- {
- directives: [
- {
- name: 'permission',
- rawName: 'v-permission',
- value: t.crud.getPermission('viewBtn', n, o),
- expression: "crud.getPermission('viewBtn',row,$index)"
- }
- ],
- class: t.b('viewBtn'),
- attrs: { type: t.menuText('success'), icon: t.crud.getBtnIcon('viewBtn'), size: t.crud.isMediumSize, disabled: t.btnDisabled },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowView(n, o);
- }
- }
- },
- [t.isIconMenu ? t._e() : [t._v('\n ' + t._s(t.crud.menuIcon('viewBtn')) + '\n ')]],
- 2
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.copyBtn, t.config.copyBtn)
- ? e(
- 'el-button',
- {
- directives: [
- {
- name: 'permission',
- rawName: 'v-permission',
- value: t.crud.getPermission('copyBtn', n, o),
- expression: "crud.getPermission('copyBtn',row,$index)"
- }
- ],
- class: t.b('copyBtn'),
- attrs: { type: t.menuText('info'), icon: t.crud.getBtnIcon('copyBtn'), size: t.crud.isMediumSize, disabled: t.btnDisabled },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowCopy(n);
- }
- }
- },
- [t.isIconMenu ? t._e() : [t._v('\n ' + t._s(t.crud.menuIcon('copyBtn')) + '\n ')]],
- 2
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.editBtn, t.config.editBtn) && !t.crud.tableOption.cellBtn
- ? e(
- 'el-button',
- {
- directives: [
- {
- name: 'permission',
- rawName: 'v-permission',
- value: t.crud.getPermission('editBtn', n, o),
- expression: "crud.getPermission('editBtn',row,$index)"
- }
- ],
- class: t.b('editBtn'),
- attrs: { type: t.menuText('primary'), icon: t.crud.getBtnIcon('editBtn'), size: t.crud.isMediumSize, disabled: t.btnDisabled },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowEdit(n, o);
- }
- }
- },
- [t.isIconMenu ? t._e() : [t._v('\n ' + t._s(t.crud.menuIcon('editBtn')) + '\n ')]],
- 2
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.delBtn, t.config.delBtn) && !n.$cellEdit
- ? e(
- 'el-button',
- {
- directives: [
- {
- name: 'permission',
- rawName: 'v-permission',
- value: t.crud.getPermission('delBtn', n, o),
- expression: "crud.getPermission('delBtn',row,$index)"
- }
- ],
- class: t.b('delBtn'),
- attrs: { type: t.menuText('danger'), icon: t.crud.getBtnIcon('delBtn'), size: t.crud.isMediumSize, disabled: t.btnDisabled },
- on: {
- click: function (e) {
- return e.stopPropagation(), t.crud.rowDel(n, 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, null, t.menuParams({ row: n, column: i, $index: o }))
- ],
- 2
- )
- ];
- }
- }
- ],
- null,
- !0
- )
- })
- : t._e();
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- ye = y(
- b({
- name: 'crud',
- components: { tableGridColumn: ie },
- data: function () {
- return { config: zt, rowSortable: null, columnSortable: null };
- },
- mixins: [Lt],
- inject: ['crud'],
- watch: {
- 'crud.isSortable': function (t) {
- this.rowDrop(t), this.columnDrop(t);
- },
- 'crud.isRowSort': function (t) {
- this.rowDrop(t);
- },
- 'crud.isColumnSort': function (t) {
- this.columnDrop(t);
- }
- },
- mounted: function () {
- this.rowDrop(), this.columnDrop();
- },
- methods: {
- indexMethod: function (t) {
- return t + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);
- },
- rowDrop: function (t) {
- var e = this;
- this.$nextTick(function () {
- if (0 != t) {
- if (e.crud.$refs.table.$el) {
- var n = e.crud.$refs.table.$el.querySelectorAll(e.config.dropRowClass)[0];
- e.rowSortable = e.crud.tableDrop('row', n, function (t) {
- var n = t.oldIndex,
- i = t.newIndex;
- e.crud.$emit('sortable-change', n, i);
- });
- }
- } else e.rowSortable && e.rowSortable.destroy();
- });
- },
- columnDrop: function (t) {
- var e = this;
- this.$nextTick(function () {
- if (0 != t) {
- if (e.crud.$refs.table.$el) {
- var n = e.crud.$refs.table.$el.querySelector(e.config.dropColClass),
- i = 0;
- ['selection', 'index', 'expand'].forEach(function (t) {
- e.crud.tableOption[t] && (i += 1);
- }),
- (e.columnSortable = e.crud.tableDrop('column', n, function (t) {
- var n = t.oldIndex - i,
- o = t.newIndex - i;
- e.crud.headerSort(n, o), e.crud.$emit('column-sortable-change', n, o);
- }));
- }
- } else e.columnSortable && e.columnSortable.destroy();
- });
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- [
- e(t.crud.tableColumnName, { tag: 'component', attrs: { width: '1px' } }),
- t._v(' '),
- t.crud.tableOption.expand
- ? e(t.crud.tableColumnName, {
- key: 'expand',
- tag: 'component',
- attrs: {
- type: 'expand',
- 'class-name': t.crud.tableOption.expandClassName,
- 'label-class-name': t.crud.tableOption.expandLabelClassName,
- width: t.crud.tableOption.expandWidth || t.config.expandWidth,
- fixed: t.vaildData(t.crud.tableOption.expandFixed, t.config.expandFixed),
- align: 'center'
- },
- scopedSlots: t._u(
- [
- {
- key: 'default',
- fn: function ({ row: e }) {
- return [t._t('expand', null, { row: e, index: e.$index })];
- }
- }
- ],
- null,
- !0
- )
- })
- : t._e(),
- t._v(' '),
- t.crud.tableOption.selection
- ? e(t.crud.tableColumnName, {
- key: 'selection',
- tag: 'component',
- attrs: {
- fixed: t.vaildData(t.crud.tableOption.selectionFixed, t.config.selectionFixed),
- type: 'selection',
- 'class-name': t.crud.tableOption.selectionClassName,
- 'label-class-name': t.crud.tableOption.selectionLabelClassName,
- selectable: t.crud.tableOption.selectable,
- 'reserve-selection': t.vaildData(t.crud.tableOption.reserveSelection),
- width: t.crud.tableOption.selectionWidth || t.config.selectionWidth,
- align: 'center'
- }
- })
- : t._e(),
- t._v(' '),
- t.vaildData(t.crud.tableOption.index)
- ? e(t.crud.tableColumnName, {
- key: 'index',
- tag: 'component',
- attrs: {
- fixed: t.vaildData(t.crud.tableOption.indexFixed, t.config.indexFixed),
- label: t.crud.tableOption.indexLabel || t.config.indexLabel,
- type: 'index',
- 'class-name': t.crud.tableOption.indexClassName,
- 'label-class-name': t.crud.tableOption.indexLabelClassName,
- width: t.crud.tableOption.indexWidth || t.config.indexWidth,
- index: t.indexMethod,
- align: 'center'
- },
- scopedSlots: t._u(
- [
- {
- key: 'default',
- fn: function ({ $index: e }) {
- return [t._v('\n ' + t._s(t.indexMethod(e)) + '\n ')];
- }
- }
- ],
- null,
- !1,
- 1392650513
- )
- })
- : t._e()
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- function ge(t, e) {
- var n = ('undefined' != typeof Symbol && t[Symbol.iterator]) || t['@@iterator'];
- if (!n) {
- if (
- Array.isArray(t) ||
- (n = (function (t, e) {
- if (!t) return;
- if ('string' == typeof t) return xe(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 xe(t, e);
- })(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 r,
- a = !0,
- s = !1;
- return {
- s: function () {
- n = n.call(t);
- },
- n: function () {
- var t = n.next();
- return (a = t.done), t;
- },
- e: function (t) {
- (s = !0), (r = t);
- },
- f: function () {
- try {
- a || null == n.return || n.return();
- } finally {
- if (s) throw r;
- }
- }
- };
- }
- function xe(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 we = y(
- b({
- name: 'crud',
- mixins: [Ct('crud'), Lt],
- directives: { permission: E },
- provide: function () {
- return { crud: this };
- },
- components: {
- column: de,
- columnDefault: ye,
- columnMenu: be,
- tableGrid: Ft,
- tablePage: Ht,
- headerSearch: Yt,
- headerMenu: pe,
- dialogColumn: he,
- dialogFilter: fe,
- dialogExcel: ve,
- dialogForm: me
- },
- data: function () {
- return {
- reload: Math.random(),
- cellForm: { list: [] },
- config: zt,
- list: [],
- listError: {},
- tableForm: {},
- tableHeight: void 0,
- tableIndex: -1,
- tableSelect: [],
- sumsList: {},
- cascaderIndexList: [],
- cascaderDicList: {},
- cascaderFormList: {},
- btnDisabledList: {},
- btnDisabled: !1,
- default: {},
- gridShow: !1
- };
- },
- created: function () {
- this.gridShow = this.tableOption.grid;
- },
- mounted: function () {
- this.dataInit(), this.getTableHeight(), this.refreshTable();
- },
- computed: {
- tableName: function () {
- return this.gridShow ? 'tableGrid' : 'elTable';
- },
- tableColumnName: function () {
- return this.gridShow ? 'tableGridColumn' : 'elTableColumn';
- },
- isSortable: function () {
- return this.tableOption.sortable;
- },
- isRowSort: function () {
- return this.tableOption.rowSort;
- },
- isColumnSort: function () {
- return this.tableOption.columnSort;
- },
- rowParentKey: function () {
- return this.option.rowParentKey || a.rowParentKey;
- },
- childrenKey: function () {
- return this.treeProps.children || a.children;
- },
- hasChildrenKey: function () {
- return this.treeProps.hasChildren || a.hasChildren;
- },
- treeProps: function () {
- return this.tableOption.treeProps || {};
- },
- isAutoHeight: function () {
- return 'auto' === this.tableOption.height;
- },
- formSlot: function () {
- return this.getSlotList(['Error', 'Label', 'Type', 'Form', 'Header'], this.$scopedSlots, this.propOption);
- },
- searchSlot: function () {
- return this.getSlotList(['Search'], this.$scopedSlots, this.propOption);
- },
- mainSlot: function () {
- var t = this,
- e = [];
- return (
- this.propOption.forEach(function (n) {
- t.$scopedSlots[n.prop] && e.push(n.prop);
- }),
- this.getSlotList(['Header', 'Form'], this.$scopedSlots, this.propOption).concat(e)
- );
- },
- calcHeight: function () {
- return (this.tableOption.calcHeight || 0) + this.$AVUE.calcHeight;
- },
- propOption: function () {
- var t = [];
- return (
- (function e() {
- var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
- Array.isArray(n) &&
- n.forEach(function (n) {
- Array.isArray(n.children) ? e(n.children) : t.push(n);
- });
- })(this.columnOption),
- (t = Kt(t))
- );
- },
- isShowSummary: function () {
- return this.option.showSummary;
- },
- isHeader: function () {
- var t = !1;
- return (
- this.columnOption.forEach(function (e) {
- e.children && (t = !0);
- }),
- t
- );
- },
- isTree: function () {
- var t = !1;
- return (
- this.data.forEach(function (e) {
- e.children && (t = !0);
- }),
- t
- );
- },
- isCard: function () {
- return this.option.card ? 'always' : 'never';
- },
- expandLevel: function () {
- return this.parentOption.expandLevel || 0;
- },
- expandAll: function () {
- return this.parentOption.expandAll || !1;
- },
- parentOption: function () {
- return this.tableOption || {};
- },
- columnOption: function () {
- var t = this.deepClone(this.tableOption);
- return ot(t.column);
- },
- sumColumnList: function () {
- return this.tableOption.sumColumnList || [];
- },
- selectLen: function () {
- return this.tableSelect ? this.tableSelect.length : 0;
- }
- },
- watch: {
- value: {
- handler: function () {
- this.tableForm = this.value;
- },
- immediate: !0,
- deep: !0
- },
- list: {
- handler: function () {
- this.cellForm.list = this.list;
- },
- deep: !0
- },
- data: {
- handler: function () {
- this.dataInit();
- },
- deep: !0
- }
- },
- props: {
- spanMethod: Function,
- summaryMethod: Function,
- beforeClose: Function,
- beforeOpen: Function,
- rowStyle: [Function, Object],
- cellStyle: [Function, Object],
- rowClassName: [Function, String],
- cellClassName: [Function, String],
- headerCellClassName: [Function, String],
- headerRowClassName: [Function, String],
- headerRowStyle: [Function, Object],
- headerCellStyle: [Function, Object],
- uploadSized: 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 {};
- }
- },
- 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: {
- handleGridShow: function () {
- (this.gridShow = !this.gridShow), this.$emit('grid-status-change', this.gridShow);
- },
- handleValidate: function (t, e, n) {
- this.listError[t] || this.$set(this.listError, t, { valid: !1, msg: '' }), (this.listError[t].valid = !e), (this.listError[t].msg = n);
- },
- 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 = document.documentElement.clientHeight,
- n = t.calcHeight || 0,
- i = t.$refs.table,
- o = t.$refs.tablePage,
- r = e - n;
- i && i.$el.getBoundingClientRect && (r -= i.$el.getBoundingClientRect().top);
- o && o.$el.getBoundingClientRect && (r -= o.$el.getBoundingClientRect().height);
- t.tableHeight = r;
- })
- : (this.tableHeight = this.tableOption.height);
- },
- doLayout: function () {
- this.$refs.table.doLayout();
- },
- refreshTable: function (t) {
- (this.reload = Math.random()),
- this.$nextTick(function () {
- t && t();
- });
- },
- treeLoad: function (t, e, n) {
- this.$emit('tree-load', t, e, function (e) {
- (t.children = e), n(e);
- });
- },
- menuIcon: function (t) {
- return this.vaildData(this.tableOption[t + 'Text'], this.t('crud.' + t));
- },
- getBtnIcon: function (t) {
- var e = t + 'Icon';
- return this.tableOption[e] || zt[e];
- },
- validateField: function (t, e) {
- return this.$refs.dialogForm.$refs.tableForm.validateField(t, e);
- },
- clearSelection: function () {
- this.$emit('selection-clear', this.deepClone(this.tableSelect)), this.$refs.table.clearSelection();
- },
- toggleAllSelection: function () {
- this.$refs.table.toggleAllSelection();
- },
- 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);
- },
- dataInit: function () {
- var t = this;
- (this.list = this.data),
- this.list.forEach(function (e, n) {
- e.$cellEdit && !t.cascaderFormList[n] && (t.cascaderFormList[n] = t.deepClone(e)), t.$set(e, '$cellEdit', e.$cellEdit || !1), t.$set(e, '$index', n);
- });
- },
- headerDragend: function (t, e, n, i) {
- this.objectOption[n.property] && this.$set(this.objectOption[n.property], 'width', t), this.$emit('header-dragend', t, e, n, i);
- },
- headerSort: function (t, e) {
- var n = this.columnOption,
- i = n.filter(function (t) {
- return 1 != t.hide;
- }),
- o = i[e],
- r = i[t];
- (e = n.findIndex(function (t) {
- return t.prop == o.prop;
- })),
- (t = n.findIndex(function (t) {
- return t.prop == r.prop;
- }));
- var a = n.splice(t, 1)[0];
- n.splice(e, 0, a), this.refreshTable();
- },
- clearFilter: function (t) {
- this.$refs.table.clearFilter(t);
- },
- 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, e) {
- var n = this;
- t
- ? t.forEach(function (t) {
- n.$refs.table.toggleRowSelection(t, e);
- })
- : 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);
- },
- rowCellAdd: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
- e = this.list.length,
- n = Ut(this.propOption).tableForm;
- (t = this.deepClone(Object.assign({ $cellEdit: !0, $index: e }, n, t))), this.list.push(t);
- },
- rowCancel: function (t, e) {
- this.validatenull(t[this.rowKey])
- ? (this.list.splice(e, 1), delete this.cascaderDIC[e])
- : ((this.cascaderFormList[e].$cellEdit = !1), this.$set(this.cascaderDIC, e, this.cascaderDicList[e]), this.$set(this.list, e, this.cascaderFormList[e])),
- delete this.cascaderDicList[e],
- delete this.cascaderFormList[e],
- this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(e), 1);
- },
- rowCell: function (t, e) {
- t.$cellEdit ? this.rowCellUpdate(t, e) : this.rowCellEdit(t, e);
- },
- rowCellUpdate: function (t, e) {
- var n = this,
- i = function (i) {
- (t = i || t),
- (n.btnDisabledList[e] = !1),
- (n.btnDisabled = !1),
- (t.$cellEdit = !1),
- (n.list[e] = t),
- n.cascaderIndexList.splice(n.cascaderIndexList.indexOf(e), 1),
- delete n.cascaderFormList[e];
- },
- o = function () {
- (n.btnDisabledList[e] = !1), (n.btnDisabled = !1);
- };
- this.validateCellField(e) &&
- ((this.btnDisabledList[e] = !0),
- (this.btnDisabled = !0),
- this.validatenull(t[this.rowKey]) ? this.$emit('row-save', t, i, o) : this.$emit('row-update', t, e, i, o));
- },
- rowCellEdit: function (t, e) {
- (t.$cellEdit = !0), (this.cascaderFormList[e] = this.deepClone(t)), (this.cascaderDicList[e] = this.deepClone(this.cascaderDIC[e]));
- },
- 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 = ge(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;
- },
- 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();
- },
- getPropRef: function (t) {
- return this.$refs.dialogForm.$refs.tableForm.getPropRef(t);
- },
- setVal: function () {
- this.$emit('input', this.tableForm), this.$emit('change', this.tableForm);
- },
- rowEdit: function (t, e) {
- (this.tableForm = this.deepClone(t)), (this.tableIndex = e), this.setVal(), this.$refs.dialogForm.show('edit');
- },
- rowCopy: function (t) {
- (this.tableForm = this.deepClone(t)), delete this.tableForm[this.rowKey], (this.tableIndex = -1), this.setVal(), this.$refs.dialogForm.show('add');
- },
- rowView: function (t, e) {
- (this.tableForm = this.deepClone(t)), (this.tableIndex = e), this.setVal(), this.$refs.dialogForm.show('view');
- },
- rowDel: function (t, e) {
- var n = this;
- this.$emit('row-del', t, e, function () {
- var e = n.findData(t[n.rowKey]),
- i = e.parentList,
- o = e.index;
- i && i.splice(o, 1);
- });
- },
- tableSpanMethod: function (t) {
- if ('function' == typeof this.spanMethod) return this.spanMethod(t);
- },
- tableSummaryMethod: function (t) {
- var e = this,
- n = {},
- i = [],
- o = t.columns,
- r = t.data;
- return (
- 'function' == typeof this.summaryMethod
- ? ((i = this.summaryMethod(t)),
- o.forEach(function (t, e) {
- n[t.property] = i[e];
- }),
- (this.sumsList = n))
- : o.forEach(function (t, o) {
- var a = e.sumColumnList.find(function (e) {
- return e.name === t.property;
- });
- if (a) {
- var s = a.decimals || 2,
- l = a.label || '';
- switch (a.type) {
- case 'count':
- i[o] = l + r.length;
- break;
- case 'avg':
- var c = r.map(function (e) {
- return Number(e[t.property]);
- }),
- u = 1;
- (i[o] = c.reduce(function (t, e) {
- var n = Number(e);
- return isNaN(n) ? t : (t * (u - 1) + e) / u++;
- }, 0)),
- (i[o] = l + i[o].toFixed(s));
- break;
- case 'sum':
- var d = r.map(function (e) {
- return Number(e[t.property]);
- });
- (i[o] = d.reduce(function (t, e) {
- var n = Number(e);
- return isNaN(n) ? t : t + e;
- }, 0)),
- (i[o] = l + i[o].toFixed(s));
- }
- n[t.property] = i[o];
- } else i[o] = '';
- }),
- (this.sumsList = n),
- i
- );
- },
- tableDrop: function (t, e, n) {
- if (!0 !== this.isSortable) {
- if ('row' == t && !this.isRowSort) return;
- if ('column' == t && !this.isColumnSort) return;
- } else if (!e) return;
- if (window.Sortable)
- return window.Sortable.create(e, {
- ghostClass: zt.ghostClass,
- chosenClass: zt.ghostClass,
- animation: 100,
- delay: 0,
- onEnd: function (t) {
- return n(t);
- }
- });
- I.logs('Sortable');
- },
- findData: function (t) {
- var e = this,
- n = {};
- return (
- (function i(o, r) {
- o.forEach(function (a, s) {
- a[e.rowKey] == t && (n = { item: a, index: s, parentList: o, parent: r }), a[e.childrenKey] && i(a[e.childrenKey], a);
- });
- })(this.list),
- n
- );
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b({ card: !t.option.card }) },
- [
- t.tableOption.title ? e(t.tableOption.titleSize || 'h2', { tag: 'component', style: t.tableOption.titleStyle }, [t._v(t._s(t.tableOption.title))]) : t._e(),
- t._v(' '),
- e('header-search', {
- ref: 'headerSearch',
- 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,
- fn: function (n) {
- return [t._t(e, null, null, n)];
- }
- };
- })
- ],
- null,
- !0
- )
- }),
- t._v(' '),
- e(
- 'el-card',
- { class: t.b('body'), attrs: { shadow: t.isCard } },
- [
- t._t('header'),
- t._v(' '),
- t.vaildData(t.tableOption.header, !0)
- ? e('header-menu', {
- ref: 'headerMenu',
- scopedSlots: t._u(
- [
- {
- key: 'menuLeft',
- fn: function (e) {
- return [t._t('menuLeft', null, null, e)];
- }
- },
- {
- key: 'menuRight',
- fn: function (e) {
- return [t._t('menuRight', null, null, e)];
- }
- }
- ],
- null,
- !0
- )
- })
- : t._e(),
- t._v(' '),
- t.vaildData(t.tableOption.tip, t.config.tip) && t.tableOption.selection
- ? e(
- 'el-tag',
- { staticClass: 'avue-crud__tip' },
- [
- e('span', { staticClass: 'avue-crud__tip-name' }, [
- t._v('\n ' + t._s(t.t('crud.tipStartTitle')) + '\n '),
- e('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
- ? e(
- 'el-button',
- {
- directives: [
- { name: 'permission', rawName: 'v-permission', value: t.getPermission('selectClearBtn'), expression: "getPermission('selectClearBtn')" }
- ],
- attrs: { type: 'text', size: 'small' },
- on: { click: t.clearSelection }
- },
- [t._v(t._s(t.t('crud.emptyBtn')))]
- )
- : t._e(),
- t._v(' '),
- t._t('tip')
- ],
- 2
- )
- : t._e(),
- t._v(' '),
- t._t('body'),
- t._v(' '),
- e(
- 'el-form',
- { ref: 'cellForm', attrs: { model: t.cellForm, 'show-message': !1 }, on: { validate: t.handleValidate } },
- [
- e(
- t.tableName,
- {
- directives: [{ name: 'loading', rawName: 'v-loading.lock', value: t.tableLoading, expression: 'tableLoading', modifiers: { lock: !0 } }],
- key: t.reload,
- ref: 'table',
- tag: 'component',
- class: { 'avue-crud--indeterminate': t.vaildData(t.tableOption.indeterminate, !1) },
- attrs: {
- data: t.cellForm.list,
- 'row-key': t.rowKey,
- 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,
- 'tooltip-effect': t.tableOption.tooltipEffect,
- '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,
- fit: t.tableOption.fit,
- 'header-cell-class-name': t.headerCellClassName,
- 'header-row-class-name': t.headerRowClassName,
- 'header-row-style': t.headerRowStyle,
- 'header-cell-style': t.headerCellStyle,
- '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,
- 'element-loading-text': t.tableOption.loadingText,
- 'element-loading-spinner': t.tableOption.loadingSpinner,
- 'element-loading-svg': t.tableOption.loadingSvg,
- 'element-loading-background': t.tableOption.loadingBackground
- },
- 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
- }
- },
- [
- e('template', { slot: 'empty' }, [
- e(
- 'div',
- { class: t.b('empty') },
- [t.$slots.empty ? t._t('empty') : e('el-empty', { attrs: { 'image-size': 100, description: t.tableOption.emptyText || t.t('crud.emptyText') } })],
- 2
- )
- ]),
- t._v(' '),
- e(
- 'column',
- {
- attrs: { columnOption: t.columnOption },
- scopedSlots: t._u(
- [
- t._l(t.mainSlot, function (e) {
- return {
- key: e,
- fn: function (n) {
- return [t._t(e, null, null, n)];
- }
- };
- })
- ],
- null,
- !0
- )
- },
- [
- e('column-default', {
- ref: 'columnDefault',
- attrs: { slot: 'header' },
- slot: 'header',
- scopedSlots: t._u(
- [
- {
- key: 'expand',
- fn: function ({ row: e, index: n }) {
- return [t._t('expand', null, { row: e, index: n })];
- }
- }
- ],
- null,
- !0
- )
- }),
- t._v(' '),
- t._v(' '),
- e('column-menu', {
- attrs: { slot: 'footer' },
- slot: 'footer',
- scopedSlots: t._u(
- [
- {
- key: 'menuHeader',
- fn: function (e) {
- return [t._t('menuHeader', null, null, e)];
- }
- },
- {
- key: 'menuBefore',
- fn: function (e) {
- return [t._t('menuBefore', null, null, e)];
- }
- },
- {
- key: 'menu',
- fn: function (e) {
- return [t._t('menu', null, null, e)];
- }
- },
- {
- key: 'menuBtnBefore',
- fn: function (e) {
- return [t._t('menuBtnBefore', null, null, e)];
- }
- },
- {
- key: 'menuBtn',
- fn: function (e) {
- return [t._t('menuBtn', null, null, e)];
- }
- }
- ],
- null,
- !0
- )
- })
- ],
- 1
- )
- ],
- 2
- )
- ],
- 1
- ),
- t._v(' '),
- t._t('footer')
- ],
- 2
- ),
- t._v(' '),
- e('table-page', { ref: 'tablePage' }, [e('template', { slot: 'page' }, [t._t('page')], 2)], 2),
- t._v(' '),
- e('dialog-form', {
- ref: 'dialogForm',
- scopedSlots: t._u(
- [
- t._l(t.formSlot, function (e) {
- return {
- key: e,
- fn: function (n) {
- return [t._t(e, null, null, n)];
- }
- };
- }),
- {
- key: 'menuFormBefore',
- fn: function (e) {
- return [t._t('menuFormBefore', null, null, e)];
- }
- },
- {
- key: 'menuForm',
- fn: function (e) {
- return [t._t('menuForm', null, null, e)];
- }
- }
- ],
- null,
- !0
- )
- }),
- t._v(' '),
- e('dialog-column', { ref: 'dialogColumn' }),
- t._v(' '),
- e('dialog-excel', { ref: 'dialogExcel' }),
- t._v(' '),
- e('dialog-filter', { ref: 'dialogFilter' })
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- _e = { img: 'img', title: 'title', info: 'info' },
- Se = y(
- b({
- name: 'card',
- props: {
- props: {
- type: Object,
- default: function () {
- return _e;
- }
- },
- option: {
- type: Object,
- default: function () {
- return {};
- }
- },
- data: {
- type: Array,
- default: function () {
- return [];
- }
- }
- },
- data: function () {
- return { propsDefault: _e };
- },
- 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);
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e(
- 'el-row',
- { attrs: { span: 24, gutter: t.gutter } },
- [
- t.vaildData(t.option.addBtn, !0)
- ? e('el-col', { attrs: { span: t.span } }, [
- e(
- 'div',
- {
- class: t.b('item', { add: !0 }),
- on: {
- click: function (e) {
- return t.rowAdd();
- }
- }
- },
- [e('i', { staticClass: 'el-icon-plus' }), t._v(' '), e('span', [t._v('添加')])]
- )
- ])
- : t._e(),
- t._v(' '),
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { span: t.span } }, [
- e(
- 'div',
- {
- class: t.b('item'),
- on: {
- click: function (e) {
- return t.rowClick(n, i);
- }
- }
- },
- [
- e('div', { class: t.b('body') }, [
- e('div', { class: t.b('avatar') }, [e('img', { attrs: { src: n[t.imgKey], alt: '' } })]),
- t._v(' '),
- e('div', { class: t.b('detail') }, [
- e('div', { class: t.b('title') }, [t._v(t._s(n[t.titleKey]))]),
- t._v(' '),
- e('div', { class: t.b('info') }, [t._v(t._s(n[t.infoKey]))])
- ])
- ]),
- t._v(' '),
- e('div', { class: t.b('menu') }, [t._t('menu', null, { index: i, row: n })], 2)
- ]
- )
- ]);
- })
- ],
- 2
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Ce = y(
- b({
- 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) : I.logs('hljs');
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e('el-scrollbar', { style: t.styleName }, [
- e('pre', [t._v(' '), e('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;
- function ke(t) {
- return (ke =
- '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 Oe = y(
- b({
- name: 'chat',
- mixins: [Lt],
- data: function () {
- return { upload: { box: !1, src: '', type: '', title: '' }, visible: !1, imgSrc: '', videoSrc: '', audioSrc: '', keys: '', show: !1 };
- },
- 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 [];
- }
- }
- },
- computed: {
- msg: {
- get: function () {
- return this.value;
- },
- set: function (t) {
- this.$emit('input', t), this.$emit('change', t);
- }
- },
- 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,
- r = {
- date: o || Gt()().format('YYYY-MM-DD HH:mm:ss'),
- text: 'object' != ke(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(r),
- 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 () {
- var n = e.children[i];
- 0 != n.getAttribute('data-flag') &&
- (n.setAttribute('data-flag', 0),
- (n.onclick = function () {
- t.handleEvent(n.dataset);
- }),
- 'IMG' === n.tagName
- ? ((n.className = 'web__msg--img'), (n.src = n.getAttribute('data-src')))
- : 'VIDEO' === n.tagName
- ? ((n.className = 'web__msg--video'), (n.src = n.getAttribute('data-src')))
- : 'AUDIO' === n.tagName
- ? ((n.className = 'web__msg--audio'), (n.controls = 'controls'), (n.src = n.getAttribute('data-src')))
- : 'FILE' === n.tagName
- ? ((n.className = 'web__msg--file'), (n.innerHTML = '<h2>File</h2><span>'.concat(n.getAttribute('data-name'), '</span>')))
- : 'MAP' === n.tagName &&
- ((n.className = 'web__msg--file web__msg--map'),
- (n.innerHTML = '<h2>Map</h2><span>'
- .concat(n.getAttribute('data-longitude'), ' , ')
- .concat(n.getAttribute('data-latitude'), '<br />')
- .concat(n.getAttribute('data-address'), '</span>'))),
- t.setScroll());
- },
- i = 0;
- i < e.children.length;
- i++
- )
- n();
- });
- }, 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,
- r = t.latitude,
- a = 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(a, ' "data-latitude="').concat(r, '" 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);
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- '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.apply(null, arguments);
- }
- }
- },
- [
- e('audio', { ref: 'chatAudio' }, [
- e('source', { attrs: { src: t.audio[0], type: 'audio/ogg' } }),
- t._v(' '),
- e('source', { attrs: { src: t.audio[1], type: 'audio/mpeg' } }),
- t._v(' '),
- e('source', { attrs: { src: t.audio[2], type: 'audio/wav' } })
- ]),
- t._v(' '),
- e(
- 'div',
- { staticClass: 'web__logo' },
- [
- e('img', { staticClass: 'web__logo-img', attrs: { src: t.config.img, alt: '' } }),
- t._v(' '),
- e('div', { staticClass: 'web__logo-info' }, [
- e('p', { staticClass: 'web__logo-name' }, [t._v(t._s(t.config.name))]),
- t._v(' '),
- e('p', { staticClass: 'web__logo-dept' }, [t._v(t._s(t.config.dept))])
- ]),
- t._v(' '),
- t._t('header')
- ],
- 2
- ),
- t._v(' '),
- e(
- 'div',
- { staticClass: 'web__content' },
- [
- e('div', { style: t.widthStyleName }, [
- e(
- 'div',
- { ref: 'main', staticClass: 'web__main' },
- t._l(t.list, function (n, i) {
- return e('div', { key: i, staticClass: 'web__main-item', class: { 'web__main-item--mine': n.mine } }, [
- e('div', { staticClass: 'web__main-user' }, [
- e('img', { attrs: { src: n.img } }),
- t._v(' '),
- e('cite', [t._v('\n ' + t._s(n.name) + '\n '), e('i', [t._v(t._s(n.date))])])
- ]),
- t._v(' '),
- e('div', { staticClass: 'web__main-text' }, [
- e('div', { staticClass: 'web__main-arrow' }),
- t._v(' '),
- e('span', { ref: 'content', refInFor: !0, domProps: { innerHTML: t._s(t.handleDetail(n.text.text)) } }),
- t._v(' '),
- t.validatenull(n.text.list)
- ? t._e()
- : e(
- 'ul',
- { staticClass: 'web__main-list' },
- t._l(n.text.list, function (n, i) {
- return e(
- 'li',
- {
- key: i,
- on: {
- click: function (e) {
- return t.handleItemMsg(n);
- }
- }
- },
- [t._v(t._s(n.text))]
- );
- }),
- 0
- )
- ])
- ]);
- }),
- 0
- ),
- t._v(' '),
- e('div', { staticClass: 'web__footer', style: t.widthStyleName }, [
- e(
- 'div',
- { staticClass: 'web__tools' },
- [
- t.tools.img
- ? e('i', {
- staticClass: 'el-icon-picture-outline',
- on: {
- click: function (e) {
- return t.handleUpload('img');
- }
- }
- })
- : t._e(),
- t._v(' '),
- t.tools.video
- ? e('i', {
- staticClass: 'el-icon-video-camera',
- on: {
- click: function (e) {
- return t.handleUpload('video');
- }
- }
- })
- : t._e(),
- t._v(' '),
- t.tools.file
- ? e('i', {
- staticClass: 'el-icon-folder-opened',
- on: {
- click: function (e) {
- return t.handleUpload('file');
- }
- }
- })
- : t._e(),
- t._v(' '),
- t._t('menu')
- ],
- 2
- ),
- t._v(' '),
- e('div', { staticClass: 'web__msg' }, [
- e('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(' '),
- e(
- 'div',
- { staticClass: 'web__msg-menu' },
- [
- e(
- 'el-dropdown',
- { staticClass: 'web__msg-submit', attrs: { 'split-button': '', type: 'primary', size: 'mini', trigger: 'click' }, on: { click: t.handleSend } },
- [
- t._v('\n 发送\n '),
- e(
- 'el-dropdown-menu',
- { attrs: { slot: 'dropdown' }, slot: 'dropdown' },
- [
- e(
- 'el-dropdown-item',
- [
- e(
- 'el-popover',
- {
- attrs: { placement: 'top', width: '160' },
- model: {
- value: t.visible,
- callback: function (e) {
- t.visible = e;
- },
- expression: 'visible'
- }
- },
- [
- e('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(' '),
- e(
- 'div',
- { staticStyle: { 'text-align': 'right', margin: '0' } },
- [
- e(
- 'el-button',
- {
- attrs: { size: 'mini', type: 'text' },
- on: {
- click: function (e) {
- t.visible = !1;
- }
- }
- },
- [t._v(t._s(t.t('common.cancelBtn')))]
- ),
- t._v(' '),
- e('el-button', { attrs: { type: 'primary', size: 'mini' }, on: { click: t.addKey } }, [t._v(t._s(t.t('common.submitBtn')))])
- ],
- 1
- ),
- t._v(' '),
- e('el-button', { attrs: { slot: 'reference', type: 'text', icon: 'el-icon-plus' }, slot: 'reference' })
- ],
- 1
- )
- ],
- 1
- ),
- t._v(' '),
- e(
- 'el-scrollbar',
- { staticStyle: { height: '100px' } },
- t._l(t.keylist, function (n, i) {
- return e(
- 'el-dropdown-item',
- {
- key: i,
- nativeOn: {
- click: function (e) {
- return t.sendKey(n);
- }
- }
- },
- [
- e('el-tooltip', { attrs: { effect: 'dark', content: n, placement: 'top' } }, [
- e('span', [t._v(' ' + t._s(n.substr(0, 10)) + t._s(n.length > 10 ? '...' : ''))])
- ])
- ],
- 1
- );
- }),
- 1
- )
- ],
- 1
- )
- ],
- 1
- )
- ],
- 1
- )
- ])
- ])
- ]),
- t._v(' '),
- t._t('default')
- ],
- 2
- ),
- t._v(' '),
- t.upload.box
- ? e(
- 'div',
- [
- e(
- 'el-dialog',
- {
- attrs: {
- title: t.upload.title,
- 'modal-append-to-body': t.$AVUE.modalAppendToBody,
- 'append-to-body': t.$AVUE.appendToBody,
- visible: t.upload.box,
- width: '30%'
- },
- on: {
- 'update:visible': function (e) {
- return t.$set(t.upload, 'box', e);
- }
- }
- },
- [
- e(
- 'el-form',
- { ref: 'form', attrs: { model: t.upload } },
- [
- e(
- 'el-form-item',
- { attrs: { prop: 'src', rules: [{ required: !0, message: '地址不能为空' }] } },
- [
- e('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(' '),
- e(
- 'span',
- { staticClass: 'dialog-footer', attrs: { slot: 'footer' }, slot: 'footer' },
- [
- e(
- 'el-button',
- {
- attrs: { size: 'small' },
- on: {
- click: function (e) {
- t.upload.box = !1;
- }
- }
- },
- [t._v(t._s(t.t('common.cancelBtn')))]
- ),
- t._v(' '),
- e('el-button', { attrs: { type: 'primary', size: 'small' }, on: { click: t.uploadSubmit } }, [t._v(t._s(t.t('common.submitBtn')))])
- ],
- 1
- )
- ],
- 1
- )
- ],
- 1
- )
- : t._e(),
- t._v(' '),
- t.show
- ? e(
- 'div',
- [
- e(
- 'el-dialog',
- {
- staticClass: 'web__dialog',
- attrs: {
- visible: t.show,
- width: '40%',
- 'modal-append-to-body': t.$AVUE.modalAppendToBody,
- 'append-to-body': t.$AVUE.appendToBody,
- 'before-close': t.handleClose
- },
- on: {
- 'update:visible': function (e) {
- t.show = e;
- }
- }
- },
- [
- t.imgSrc ? e('img', { staticStyle: { width: '100%', 'object-fit': 'cover' }, attrs: { src: t.imgSrc } }) : t._e(),
- t._v(' '),
- t.videoSrc ? e('video', { staticStyle: { width: '100%', 'object-fit': 'cover' }, attrs: { src: t.videoSrc, controls: 'controls' } }) : t._e(),
- t._v(' '),
- t.audioSrc ? e('audio', { staticStyle: { width: '100%', 'object-fit': 'cover' }, attrs: { src: t.audioSrc, controls: 'controls' } }) : t._e()
- ]
- )
- ],
- 1
- )
- : t._e()
- ]
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- $e = { avatar: 'avatar', author: 'author', body: 'body' },
- Pe = y(
- b({
- name: 'comment',
- props: {
- reverse: { type: Boolean, default: !1 },
- data: {
- type: Object,
- default: function () {
- return {};
- }
- },
- props: {
- type: Object,
- default: function () {
- return $e;
- }
- },
- option: {
- type: Object,
- default: function () {
- return {};
- }
- }
- },
- computed: {
- avatarKey: function () {
- return this.props.avatar || $e.avatar;
- },
- authorKey: function () {
- return this.props.author || $e.author;
- },
- bodyKey: function () {
- return this.props.body || $e.body;
- },
- avatar: function () {
- return this.data[this.avatarKey];
- },
- author: function () {
- return this.data[this.authorKey];
- },
- body: function () {
- return this.data[this.bodyKey];
- }
- },
- mounted: function () {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e('div', { class: t.b({ reverse: t.reverse }) }, [
- e('img', { class: t.b('avatar'), attrs: { src: t.avatar, alt: '' } }),
- t._v(' '),
- e('div', { class: t.b('main') }, [
- e(
- 'div',
- { class: t.b('header') },
- [t.author ? e('div', { class: t.b('author'), domProps: { textContent: t._s(t.author) } }) : t._e(), t._v(' '), t._t('default')],
- 2
- ),
- t._v(' '),
- t.body ? e('div', { class: t.b('body'), domProps: { innerHTML: t._s(t.body) } }) : t._e()
- ])
- ]);
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- function Te(t) {
- return (Te =
- '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 je = y(
- {
- inject: ['formSafe'],
- mixins: [Lt],
- computed: {
- menuXsSpan: function () {
- return this.formSafe.parentOption.menuXsSpan || this.formSafe.config.xsSpan;
- },
- menuSpan: function () {
- return this.formSafe.parentOption.menuSpan || this.formSafe.config.xsSpan;
- },
- styleName: function () {
- return 24 !== this.menuSpan ? { padding: 0 } : {};
- }
- }
- },
- function () {
- var t = this,
- e = t._self._c;
- return t.vaildData(t.formSafe.parentOption.menuBtn, !0)
- ? e(
- 'el-col',
- { class: [t.formSafe.b('menu', [t.formSafe.menuPosition]), 'no-print'], style: t.styleName, attrs: { span: t.menuSpan, md: t.menuSpan, xs: t.menuXsSpan } },
- [
- e(
- 'el-form-item',
- { attrs: { 'label-width': '0px' } },
- [
- t._t('menuFormBefore', null, { disabled: t.formSafe.allDisabled, size: t.formSafe.controlSize }),
- t._v(' '),
- t.formSafe.isMock
- ? e(
- 'el-button',
- {
- attrs: { type: 'primary', size: t.formSafe.controlSize, icon: 'el-icon-edit-outline', disabled: t.formSafe.allDisabled },
- on: { click: t.formSafe.handleMock }
- },
- [t._v(t._s(t.vaildData(t.formSafe.parentOption.mockText, t.t('form.mockBtn'))))]
- )
- : t._e(),
- t._v(' '),
- t.formSafe.isPrint
- ? e(
- 'el-button',
- {
- attrs: { type: 'primary', size: t.formSafe.controlSize, icon: 'el-icon-printer', disabled: t.formSafe.allDisabled },
- on: { click: t.formSafe.handlePrint }
- },
- [t._v(t._s(t.vaildData(t.formSafe.parentOption.printText, t.t('form.printBtn'))))]
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.formSafe.parentOption.submitBtn, !0)
- ? e(
- '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.submitBtn'))))]
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.formSafe.parentOption.emptyBtn, !0)
- ? e(
- 'el-button',
- {
- attrs: { icon: t.formSafe.parentOption.emptyIcon || 'el-icon-delete', size: t.formSafe.controlSize, disabled: t.formSafe.allDisabled },
- on: { click: t.formSafe.resetForm }
- },
- [t._v(t._s(t.vaildData(t.formSafe.parentOption.emptyText, t.t('form.emptyBtn'))))]
- )
- : t._e(),
- t._v(' '),
- t._t('menuForm', null, { disabled: t.formSafe.allDisabled, size: t.formSafe.controlSize })
- ],
- 2
- )
- ],
- 1
- )
- : t._e();
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Be = { labelWidth: 90, span: 12, xsSpan: 24 },
- Ae = {},
- De = y(
- b({
- name: 'form',
- mixins: [Ct('form')],
- components: { formTemp: ee, formMenu: je },
- props: {
- uploadBefore: Function,
- uploadAfter: Function,
- uploadDelete: Function,
- uploadPreview: Function,
- uploadError: Function,
- uploadExceed: Function,
- status: { type: Boolean, default: !1 },
- isCrud: { type: Boolean, default: !1 },
- value: {
- type: Object,
- required: !0,
- default: function () {
- return {};
- }
- }
- },
- data: function () {
- return { config: Be, activeName: '', allDisabled: !1, tableOption: {}, form: {}, formCreate: !1, formList: [], formBind: {} };
- },
- provide: function () {
- return { formSafe: this };
- },
- watch: {
- value: {
- handler: function (t) {
- this.formCreate && this.setForm();
- },
- deep: !0
- },
- form: {
- handler: function (t) {
- this.formCreate && (this.setLabel(), this.setVal());
- },
- deep: !0
- },
- tabsActive: {
- handler: function (t) {
- this.activeName = this.tabsActive;
- },
- immediate: !0
- },
- DIC: {
- handler: function () {
- this.setLabel();
- },
- deep: !0,
- immediate: !0
- },
- allDisabled: {
- handler: function (t) {
- this.$emit('update:status', t);
- },
- deep: !0,
- immediate: !0
- }
- },
- computed: {
- columnSlot: function () {
- var t = this;
- return Object.keys(this.$scopedSlots).filter(function (e) {
- return !t.propOption
- .map(function (t) {
- return t.prop;
- })
- .includes(e);
- });
- },
- labelSuffix: function () {
- return this.parentOption.labelSuffix || ':';
- },
- isMenu: function () {
- return 1 != this.columnOption.length;
- },
- isDetail: function () {
- return !0 === this.detail;
- },
- isTabs: function () {
- return !0 === this.parentOption.tabs;
- },
- isAdd: function () {
- return ['parentAdd', 'add'].includes(this.boxType);
- },
- isEdit: function () {
- return 'edit' === this.boxType;
- },
- isView: function () {
- return 'view' === this.boxType;
- },
- detail: function () {
- return this.parentOption.detail;
- },
- 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
- );
- },
- propOption: function () {
- var t = [];
- return (
- this.columnOption.forEach(function (e) {
- !1 !== e.display &&
- e.column.forEach(function (e) {
- t.push(e);
- });
- }),
- t
- );
- },
- parentOption: function () {
- return this.tableOption || {};
- },
- columnOption: function () {
- var t = this,
- e = this.deepClone(this.tableOption),
- n = ot(e.column),
- i = e.group || [],
- o = e.footer || [];
- return (
- i.unshift({ header: !1, column: n }),
- 0 !== o.length && i.push({ header: !1, column: o }),
- i.forEach(function (e, n) {
- (e.column = ot(e.column)),
- e.column.forEach(function (e, n) {
- !1 === e.display ||
- t.isMobile ||
- (e = (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 && (Rt = 0);
- var i = 24;
- return (
- (Rt = Rt + (t.span || e) + (t.offset || 0)) === i
- ? (Rt = 0)
- : Rt > i
- ? (Rt = 0 + (t.span || e) + (t.offset || 0))
- : t.row && Rt !== i && ((t.count = i - Rt), (Rt = 0)),
- t
- );
- })(e, t.config.span, 0 === n));
- }),
- (e.column = Kt(e.column)),
- (e.column = e.column.sort(function (t, e) {
- return (e.order || 0) - (t.order || 0);
- }));
- }),
- i
- );
- },
- 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);
- }
- },
- mounted: function () {
- var t = this;
- setTimeout(function () {
- t.dataFormat();
- });
- },
- methods: {
- getComponent: Wt,
- getPlaceholder: Xt,
- getDisabled: function (t) {
- return this.vaildDetail(t) || this.isDetail || this.vaildDisabled(t) || this.allDisabled;
- },
- isGroupShow: function (t, e) {
- return !this.isTabs || e == this.activeName || 0 == e;
- },
- dataFormat: function () {
- var t = this,
- e = Ut(this.propOption).tableForm,
- n = this.value,
- i = {};
- Object.entries(Object.assign(e, n)).forEach(function (e) {
- var o = e[0],
- r = e[1];
- t.validatenull(n[o]) ? (i[o] = r) : (i[o] = n[o]);
- }),
- this.$set(this, 'form', i),
- this.setLabel(),
- this.setControl(),
- this.setVal(),
- setTimeout(function () {
- (t.formCreate = !0), t.clearValidate();
- });
- },
- setControl: function () {
- var t = this;
- this.propOption.forEach(function (e) {
- var n = e.prop,
- i = e.bind,
- o = e.control;
- t.form;
- if (!t.formBind[n]) {
- var r = [];
- if (i) {
- var a = t.$watch('form.' + n, function (e, n) {
- !(function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : '',
- n = arguments.length > 2 ? arguments[2] : void 0;
- z()(t, e, n);
- })(t.form, i, e);
- }),
- s = t.$watch('form.' + i, function (e, i) {
- t.$set(t.form, n, e);
- });
- r.push(a), r.push(s), t.$set(t.form, n, G(t.form, i));
- }
- if (o) {
- var l = function () {
- var n = function (e) {
- Object.keys(e).forEach(function (n) {
- var i = Object.assign(t.objectOption[n] || {}, e[n]);
- (t.objectOption[n] = i), e[n].dicData && (t.DIC[n] = e[n].dicData);
- });
- },
- i = o(t.form[e.prop], t.form) || {};
- i instanceof Promise
- ? i.then(function (t) {
- n(t);
- })
- : n(i);
- },
- c = t.$watch('form.' + n, function (t, e) {
- l();
- });
- r.push(c), l();
- }
- t.formBind[n] = r;
- }
- });
- },
- setForm: function () {
- var t = this;
- Object.keys(this.value).forEach(function (e) {
- t.$set(t.form, e, t.value[e]);
- });
- },
- setVal: function () {
- this.$emit('input', this.form), this.$emit('change', this.form);
- },
- setLabel: function () {
- var t = this;
- !0 === this.tableOption.filterNull && (this.form = st(this.form, [''], !1)),
- 1 == this.tableOption.filterDic
- ? (this.form = st(this.form, ['$'], !1))
- : this.propOption.forEach(function (e) {
- var n,
- i = t.DIC[e.prop];
- t.validatenull(i) || ((n = Zt(t.form, e, t.tableOption, i)) ? t.$set(t.form, '$'.concat(e.prop), n) : t.$delete(t.form, '$'.concat(e.prop)));
- });
- },
- handleGroupClick: function (t) {
- this.$emit('tab-click', t);
- },
- handleTabClick: function (t, e) {
- this.$emit('tab-click', t, e);
- },
- getItemParams: function (t, e, n, i) {
- var o;
- return (
- (o = this.validatenull(t[n]) ? (this.validatenull(e[n]) ? this.parentOption[n] : e[n]) : t[n]), (o = this.vaildData(o, this.config[n])), i ? this.setPx(o) : o
- );
- },
- validateField: function (t, e) {
- return this.$refs.form.validateField(t, e);
- },
- validTip: function (t) {
- return !t.tip || 'upload' === t.type;
- },
- getPropRef: function (t) {
- return this.$refs[t][0];
- },
- handleChange: function (t, e) {
- var n = this;
- this.$nextTick(function () {
- var i = e.cascader,
- o = i.join(',');
- i.forEach(function (r) {
- var s = r,
- l = n.form[e.prop],
- c = n.findObject(t, s);
- n.validatenull(c) ||
- (n.formList.includes(o) &&
- i.forEach(function (t) {
- (n.form[t] = ut(n.form[t])), n.$set(n.DIC, t, []);
- }),
- n.validatenull(i) ||
- n.validatenull(l) ||
- n.validatenull(c) ||
- yt({ column: c, value: l, form: n.form }).then(function (t) {
- n.formList.includes(o) || n.formList.push(o);
- var e = t || [];
- n.$set(n.DIC, s, e),
- n.validatenull(e) ||
- n.validatenull(e) ||
- n.validatenull(c.cascaderIndex) ||
- !n.validatenull(n.form[s]) ||
- (n.form[s] = e[c.cascaderIndex][(c.props || {}).value || a.value]);
- }));
- });
- });
- },
- handlePrint: function () {
- this.$Print(this.$el);
- },
- propChange: function (t, e) {
- var n = e.prop;
- Ae[n] || (e.cascader && this.handleChange(t, e)),
- (Ae[n] = !0),
- this.$nextTick(function () {
- return (Ae[n] = !1);
- });
- },
- handleMock: function () {
- var t = this;
- this.isMock &&
- (this.columnOption.forEach(function (e) {
- var n = (function (t, e, n, i) {
- if (i) {
- if (window.Mock) {
- var o = window.Mock,
- r = (o || {}).Random,
- a = {};
- return (
- Object.keys(t).forEach(function (i) {
- var r = t[i],
- b = 'object' === Te(r.mock),
- y = (b && r.mock) || {};
- (y.dic = e[r.prop] || []), (y.props = r.props || {}), (y.columnType = r.type), (y.multiple = r.multiple);
- var g = { name: s, number: d, datetime: h, word: f, tel: u, id: c, image: l, url: p, county: m, dic: v };
- b && g[y.type]
- ? y.array
- ? (a[r.prop] = Array.from({ length: y.array }, function () {
- return g[y.type](y);
- }))
- : (a[r.prop] = g[y.type](y))
- : r.mock instanceof Function && (a[r.prop] = r.mock(n, o));
- }),
- a
- );
- }
- I.logs('mock');
- }
- function s(t) {
- return t.en ? r.name(!0) : r.cname();
- }
- function l(t) {
- var e = t.size,
- n = t.text,
- i = t.base64,
- o = e || r.natural(200, 400),
- a = n ? '#000000' : r.color(),
- s = n ? '#ffffff' : r.color();
- return i ? r.dataImage(o, n) : r.image(o, s, a, 'png', n || r.name());
- }
- function c(t) {
- return t.uuid ? o.mock('@guid') : o.mock('@id');
- }
- function u() {
- return o.mock(/^1[3-9]\d{9}$/);
- }
- function d(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 p(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));
- }
- function h(t) {
- var e = t.format;
- return t.now ? r.now(e) : r.datetime(e);
- }
- function f(t) {
- var e = t.min,
- n = t.max;
- return r.csentence(e, n);
- }
- function m() {
- return r.county(!0);
- }
- function v(t) {
- var e = t.dic,
- n = t.props,
- i = t.columnType,
- o = t.multiple,
- r = n.value || 'value',
- a = e.length;
- if (0 !== a) {
- if (['checkbox'].includes(i) || o) {
- for (var s = d({ min: 1, max: a }), l = [], c = 0; c < s; c++)
- for (var u = !0; u; ) {
- var p = e[d({ min: 0, max: a - 1 })][r];
- l.includes(p) || (l.push(p), (u = !1));
- }
- return l;
- }
- return e[d({ min: 0, max: a - 1 })][r];
- }
- }
- })(e.column, t.DIC, t.form, t.isMock);
- t.validatenull(n) ||
- Object.keys(n).forEach(function (e) {
- t.form[e] = n[e];
- });
- }),
- this.$nextTick(function () {
- t.clearValidate(), t.$emit('mock-change', t.form);
- }));
- },
- vaildDetail: function (t) {
- var e;
- if (this.detail) return !1;
- if (this.validatenull(t.detail)) {
- if (this.isAdd) e = 'addDetail';
- else if (this.isEdit) e = 'editDetail';
- else if (this.isView) return !1;
- } else e = 'detail';
- return this.vaildData(t[e], !1);
- },
- vaildDisabled: function (t) {
- var e;
- if (this.disabled) return !0;
- if (this.validatenull(t.disabled)) {
- if (this.isAdd) e = 'addDisabled';
- else if (this.isEdit) e = 'editDisabled';
- else if (this.isView) return !0;
- } else e = 'disabled';
- return this.vaildData(t[e], !1);
- },
- vaildDisplay: function (t) {
- var e;
- return (
- this.validatenull(t.display) ? (this.isAdd ? (e = 'addDisplay') : this.isEdit ? (e = 'editDisplay') : this.isView && (e = 'viewDisplay')) : (e = 'display'),
- this.vaildData(t[e], !0)
- );
- },
- clearValidate: function (t) {
- this.$refs.form && this.$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 = [],
- r = [],
- a = {};
- e.dynamicOption.forEach(function (t) {
- var n = 'form' === t.children.type;
- r.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) || (a[r[n]] = t);
- });
- var o = Object.assign(a, i);
- e.validatenull(o) ? (e.show(), t && t(!0, e.hide, o)) : t && t(!1, e.hide, o);
- });
- });
- },
- resetForm: function () {
- var t = this,
- e = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
- if (e) {
- var n = this.propOption.map(function (t) {
- return t.prop;
- });
- this.form = dt(this.form, n, (this.tableOption.filterParams || []).concat([this.rowKey]));
- }
- this.$nextTick(function () {
- t.clearValidate(), t.$emit('reset-change');
- });
- },
- 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, i) {
- e ? t.$emit('submit', st(t.form, ['$']), t.hide) : t.$emit('error', i);
- });
- }
- },
- beforeDestroy: function () {
- var t = this;
- Object.keys(this.formBind).forEach(function (e) {
- t.formBind[e].forEach(function (t) {
- t();
- });
- });
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: [t.b(), { 'avue--detail': t.isDetail }], style: { width: t.setPx(t.parentOption.formWidth, '100%') } },
- [
- e(
- 'el-form',
- {
- ref: 'form',
- attrs: {
- 'status-icon': t.parentOption.statusIcon,
- model: t.form,
- 'label-suffix': t.labelSuffix,
- 'hide-required-asterisk': t.parentOption.hideRequiredAsterisk,
- size: t.$AVUE.formSize || t.controlSize,
- 'label-position': t.parentOption.labelPosition,
- 'label-width': t.setPx(t.parentOption.labelWidth, t.config.labelWidth)
- },
- nativeOn: {
- submit: function (t) {
- t.preventDefault();
- }
- }
- },
- [
- e(
- 'el-row',
- { class: { 'avue-form__tabs': t.isTabs }, attrs: { span: 24, gutter: t.parentOption.gutter } },
- [
- t._l(t.columnOption, function (n, i) {
- return e(
- 'avue-group',
- {
- key: n.prop,
- attrs: {
- tabs: t.isTabs,
- arrow: n.arrow,
- collapse: n.collapse,
- display: t.vaildDisplay(n),
- icon: n.icon,
- index: i,
- header: !t.isTabs,
- active: t.activeName,
- label: n.label
- },
- on: { change: t.handleGroupClick }
- },
- [
- t.isTabs && 1 == i
- ? e(
- '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 (n, i) {
- return [
- t.vaildDisplay(n) && 0 != i
- ? e('el-tab-pane', { key: i, attrs: { name: i + '' } }, [
- e(
- 'span',
- { attrs: { slot: 'label' }, slot: 'label' },
- [
- t.getSlotName(n, 'H', t.$scopedSlots)
- ? t._t(t.getSlotName(n, 'H'), null, { column: t.column })
- : [e('i', { class: n.icon }, [t._v(' ')]), t._v('\n ' + t._s(n.label) + '\n ')]
- ],
- 2
- )
- ])
- : t._e()
- ];
- })
- ],
- 2
- )
- : t._e(),
- t._v(' '),
- t.getSlotName(n, 'H', t.$scopedSlots) ? e('template', { slot: 'header' }, [t._t(t.getSlotName(n, 'H'), null, { column: n })], 2) : t._e(),
- t._v(' '),
- e(
- 'div',
- {
- directives: [{ name: 'show', rawName: 'v-show', value: t.isGroupShow(n, i), expression: 'isGroupShow(item,index)' }],
- class: t.b('group', { flex: t.vaildData(n.flex, !0) })
- },
- [
- t._l(n.column, function (i, o) {
- return [
- t.vaildDisplay(i)
- ? e(
- 'el-col',
- {
- key: o,
- class: [t.b('row'), { 'avue--detail avue--detail__column': t.vaildDetail(i) }, i.className],
- attrs: {
- span: t.getItemParams(i, n, 'span'),
- md: t.getItemParams(i, n, 'span'),
- sm: t.getItemParams(i, n, 'span'),
- xs: t.getItemParams(i, n, 'xsSpan'),
- offset: t.getItemParams(i, n, 'offset'),
- push: t.getItemParams(i, n, 'push'),
- pull: t.getItemParams(i, n, 'pull')
- }
- },
- [
- e(
- 'el-form-item',
- {
- class: t.b('item--' + (i.labelPosition || n.labelPosition || '')),
- attrs: {
- prop: i.prop,
- label: i.label,
- rules: i.rules,
- 'label-position': i.labelPosition || n.labelPosition || t.parentOption.labelPosition,
- 'label-width': t.getItemParams(i, n, 'labelWidth', !0)
- },
- scopedSlots: t._u(
- [
- {
- key: 'error',
- fn: function (e) {
- return t.getSlotName(i, 'E', t.$scopedSlots)
- ? [
- t._t(
- t.getSlotName(i, 'E'),
- null,
- null,
- Object.assign(e, {
- 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]
- })
- )
- ]
- : void 0;
- }
- }
- ],
- null,
- !0
- )
- },
- [
- t.getSlotName(i, 'L', t.$scopedSlots)
- ? e(
- 'template',
- { slot: 'label' },
- [
- t._t(t.getSlotName(i, 'L'), null, {
- 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]
- })
- ],
- 2
- )
- : i.labelTip
- ? e(
- 'template',
- { slot: 'label' },
- [
- e('el-tooltip', { staticClass: 'item', attrs: { effect: 'dark', placement: i.labelTipPlacement || 'top-start' } }, [
- e('div', { attrs: { slot: 'content' }, domProps: { innerHTML: t._s(i.labelTip) }, slot: 'content' }),
- t._v(' '),
- e('i', { staticClass: 'el-icon-info' })
- ]),
- t._v(' '),
- e('span', [t._v(' ' + t._s(i.label) + t._s(t.labelSuffix))])
- ],
- 1
- )
- : t._e(),
- t._v(' '),
- t._v(' '),
- e(
- 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]
- })
- : e(
- 'form-temp',
- t._b(
- {
- ref: i.prop,
- refInFor: !0,
- attrs: {
- column: i,
- 'box-type': t.boxType,
- dic: t.DIC[i.prop],
- props: t.parentOption.props,
- propsHttp: t.parentOption.propsHttp,
- render: i.render,
- row: t.form,
- 'table-data': t.tableData,
- disabled: t.getDisabled(i),
- readonly: i.readonly || t.readonly,
- enter: t.parentOption.enter,
- size: t.size,
- 'column-slot': t.columnSlot
- },
- on: {
- enter: t.submit,
- change: function (e) {
- return t.propChange(n.column, i);
- }
- },
- scopedSlots: t._u(
- [
- t._l(t.getSlotName(i, 'T', t.$scopedSlots) ? [i] : [], function (e) {
- return {
- key: t.getSlotName(i, 'T'),
- fn: function (n) {
- return [t._t(t.getSlotName(e, 'T'), null, null, n)];
- }
- };
- }),
- t._l(t.columnSlot, function (e) {
- return {
- key: e,
- fn: function (n) {
- return [t._t(e, 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
- ? e('div', { key: 'line' + o, class: t.b('line'), style: { width: (i.count / 24) * 100 + '%' } })
- : t._e()
- ];
- }),
- t._v(' '),
- t.isDetail || t.isMenu
- ? t._e()
- : e('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
- ? e('form-menu', {
- scopedSlots: t._u(
- [
- {
- key: 'menuFormBefore',
- fn: function (e) {
- return [t._t('menuFormBefore', null, null, e)];
- }
- },
- {
- key: 'menuForm',
- fn: function (e) {
- return [t._t('menuForm', null, null, e)];
- }
- }
- ],
- null,
- !0
- )
- })
- : t._e()
- ],
- 2
- )
- ],
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Ie = function () {
- return {
- mixins: [gt],
- data: function () {
- return { stringMode: !1, name: '', text: void 0, propsHttpDefault: s, propsDefault: a };
- },
- props: {
- blur: Function,
- focus: Function,
- change: Function,
- click: Function,
- typeformat: Function,
- control: Function,
- separator: { type: String, default: ',' },
- params: {
- type: Object,
- default: function () {
- return {};
- }
- },
- listType: { type: String },
- tableData: {
- type: Object,
- default: function () {
- return {};
- }
- },
- 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, Function],
- 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 },
- popperClass: { type: String },
- propsHttp: {
- type: Object,
- default: function () {
- return s;
- }
- },
- props: {
- type: Object,
- default: function () {
- return a;
- }
- }
- },
- watch: {
- text: {
- handler: function (t) {
- this.handleChange(t);
- }
- },
- value: {
- handler: function () {
- this.initVal();
- }
- }
- },
- computed: {
- clearableVal: function () {
- return !this.disabled && this.clearable;
- },
- componentName: function () {
- return ''
- .concat('el', '-')
- .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;
- },
- isJson: function () {
- return 'json' === 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;
- },
- fileTypeKey: function () {
- return this.propsHttp.fileType || this.propsHttpDefault.fileType;
- },
- groupsKey: function () {
- return this.props.groups || this.propsDefault.groups;
- },
- valueKey: function () {
- return this.props.value || this.propsDefault.value;
- },
- typeKey: function () {
- return this.props.type || this.propsDefault.type;
- },
- 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();
- }
- };
- },
- Ee = function () {
- return {
- methods: {
- bindEvent: function (t, e) {
- var n = lt(this.dic, this.props, this.text);
- (e = Object.assign(e, { column: this.column, dic: this.dic, item: n }, this.tableData)),
- 'function' == typeof this[t] && ('change' == t ? 1 != this.column.cell && this[t](e) : this[t](e)),
- this.$emit(t, e);
- },
- initVal: function () {
- var t, e, n, i, o, r, a, s, l, c, u;
- (this.stringMode = 'string' == typeof this.value),
- (this.text =
- ((t = this.value),
- (n = (e = this).type),
- (i = e.multiple),
- (o = e.dataType),
- (r = e.separator),
- (a = void 0 === r ? ',' : r),
- (s = e.alone),
- (l = e.emitPath),
- (c = e.range),
- (u = t),
- (p.includes(n) && 1 == i) || (f.includes(n) && !1 !== l) || (h.includes(n) && 1 == c)
- ? (Array.isArray(u) || (u = M(u) ? [] : 'json' == o ? JSON.parse(u) : (u + '').split(a) || []),
- u.forEach(function (t, e) {
- u[e] = rt(t, o);
- }),
- d.includes(n) && M(u) && s && (u = ['']))
- : (u = rt(u, o)),
- u));
- },
- getLabelText: function (t) {
- return this.validatenull(t) ? '' : 'function' == typeof this.typeformat ? this.typeformat(t, this.labelKey, this.valueKey) : t[this.labelKey];
- },
- handleFocus: function (t) {
- this.bindEvent('focus', { value: this.value, event: t });
- },
- handleBlur: function (t) {
- this.bindEvent('blur', { value: this.value, event: t });
- },
- handleClick: function (t) {
- this.bindEvent('click', { value: this.value, event: t });
- },
- handleChange: function (t) {
- var e = t;
- this.isJson
- ? (e = JSON.stringify(t))
- : (this.isString || this.isNumber || this.stringMode || 'picture-img' === this.listType) && Array.isArray(t) && (e = t.join(this.separator));
- this.bindEvent('change', { value: e }), this.$emit('input', e);
- }
- }
- };
- },
- Me = y(
- b({
- name: 'checkbox',
- props: { all: { type: Boolean, default: !1 } },
- mixins: [Ie(), Ee(), Lt],
- data: function () {
- return { checkAll: !1, isIndeterminate: !1, name: 'checkbox' };
- },
- watch: {
- dic: function () {
- this.handleCheckChange();
- },
- text: {
- handler: function (t) {
- this.handleCheckChange();
- }
- }
- },
- 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 = this.text;
- if (this.all) {
- var e = t.length,
- n = this.dic.length;
- (this.checkAll = e === n), (this.isIndeterminate = e > 0 && e < n);
- }
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- t.all
- ? e(
- 'el-checkbox',
- {
- class: t.b('all'),
- attrs: { disabled: t.disabled, indeterminate: t.isIndeterminate },
- on: { change: t.handleCheckAll },
- model: {
- value: t.checkAll,
- callback: function (e) {
- t.checkAll = e;
- },
- expression: 'checkAll'
- }
- },
- [t._v(t._s(t.t('check.checkAll')))]
- )
- : t._e(),
- t._v(' '),
- e(
- '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.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- },
- t._l(t.dic, function (n, i) {
- return e(
- t.componentName,
- { key: i, tag: 'component', attrs: { label: n[t.valueKey], border: t.border, size: t.size, readonly: t.readonly, disabled: n[t.disabledKey] } },
- [t._v(t._s(n[t.labelKey]) + '\n ')]
- );
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Le = y(
- b({
- name: 'date',
- mixins: [Ie(), Ee(), Lt],
- props: {
- editable: Boolean,
- unlinkPanels: Boolean,
- startPlaceholder: String,
- endPlaceholder: String,
- rangeSeparator: String,
- defaultValue: [String, Array],
- defaultTime: [String, Array],
- pickerOptions: Object,
- type: { type: String, default: 'date' },
- valueFormat: String,
- format: String
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e('el-date-picker', {
- attrs: {
- type: t.type,
- 'popper-class': t.popperClass,
- size: t.size,
- editable: t.editable,
- 'unlink-panels': t.unlinkPanels,
- readonly: t.readonly,
- 'default-value': t.defaultValue,
- 'default-time': t.defaultTime,
- 'range-separator': t.rangeSeparator,
- 'start-placeholder': t.startPlaceholder || t.t('date.start'),
- 'end-placeholder': t.endPlaceholder || t.t('date.end'),
- format: t.format,
- clearable: t.clearableVal,
- '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.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- })
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Ne = y(
- b({
- 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 },
- lock: { 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 {
- first: !0,
- 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 = q(t) || this.children.offsetWidth;
- },
- height: function (t) {
- this.baseHeight = q(t) || this.children.offsetHeight;
- },
- left: function (t) {
- this.baseLeft = q(t);
- },
- top: function (t) {
- this.baseTop = q(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));
- },
- baseLeft: function (t, e) {
- this.first || this.setMove(t - e, 0);
- },
- baseTop: function (t, e) {
- this.first || this.setMove(0, t - e);
- }
- },
- mounted: function () {
- this.init();
- },
- methods: {
- init: function () {
- var t = this;
- (this.children = this.$refs.item.firstChild),
- (this.baseWidth = q(this.width) || this.children.offsetWidth),
- (this.baseHeight = q(this.height) || this.children.offsetHeight),
- (this.baseLeft = q(this.left)),
- (this.baseTop = q(this.top)),
- (this.keyDown = document.onkeydown),
- this.$nextTick(function () {
- t.first = !1;
- });
- },
- setMove: function (t, e) {
- this.$emit('move', { index: this.index, left: t, top: e });
- },
- 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 && !this.lock) {
- var i, o, r, a, 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), (r = !0), (s = !0), (o = !1))
- : 'top' === e
- ? ((i = !1), (o = !0), (a = !0), (l = !0))
- : 'bottom' === e
- ? ((i = !1), (o = !0))
- : 'bottom-right' === e
- ? ((i = !0), (o = !0))
- : 'bottom-left' === e
- ? ((i = !0), (o = !0), (r = !0), (s = !0))
- : 'top-right' === e
- ? ((i = !0), (o = !0), (a = !0), (l = !0))
- : 'top-left' === e && ((i = !0), (o = !0), (r = !0), (s = !0), (a = !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), r && (n.baseLeft = q(n.baseLeft - h)), (n.baseWidth = q(n.baseWidth + h));
- }
- if (o) {
- var f = p * n.step;
- l && (f = -f), a && (n.baseTop = q(n.baseTop - f)), (n.baseHeight = q(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 && !this.lock) {
- 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,
- r = t.clientY - i;
- (n = t.clientX), (i = t.clientY), (e.baseLeft = q(e.baseLeft + o * e.step)), (e.baseTop = q(e.baseTop + r * 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 = q(e.baseTop - o))
- : i && 37 == i.keyCode
- ? (e.baseLeft = q(e.baseLeft - o))
- : i && 40 == i.keyCode
- ? (e.baseTop = q(e.baseTop + o))
- : i && 39 == i.keyCode && (e.baseLeft = q(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 });
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- '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.apply(null, arguments);
- },
- mouseover: function (e) {
- return e.stopPropagation(), t.handleOver.apply(null, arguments);
- },
- mouseout: function (e) {
- return e.stopPropagation(), t.handleOut.apply(null, arguments);
- }
- }
- },
- [
- e('el-input', {
- ref: 'input',
- class: t.b('focus'),
- model: {
- value: t.value,
- callback: function (e) {
- t.value = e;
- },
- expression: 'value'
- }
- }),
- t._v(' '),
- e(
- 'div',
- { ref: 'wrapper', class: t.b('wrapper') },
- [
- (t.active || t.overActive || t.moveActive) && !t.readonly
- ? [
- e('div', { class: t.b('line', ['left']), style: t.styleLineName }),
- t._v(' '),
- e('div', { class: t.b('line', ['top']), style: t.styleLineName }),
- t._v(' '),
- e('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 (n, i) {
- return t.readonly
- ? t._e()
- : [
- t.active
- ? e('div', {
- key: i,
- class: t.b('range', [n.classname]),
- style: [t.styleRangeName, t.getRangeStyle(n.classname)],
- on: {
- mousedown: function (e) {
- return e.stopPropagation(), t.rangeMove(e, n.classname);
- }
- }
- })
- : t._e()
- ];
- }),
- t._v(' '),
- e(
- '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(' '),
- e('div', { ref: 'item', class: t.b('item') }, [t._t('default')], 2),
- t._v(' '),
- !t.disabled && t.mask ? e('div', { class: t.b('mask') }) : t._e()
- ],
- 2
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Fe = y(
- b({
- 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', ''))
- });
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- '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 }
- },
- [
- e('div', { class: t.b('node', { active: t.active === t.node.id }) }, [
- e('div', { class: t.b('node-header') }, [e('i', { staticClass: 'el-icon-rank', class: t.b('node-drag') }), t._v(' '), t._t('header', null, { node: t.node })], 2),
- t._v(' '),
- e('div', { class: t.b('node-body') }, [t._t('default', null, { node: t.node })], 2)
- ])
- ]
- );
- },
- [],
- !1,
- null,
- null,
- null
- ),
- ze = y(
- b({
- name: 'flow',
- components: { flowNode: Fe.exports },
- data: function () {
- return {
- 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%' } },
- created: function () {
- (this.id = et()), (this.jsplumbSetting.Container = this.id);
- },
- mounted: function () {
- this.init();
- },
- computed: {
- active: {
- get: function () {
- return this.value;
- },
- set: function (t) {
- this.$emit('input', t), this.$emit('change', t);
- }
- },
- 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);
- });
- });
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e('div', { class: t.b(), style: t.styleName }, [
- e(
- 'div',
- { style: t.styleName, attrs: { id: t.id } },
- [
- e('div', { staticClass: 'avue-grid' }),
- t._v(' '),
- t._l(t.option.nodeList, function (n, i) {
- return n.display
- ? t._e()
- : e(
- 'flow-node',
- {
- key: i,
- attrs: { node: n, id: n.id, index: i, active: t.active },
- on: { changeNodeSite: t.changeNodeSite },
- nativeOn: {
- click: function (e) {
- return t.handleClick(n);
- }
- },
- scopedSlots: t._u(
- [
- {
- key: 'header',
- fn: function ({ node: e }) {
- return [t._t('header', null, { node: e })];
- }
- }
- ],
- null,
- !0
- )
- },
- [t._v(' '), t._t('default', null, { node: n })],
- 2
- );
- })
- ],
- 2
- )
- ]);
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- He = y(
- b({
- 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: {
- 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);
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return t.display
- ? e(
- 'div',
- { class: [t.b({ header: !t.isHeader, arrow: !t.arrow })] },
- [
- t._t('tabs'),
- t._v(' '),
- e(
- 'el-collapse',
- {
- attrs: { value: t.text },
- on: { change: t.handleChange },
- model: {
- value: t.activeName,
- callback: function (e) {
- t.activeName = e;
- },
- expression: 'activeName'
- }
- },
- [
- e(
- 'el-collapse-item',
- { attrs: { name: 1, disabled: !t.arrow } },
- [
- t.$slots.header && t.header
- ? e('div', { class: [t.b('header')], attrs: { slot: 'title' }, slot: 'title' }, [t._t('header')], 2)
- : (t.label || t.icon) && t.header
- ? e('div', { class: [t.b('header')], attrs: { slot: 'title' }, slot: 'title' }, [
- t.icon ? e('i', { class: [t.icon, t.b('icon')] }) : t._e(),
- t._v(' '),
- t.label ? e('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,
- Ke = { img: 'img', title: 'title', subtile: 'title', tag: 'tag', status: 'status' },
- Re = y(
- b({
- name: 'notice',
- props: {
- finish: { type: Boolean, default: !1 },
- 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 || Ke;
- },
- imgKey: function () {
- return this.props.img || Ke.img;
- },
- titleKey: function () {
- return this.props.title || Ke.title;
- },
- subtitleKey: function () {
- return this.props.subtitle || Ke.subtitle;
- },
- tagKey: function () {
- return this.props.tag || Ke.tag;
- },
- statusKey: function () {
- return this.props.status || Ke.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;
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- t._l(t.data, function (n, i) {
- return e(
- 'div',
- {
- key: i,
- class: t.b('item'),
- on: {
- click: function (e) {
- return t.click(n);
- }
- }
- },
- [
- n[t.imgKey] ? e('div', { class: t.b('img') }, [e('img', { attrs: { src: n[t.imgKey], alt: '' } })]) : t._e(),
- t._v(' '),
- e('div', { class: t.b('content') }, [
- e('div', { class: t.b('title') }, [
- e('span', { class: t.b('name') }, [t._v(t._s(n[t.titleKey]))]),
- t._v(' '),
- n[t.tagKey]
- ? e('span', { class: t.b('tag') }, [e('el-tag', { attrs: { size: 'small', type: t.getType(n[t.statusKey]) } }, [t._v(t._s(n[t.tagKey]))])], 1)
- : t._e()
- ]),
- t._v(' '),
- e('div', { class: t.b('subtitle') }, [t._v(t._s(n[t.subtitleKey]))])
- ])
- ]
- );
- }),
- t._v(' '),
- t.finish
- ? t._e()
- : e(
- '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,
- Ve = y(
- b({
- 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,
- r = e.width ? (o.height / o.width) * e.width : o.height;
- t.context.drawImage(o, e.left, e.top, n, r), 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),
- r = t.dataURLtoFile(o, e);
- clearInterval(i), n(r);
- }
- }, 1e3);
- });
- },
- downFile: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Date().getTime();
- J(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,
- r = 0,
- a = 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, a, s);
- else for (; o > 0; ) c.addImage(l, 'JPEG', 0, r, a, s), (r -= 841.89), (o -= i) > 0 && c.addPage();
- c.save(''.concat(t, '.pdf'));
- }
- }
- }),
- function () {
- var t = this._self._c;
- this._self._setupProxy;
- return t(
- 'div',
- { class: this.b(), staticStyle: { position: 'relative' } },
- [t('canvas', { ref: 'canvas', attrs: { id: 'canvas' + this.id } }), this._v(' '), this._t('default')],
- 2
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- We = y(
- b({
- name: 'progress',
- props: {
- showText: { type: Boolean },
- width: { type: [Number, String] },
- strokeWidth: { type: [Number, String] },
- type: { type: String },
- color: { type: String },
- percentage: { type: [Number] }
- }
- }),
- function () {
- var t = this._self._c;
- this._self._setupProxy;
- return t(
- 'div',
- { class: this.b() },
- [
- t('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,
- Ue = y(
- b({
- name: 'time',
- mixins: [Ie(), Ee(), Lt],
- props: {
- editable: Boolean,
- startPlaceholder: String,
- endPlaceholder: String,
- rangeSeparator: String,
- defaultValue: [String, Array],
- pickerOptions: Object,
- valueFormat: String,
- arrowControl: Boolean,
- type: String,
- format: String
- },
- watch: {
- text: function () {
- this.validatenull(this.text) && (this.text = null);
- }
- },
- computed: {
- componentName: function () {
- var t = this.pickerOptions || {};
- return t.start || t.end || t.step ? 'elTimeSelect' : 'elTimePicker';
- },
- isRange: function () {
- return 'timerange' === this.type;
- }
- },
- methods: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e(t.componentName, {
- tag: 'component',
- attrs: {
- 'popper-class': t.popperClass,
- 'is-range': t.isRange,
- size: t.size,
- editable: t.editable,
- 'default-value': t.defaultValue,
- 'range-separator': t.rangeSeparator,
- 'arrow-control': t.arrowControl,
- 'start-placeholder': t.startPlaceholder || t.t('time.start'),
- 'end-placeholder': t.endPlaceholder || t.t('time.end'),
- format: t.format,
- readonly: t.readonly,
- clearable: t.clearableVal,
- 'picker-options': t.pickerOptions,
- 'value-format': t.valueFormat,
- placeholder: t.placeholder,
- disabled: t.disabled
- },
- nativeOn: {
- click: function (e) {
- return t.handleClick.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- })
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- function Xe(t) {
- return (Xe =
- '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 Ye(t, e, n) {
- var i;
- return (
- (i = (function (t, e) {
- if ('object' != Xe(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != Xe(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(e, 'string')),
- (e = 'symbol' == Xe(i) ? i : String(i)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n),
- t
- );
- }
- var qe = y(
- b({
- name: 'input',
- mixins: [Ie(), Ee()],
- props: Ye(
- Ye(
- Ye(
- Ye(
- Ye(
- Ye(
- {
- 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 }
- },
- 'minlength',
- { type: Number }
- ),
- 'maxlength',
- { type: Number }
- ),
- 'rows',
- Number
- ),
- 'minRows',
- { type: Number, default: 5 }
- ),
- 'maxRows',
- { type: Number, default: 10 }
- ),
- 'autocomplete',
- { type: String }
- ),
- computed: {
- isSearch: function () {
- return 'search' == this.type;
- },
- typeParam: function () {
- return 'textarea' === this.type ? 'textarea' : 'password' === this.type ? 'password' : 'text';
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'el-input',
- {
- class: t.b(),
- attrs: {
- size: t.size,
- clearable: t.clearableVal,
- type: t.typeParam,
- maxlength: t.maxlength,
- minlength: t.minlength,
- 'show-password': 'password' == t.typeParam && t.showPassword,
- rows: t.rows,
- 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(t.text);
- },
- focus: t.handleFocus,
- blur: t.handleBlur
- },
- nativeOn: {
- click: function (e) {
- return t.handleClick.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- },
- [
- t.prepend
- ? e('template', { slot: 'prepend' }, [
- e(
- 'span',
- {
- on: {
- click: function (e) {
- return t.prependClick(t.text);
- }
- }
- },
- [t._v(t._s(t.prepend))]
- )
- ])
- : t._e(),
- t._v(' '),
- t.append
- ? e('template', { slot: 'append' }, [
- e(
- 'span',
- {
- on: {
- click: function (e) {
- return t.appendClick(t.text);
- }
- }
- },
- [t._v(t._s(t.append))]
- )
- ])
- : t.isSearch
- ? e('el-button', {
- attrs: { slot: 'append', icon: 'el-icon-search' },
- on: {
- click: function (e) {
- return t.appendClick(t.text);
- }
- },
- slot: 'append'
- })
- : t._e()
- ],
- 2
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Ge = y(
- b({
- name: 'radio',
- mixins: [Ie(), Ee()],
- data: function () {
- return { name: 'radio' };
- },
- props: { value: {} },
- watch: {},
- created: function () {},
- mounted: function () {},
- methods: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e(
- 'el-radio-group',
- {
- attrs: { size: t.size, disabled: t.disabled },
- nativeOn: {
- click: function (e) {
- return t.handleClick.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- },
- t._l(t.dic, function (n, i) {
- return e(t.componentName, { key: i, tag: 'component', attrs: { label: n[t.valueKey], border: t.border, readonly: t.readonly, disabled: n[t.disabledKey] } }, [
- t._v(t._s(n[t.labelKey]))
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Je = y(
- b({
- name: 'select',
- mixins: [Ie(), Ee()],
- data: function () {
- return { checked: !1, indeterminate: !1, created: !1, netDic: [], loading: !1 };
- },
- props: {
- 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 },
- all: { type: Boolean, default: !1 },
- popperAppendToBody: { type: Boolean, default: !0 }
- },
- computed: {
- classNameKey: function () {
- return this.props.className || 'className';
- }
- },
- watch: {
- text: function (t) {
- this.validatenull(t) || (this.remote && !this.created && ((this.created = !0), this.handleRemoteMethod(this.multiple ? this.text.join(',') : this.text))),
- this.multiple &&
- (0 == this.text.length
- ? ((this.checked = !1), (this.indeterminate = !1))
- : this.text.length == this.netDic.length
- ? ((this.checked = !0), (this.indeterminate = !1))
- : ((this.checked = !1), (this.indeterminate = !0)));
- },
- 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];
- window.Sortable.create(e, {
- animation: 100,
- onEnd: function (e) {
- var n = t.value.splice(e.oldIndex, 1)[0];
- t.value.splice(e.newIndex, 0, n);
- }
- });
- } else I.logs('Sortable');
- },
- handleRemoteMethod: function (t) {
- var e = this;
- (this.loading = !0),
- yt({ column: this.column, value: t }).then(function (t) {
- (e.loading = !1), (e.netDic = t);
- });
- },
- checkChange: function (t) {
- var e = this;
- (this.text = []),
- (this.checked = t),
- (this.indeterminate = !1),
- t &&
- (this.text = this.netDic.map(function (t) {
- return t[e.valueKey];
- }));
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- '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.remote ? t.handleRemoteMethod : void 0,
- 'popper-class': t.popperClass,
- 'popper-append-to-body': t.popperAppendToBody,
- 'collapse-tags': t.tags,
- clearable: t.clearableVal,
- 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.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- },
- [
- t.group
- ? t._l(t.netDic, function (n, i) {
- return e(
- 'el-option-group',
- { key: i, attrs: { label: t.getLabelText(n) } },
- t._l(n[t.groupsKey], function (n, i) {
- return e(
- 'el-option',
- { key: n[t.valueKey], class: n[t.classNameKey], attrs: { disabled: n[t.disabledKey], label: t.getLabelText(n), value: n[t.valueKey] } },
- [
- t.$scopedSlots.default
- ? t._t('default', null, { label: t.labelKey, value: t.valueKey, item: n })
- : [e('span', [t._v(t._s(t.getLabelText(n)))]), t._v(' '), n[t.descKey] ? e('span', { class: t.b('desc') }, [t._v(t._s(n[t.descKey]))]) : t._e()]
- ],
- 2
- );
- }),
- 1
- );
- })
- : [
- t.all && t.multiple
- ? e(
- 'el-checkbox',
- {
- class: t.b('check'),
- attrs: { value: t.checked, checked: t.checked, disabled: t.disabled, indeterminate: t.indeterminate },
- on: { change: t.checkChange }
- },
- [t._v('全选')]
- )
- : t._e(),
- t._v(' '),
- t._l(t.netDic, function (n, i) {
- return e(
- 'el-option',
- { key: n[t.valueKey], class: n[t.classNameKey], attrs: { disabled: n[t.disabledKey], label: t.getLabelText(n), value: n[t.valueKey] } },
- [
- t.$scopedSlots.default
- ? t._t('default', null, { label: t.labelKey, value: t.valueKey, item: n })
- : [e('span', [t._v(t._s(t.getLabelText(n)))]), t._v(' '), n[t.descKey] ? e('span', { class: t.b('desc') }, [t._v(t._s(n[t.descKey]))]) : t._e()]
- ],
- 2
- );
- })
- ]
- ],
- 2
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- function Qe(t) {
- return (Qe =
- '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 Ze(t, e, n) {
- var i;
- return (
- (i = (function (t, e) {
- if ('object' != Qe(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != Qe(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(e, 'string')),
- (e = 'symbol' == Qe(i) ? i : String(i)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n),
- t
- );
- }
- var tn = y(
- b({
- name: 'cascader',
- mixins: [Ie(), Ee()],
- props: {
- checkStrictly: { type: Boolean, default: !1 },
- emitPath: { type: Boolean, default: !0 },
- tags: { 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 },
- separator: { type: String }
- },
- data: function () {
- return {};
- },
- computed: {
- allProps: function () {
- var t = this;
- return Ze(
- {
- label: this.labelKey,
- value: this.valueKey,
- disabled: this.disabledKey,
- children: this.childrenKey,
- checkStrictly: this.checkStrictly,
- multiple: this.multiple,
- emitPath: this.emitPath,
- expandTrigger: this.props.expandTrigger,
- hoverThreshold: this.props.hoverThreshold,
- leaf: this.leafKey,
- 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: {
- handleValueChange: function (t) {
- var e = this;
- setTimeout(function () {
- var n = e.$parent.$parent;
- !e.validatenull(t) && n && e.rules && n.clearValidate && n.clearValidate();
- });
- },
- getCheckedNodes: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
- return this.$refs.cascader.getCheckedNodes(t);
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e('el-cascader', {
- ref: 'cascader',
- attrs: {
- options: t.dic,
- placeholder: t.placeholder,
- props: t.allProps,
- size: t.size,
- clearable: t.clearableVal,
- 'show-all-levels': t.showAllLevels,
- filterable: t.filterable,
- 'popper-class': t.popperClass,
- separator: t.separator,
- disabled: t.disabled,
- 'collapse-tags': t.tags
- },
- on: { focus: t.handleFocus, blur: t.handleBlur, change: t.handleValueChange },
- nativeOn: {
- click: function (e) {
- return t.handleClick.apply(null, arguments);
- }
- },
- scopedSlots: t._u(
- [
- {
- key: 'default',
- fn: function ({ data: n, node: i }) {
- return [t.$scopedSlots.default ? t._t('default', null, { data: n, node: i }) : e('span', [t._v(t._s(n[t.labelKey]))])];
- }
- }
- ],
- null,
- !0
- ),
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- });
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- en = y(
- b({
- name: 'input-color',
- mixins: [Ie(), Ee()],
- props: {
- prefixIcon: { type: String },
- suffixIcon: { type: String },
- colorFormat: String,
- predefine: {
- type: Array,
- default: function () {
- return [
- '#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)'
- ];
- }
- },
- showAlpha: { type: Boolean, default: !0 }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e(
- 'el-input',
- {
- ref: 'main',
- attrs: {
- 'prefix-icon': t.prefixIcon,
- 'suffix-icon': t.suffixIcon,
- placeholder: t.placeholder,
- size: t.size,
- readonly: t.readonly,
- clearable: t.clearableVal,
- disabled: t.disabled
- },
- nativeOn: {
- click: function (e) {
- return t.handleClick.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- },
- [
- e(
- 'template',
- { slot: 'append' },
- [
- e('el-color-picker', {
- attrs: {
- size: 'mini',
- 'popper-class': t.popperClass,
- 'color-format': t.colorFormat,
- disabled: t.disabled,
- 'show-alpha': t.showAlpha,
- predefine: t.predefine
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- })
- ],
- 1
- )
- ],
- 2
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- nn = y(
- b({
- name: 'input-number',
- mixins: [Ie(), Ee()],
- data: function () {
- return {};
- },
- props: {
- stepStrictly: { type: Boolean, default: !1 },
- controls: { type: Boolean, default: !0 },
- step: { type: Number, default: 1 },
- controlsPosition: { type: String, default: 'right' },
- precision: { type: Number },
- min: { type: Number, default: -1 / 0 },
- max: { type: Number, default: 1 / 0 }
- },
- created: function () {},
- mounted: function () {},
- methods: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e('el-input-number', {
- class: t.b(),
- attrs: {
- precision: t.precision,
- placeholder: t.placeholder,
- 'step-strictly': t.stepStrictly,
- size: t.size,
- min: t.min,
- max: t.max,
- step: t.step,
- clearable: t.clearableVal,
- 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.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = t._n(e);
- },
- expression: 'text'
- }
- });
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- on = y(
- b({
- name: 'input-tree',
- mixins: [Ie(), Ee()],
- data: function () {
- return { node: [], filterValue: '', box: !1, dicList: [] };
- },
- props: {
- indent: Number,
- filterNodeMethod: Function,
- nodeClick: Function,
- treeLoad: Function,
- checked: Function,
- lazy: { type: Boolean, default: !1 },
- leafOnly: { type: Boolean, default: !0 },
- tags: { type: Boolean, default: !1 },
- limit: { type: Number, 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 },
- iconClass: String,
- defaultExpandedKeys: Array,
- checkOnClickNode: Boolean,
- expandOnClickNode: Boolean,
- defaultExpandAll: Boolean,
- popperAppendToBody: { type: Boolean, default: !0 }
- },
- watch: {
- text: function (t) {
- this.init();
- },
- dic: {
- handler: function (t) {
- this.dicList = t;
- },
- immediate: !0
- },
- dicList: {
- handler: function () {
- this.init();
- },
- immediate: !0
- },
- filterValue: function (t) {
- this.$refs.tree.filter(t);
- }
- },
- computed: {
- treeProps: function () {
- return Object.assign(this.props, { isLeaf: this.leafKey });
- },
- currentNodeKey: function () {
- return this.multiple ? '' : this.text;
- },
- keysList: function () {
- return this.multiple ? this.text : [this.text || ''];
- },
- labelShow: function () {
- var t = this,
- e = [];
- return (
- this.keysList.forEach(function (n) {
- var i = t.node.find(function (e) {
- return e[t.valueKey] == n;
- });
- i || (((i = {})[t.labelKey] = n), (i[t.valueKey] = n)), e.push(t.getLabelText(i));
- }),
- e
- );
- }
- },
- methods: {
- removeTag: function (t) {
- var e = this,
- n = this.node.findIndex(function (n) {
- return n[e.labelKey] == t;
- });
- -1 != n && (this.$refs.tree.setChecked(this.node[n][this.valueKey]), this.text.splice(n, 1));
- },
- handleClear: function () {
- (this.text = this.multiple ? [] : ''), (this.node = []), (this.filterValue = ''), this.$refs.tree.setCurrentKey(null), this.$refs.tree.setCheckedKeys([]);
- },
- 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.dicList, t.key, i),
- e(i);
- });
- },
- filterNode: function (t, e) {
- return 'function' == typeof this.filterNodeMethod ? this.filterNodeMethod(t, e) : !t || -1 !== e[this.labelKey].toLowerCase().indexOf(t.toLowerCase());
- },
- checkChange: function (t, e, n, i) {
- var o = this;
- this.text.splice(0, this.text.length);
- var r = !this.checkStrictly && this.leafOnly;
- this.$refs.tree.getCheckedNodes(r, !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))
- if (t.validatenull(t.text)) t.$refs.tree.setCheckedKeys([]);
- else {
- var e = !t.checkStrictly && t.leafOnly;
- t.$refs.tree.getCheckedNodes(e, !1).forEach(function (e) {
- t.node.push(e);
- });
- }
- else {
- var n = t.$refs.tree.getNode(t.text || '');
- if (n) {
- var i = n.data;
- t.$refs.tree.setCurrentKey(i[t.valueKey]), t.node.push(i);
- }
- }
- }),
- 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));
- });
- },
- 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())));
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- '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.clearableVal,
- placeholder: t.placeholder,
- 'popper-class': t.popperClass,
- 'popper-append-to-body': t.popperAppendToBody,
- disabled: t.disabled
- },
- on: { click: t.handleClick, 'remove-tag': t.removeTag, focus: t.handleFocus, blur: t.handleBlur, clear: t.handleClear }
- },
- [
- t.filter
- ? e(
- 'div',
- { class: t.b('filter') },
- [
- e('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(' '),
- e(
- 'el-option',
- { attrs: { value: t.text } },
- [
- e('el-tree', {
- ref: 'tree',
- class: t.b('select'),
- attrs: {
- data: t.dicList,
- lazy: t.lazy,
- load: t.handleTreeLoad,
- 'node-key': t.valueKey,
- accordion: t.accordion,
- 'icon-class': t.iconClass,
- indent: t.indent,
- 'show-checkbox': t.multiple,
- props: t.treeProps,
- 'check-strictly': t.checkStrictly,
- 'highlight-current': 1 != t.multiple,
- 'current-node-key': t.currentNodeKey,
- 'filter-node-method': t.filterNode,
- 'default-checked-keys': t.keysList,
- 'default-expanded-keys': t.defaultExpandedKeys ? t.defaultExpandedKeys : t.keysList,
- 'default-expand-all': t.defaultExpandAll,
- 'check-on-click-node': t.checkOnClickNode,
- 'expand-on-click-node': t.expandOnClickNode
- },
- on: {
- check: t.checkChange,
- 'node-click': function (e) {
- return e.target !== e.currentTarget ? null : t.handleNodeClick.apply(null, arguments);
- }
- },
- scopedSlots: t._u(
- [
- {
- key: 'default',
- fn: function ({ data: n }) {
- return e(
- 'div',
- { class: t.b('item') },
- [
- t.$scopedSlots.default
- ? t._t('default', null, { label: t.labelKey, value: t.valueKey, item: n })
- : [
- e('span', { class: { 'avue--disabled': n[t.disabledKey] } }, [t._v(t._s(n[t.labelKey]))]),
- t._v(' '),
- n[t.descKey] ? e('span', { class: t.b('desc') }, [t._v(t._s(n[t.descKey]))]) : t._e()
- ]
- ],
- 2
- );
- }
- }
- ],
- null,
- !0
- )
- })
- ],
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- rn = y(
- b({
- name: 'input-map',
- mixins: [Ie(), Ee(), Lt],
- props: {
- beforeClose: Function,
- mapChange: Function,
- prefixIcon: { type: String },
- suffixIcon: { type: String },
- dialogWidth: { type: String, default: '80%' },
- rows: Number,
- minRows: { type: Number, default: 1 },
- maxRows: { type: Number }
- },
- 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 = {}), (this.address = ''));
- },
- 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) {
- n.mapChange && n.mapChange(o);
- var r = o.regeocode;
- n.poi = Object.assign(r, { longitude: t, latitude: e });
- var a = document.createElement('div'),
- s = document.createElement('img');
- (s.src = '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png'), a.appendChild(s);
- var l = document.createElement('span');
- (l.className = 'avue-input-map__marker'), (l.innerHTML = n.poi.formattedAddress), a.appendChild(l), n.marker.setContent(a);
- }
- });
- });
- },
- 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.lat,
- o = n.lng;
- 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())
- : I.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);
- })
- : I.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;
- console.log(o),
- (e.poi = Object.assign(o, { formattedAddress: o.name, longitude: o.location.lng, latitude: o.location.lat })),
- 'search' !== i && t.searchByKeyword(o.name);
- });
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e('el-input', {
- ref: 'main',
- attrs: {
- 'prefix-icon': t.prefixIcon,
- 'suffix-icon': t.suffixIcon,
- size: t.size,
- clearable: t.clearableVal,
- rows: t.rows,
- autosize: { minRows: t.minRows, maxRows: t.maxRows },
- disabled: t.disabled,
- type: 'textarea',
- placeholder: t.placeholder
- },
- on: { clear: t.handleClear, focus: t.handleShow },
- nativeOn: {
- click: function (e) {
- return t.handleClick.apply(null, arguments);
- }
- },
- model: {
- value: t.address,
- callback: function (e) {
- t.address = e;
- },
- expression: 'address'
- }
- }),
- t._v(' '),
- t.box
- ? e(
- 'div',
- [
- e(
- 'el-dialog',
- {
- staticClass: 'avue-dialog avue-dialog--none',
- attrs: {
- width: t.setPx(t.dialogWidth),
- 'before-close': t.beforeClose,
- 'modal-append-to-body': t.$AVUE.modalAppendToBody,
- 'append-to-body': t.$AVUE.appendToBody,
- title: t.placeholder,
- visible: t.box
- },
- on: {
- close: t.handleClose,
- 'update:visible': function (e) {
- t.box = e;
- }
- }
- },
- [
- t.box
- ? e(
- 'div',
- { class: t.b('content') },
- [
- e('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(' '),
- e('div', { class: t.b('content-box') }, [
- e('div', { class: t.b('content-container'), attrs: { id: 'map__container', tabindex: '0' } }),
- t._v(' '),
- e('div', { class: t.b('content-result'), attrs: { id: 'map__result' } })
- ])
- ],
- 1
- )
- : t._e(),
- t._v(' '),
- e(
- 'span',
- { staticClass: 'dialog-footer', attrs: { slot: 'footer' }, slot: 'footer' },
- [
- t.disabled || t.readonly
- ? t._e()
- : e('el-button', { attrs: { type: 'primary', size: t.size, icon: 'el-icon-check' }, on: { click: t.handleSubmit } }, [
- t._v(t._s(t.t('common.submitBtn')))
- ])
- ],
- 1
- )
- ]
- )
- ],
- 1
- )
- : t._e()
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- an = y(
- b({
- name: 'input-icon',
- components: { iconTemp: ne },
- mixins: [Ie(), Ee(), Lt],
- props: {
- beforeClose: Function,
- prefixIcon: { type: String },
- suffixIcon: { type: String },
- dialogWidth: { type: String, default: '80%' },
- iconList: {
- type: Array,
- default: function () {
- return [];
- }
- }
- },
- data: function () {
- return { filterText: '', box: !1, tabs: {} };
- },
- computed: {
- list: function () {
- var t = this,
- e = this.tabs.list.map(function (t) {
- return t.value || t.label ? t : { label: t, value: t };
- });
- return (
- this.filterText &&
- (e = e.filter(function (e) {
- return -1 !== e.label.indexOf(t.filterText);
- })),
- e
- );
- },
- 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.tabs = this.iconList[0]), (this.box = !0));
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e(
- 'el-input',
- {
- ref: 'main',
- attrs: { 'prefix-icon': t.prefixIcon, 'suffix-icon': t.suffixIcon, placeholder: t.placeholder, size: t.size, clearable: t.clearableVal, disabled: t.disabled },
- on: { focus: t.handleShow },
- nativeOn: {
- click: function (e) {
- return t.handleClick.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- },
- [e('icon-temp', { attrs: { slot: 'append', text: t.text, size: 28, small: 'mini' == t.size }, on: { click: t.handleShow }, slot: 'append' })],
- 1
- ),
- t._v(' '),
- t.box
- ? e(
- 'div',
- [
- e(
- 'el-dialog',
- {
- staticClass: 'avue-dialog avue-dialog--none',
- attrs: {
- title: t.placeholder,
- 'before-close': t.beforeClose,
- 'modal-append-to-body': t.$AVUE.modalAppendToBody,
- 'append-to-body': t.$AVUE.appendToBody,
- visible: t.box,
- width: t.setPx(t.dialogWidth)
- },
- on: {
- 'update:visible': function (e) {
- t.box = e;
- }
- }
- },
- [
- e(
- 'div',
- { class: t.b('filter') },
- [
- e('el-input', {
- attrs: { placeholder: t.vaildData(t.option.filterText, t.t('tip.input')), size: t.size },
- model: {
- value: t.filterText,
- callback: function (e) {
- t.filterText = e;
- },
- expression: 'filterText'
- }
- })
- ],
- 1
- ),
- t._v(' '),
- e('avue-tabs', { attrs: { option: t.option }, on: { change: t.handleTabs } }),
- t._v(' '),
- e(
- 'div',
- { class: t.b('list') },
- t._l(t.list, function (n, i) {
- return e(
- 'div',
- {
- key: i,
- class: t.b('item', { active: t.text === n }),
- on: {
- click: function (e) {
- return t.handleSubmit(n.value);
- }
- }
- },
- [e('icon-temp', { attrs: { text: n.value, small: 'mini' == t.size } }), t._v(' '), e('p', [t._v(t._s(n.label || n.value))])],
- 1
- );
- }),
- 0
- )
- ],
- 1
- )
- ],
- 1
- )
- : t._e()
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- sn = y(
- b({
- name: 'input-table',
- mixins: [Ie(), Ee(), Lt],
- data: function () {
- return { object: [], active: [], search: {}, page: {}, loading: !1, box: !1, created: !1, data: [] };
- },
- props: {
- beforeClose: Function,
- prefixIcon: { type: String },
- suffixIcon: { type: String },
- formatter: Function,
- onLoad: Function,
- children: {
- type: Object,
- default: function () {
- return {};
- }
- },
- dialogWidth: { type: String, default: '80%' }
- },
- watch: {
- value: function (t) {
- this.validatenull(t) && ((this.active = []), (this.object = []));
- },
- text: function (t) {
- var e = this;
- this.created ||
- this.validatenull(t) ||
- ('function' == typeof this.onLoad &&
- this.onLoad({ value: this.text }, function (t) {
- var n = Array.isArray(t) ? t : [t];
- (e.active = n), (e.object = n), (e.created = !0);
- }));
- }
- },
- computed: {
- isMultiple: function () {
- return this.multiple;
- },
- title: function () {
- return this.disabled || this.readonly ? '查看' : '选择';
- },
- labelShow: function () {
- var t = this;
- return 'function' == typeof this.formatter
- ? this.formatter(this.isMultiple ? this.object : this.object[0] || {})
- : this.object
- .map(function (e) {
- return e[t.labelKey];
- })
- .join(',');
- },
- option: function () {
- return Object.assign(
- {
- menu: !1,
- header: !1,
- size: this.size,
- headerAlign: 'center',
- align: 'center',
- highlightCurrentRow: !this.isMultiple,
- reserveSelection: this.isMultiple,
- selection: this.isMultiple,
- selectable: function (t, e) {
- return !t.disabled;
- }
- },
- this.children
- );
- }
- },
- methods: {
- handleSelectionAllChange: function (t) {
- var e = this,
- n = this.data.map(function (t) {
- return t[e.valueKey];
- }),
- i = t.filter(function (t) {
- return n.includes(t[e.valueKey]);
- });
- this.data.forEach(function (t) {
- var n = e.active.findIndex(function (n) {
- return n[e.valueKey] == t[e.valueKey];
- });
- 0 == i.length ? -1 != n && e.active.splice(n, 1) : -1 == n && e.active.push(t);
- });
- },
- handleSelectionChange: function (t, e) {
- var n = this;
- if (
- t.find(function (t) {
- return t[n.valueKey] == e[n.valueKey];
- })
- )
- this.active.push(e);
- else {
- var i = this.active.findIndex(function (t) {
- return t[n.valueKey] == e[n.valueKey];
- });
- -1 != i && this.active.splice(i, 1);
- }
- },
- handleClear: function () {
- (this.active = []), this.setVal();
- },
- handleShow: function () {
- this.$refs.main.blur(), this.disabled || this.readonly || ((this.search = {}), (this.page = { currentPage: 1, total: 0 }), (this.data = []), (this.box = !0));
- },
- setVal: function () {
- var t = this;
- (this.object = this.active),
- (this.text = this.active.map(function (e) {
- return e[t.valueKey];
- })),
- (this.box = !1);
- },
- handleRowClassName: function (t) {
- var e = t.row;
- t.rowIndex;
- if (e[this.disabledKey]) return 'disabled';
- },
- handleCurrentRowChange: function (t) {
- t && (this.isMultiple ? this.$refs.crud.setCurrentRow(null) : t[this.disabledKey] ? this.$refs.crud.setCurrentRow(this.active[0]) : (this.active = [t]));
- },
- handleSearchChange: function (t, e) {
- (this.loading = !0),
- (this.page.currentPage = 1),
- this.onList({}, function () {
- e && e();
- });
- },
- onList: function (t, e) {
- var n = this;
- (this.loading = !0),
- 'function' == typeof this.onLoad &&
- this.onLoad({ page: this.page, data: this.search }, function (t) {
- if ((e && e(), (n.page.total = t.total), (n.data = t.data), (n.loading = !1), n.isMultiple)) {
- var i = n.object.map(function (t) {
- return t[n.valueKey];
- }),
- o = n.data.filter(function (t) {
- return i.includes(t[n.valueKey]);
- });
- n.$nextTick(function () {
- n.$refs.crud.toggleSelection(o, !0);
- });
- } else {
- var r = n.data.find(function (t) {
- return t[n.valueKey] == n.text;
- });
- setTimeout(function () {
- return n.$refs.crud.setCurrentRow(r);
- });
- }
- });
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e('el-input', {
- ref: 'main',
- attrs: {
- 'prefix-icon': t.prefixIcon,
- 'suffix-icon': t.suffixIcon,
- size: t.size,
- value: t.labelShow,
- clearable: t.clearableVal,
- placeholder: t.placeholder,
- disabled: t.disabled
- },
- on: { clear: t.handleClear, focus: t.handleShow },
- nativeOn: {
- click: function (e) {
- return t.handleClick.apply(null, arguments);
- }
- }
- }),
- t._v(' '),
- t.box
- ? e(
- 'div',
- [
- e(
- 'el-dialog',
- {
- staticClass: 'avue-dialog avue-dialog--none',
- class: t.b(),
- attrs: {
- width: t.setPx(t.dialogWidth),
- 'before-close': t.beforeClose,
- 'modal-append-to-body': t.$AVUE.modalAppendToBody,
- 'append-to-body': t.$AVUE.appendToBody,
- title: t.placeholder,
- visible: t.box
- },
- on: {
- 'update:visible': function (e) {
- t.box = e;
- }
- }
- },
- [
- t.box
- ? e('avue-crud', {
- ref: 'crud',
- class: t.b('crud'),
- attrs: { option: t.option, data: t.data, 'table-loading': t.loading, rowClassName: t.handleRowClassName, search: t.search, page: t.page },
- on: {
- 'on-load': t.onList,
- 'search-change': t.handleSearchChange,
- 'select-all': t.handleSelectionAllChange,
- select: t.handleSelectionChange,
- 'search-reset': t.handleSearchChange,
- 'current-row-change': t.handleCurrentRowChange,
- 'update:search': function (e) {
- t.search = e;
- },
- 'update:page': function (e) {
- t.page = e;
- }
- }
- })
- : t._e(),
- t._v(' '),
- e(
- 'span',
- { staticClass: 'dialog-footer', attrs: { slot: 'footer' }, slot: 'footer' },
- [e('el-button', { attrs: { type: 'primary', size: t.size, icon: 'el-icon-check' }, on: { click: t.setVal } }, [t._v(t._s(t.t('common.submitBtn')))])],
- 1
- )
- ],
- 1
- )
- ],
- 1
- )
- : t._e()
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- ln = y(
- b({
- name: 'verify',
- props: { size: { type: [Number, String], default: 50 }, value: [Number, String], len: { type: [Number, String], default: 6 } },
- computed: {
- data: {
- get: function () {
- return this.value || '';
- },
- set: function (t) {
- var e = t + '';
- this.$emit('input', e), this.$emit('change', e);
- }
- },
- 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('');
- }
- },
- created: function () {
- this.randomn();
- },
- 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;
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- t._l(t.list, function (n, i) {
- return e('span', { key: i, class: t.b('item'), style: t.styleName }, [t._v('\n ' + t._s(n) + '\n ')]);
- }),
- 0
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- cn = y(
- b({
- name: 'switch',
- mixins: [Ie(), Ee()],
- 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: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return 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.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- });
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- un = y(
- b({
- name: 'rate',
- mixins: [Ie(), Ee()],
- props: {
- allowHalf: Boolean,
- lowThreshold: Number,
- highThreshold: Number,
- disabledVoidColor: String,
- disabledVoidIconClass: String,
- value: { type: Number, default: 0 },
- colors: { type: Array },
- max: { type: Number, default: 5 },
- iconClasses: { type: Array },
- texts: { type: Array },
- scoreTemplate: String,
- showScore: { type: Boolean, default: !1 },
- showText: { type: Boolean, default: !1 },
- voidIconClass: { type: String }
- },
- data: function () {
- return {};
- },
- watch: {},
- created: function () {},
- mounted: function () {},
- methods: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e('el-rate', {
- attrs: {
- max: t.max,
- 'low-threshold': t.lowThreshold,
- 'high-threshold': t.highThreshold,
- 'disabled-void-color': t.disabledVoidColor,
- 'disabled-void-icon-class': t.disabledVoidIconClass,
- 'allow-half': t.allowHalf,
- readonly: t.readonly,
- texts: t.texts,
- 'show-score': t.showScore,
- 'score-template': t.scoreTemplate,
- 'show-text': t.showText,
- 'icon-classes': t.iconClasses,
- 'void-icon-class': t.voidIconClass,
- disabled: t.disabled,
- colors: t.colors
- },
- nativeOn: {
- click: function (e) {
- return t.handleClick.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- });
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- function dn(t) {
- return (dn =
- '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 pn(t, e) {
- if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function');
- }
- function hn(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, fn(i.key), i);
- }
- }
- function fn(t) {
- var e = (function (t, e) {
- if ('object' != dn(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != dn(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(t, 'string');
- return 'symbol' == dn(e) ? e : String(e);
- }
- var mn = (function () {
- function t() {
- var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
- pn(this, t),
- (this.CONTAINERID = et()),
- (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 = Object.assign(
- { width: 400, height: 200, text: 'avueJS', fontSize: '30px', fontStyle: '黑体', textAlign: 'center', color: 'rgba(100,100,100,0.15)', degree: -20 },
- t
- );
- }
- },
- {
- 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.width),
- (e.height = this.option.height),
- (n.font = ''.concat(this.option.fontSize, ' ').concat(this.option.fontStyle)),
- (n.textAlign = this.option.textAlign),
- (n.fillStyle = this.option.color),
- 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,
- o = e.toDataURL('image/png'),
- r = this.option.id;
- r && (i = document.getElementById(r)),
- (this.styleStr = '\n position:'
- .concat(r ? 'absolute' : 'fixed', ';\n top:0;\n left:0;\n width:')
- .concat(r ? i.offsetWidth + 'px' : '100%', ';\n height:')
- .concat(r ? i.offsetHeight + 'px' : '100%', ";\n z-index:9999;\n pointer-events:none;\n background-repeat:repeat;\n background-image:url('")
- .concat(o, "')")),
- t.setAttribute('style', this.styleStr),
- r ? document.getElementById(r).appendChild(t) : 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);
- }
- }
- ]) && hn(e.prototype, n),
- i && hn(e, i),
- Object.defineProperty(e, 'prototype', { writable: !1 }),
- t
- );
- })();
- function vn(t, e) {
- var n = new FileReader();
- n.readAsDataURL(t),
- (n.onload = function (t) {
- e(t.target.result);
- });
- }
- var bn,
- yn,
- gn = 200,
- xn = 200,
- wn = { text: 'avueJS', fontFamily: 'microsoft yahei', color: '#999', fontSize: 16, opacity: 100, bottom: 10, right: 10, ratio: 1 };
- function _n(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- return new Promise(function (n, i) {
- var o = e.text,
- r = e.fontFamily,
- a = e.color,
- s = e.fontSize,
- l = e.opacity,
- c = e.bottom,
- u = e.right,
- d = e.ratio;
- (wn.text = o || wn.text),
- (wn.fontFamily = r || wn.fontFamily),
- (wn.color = a || wn.color),
- (wn.fontSize = s || wn.fontSize),
- (wn.opacity = l || wn.opacity),
- (wn.bottom = c || wn.bottom),
- (wn.right = u || wn.right),
- (wn.ratio = d || wn.ratio),
- vn(t, function (e) {
- var i = new Image();
- (i.src = e),
- (i.onload = function () {
- var e = i.width,
- o = i.height;
- !(function (t, e) {
- null === (bn = document.getElementById('canvas')) &&
- (((bn = document.createElement('canvas')).id = 'canvas'), (bn.className = 'avue-canvas'), document.body.appendChild(bn));
- (yn = bn.getContext('2d')), (bn.width = t), (bn.height = e);
- })(e, o),
- yn.drawImage(i, 0, 0, e, o),
- (function (t, e) {
- var n = wn.text,
- i = (function (t, e, n) {
- var i,
- o,
- r = (wn.fontSize / gn) * e;
- o = wn.bottom ? xn - wn.bottom : wn.top;
- i = wn.right ? gn - wn.right : wn.left;
- yn.font = wn.fontSize + 'px ' + wn.fontFamily;
- var a = Number(yn.measureText(t).width);
- return { x: (i = ((i = i - a) / gn) * e), y: (o = (o / xn) * n), fontSize: r };
- })(n, t, e);
- (yn.font = i.fontSize + 'px ' + wn.fontFamily), (yn.fillStyle = wn.color), (yn.globalAlpha = wn.opacity / 100), yn.fillText(n, i.x, i.y);
- })(e, o),
- n(Z(document.getElementById('canvas').toDataURL(t.type, wn.ratio), t.name));
- });
- });
- });
- }
- var Sn = function (t, e, n) {
- var i = (function (t) {
- var e, n, i, o, r, a;
- (i = t.length), (n = 0), (e = '');
- for (; n < i; ) {
- if (((o = 255 & t.charCodeAt(n++)), n == i)) {
- (e += Cn.charAt(o >> 2)), (e += Cn.charAt((3 & o) << 4)), (e += '==');
- break;
- }
- if (((r = t.charCodeAt(n++)), n == i)) {
- (e += Cn.charAt(o >> 2)), (e += Cn.charAt(((3 & o) << 4) | ((240 & r) >> 4))), (e += Cn.charAt((15 & r) << 2)), (e += '=');
- break;
- }
- (a = t.charCodeAt(n++)),
- (e += Cn.charAt(o >> 2)),
- (e += Cn.charAt(((3 & o) << 4) | ((240 & r) >> 4))),
- (e += Cn.charAt(((15 & r) << 2) | ((192 & a) >> 6))),
- (e += Cn.charAt(63 & a));
- }
- 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 + ':' + kn(o) + ':' + i;
- };
- var Cn = '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 kn = function (t) {
- return (t = (t = t.replace(/\+/g, '-')).replace(/\//g, '_'));
- };
- function On(t, e) {
- var n = Object.keys(t);
- if (Object.getOwnPropertySymbols) {
- var i = Object.getOwnPropertySymbols(t);
- e &&
- (i = i.filter(function (e) {
- return Object.getOwnPropertyDescriptor(t, e).enumerable;
- })),
- n.push.apply(n, i);
- }
- return n;
- }
- function $n(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = null != arguments[e] ? arguments[e] : {};
- e % 2
- ? On(Object(n), !0).forEach(function (e) {
- Pn(t, e, n[e]);
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
- : On(Object(n)).forEach(function (e) {
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e));
- });
- }
- return t;
- }
- function Pn(t, e, n) {
- var i;
- return (
- (i = (function (t, e) {
- if ('object' != Tn(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != Tn(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(e, 'string')),
- (e = 'symbol' == Tn(i) ? i : String(i)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n),
- t
- );
- }
- function Tn(t) {
- return (Tn =
- '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 jn(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : '';
- return e.match(/(^http:\/\/|^https:\/\/|^\/\/|data:image\/)/) ? e : t + e;
- }
- function Bn(t) {
- return 'ready' === t.status;
- }
- var An = y(
- b({
- name: 'upload',
- mixins: [Ie(), Ee(), Lt],
- data: function () {
- return { uploadCacheList: [], uploadList: [], res: '', menu: !1, reload: Math.random() };
- },
- props: {
- qiniu: Object,
- ali: Object,
- data: {
- type: Object,
- default: function () {
- return {};
- }
- },
- paramsList: {
- type: Array,
- default: function () {
- return [];
- }
- },
- showFileList: { type: Boolean, default: !0 },
- fileText: String,
- fileType: { type: String },
- oss: { type: String },
- limit: { type: Number },
- headers: {
- type: Object,
- default: function () {
- return {};
- }
- },
- accept: { type: [String, Array], default: '' },
- canvasOption: {
- type: Object,
- default: function () {
- return {};
- }
- },
- cropperOption: {
- type: Object,
- default: function () {
- return {};
- }
- },
- fileSize: { type: Number },
- dragFile: { type: Boolean, default: !1 },
- drag: { type: Boolean, default: !1 },
- loadText: { type: String, default: 'Loading...' },
- action: { type: String, default: '' },
- uploadSized: Function,
- uploadBefore: Function,
- uploadAfter: Function,
- uploadDelete: Function,
- uploadPreview: Function,
- uploadError: Function,
- uploadExceed: Function,
- httpRequest: Function
- },
- computed: {
- isObject: function () {
- return 'object' === Tn(this.text[0]) || 'object' == this.dataType || this.isJson;
- },
- acceptList: function () {
- return Array.isArray(this.accept) ? this.accept.join(',') : this.accept;
- },
- homeUrl: function () {
- return this.propsHttp.home || '';
- },
- fileName: function () {
- return this.propsHttp.fileName || 'file';
- },
- isCosOss: function () {
- return 'cos' === this.oss;
- },
- isAliOss: function () {
- return 'ali' === this.oss;
- },
- isQiniuOss: function () {
- return 'qiniu' === this.oss;
- },
- isPictureImg: function () {
- return 'picture-img' === this.listType;
- },
- firstFile: function () {
- return this.fileList[0] || {};
- },
- fileList: function () {
- var t = this,
- e = [];
- return (
- this.text.forEach(function (n, i) {
- if (n) {
- var o = (function (e) {
- var n, i, o;
- return (
- t.isObject
- ? ((n = e[t.labelKey]), (i = e[t.valueKey]), (o = e[t.typeKey] || t.isMediaType(i)))
- : ((n = e.substring(e.lastIndexOf('/') + 1)), (i = e), (o = t.isMediaType(i))),
- { name: n, url: (i = jn(t.homeUrl, i)), type: o }
- );
- })(n),
- r = o.name,
- a = o.url,
- s = o.type;
- e.push({ uid: i + '', status: 'done', type: s, name: r, url: a });
- }
- }),
- e.concat(this.uploadList)
- );
- }
- },
- mounted: function () {
- this.drag && this.setSort();
- },
- methods: {
- handleMouseover: function () {
- this.menu = !0;
- },
- handleMouseout: function () {
- this.menu = !1;
- },
- showProgress: function (t) {
- return Bn(t) && !this.oss;
- },
- isMediaType: function (t) {
- return X(t, this.fileType);
- },
- setSort: function () {
- var t = this;
- if (window.Sortable) {
- var e = this.$el.querySelectorAll('.avue-upload > ul')[0];
- window.Sortable.create(e, {
- animation: 100,
- onEnd: function (e) {
- var n = t.text.splice(e.oldIndex, 1)[0];
- t.text.splice(e.newIndex, 0, n),
- (t.reload = Math.random()),
- t.$nextTick(function () {
- return t.setSort();
- });
- }
- });
- } else I.logs('Sortable');
- },
- handleError: function (t) {
- t && this.uploadError && this.uploadError(t, this.column);
- },
- handleSuccess: function (t) {
- if (this.isObject) {
- var e = Pn(Pn(Pn({}, this.labelKey, t[this.nameKey]), this.valueKey, t[this.urlKey]), this.typeKey, t[this.fileTypeKey]);
- this.paramsList.forEach(function (n) {
- return (e[n.label] = t[n.value]);
- }),
- this.text.push(e);
- } else this.text.push(t[this.urlKey]);
- },
- handleRemove: function (t) {
- var e = this;
- if (Bn(t)) {
- var n = this.uploadList.findIndex(function (e) {
- return e.raw == t;
- });
- this.uploadList.splice(n, 1);
- } else
- this.beforeRemove(t).then(function () {
- e.text.forEach(function (n, i) {
- var o = e.isObject ? n[e.valueKey] : n;
- jn(e.homeUrl, o) === t.url && e.text.splice(i, 1);
- });
- });
- },
- handleFileChange: function (t, e) {
- e.pop(), this.uploadCacheList.push(t);
- },
- httpUpload: function (t) {
- var e = this,
- n = t.file,
- i = this.uploadCacheList.findIndex(function (t) {
- return t.raw === n;
- }),
- o = this.uploadCacheList[i] || {},
- r = function () {
- var t = e.uploadCacheList.findIndex(function (t) {
- return t.raw === n;
- }),
- i = e.uploadList.findIndex(function (t) {
- return t.raw === n;
- });
- -1 !== t && e.uploadCacheList.splice(t, 1), -1 !== i && e.uploadList.splice(i, 1);
- },
- a = function (t) {
- r(), (e.res = t || e.res), e.handleSuccess(e.res);
- },
- s = function (t) {
- r(), e.handleError(t);
- };
- if ('function' == typeof this.httpRequest) return r(), void this.httpRequest(t);
- var l = n.size / 1024;
- if (!this.validatenull(l) && l > this.fileSize) return r(), void this.handleSized(n, this.text);
- var c = $n($n({}, this.headers), {}, { 'Content-Type': 'multipart/form-data' }),
- u = {},
- d = new FormData(),
- p = function () {
- e.oss ? (o.loading = !0) : (o.percentage = 0);
- var t,
- r = e.action;
- for (var l in e.data) d.append(l, e.data[l]);
- var p = function (t) {
- if (((e.res = {}), e.isQiniuOss)) {
- var n = t.data.key;
- (t.data.url = u.url + n), (t.data.name = n);
- }
- (e.res = G(e.isAliOss ? t : t.data, e.resKey)), 'function' == typeof e.uploadAfter ? e.uploadAfter(e.res, a, s, e.column) : a();
- },
- h = function (t) {
- s(t);
- },
- f = function () {
- var t = null;
- e.$axios({
- url: r,
- method: 'post',
- data: d,
- headers: c,
- onUploadProgress: function (e) {
- var n = (e.loaded / e.total) * 100 || 0;
- if (n >= 80) {
- if (t) return;
- t = setInterval(function () {
- (n += 0.2 * (100 - n)), o && (o.percentage = parseFloat(n.toFixed(2))), n > 99 && t && clearInterval(t);
- }, 1e3);
- } else o && (o.percentage = parseFloat(n.toFixed(2)));
- }
- })
- .then(p)
- .catch(h);
- },
- m = function () {
- if (!window.OSS) return I.logs('AliOSS'), void s();
- (u = e.ali || e.$AVUE.ali), new OSS(u).put(t.name, t, { headers: e.headers }).then(p).catch(h);
- },
- v = function (o) {
- if (
- -1 !==
- (i = e.uploadCacheList.findIndex(function (t) {
- return t.raw === n;
- }))
- ) {
- var a = e.uploadCacheList.splice(i, 1);
- e.uploadList = e.uploadList.concat(a);
- }
- (t = o || n),
- d.append(e.fileName, t),
- e.isCosOss
- ? (function () {
- if (!window.COS) return I.logs('COS'), void s();
- (u = e.cos || e.$AVUE.cos),
- new COS({ SecretId: u.SecretId, SecretKey: u.SecretKey }).uploadFile({ Bucket: u.Bucket, Region: u.Region, Key: t.name, Body: t }, function (t, e) {
- t ? h(t) : p({ data: { name: e.ETag, url: location.protocol + '//' + e.Location } });
- });
- })()
- : e.isQiniuOss
- ? (function () {
- if (!window.CryptoJS) return I.logs('CryptoJS'), void s();
- u = e.qiniu || e.$AVUE.qiniu;
- var t = Sn(u.AK, u.SK, { scope: u.scope, deadline: new Date().getTime() + 3600 * u.deadline });
- d.append('token', t), (r = u.bucket), f();
- })()
- : e.isAliOss
- ? m()
- : f();
- };
- 'function' == typeof e.uploadBefore ? e.uploadBefore(n, v, s, e.column) : v();
- };
- if ('img' != X(n.name)) p();
- else {
- var h = function () {
- e.validatenull(e.canvasOption)
- ? p()
- : _n(n, e.canvasOption).then(function (t) {
- (n = t), p();
- });
- };
- this.validatenull(this.cropperOption)
- ? h()
- : vn(n, function (t) {
- var i = Object.assign(e.cropperOption, {
- img: t,
- type: 'file',
- callback: function (t) {
- (n = t), h();
- },
- cancel: function () {
- r();
- }
- });
- e.$ImageCropper(i);
- });
- }
- },
- handleSized: function (t, e) {
- this.uploadSized && this.uploadSized(this.fileSize, t, e, this.column), this.handleError('size');
- },
- handleExceed: function (t, e) {
- this.uploadExceed && this.uploadExceed(this.limit, t, e, this.column), this.handleError('exceed');
- },
- handlePreview: function (t) {
- var e = this;
- if (!Bn(t)) {
- var n = function () {
- var n = e.fileList.findIndex(function (e) {
- return e.url === t.url;
- });
- e.$ImagePreview(e.fileList, n);
- };
- 'function' == typeof this.uploadPreview ? this.uploadPreview(t, this.column, n) : n();
- }
- },
- beforeRemove: function (t) {
- return 'function' == typeof this.uploadDelete ? this.uploadDelete(t, this.column) : Promise.resolve();
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e(
- 'el-upload',
- {
- key: t.reload,
- ref: 'main',
- class: [t.b({ list: 'picture-img' == t.listType, disabled: t.disabled }), 'avue-upload--' + t.listType],
- 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.httpUpload,
- readonly: t.readonly,
- drag: t.dragFile,
- '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.apply(null, arguments);
- }
- },
- scopedSlots: t._u([
- {
- key: 'file',
- fn: function ({ file: n }) {
- return [
- e(
- 'span',
- {
- directives: [{ name: 'loading', rawName: 'v-loading.lock', value: n.loading, expression: 'file.loading', modifiers: { lock: !0 } }],
- attrs: { 'element-loading-text': t.loadText }
- },
- [
- 'picture-card' === t.listType
- ? [
- t.showProgress(n)
- ? e('el-progress', { attrs: { type: 'circle', percentage: n.percentage } })
- : [
- t.$scopedSlots.default
- ? t._t('default', null, { file: n })
- : [
- n.type
- ? e(n.type, {
- tag: 'component',
- staticClass: 'el-upload-list__item-thumbnail',
- attrs: { controls: 'controls', src: n.url, ne: '' }
- })
- : e('i', { staticClass: 'el-icon-document', class: t.b('avatar'), attrs: { src: n.url } })
- ]
- ],
- t._v(' '),
- e('span', { staticClass: 'el-upload-list__item-actions' }, [
- e('span', { staticClass: 'el-upload-list__item-preview' }, [
- e('i', {
- staticClass: 'el-icon-zoom-in',
- on: {
- click: function (e) {
- return e.stopPropagation(), t.handlePreview(n);
- }
- }
- })
- ]),
- t._v(' '),
- e('span', { staticClass: 'el-upload-list__item-delete' }, [
- t.disabled
- ? t._e()
- : e('i', {
- staticClass: 'el-icon-delete',
- on: {
- click: function (e) {
- return e.stopPropagation(), t.handleRemove(n);
- }
- }
- })
- ])
- ])
- ]
- : 'picture' === t.listType
- ? e(
- 'span',
- {
- on: {
- click: function (e) {
- return e.stopPropagation(), t.handlePreview(n);
- }
- }
- },
- [
- t.$scopedSlots.default
- ? t._t('default', null, { file: n })
- : [
- n.type
- ? e(n.type, { tag: 'component', staticClass: 'el-upload-list__item-thumbnail', attrs: { src: n.url, controls: 'controls' } })
- : t._e(),
- t._v(' '),
- e('a', { staticClass: 'el-upload-list__item-name' }, [
- e('i', { staticClass: 'el-icon-document' }),
- t._v('\n ' + t._s(n.name) + '\n ')
- ])
- ],
- t._v(' '),
- e('i', {
- staticClass: 'el-icon-close',
- on: {
- click: function (e) {
- return e.stopPropagation(), t.handleRemove(n);
- }
- }
- }),
- t._v(' '),
- t.showProgress(n) ? e('el-progress', { attrs: { percentage: n.percentage, 'stroke-width': 3 } }) : t._e()
- ],
- 2
- )
- : e(
- 'span',
- {
- on: {
- click: function (e) {
- return e.stopPropagation(), t.handlePreview(n);
- }
- }
- },
- [
- t.$scopedSlots.default
- ? t._t('default', null, { file: n })
- : e('a', { staticClass: 'el-upload-list__item-name' }, [
- e('i', { staticClass: 'el-icon-document' }),
- t._v('\n ' + t._s(n.name) + '\n ')
- ]),
- t._v(' '),
- t.disabled
- ? t._e()
- : e('i', {
- staticClass: 'el-icon-close',
- on: {
- click: function (e) {
- return e.stopPropagation(), t.handleRemove(n);
- }
- }
- }),
- t._v(' '),
- t.showProgress(n) ? e('el-progress', { attrs: { percentage: n.percentage, 'stroke-width': 3 } }) : t._e()
- ],
- 2
- )
- ],
- 2
- )
- ];
- }
- }
- ])
- },
- [
- 'picture-card' == t.listType
- ? [e('i', { staticClass: 'el-icon-plus' })]
- : 'picture-img' == t.listType
- ? e(
- 'div',
- { class: t.b('avatar') },
- [
- t.showProgress(t.firstFile)
- ? e('el-progress', {
- attrs: { type: 'circle', percentage: t.firstFile.percentage },
- nativeOn: {
- mouseover: function (e) {
- return t.handleMouseover.apply(null, arguments);
- }
- }
- })
- : e(
- 'div',
- {
- directives: [
- { name: 'loading', rawName: 'v-loading.lock', value: t.firstFile.loading, expression: 'firstFile.loading', modifiers: { lock: !0 } }
- ],
- attrs: { 'element-loading-text': t.loadText }
- },
- [
- t.firstFile.url
- ? [
- t.$scopedSlots.default
- ? t._t('default', null, { file: t.firstFile })
- : [
- t.firstFile.type
- ? e(t.firstFile.type, {
- tag: 'component',
- class: t.b('avatar'),
- attrs: { src: t.firstFile.url, controls: 'controls' },
- on: { mouseover: t.handleMouseover }
- })
- : e('i', {
- staticClass: 'el-icon-document',
- class: t.b('avatar'),
- attrs: { src: t.firstFile.url },
- on: { mouseover: t.handleMouseover }
- })
- ]
- ]
- : e('i', { staticClass: 'el-icon-plus', class: t.b('avatar') })
- ],
- 2
- ),
- t._v(' '),
- t.menu
- ? e(
- 'div',
- {
- staticClass: 'el-upload-list__item-actions',
- class: t.b('menu'),
- on: {
- mouseover: t.handleMouseover,
- mouseout: t.handleMouseout,
- click: function (t) {
- return t.stopPropagation(), (() => !1).apply(null, arguments);
- }
- }
- },
- [
- e('i', {
- staticClass: 'el-icon-zoom-in',
- on: {
- click: function (e) {
- return e.stopPropagation(), t.handlePreview(t.firstFile);
- }
- }
- }),
- t._v(' '),
- t.disabled
- ? t._e()
- : e('i', {
- staticClass: 'el-icon-delete',
- on: {
- click: function (e) {
- return e.stopPropagation(), t.handleRemove(t.firstFile);
- }
- }
- })
- ]
- )
- : t._e()
- ],
- 1
- )
- : t.dragFile
- ? [
- e('i', { staticClass: 'el-icon-upload' }),
- t._v(' '),
- e('div', { staticClass: 'el-upload__text' }, [e('em', [t._v(t._s(t.fileText || t.t('upload.upload')))])])
- ]
- : [
- t.$scopedSlots.button
- ? t._t('button', null, { disabled: t.disabled })
- : e('el-button', { attrs: { icon: 'el-icon-upload', disabled: t.disabled, size: t.size, type: 'primary' } }, [
- t._v(t._s(t.fileText || t.t('upload.upload')))
- ])
- ],
- t._v(' '),
- e('div', { staticClass: 'el-upload__tip', attrs: { slot: 'tip' }, domProps: { innerHTML: t._s(t.tip) }, slot: 'tip' })
- ],
- 2
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- var Dn = y(
- b({
- name: 'sign',
- props: { width: { type: Number, default: 600 }, height: { type: Number, default: 400 } },
- data: function () {
- return { disabled: !1, 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,
- r = i.width / 2,
- a = i.height / 2;
- (o.lineWidth = 7),
- (o.strokeStyle = '#f00'),
- o.beginPath(),
- o.arc(r, a, 110, 0, 2 * Math.PI),
- o.stroke(),
- (function (t, e, n, i, o, r) {
- t.save(), (t.fillStyle = o), t.translate(e, n), t.rotate(Math.PI + r), t.beginPath();
- for (var a = Math.sin(0), s = Math.cos(0), l = (Math.PI / 5) * 4, c = 0; c < 5; c++) {
- (a = Math.sin(c * l)), (s = Math.cos(c * l));
- t.lineTo(a * i, s * i);
- }
- t.closePath(), t.stroke(), t.fill(), t.restore();
- })(o, r, a, 20, '#f00', 0),
- (o.font = '18px 黑体'),
- (o.textBaseline = 'middle'),
- (o.textAlign = 'center'),
- (o.lineWidth = 1),
- (o.strokeStyle = '#f00'),
- o.strokeText(t, r, a + 50),
- (o.font = '14px 黑体'),
- (o.textBaseline = 'middle'),
- (o.textAlign = 'center'),
- (o.lineWidth = 1),
- (o.strokeStyle = '#f00'),
- o.strokeText(n, r, a + 80),
- o.translate(r, a),
- (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();
- this.disabled = !0;
- },
- 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.disabled = !1), (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,
- r = 0;
- function a(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) {
- if (!e.disabled) {
- var l = a(t, s).x,
- c = a(t, s).y;
- if (1 == r) {
- 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) {
- if (!e.disabled) {
- var i = a(t, n).x,
- o = a(t, n).y;
- (r = 1), e.linex.push(i), e.liney.push(o), e.linen.push(0);
- }
- }
- function c() {
- e.disabled || (r = 0);
- }
- }
- }
- }),
- function () {
- var t = this._self._c;
- this._self._setupProxy;
- return t('div', { class: this.b() }, [t('canvas', { ref: 'canvas', class: this.b('canvas'), attrs: { width: this.width, height: this.height } })]);
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- In = y(
- b({
- name: 'slider',
- mixins: [Ie(), Ee()],
- props: {
- step: Number,
- min: Number,
- max: Number,
- marks: Number,
- range: Boolean,
- showTooltip: Boolean,
- showInput: Boolean,
- showStops: Boolean,
- vertical: Boolean,
- formatTooltip: Function,
- height: String,
- showInputControls: Boolean,
- tooltipClass: String
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e('el-slider', {
- attrs: {
- disabled: t.disabled,
- vertical: t.vertical,
- height: t.setPx(t.height),
- step: t.step,
- min: t.min,
- max: t.max,
- range: t.range,
- 'show-stops': t.showStops,
- 'show-tooltip': t.showTooltip,
- 'show-input': t.showInput,
- 'show-input-controls': t.showInputControls,
- 'input-size': t.size,
- 'tooltip-class': t.tooltipClass,
- marks: t.marks,
- 'format-tooltip': t.formatTooltip
- },
- nativeOn: {
- click: function (e) {
- return t.handleClick.apply(null, arguments);
- }
- },
- model: {
- value: t.text,
- callback: function (e) {
- t.text = e;
- },
- expression: 'text'
- }
- });
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- function En(t) {
- return (En =
- '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 Mn(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, Ln(i.key), i);
- }
- }
- function Ln(t) {
- var e = (function (t, e) {
- if ('object' != En(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != En(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(t, 'string');
- return 'symbol' == En(e) ? e : String(e);
- }
- var Nn = (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' === En(e))
- ) {
- this.obj = e;
- var n = document.querySelector(e.el),
- i = '';
- if ('object' === En(e.style)) for (var o in e.style) i += o + ': ' + e.style[o] + ';';
- for (
- var r = '<div class="akeyboard-keyboard' + (e.fixedBottomCenter ? ' akeyboard-keyboard-fixedBottomCenter' : '') + '" style="' + i + '">', a = [], s = 1;
- s < 10;
- s++
- )
- a.push(s.toString());
- a.push('0');
- for (
- var l,
- c = e.keys || [
- ['`'].concat(a).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]), (r += '<div class="akeyboard-keyboard-innerKeys">');
- for (var m = 0; m < l.length; m++) r += '<div class="akeyboard-keyboard-keys akeyboard-keyboard-keys-' + l[m] + '">' + l[m] + '</div>';
- r += '</div>';
- }
- (r += '</div>'), (n.innerHTML = r);
- var v = !1;
- if (
- (c.forEach(function (t) {
- t.includes('Shift') && (v = !0);
- }),
- v)
- )
- 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 r = 0; r < n.childNodes.length; r++) n.childNodes[r].innerHTML = c[o][r];
- }
- } else {
- var a = document.querySelector(e.el + ' .akeyboard-keyboard-keys-Caps');
- if (a && a.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 b = !1;
- if (
- (c.forEach(function (t) {
- t.includes('Caps') && (b = !0);
- }),
- b)
- )
- 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 r = document.querySelector(e.el + ' .akeyboard-keyboard-keys-Shift');
- if (r && r.isShift) return;
- (this.isCaps = !0), this.classList.add('keyboard-keyboard-keys-focus');
- for (var a, s = document.querySelectorAll(e.el + ' .akeyboard-keyboard-innerKeys'), l = 0; l < s.length; l++) {
- a = s[l];
- for (var u = 0; u < a.childNodes.length; u++) a.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), r = document.querySelectorAll(this.obj.el + ' .akeyboard-keyboard-keys'), a = 0; a < r.length; a++)
- ['Shift', 'Caps'].includes(r[a].innerHTML) ||
- ('Delete' !== r[a].innerHTML
- ? 'Tab' !== r[a].innerHTML
- ? 'Enter' !== r[a].innerHTML
- ? 'Space' !== r[a].innerHTML
- ? i && 'object' === En(i) && Object.keys(i).length > 0 && i[r[a].innerHTML]
- ? (r[a].onclick = i[r[a].innerHTML])
- : (r[a].onclick = function () {
- (o[e] += this.innerText), n(this.innerText, o[e]);
- })
- : (r[a].onclick = function () {
- (o[e] += ' '), n('Space', o[e]);
- })
- : (r[a].onclick = function () {
- (o[e] += '\n'), n('Enter', o[e]);
- })
- : (r[a].onclick = function () {
- (o[e] += ' '), n('Tab', o[e]);
- })
- : (r[a].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()">');
- }
- }
- ]) && Mn(e.prototype, n),
- i && Mn(e, i),
- Object.defineProperty(e, 'prototype', { writable: !1 }),
- t
- );
- })();
- function Fn(t) {
- return (Fn =
- '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 zn(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, Hn(i.key), i);
- }
- }
- function Hn(t) {
- var e = (function (t, e) {
- if ('object' != Fn(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != Fn(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(t, 'string');
- return 'symbol' == Fn(e) ? e : String(e);
- }
- var Kn = (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' === Fn(e))
- ) {
- this.obj = e;
- var n = document.querySelector(e.el),
- i = '';
- if ('object' === Fn(e.style)) for (var o in e.style) i += o + ': ' + e.style[o] + ';';
- var r = '<div class="akeyboard-numberKeyboard' + (e.fixedBottomCenter ? ' akeyboard-keyboard-fixedBottomCenter' : '') + '" style="' + i + '">';
- r += '<div class="akeyboard-keyboard-innerKeys">';
- for (var a = 1; a < 10; a++)
- (r += '<div class="akeyboard-keyboard-keys akeyboard-keyboard-keys-' + a + '">' + a + '</div>'),
- a % 3 == 0 && (r += '</div><div class="akeyboard-keyboard-innerKeys">');
- (r +=
- '<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>'),
- (r += '</div>'),
- (n.innerHTML = r);
- } 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), r = document.querySelectorAll(this.obj.el + ' .akeyboard-keyboard-keys'), a = 0; a < r.length; a++)
- 'Delete' !== r[a].innerHTML
- ? 'Enter' !== r[a].innerHTML
- ? i && 'object' === Fn(i) && Object.keys(i).length > 0 && i[r[a].innerHTML]
- ? (r[a].onclick = i[r[a].innerHTML])
- : (r[a].onclick = function () {
- (o[e] += this.innerText), n(this.innerText, o[e]);
- })
- : (r[a].onclick = function () {
- (o[e] += '\n'), n('Enter', o[e]);
- })
- : (r[a].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()">');
- }
- }
- ]) && zn(e.prototype, n),
- i && zn(e, i),
- Object.defineProperty(e, 'prototype', { writable: !1 }),
- t
- );
- })();
- var Rn = y(
- b({
- 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 Nn(n)) : 'number' == this.type ? (e = new Kn(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);
- }
- }
- }),
- function () {
- var t = this._self._c;
- this._self._setupProxy;
- return t('div', { class: [this.b(), this.className] }, [t('div', { attrs: { id: 'keyboard' } })]);
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Vn = y(
- b({
- name: 'tree',
- mixins: [Lt],
- directives: { permission: E },
- props: {
- indent: Number,
- filterNodeMethod: Function,
- checkOnClickNode: Boolean,
- beforeClose: Function,
- beforeOpen: 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: {}, form: {} };
- },
- computed: {
- draggable: function () {
- return this.option.draggable;
- },
- 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 || this.t('crud.addTitle');
- },
- 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.menuIcon('addBtn') : this.menuIcon('updateBtn');
- },
- 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 || a.leaf;
- },
- valueKey: function () {
- return this.props.value || a.value;
- },
- labelKey: function () {
- return this.props.label || a.label;
- },
- childrenKey: function () {
- return this.props.children || a.children;
- },
- nodeKey: function () {
- return this.option.nodeKey || a.nodeKey;
- },
- defaultExpandAll: function () {
- return this.option.defaultExpandAll;
- },
- defaultExpandedKeys: function () {
- return this.option.defaultExpandedKeys;
- },
- formOption: function () {
- return Object.assign(this.option.formOption || {}, { boxType: this.type, submitText: this.addText });
- }
- },
- 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), this.$emit('change', t);
- }
- },
- methods: {
- handleDragStart: function (t, e) {
- this.$emit('node-drag-start', t, e);
- },
- handleDragEnter: function (t, e, n) {
- this.$emit('node-drag-enter', t, e, n);
- },
- handleDragLeave: function (t, e, n) {
- this.$emit('node-drag-leave', t, e, n);
- },
- handleDragOver: function (t, e, n) {
- this.$emit('node-drag-over', t, e, n);
- },
- handleDragEnd: function (t, e, n, i) {
- this.$emit('node-drag-end', t, e, n, i);
- },
- handleDrop: function (t, e, n, i) {
- this.$emit('node-drop', t, e, n, i);
- },
- menuIcon: function (t) {
- return this.vaildData(this.option[t + 'Text'], this.t('crud.' + t));
- },
- getPermission: function (t) {
- return 'function' == typeof this.permission ? this.permission(t, this.node.data || {}) : !!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, n, i) {
- (this.node = n), (this.client.x = t.clientX), (this.client.y = t.clientY), (this.client.show = !0), this.$emit('node-contextmenu', e, n, i);
- },
- 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.client.show = !1), 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 (t) {
- var e = this,
- n = function () {
- t && t(), (e.node = {}), (e.form = {}), (e.box = !1);
- };
- 'function' == typeof this.beforeClose ? this.beforeClose(n, this.type) : n();
- },
- save: function (t, e) {
- var n = this;
- this.$emit(
- 'save',
- this.node,
- t,
- function (t) {
- (t = t || n.form), 'add' === n.type ? n.$refs.tree.append(t, n.node.data[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 (t) {
- var i = (t = t || n.form)[n.valueKey];
- n.node.data = n.form;
- var o = n.findData(i),
- r = o.parentList,
- a = o.index;
- if (r) {
- var s = r.splice(a, 1)[0];
- (t[n.childrenKey] = s[n.childrenKey]), r.splice(a, 0, t);
- }
- n.hide(), e();
- },
- e
- );
- },
- rowEdit: function (t) {
- (this.type = 'edit'), (this.form = this.node.data), this.show();
- },
- parentAdd: function () {
- (this.type = 'parentAdd'), this.show();
- },
- rowAdd: function () {
- (this.type = 'add'), this.show();
- },
- show: function () {
- var t = this,
- e = function () {
- (t.client.show = !1), (t.box = !0);
- };
- 'function' == typeof this.beforeOpen ? this.beforeOpen(e, this.type) : e();
- },
- rowRemove: function () {
- var t = this;
- this.client.show = !1;
- this.$emit('del', this.node, function () {
- t.$refs.tree.remove(t.node.data[t.valueKey]);
- });
- },
- findData: function (t) {
- var e = this,
- n = {};
- return (
- (function i(o, r) {
- o.forEach(function (a, s) {
- a[e.valueKey] == t && (n = { item: a, index: s, parentList: o, parent: r }), a[e.childrenKey] && i(a[e.childrenKey], a);
- });
- })(this.data),
- n
- );
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- t.vaildData(t.option.filter, !0)
- ? e(
- 'div',
- { class: t.b('filter') },
- [
- e('el-input', {
- attrs: { placeholder: t.vaildData(t.option.filterText, t.t('tip.input')), size: t.size },
- model: {
- value: t.filterValue,
- callback: function (e) {
- t.filterValue = e;
- },
- expression: 'filterValue'
- }
- }),
- t._v(' '),
- t.vaildData(t.option.addBtn, !0)
- ? e('el-button', {
- directives: [{ name: 'permission', rawName: 'v-permission', value: t.getPermission('addBtn'), expression: "getPermission('addBtn')" }],
- attrs: { size: t.size, icon: 'el-icon-plus' },
- on: { click: t.parentAdd }
- })
- : t._t('addBtn')
- ],
- 2
- )
- : t._e(),
- t._v(' '),
- e(
- 'el-scrollbar',
- { class: t.b('content') },
- [
- e('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,
- draggable: t.draggable,
- props: t.treeProps,
- 'icon-class': t.iconClass,
- indent: t.indent,
- 'highlight-current': !t.multiple,
- 'show-checkbox': t.multiple,
- accordion: t.accordion,
- 'node-key': t.valueKey,
- 'check-strictly': t.checkStrictly,
- 'check-on-click-node': t.checkOnClickNode,
- 'filter-node-method': t.filterNode,
- 'expand-on-click-node': t.expandOnClickNode,
- 'allow-drop': t.option.allowDrop,
- 'allow-drag': t.option.allowDrag,
- 'default-expand-all': t.defaultExpandAll,
- 'default-expanded-keys': t.defaultExpandedKeys
- },
- on: {
- 'check-change': t.handleCheckChange,
- 'node-click': t.nodeClick,
- 'node-contextmenu': t.nodeContextmenu,
- 'node-drag-start': t.handleDragStart,
- 'node-drag-enter': t.handleDragEnter,
- 'node-drag-leave': t.handleDragLeave,
- 'node-drag-over': t.handleDragOver,
- 'node-drag-end': t.handleDragEnd,
- 'node-drop': t.handleDrop
- },
- scopedSlots: t._u(
- [
- {
- key: 'default',
- fn: function ({ node: n, data: i }) {
- return t.$scopedSlots.default
- ? t._t('default', null, { node: n, data: i })
- : e('span', { staticClass: 'el-tree-node__label' }, [e('span', [t._v(t._s(n.label))])]);
- }
- }
- ],
- null,
- !0
- )
- })
- ],
- 1
- ),
- t._v(' '),
- t.client.show && t.menu
- ? e(
- '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)
- ? e(
- '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._s(t.menuIcon('addBtn')))]
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.option.editBtn, !0)
- ? e(
- '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._s(t.menuIcon('editBtn')))]
- )
- : t._e(),
- t._v(' '),
- t.vaildData(t.option.delBtn, !0)
- ? e(
- '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._s(t.menuIcon('delBtn')))]
- )
- : t._e(),
- t._v(' '),
- t._t('menu', null, { node: t.node })
- ],
- 2
- )
- : t._e(),
- t._v(' '),
- t.box
- ? e(
- 'div',
- [
- e(
- 'el-dialog',
- {
- staticClass: 'avue-dialog avue-dialog--none',
- class: t.b('dialog'),
- attrs: {
- title: t.node[t.labelKey] || t.title,
- visible: t.box,
- 'modal-append-to-body': t.$AVUE.modalAppendToBody,
- 'append-to-body': t.$AVUE.appendToBody,
- 'before-close': t.hide,
- width: t.setPx(t.vaildData(t.option.dialogWidth, '50%'))
- },
- on: {
- 'update:visible': function (e) {
- t.box = e;
- }
- }
- },
- [
- e('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
- )
- : t._e()
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Wn = y(
- b({
- name: 'title',
- mixins: [Ie(), Ee()],
- props: {
- styles: {
- type: Object,
- default: function () {
- return {};
- }
- }
- },
- mounted: function () {},
- methods: {}
- }),
- function () {
- var t = this._self._c;
- this._self._setupProxy;
- return t('div', { class: this.b() }, [t('p', { style: this.styles }, [this._v(this._s(this.text))])]);
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Un = y(
- b({
- name: 'search',
- mixins: [Ct()],
- props: { value: {} },
- watch: {
- value: {
- handler: function (t) {
- this.setVal(t);
- },
- deep: !0
- }
- },
- computed: {
- form: {
- get: function () {
- return this.value;
- },
- set: function (t) {
- this.setVal(t);
- }
- },
- props: function () {
- return this.parentOption.props || {};
- },
- labelKey: function () {
- return a.label;
- },
- valueKey: function () {
- return a.value;
- },
- mainSlot: function () {
- var t = this,
- e = [];
- return (
- this.propOption.forEach(function (n) {
- t.$scopedSlots[n.prop] && e.push(n.prop);
- }),
- e
- );
- },
- isCard: function () {
- return this.parentOption.card;
- },
- parentOption: function () {
- return this.tableOption;
- },
- propOption: function () {
- return this.columnOption;
- },
- columnOption: function () {
- return this.parentOption.column;
- }
- },
- created: function () {
- this.dataFormat();
- },
- methods: {
- setVal: function (t) {
- this.$emit('input', t), this.$emit('change', t);
- },
- 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.props[n] || n];
- },
- dataFormat: function () {
- var t = this;
- this.propOption.forEach(function (e) {
- var n = e.prop;
- t.validatenull(t.form[n]) && t.$set(t.form, n, !1 === e.multiple ? '' : []);
- });
- },
- getActive: function (t, e) {
- var n = this.getKey(t, e.props, this.valueKey);
- 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, this.valueKey);
- 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);
- }
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'el-row',
- { class: [t.b(), { 'avue--card': t.isCard }], attrs: { span: 24 } },
- t._l(t.columnOption, function (n, i) {
- return e('el-col', { key: n.prop, class: t.b('item'), attrs: { span: n.span || 24 } }, [
- e('p', { class: t.b('title') }, [t._v(t._s(n.label) + ':')]),
- t._v(' '),
- e(
- 'div',
- { class: t.b('content') },
- [
- t.mainSlot.includes(n.prop)
- ? t._t(n.prop, null, { dic: t.DIC[n.prop] })
- : t._l(t.DIC[n.prop], function (i) {
- return e(
- 'span',
- {
- key: t.getKey(i, n.props, t.valueKey),
- class: [t.b('tags'), { 'avue-search__tags--active': t.getActive(i, n) }],
- on: {
- click: function (e) {
- return t.handleClick(n, i);
- }
- }
- },
- [t._v(t._s(t.getKey(i, n.props, t.labelKey)))]
- );
- })
- ],
- 2
- )
- ]);
- }),
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- function Xn(t) {
- return (Xn =
- '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 Yn(t, e, n) {
- var i;
- return (
- (i = (function (t, e) {
- if ('object' != Xn(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != Xn(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(e, 'string')),
- (e = 'symbol' == Xn(i) ? i : String(i)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n),
- t
- );
- }
- var qn = y(
- b({
- 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 = this.active;
- return Yn({}, ''.concat('avue-skeleton', '__loading'), t);
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- t._l(t.number, function (n, i) {
- return t.loading
- ? e('div', { key: i, class: t.b('item') }, [
- e('div', { class: t.b('header') }, [t.avatar ? e('span', { class: [t.b('avatar'), t.className] }) : t._e()]),
- t._v(' '),
- e('div', { class: t.b('content') }, [
- e('h3', { class: [t.b('title'), t.className] }),
- t._v(' '),
- e(
- 'div',
- { class: t.b('list') },
- t._l(t.rows, function (n, i) {
- return e('li', { key: i, class: [t.b('li'), t.className], style: t.styleName });
- }),
- 0
- )
- ])
- ])
- : e('div', [t._t('default')], 2);
- }),
- 0
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Gn = y(
- b({
- 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 + '';
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e(
- 'el-tabs',
- {
- attrs: { 'before-leave': t.parentOption.beforeLeave, stretch: t.parentOption.stretch, '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 (n, i) {
- return e('el-tab-pane', { key: i, attrs: { name: i + '', disabled: n.disabled } }, [
- e('span', { attrs: { slot: 'label' }, slot: 'label' }, [e('i', { class: n.icon }), t._v(' \n ' + t._s(n.label) + '\n ')])
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- function Jn(t) {
- return (Jn =
- '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 Qn(t, e) {
- var n = Object.keys(t);
- if (Object.getOwnPropertySymbols) {
- var i = Object.getOwnPropertySymbols(t);
- e &&
- (i = i.filter(function (e) {
- return Object.getOwnPropertyDescriptor(t, e).enumerable;
- })),
- n.push.apply(n, i);
- }
- return n;
- }
- function Zn(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = null != arguments[e] ? arguments[e] : {};
- e % 2
- ? Qn(Object(n), !0).forEach(function (e) {
- ti(t, e, n[e]);
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
- : Qn(Object(n)).forEach(function (e) {
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e));
- });
- }
- return t;
- }
- function ti(t, e, n) {
- var i;
- return (
- (i = (function (t, e) {
- if ('object' != Jn(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != Jn(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(e, 'string')),
- (e = 'symbol' == Jn(i) ? i : String(i)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n),
- t
- );
- }
- var ei = y(
- b({
- name: 'dynamic',
- mixins: [Ie(), Ee()],
- data: function () {
- return { reload: Math.random(), hoverList: [] };
- },
- props: {
- uploadSized: Function,
- uploadBefore: Function,
- uploadAfter: Function,
- uploadDelete: Function,
- uploadPreview: Function,
- uploadError: Function,
- uploadExceed: Function,
- max: Number,
- boxType: String,
- columnSlot: {
- type: Array,
- default: function () {
- return [];
- }
- },
- children: {
- type: Object,
- default: function () {
- return {};
- }
- }
- },
- computed: {
- isAdd: function () {
- return 'add' === this.boxType;
- },
- isEdit: function () {
- return 'edit' === this.boxType;
- },
- isView: function () {
- return 'view' === this.boxType;
- },
- textLen: function () {
- return this.text.length;
- },
- maxFlag: function () {
- return !this.max || !(this.text.length == this.max);
- },
- 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 ot(this.children.column);
- },
- option: function () {
- var t = this,
- e = { boxType: this.boxType, border: !0, header: !1, menu: !1, size: this.size, disabled: this.disabled, readonly: this.readonly, menuBtn: !1 },
- n = this.deepClone(this.children);
- delete n.column;
- var i = this.deepClone(this.columnOption);
- return (
- (function e(n) {
- n.forEach(function (i, o) {
- i.children && Array.isArray(i.children)
- ? e(i.children)
- : (n[o] = Zn(Zn({}, i), {
- hide: t.vaildData(i.hide, !t.vaildParams(i, 'display', !0)),
- disabled: t.vaildParams(i, 'disabled', !1),
- detail: t.vaildParams(i, 'detail', !1),
- cell: t.vaildData(i.cell, t.isCrud)
- }));
- });
- })(i),
- i.unshift({
- label: this.children.indexLabel || '#',
- prop: '_index',
- display: this.showIndex,
- hide: !this.showIndex,
- fixed: !0,
- align: 'center',
- headerAlign: 'center',
- span: 24,
- width: 60
- }),
- Zn(Zn(Zn({}, e), { column: i }), n)
- );
- }
- },
- mounted: function () {
- this.initData();
- },
- watch: {
- text: function () {
- this.initData();
- }
- },
- methods: {
- vaildParams: function (t, e, n) {
- var i,
- o = e.toLowerCase().replace(/\b(\w)|\s(\w)/g, function (t) {
- return t.toUpperCase();
- });
- return this.validatenull(t[e]) ? (this.isAdd ? (i = 'add' + o) : this.isEdit ? (i = 'edit' + o) : this.isView && (i = 'view' + o)) : (i = e), this.vaildData(t[i], n);
- },
- 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), (e.reload = Math.random());
- };
- '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] : {},
- n = t.deepClone(Zn(Zn(Zn({}, t.valueOption), e), { $index: t.textLen }));
- t.isCrud ? t.$refs.main.rowCellAdd(n) : t.isForm && t.text.push(n);
- };
- 'function' == typeof this.rowAdd ? this.rowAdd(e) : e();
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { key: t.reload, class: t.b() },
- [
- t.isForm
- ? [
- e(
- 'div',
- { class: t.b('header') },
- [
- t.readonly || t.disabled || t.addBtn
- ? t._e()
- : e('el-button', { attrs: { size: 'mini', circle: '', disabled: t.disabled, type: 'primary', icon: 'el-icon-plus' }, on: { click: t.addRow } })
- ],
- 1
- ),
- t._v(' '),
- e(
- 'div',
- t._l(t.text, function (n, i) {
- return e(
- '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()
- : e('el-button', {
- class: t.b('menu'),
- attrs: { type: 'danger', size: 'mini', disabled: t.disabled, icon: 'el-icon-delete', circle: '' },
- on: {
- click: function (e) {
- return t.delRow(n.$index);
- }
- }
- }),
- t._v(' '),
- e(
- 'avue-form',
- t._b(
- {
- key: i,
- ref: 'main',
- refInFor: !0,
- attrs: { 'table-data': { row: t.text[i], index: i }, option: t.option },
- scopedSlots: t._u(
- [
- {
- key: '_index',
- fn: function ({}) {
- return e('div', {}, [e('span', [t._v(t._s(n.$index + 1))])]);
- }
- },
- t._l(t.columnSlot, function (e) {
- return {
- key: e,
- fn: function (n) {
- return [t._t(e, 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]'
- }
- },
- 'avue-form',
- t.$uploadFun(null, this),
- !1
- )
- )
- ],
- 1
- );
- }),
- 0
- )
- ]
- : t.isCrud
- ? e(
- 'avue-crud',
- t._b(
- {
- 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: '_indexHeader',
- fn: function (n) {
- return [
- t.addBtn || t.readonly || !t.maxFlag
- ? t._e()
- : e('el-button', {
- attrs: { type: 'primary', size: 'mini', disabled: t.disabled, icon: 'el-icon-plus', circle: '' },
- on: {
- click: function (e) {
- return t.addRow();
- }
- }
- })
- ];
- }
- },
- {
- key: '_index',
- fn: function (n) {
- return [
- t.readonly || t.disabled || t.delBtn || !t.hoverList[n.row.$index]
- ? e('div', [t._v(t._s(n.row.$index + 1))])
- : e('el-button', {
- attrs: { type: 'danger', size: 'mini', disabled: t.disabled, icon: 'el-icon-delete', circle: '' },
- on: {
- click: function (e) {
- return t.delRow(n.row.$index);
- }
- }
- })
- ];
- }
- },
- t._l(t.columnSlot, function (e) {
- return {
- key: t.getSlotName({ prop: e }, 'F'),
- fn: function (n) {
- return [t._t(e, null, null, n)];
- }
- };
- })
- ],
- null,
- !0
- )
- },
- 'avue-crud',
- t.$uploadFun(null, this),
- !1
- )
- )
- : t._e()
- ],
- 2
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports;
- function ni(t) {
- return (ni =
- '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 ii(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, oi(i.key), i);
- }
- }
- function oi(t) {
- var e = (function (t, e) {
- if ('object' != ni(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != ni(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(t, 'string');
- return 'symbol' == ni(e) ? e : String(e);
- }
- var ri = (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;
- }
- }
- ]) && ii(e.prototype, n),
- i && ii(e, i),
- Object.defineProperty(e, 'prototype', { writable: !1 }),
- t
- );
- })(),
- ai = y(
- b({
- 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 ri(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);
- });
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e('div', { class: t.b(), style: t.styleName }, [
- e('div', { class: t.b('border') }, [
- e('span', { style: t.borderStyleName }),
- t._v(' '),
- e('span', { style: t.borderStyleName }),
- t._v(' '),
- e('span', { style: t.borderStyleName }),
- t._v(' '),
- e('span', { style: t.borderStyleName })
- ]),
- t._v(' '),
- e('img', { class: t.b('img'), style: t.imgStyleName, attrs: { src: t.background } }),
- t._v(' '),
- e('video', { ref: 'main', class: t.b('main'), attrs: { autoplay: '', muted: '' }, domProps: { muted: !0 } })
- ]);
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- si = y(
- b({
- name: 'login',
- props: {
- value: {
- type: Object,
- default: function () {
- return {};
- }
- },
- codesrc: { type: String },
- option: {
- type: Object,
- default: function () {
- return {};
- }
- }
- },
- computed: {
- form: {
- get: function () {
- return this.value;
- },
- set: function (t) {
- this.$emit('input', t), this.$emit('change', t);
- }
- },
- 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 };
- },
- 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;
- })()
- );
- });
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b(), style: { width: t.setPx(t.width) } },
- [
- e(
- 'el-form',
- { ref: 'form', attrs: { model: t.form, 'label-suffix': ':', 'label-width': t.setPx(t.labelWidth) } },
- [
- t.username.hide
- ? t._e()
- : e(
- 'el-form-item',
- { attrs: { label: t.username.label || '用户名', rules: t.username.rules, 'label-width': t.setPx(t.username.labelWidth), prop: 'username' } },
- [
- e(
- 'el-tooltip',
- { attrs: { content: t.username.tip, disabled: void 0 === t.username.tip, placement: 'top-start' } },
- [
- e('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()
- : e(
- 'el-form-item',
- { attrs: { label: t.password.label || '密码', rules: t.password.rules, 'label-width': t.setPx(t.password.labelWidth), prop: 'password' } },
- [
- e(
- 'el-tooltip',
- { attrs: { content: t.password.tip, disabled: void 0 === t.password.tip, placement: 'top-start' } },
- [
- e('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()
- : e(
- 'el-form-item',
- { attrs: { label: t.code.label || '验证码', rules: t.code.rules, 'label-width': t.setPx(t.code.labelWidth), prop: 'code' } },
- [
- e(
- 'el-tooltip',
- { attrs: { content: t.code.tip, disabled: void 0 === t.code.tip, placement: 'top-start' } },
- [
- e(
- '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'
- }
- },
- [
- e(
- 'template',
- { slot: 'append' },
- [
- t.isPhone
- ? e('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 ? e('span', [e('img', { attrs: { src: t.codesrc, alt: '', width: '80', height: '25' }, on: { click: t.onRefresh } })]) : t._e()
- ],
- 1
- )
- ],
- 2
- )
- ],
- 1
- )
- ],
- 1
- ),
- t._v(' '),
- e('el-form-item', [e('el-button', { class: t.b('submit'), attrs: { type: 'primary' }, on: { click: t.onSubmit } }, [t._v('登录')])], 1)
- ],
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- li = {
- Arrays: y(
- b({
- name: 'array',
- mixins: [Ie(), Ee()],
- computed: {
- isLimit: function () {
- return !this.validatenull(this.limit) && this.textLen >= this.limit;
- },
- textLen: function () {
- return this.text.length;
- },
- isImg: function () {
- return 'img' === this.type;
- },
- isUrl: function () {
- return 'url' === this.type;
- }
- },
- props: { fileType: String, alone: Boolean, type: String, limit: Number },
- methods: {
- isMediaType: function (t) {
- return X(t, this.fileType);
- },
- add: function (t) {
- this.text.splice(t + 1, 0, '');
- },
- remove: function (t) {
- this.text.splice(t, 1);
- },
- openImg: function (t) {
- var e = this,
- n = this.text.map(function (t) {
- return { thumbUrl: t, url: t, type: e.fileType };
- });
- this.$ImagePreview(n, t);
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- t.validatenull(t.text)
- ? e('el-button', {
- attrs: { type: 'primary', icon: 'el-icon-plus', circle: '', size: t.size, disabled: t.disabled },
- on: {
- click: function (e) {
- return t.add();
- }
- }
- })
- : t._e(),
- t._v(' '),
- t._l(t.text, function (n, i) {
- return e('div', { key: i, class: t.b('item') }, [
- e(
- 'div',
- { class: t.b('input') },
- [
- e(
- 'el-tooltip',
- { attrs: { placement: 'bottom', disabled: (!t.isImg && !t.isUrl) || t.validatenull(n) } },
- [
- e(
- 'div',
- { attrs: { slot: 'content' }, slot: 'content' },
- [
- t.isImg
- ? e(t.isMediaType(n), {
- tag: 'component',
- staticStyle: { width: '200px' },
- attrs: { src: n, controls: 'controls' },
- on: {
- click: function (e) {
- return t.openImg(i);
- }
- }
- })
- : t.isUrl
- ? e('el-link', { attrs: { type: 'primary', href: n, target: t.target } }, [t._v(t._s(n))])
- : t._e()
- ],
- 1
- ),
- t._v(' '),
- e('el-input', {
- attrs: { size: t.size, 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()
- : [
- t.isLimit
- ? t._e()
- : e('el-button', {
- attrs: { type: 'primary', icon: 'el-icon-plus', circle: '', size: t.size, disabled: t.disabled },
- on: {
- click: function (e) {
- return t.add(i);
- }
- }
- }),
- t._v(' '),
- e('el-button', {
- attrs: { type: 'danger', icon: 'el-icon-minus', circle: '', size: t.size, disabled: t.disabled },
- on: {
- click: function (e) {
- return t.remove(i);
- }
- }
- })
- ]
- ],
- 2
- )
- ]);
- })
- ],
- 2
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Affix: g,
- Avatar: k,
- Article: $,
- Crud: we,
- Code: Ce,
- Card: Se,
- Chat: Oe,
- Comment: Pe,
- Form: De,
- Checkbox: Me,
- Date: Le,
- CountUp: _,
- Draggable: Ne,
- Flow: ze,
- Group: He,
- Notice: Re,
- License: Ve,
- Progress: We,
- Time: Ue,
- Input: qe,
- Radio: Ge,
- Select: Je,
- Cascader: tn,
- InputColor: en,
- InputNumber: nn,
- InputTree: on,
- InputIcon: an,
- InputMap: rn,
- InputTable: sn,
- Switchs: cn,
- Rate: un,
- Upload: An,
- Slider: In,
- Keyboard: Rn,
- Tree: Vn,
- Title: Wn,
- Search: Un,
- Tabs: Gn,
- Dynamic: ei,
- Video: ai,
- Verifys: ln,
- textEllipsis: y(
- b({
- 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, isHide: !1 };
- },
- watch: {
- isLimitHeight: function () {
- this.init();
- },
- text: function () {
- this.init();
- },
- height: function () {
- this.init();
- }
- },
- mounted: function () {
- this.init();
- },
- methods: {
- init: function () {
- (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 r = t.text; n.offsetHeight > t.height && o > 0; )
- n.offsetHeight > 3 * t.height ? (e.innerText = r = r.substring(0, Math.floor(r.length / 2))) : (e.innerText = r = r.substring(0, r.length - 1)), o--;
- t.$emit('hide'), (t.isHide = !0);
- } else t.$emit('show'), (t.isHide = !1);
- });
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b(), style: { width: t.setPx(t.width, '100%') } },
- [
- t._t('before'),
- t._v(' '),
- e('el-tooltip', { attrs: { content: t.text, disabled: !(t.useTooltip && t.isHide), placement: t.placement } }, [
- e('span', [e('span', { key: t.keyIndex, ref: 'text', class: t.b('text') }, [t._v(t._s(t.text))])])
- ]),
- t._v(' '),
- e('span', { ref: 'more', class: t.b('more') }, [t._t('more')], 2),
- t._v(' '),
- t._t('after')
- ],
- 2
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Skeleton: qn,
- Sign: Dn,
- Login: si
- },
- ci = {
- DataTabs: y(
- b({
- 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 () {} } }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'avue-data-tabs' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { md: t.span, xs: 24, sm: 12 } }, [
- e('div', { staticClass: 'item', style: { background: n.color } }, [
- e(
- 'a',
- {
- attrs: { href: n.href, target: n.target },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [
- e('div', { staticClass: 'item-header' }, [e('p', [t._v(t._s(n.title))]), t._v(' '), e('span', [t._v(t._s(n.subtitle))])]),
- t._v(' '),
- e(
- 'div',
- { staticClass: 'item-body' },
- [e('avue-count-up', { staticClass: 'h2', attrs: { decimals: n.decimals || t.decimals, animation: n.animation || t.animation, end: n.count } })],
- 1
- ),
- t._v(' '),
- e('div', { staticClass: 'item-footer' }, [e('span', [t._v(t._s(n.allcount))]), t._v(' '), e('p', [t._v(t._s(n.text))])]),
- t._v(' '),
- e('p', { staticClass: 'item-tip' }, [t._v(t._s(n.key))])
- ]
- )
- ])
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataCardText: y(
- b({
- 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 () {} } }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'avue-data-cardText' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { md: t.span, xs: 24, sm: 12 } }, [
- e('div', { staticClass: 'item' }, [
- e(
- 'a',
- {
- attrs: { href: n.href, target: n.target },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [
- e('div', { staticClass: 'item-header' }, [t._v('\n ' + t._s(n.title) + '\n ')]),
- t._v(' '),
- e('div', { staticClass: 'item-content' }, [t._v(t._s(n.content))]),
- t._v(' '),
- e('div', { staticClass: 'item-footer' }, [e('span', [t._v(t._s(n.name))]), t._v(' '), e('span', [t._v(t._s(n.date))])])
- ]
- )
- ])
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataBox: y(
- b({
- 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: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'data-box' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { md: t.span, xs: 24, sm: 12 } }, [
- e('div', { staticClass: 'item' }, [
- e(
- 'a',
- {
- attrs: { href: n.href, target: n.target },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [
- e('div', { staticClass: 'item-icon', style: { backgroundColor: n.color } }, [e('i', { class: n.icon })]),
- t._v(' '),
- e(
- 'div',
- { staticClass: 'item-info' },
- [
- e('avue-count-up', {
- staticClass: 'title',
- style: { color: n.color },
- attrs: { animation: n.animation || t.animation, decimals: n.decimals || t.decimals, end: n.count }
- }),
- t._v(' '),
- e('div', { staticClass: 'info' }, [t._v(t._s(n.title))])
- ],
- 1
- )
- ]
- )
- ])
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataProgress: y(
- b({
- 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: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'data-progress' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { md: t.span, xs: 24, sm: 12 } }, [
- e('div', { staticClass: 'item' }, [
- e(
- 'a',
- {
- attrs: { href: n.href, target: n.target },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [
- e(
- 'div',
- { staticClass: 'item-header' },
- [
- e('avue-count-up', {
- staticClass: 'item-count',
- attrs: { animation: n.animation || t.animation, decimals: n.decimals || t.decimals, end: n.count }
- }),
- t._v(' '),
- e('div', { staticClass: 'item-title', domProps: { textContent: t._s(n.title) } })
- ],
- 1
- ),
- t._v(' '),
- e('el-progress', { attrs: { 'stroke-width': 15, percentage: n.count, color: n.color, 'show-text': !1 } })
- ],
- 1
- )
- ])
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataIcons: y(
- b({
- 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 () {} } }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'data-icons' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- [
- t._l(t.data, function (n, i) {
- return [
- e('el-col', { key: i, attrs: { xs: 12, sm: 6, md: t.span } }, [
- e('div', { staticClass: 'item', class: [{ 'item--easy': t.discount }] }, [
- e(
- 'a',
- {
- attrs: { href: n.href, target: n.target },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [
- e('div', { staticClass: 'item-icon', style: { color: t.color } }, [e('i', { class: n.icon })]),
- t._v(' '),
- e(
- 'div',
- { staticClass: 'item-info' },
- [
- e('span', [t._v(t._s(n.title))]),
- t._v(' '),
- e('avue-count-up', {
- staticClass: 'count',
- style: { color: t.color },
- attrs: { animation: n.animation || t.animation, decimals: n.decimals || t.decimals, end: n.count }
- })
- ],
- 1
- )
- ]
- )
- ])
- ])
- ];
- })
- ],
- 2
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataCard: y(
- b({
- 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: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'data-card' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { md: t.span, xs: 24, sm: 12 } }, [
- e('div', { staticClass: 'item' }, [
- e(
- 'a',
- {
- attrs: { href: n.href, target: n.target },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [
- e('img', { staticClass: 'item-img', attrs: { src: n.src } }),
- t._v(' '),
- e('div', { staticClass: 'item-text', style: { backgroundColor: t.bgText } }, [
- e('h3', { style: { color: t.colorText } }, [t._v(t._s(n.name))]),
- t._v(' '),
- e('p', { style: { color: t.colorText } }, [t._v(t._s(n.text))])
- ])
- ]
- )
- ])
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataDisplay: y(
- b({
- 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: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'avue-data-display' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { md: t.span, xs: 12, sm: 12 } }, [
- e('div', { staticClass: 'item', style: { color: t.color } }, [
- e(
- 'a',
- {
- attrs: { href: n.href, target: n.target },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [
- e('avue-count-up', {
- staticClass: 'count',
- style: { color: n.color },
- attrs: { animation: n.animation || t.animation, decimals: n.decimals || t.decimals, end: n.count }
- }),
- t._v(' '),
- e('span', { staticClass: 'splitLine' }),
- t._v(' '),
- e('div', { staticClass: 'title', style: { color: n.fontColor } }, [t._v(t._s(n.title))])
- ],
- 1
- )
- ])
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataImgText: y(
- b({
- 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: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'avue-data-imgtext' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { md: t.span, xs: 24, sm: 12 } }, [
- e('div', { staticClass: 'item', style: { color: t.color } }, [
- e(
- 'a',
- {
- attrs: { href: n.href, target: n.target },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [
- e('div', { staticClass: 'item-header' }, [e('img', { attrs: { src: n.imgsrc, alt: '' } })]),
- t._v(' '),
- e('div', { staticClass: 'item-content' }, [e('span', [t._v(t._s(n.title))]), t._v(' '), e('p', [t._v(t._s(n.content))])]),
- t._v(' '),
- e('div', { staticClass: 'item-footer' }, [
- e('div', { staticClass: 'time' }, [e('span', [t._v(t._s(n.time))])]),
- t._v(' '),
- e('div', { staticClass: 'imgs' }, [
- e(
- 'ul',
- t._l(n.headimg, function (t, n) {
- return e(
- 'li',
- { key: n },
- [e('el-tooltip', { attrs: { effect: 'dark', content: t.name, placement: 'top-start' } }, [e('img', { attrs: { src: t.src, alt: '' } })])],
- 1
- );
- }),
- 0
- )
- ])
- ])
- ]
- )
- ])
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataOperaText: y(
- b({
- 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: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'avue-data-operatext' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { md: t.span, xs: 24, sm: 12 } }, [
- e('div', { staticClass: 'item' }, [
- e(
- 'a',
- {
- attrs: { href: n.href },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [
- e('div', { staticClass: 'item-header', style: { backgroundColor: n.color, backgroundImage: `url(${n.colorImg})` } }, [
- e('span', { staticClass: 'item-title' }, [t._v(t._s(n.title))]),
- t._v(' '),
- e('span', { staticClass: 'item-subtitle' }, [t._v(t._s(n.subtitle))])
- ]),
- t._v(' '),
- e('div', { staticClass: 'item-content' }, [
- e('div', { staticClass: 'item-img' }, [e('img', { attrs: { src: n.img, alt: '' } })]),
- t._v(' '),
- e(
- 'div',
- { staticClass: 'item-list' },
- t._l(n.list, function (n, i) {
- return e('div', { key: i, staticClass: 'item-row' }, [
- e('span', { staticClass: 'item-label' }, [t._v(t._s(n.label))]),
- t._v(' '),
- e('span', { staticClass: 'item-value' }, [t._v(t._s(n.value))])
- ]);
- }),
- 0
- )
- ])
- ]
- )
- ])
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataRotate: y(
- b({
- 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: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'avue-data-rotate' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { md: t.span, xs: 24, sm: 12 } }, [
- e('div', { staticClass: 'item', style: { backgroundColor: n.color } }, [
- e(
- 'div',
- { staticClass: 'item-box' },
- [
- e('avue-count-up', { staticClass: 'item-count', attrs: { decimals: n.decimals || t.decimals, animation: n.animation || t.animation, end: n.count } }),
- t._v(' '),
- e('span', { staticClass: 'item-title' }, [t._v(t._s(n.title))]),
- t._v(' '),
- e('i', { staticClass: 'item-icon', class: n.icon })
- ],
- 1
- ),
- t._v(' '),
- e(
- 'a',
- {
- attrs: { href: n.href },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [e('p', { staticClass: 'item-more' }, [t._v('更多'), e('i', { staticClass: 'el-icon-arrow-right' })])]
- )
- ])
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataPay: y(
- b({
- 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 || [];
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { class: t.b() },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { md: t.span, xs: 24, sm: 12 } }, [
- e('div', { staticClass: 'item' }, [
- e('div', { staticClass: 'top', style: { backgroundColor: n.color } }),
- t._v(' '),
- e(
- 'div',
- { staticClass: 'header' },
- [
- e('p', { staticClass: 'title' }, [t._v(t._s(n.title))]),
- t._v(' '),
- e('img', { staticClass: 'img', attrs: { src: n.src, alt: '' } }),
- t._v(' '),
- n.subtitle ? [e('p', { staticClass: 'subtitle', style: { color: n.color } }, [t._v(t._s(n.subtitle))])] : t._e(),
- t._v(' '),
- n.money || n.dismoney
- ? [
- e(
- 'p',
- { staticClass: 'money', style: { color: n.color } },
- [
- e('span', [t._v('¥')]),
- t._v(' '),
- e('avue-count-up', {
- staticClass: 'b',
- attrs: { decimals: n.decimals || t.decimals, animation: n.animation || t.animation, end: n.dismoney }
- }),
- t._v(' '),
- e('s', [t._v(t._s(n.money))]),
- t._v(' '),
- e('em', [t._v(t._s(n.tip))])
- ],
- 1
- )
- ]
- : t._e(),
- t._v(' '),
- e('div', { staticClass: 'line' }),
- t._v(' '),
- e(
- 'a',
- {
- staticClass: 'btn',
- style: { backgroundColor: n.color },
- attrs: { href: n.href },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [t._v(t._s(n.subtext))]
- )
- ],
- 2
- ),
- t._v(' '),
- e(
- 'div',
- { staticClass: 'list' },
- t._l(n.list, function (i, o) {
- return e('div', { staticClass: 'list-item' }, [
- i.check
- ? e('i', { staticClass: 'list-item-icon list-item--check', style: { color: n.color } }, [t._v('√')])
- : e('i', { staticClass: 'list-item-icon list-item--no' }, [t._v('x')]),
- t._v(' '),
- e(
- 'a',
- { attrs: { href: i.href ? i.href : 'javascript:void(0);' } },
- [
- e('el-tooltip', { attrs: { effect: 'dark', disabled: !i.tip, placement: 'top' } }, [
- e('div', { attrs: { slot: 'content' }, domProps: { innerHTML: t._s(i.tip) }, slot: 'content' }),
- t._v(' '),
- e('span', { class: { 'list-item--link': i.href } }, [t._v(t._s(i.title))])
- ])
- ],
- 1
- )
- ]);
- }),
- 0
- )
- ])
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataPrice: y(
- b({
- 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 () {} } }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'data-price' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- [
- t._l(t.data, function (n, i) {
- return [
- e('el-col', { key: i, attrs: { xs: 12, sm: 6, md: t.span } }, [
- e('div', { staticClass: 'item item--active' }, [
- e(
- 'a',
- {
- attrs: { href: n.href, target: n.target },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [
- e('div', { staticClass: 'title' }, [t._v('\n ' + t._s(n.title) + '\n ')]),
- t._v(' '),
- e('div', { staticClass: 'body' }, [
- e('span', { staticClass: 'price' }, [t._v(t._s(n.price))]),
- t._v(' '),
- e('span', { staticClass: 'append' }, [t._v(t._s(n.append))])
- ]),
- t._v(' '),
- e(
- 'div',
- { staticClass: 'list' },
- t._l(n.list, function (n, i) {
- return e('p', { key: i }, [t._v('\n ' + t._s(n) + '\n ')]);
- }),
- 0
- )
- ]
- )
- ])
- ])
- ];
- })
- ],
- 2
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- DataPanel: y(
- b({
- 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: {}
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return e(
- 'div',
- { staticClass: 'avue-data-panel' },
- [
- e(
- 'el-row',
- { attrs: { span: 24 } },
- t._l(t.data, function (n, i) {
- return e('el-col', { key: i, attrs: { md: t.span, xs: 24, sm: 12 } }, [
- e(
- 'a',
- {
- attrs: { href: n.href },
- on: {
- click: function (t) {
- n.click && n.click(n);
- }
- }
- },
- [
- e('div', { staticClass: 'item' }, [
- e('div', { staticClass: 'item-icon' }, [e('i', { class: n.icon, style: { color: n.color } })]),
- t._v(' '),
- e(
- 'div',
- { staticClass: 'item-info' },
- [
- e('div', { staticClass: 'item-title' }, [t._v(t._s(n.title))]),
- t._v(' '),
- e('avue-count-up', {
- staticClass: 'item-count',
- attrs: { animation: n.animation || t.animation, decimals: n.decimals || t.decimals, end: n.count }
- })
- ],
- 1
- )
- ])
- ]
- )
- ]);
- }),
- 1
- )
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports
- };
- function ui(t) {
- return (ui =
- '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 di(t, e) {
- var n = Object.keys(t);
- if (Object.getOwnPropertySymbols) {
- var i = Object.getOwnPropertySymbols(t);
- e &&
- (i = i.filter(function (e) {
- return Object.getOwnPropertyDescriptor(t, e).enumerable;
- })),
- n.push.apply(n, i);
- }
- return n;
- }
- function pi(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = null != arguments[e] ? arguments[e] : {};
- e % 2
- ? di(Object(n), !0).forEach(function (e) {
- hi(t, e, n[e]);
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
- : di(Object(n)).forEach(function (e) {
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e));
- });
- }
- return t;
- }
- function hi(t, e, n) {
- var i;
- return (
- (i = (function (t, e) {
- if ('object' != ui(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != ui(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(e, 'string')),
- (e = 'symbol' == ui(i) ? i : String(i)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n),
- t
- );
- }
- var fi = pi(pi({}, li), ci),
- mi = n(49),
- vi = n.n(mi),
- bi = {
- bind: function (t, e, n, i) {
- if (0 != e.value) {
- var o = t.querySelector('.el-dialog__header'),
- r = t.querySelector('.el-dialog');
- if (!(!r & !o)) {
- o.style.cursor = 'move';
- var a = r.currentStyle || window.getComputedStyle(r, null),
- s = r.style.width;
- (s = s.includes('%') ? +document.body.clientWidth * (+s.replace(/\%/g, '') / 100) : +s.replace(/\px/g, '')),
- (o.onmousedown = function (t) {
- var e,
- n,
- i = t.clientX - o.offsetLeft,
- s = t.clientY - o.offsetTop;
- a.left.includes('%')
- ? ((e = +document.body.clientWidth * (+a.left.replace(/\%/g, '') / 100)), (n = +document.body.clientHeight * (+a.top.replace(/\%/g, '') / 100)))
- : ((e = +a.left.replace(/\px/g, '')), (n = +a.top.replace(/\px/g, ''))),
- (document.onmousemove = function (t) {
- var o = t.clientX - i,
- a = t.clientY - s,
- l = o + e,
- c = a + n;
- (r.style.left = ''.concat(l, 'px')), (r.style.top = ''.concat(c, 'px'));
- }),
- (document.onmouseup = function (t) {
- (document.onmousemove = null), (document.onmouseup = null);
- });
- });
- }
- }
- }
- },
- yi = (function () {
- var t;
- function e(e, n, i, o) {
- var r = n,
- a = i,
- s = o;
- e.oncontextmenu = function (e) {
- var n = document.documentElement,
- i = n.clientWidth,
- o = n.clientHeight,
- l = e.clientX,
- c = e.clientY;
- t.style.display = 'block';
- var u = t,
- d = u.offsetWidth,
- p = u.offsetHeight;
- o - c - p < 0 && (c -= p), i - l - d < 0 && (l -= d);
- for (
- var h = t.querySelectorAll('li'),
- f = Array.from(h).filter(function (e) {
- return e.parentNode === t;
- }),
- m = f.length,
- v = function (e) {
- var n = f[e],
- i = n.querySelector('ul');
- i &&
- ((i.style.position = 'absolute'),
- (i.style.top = '-9999px'),
- (i.style.width = 'max-content'),
- n.addEventListener('mouseenter', function () {
- i.style.left = ''.concat(t.clientWidth + 1, 'px');
- var r = o - (c + n.clientHeight * (e + 1)) - i.clientHeight,
- a = r < 0 ? r : 0;
- i.style.top = ''.concat(a, 'px');
- }),
- n.addEventListener('mouseleave', function () {
- i.style.top = '-9999px';
- }));
- },
- b = 0;
- b < m;
- b++
- )
- v(b);
- function y() {
- (t.style.display = 'none'), s && s(r, e), document.removeEventListener('click', y);
- }
- function g() {
- (t.style.position = 'fixed'),
- (t.style.zIndex = 1024),
- (t.style.top = ''.concat(c, 'px')),
- (t.style.left = ''.concat(l, 'px')),
- document.addEventListener('click', y);
- }
- return a ? a(r, g) : g(), !1;
- };
- }
- return {
- inserted: function (n, i) {
- var o = i.value.id,
- r = i.value.event,
- a = i.value.value,
- s = i.value.hide;
- (t = document.getElementById(o)) && ((t.style.display = 'none'), e(n, a, r, s));
- },
- update: function (t, n) {
- var i = n.value.event;
- e(t, n.value.value, i, n.value.hide);
- },
- unbind: function (t) {
- t.oncontextmenu = null;
- }
- };
- })();
- function gi(t) {
- return (
- (function (t) {
- if (Array.isArray(t)) return xi(t);
- })(t) ||
- (function (t) {
- if (('undefined' != typeof Symbol && null != t[Symbol.iterator]) || null != t['@@iterator']) return Array.from(t);
- })(t) ||
- (function (t, e) {
- if (!t) return;
- if ('string' == typeof t) return xi(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 xi(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 xi(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 wi = {
- buildHeader: function (t) {
- var e = this,
- n = [];
- this.getHeader(t, n, 0, 0);
- var i = Math.max.apply(
- Math,
- gi(
- n.map(function (t) {
- return t.length;
- })
- )
- );
- return (
- n
- .filter(function (t) {
- return t.length < i;
- })
- .forEach(function (t) {
- return e.pushRowSpanPlaceHolder(t, i - t.length);
- }),
- n
- );
- },
- getHeader: function (t, e, n, i) {
- var o = 0,
- r = e[n];
- r || (r = e[n] = []), this.pushRowSpanPlaceHolder(r, i - r.length);
- for (var a = 0; a < t.length; a++) {
- var s = t[a];
- if ((r.push(s.label), s.hasOwnProperty('children') && Array.isArray(s.children) && s.children.length > 0)) {
- var l = this.getHeader(s.children, e, n + 1, r.length - 1);
- this.pushColSpanPlaceHolder(r, l - 1), (o += l);
- } else o++;
- }
- return o;
- },
- pushRowSpanPlaceHolder: function (t, e) {
- for (var n = 0; n < e; n++) t.push('!$ROW_SPAN_PLACEHOLDER');
- },
- pushColSpanPlaceHolder: function (t, e) {
- for (var n = 0; n < e; n++) t.push('!$COL_SPAN_PLACEHOLDER');
- },
- doMerges: function (t) {
- for (var e = t.length, n = [], i = 0; i < e; i++)
- for (var o = t[i], r = 0, a = 0; a < o.length; a++)
- '!$COL_SPAN_PLACEHOLDER' === o[a]
- ? ((o[a] = void 0), a + 1 === o.length && n.push({ s: { r: i, c: a - r - 1 }, e: { r: i, c: a } }), r++)
- : r > 0 && a > r
- ? (n.push({ s: { r: i, c: a - r - 1 }, e: { r: i, c: a - 1 } }), (r = 0))
- : (r = 0);
- for (var s = t[0].length, l = 0; l < s; l++)
- for (var c = 0, u = 0; u < e; u++)
- '!$ROW_SPAN_PLACEHOLDER' === t[u][l]
- ? ((t[u][l] = void 0), u + 1 === e && n.push({ s: { r: u - c, c: l }, e: { r: u, c: l } }), c++)
- : c > 0 && u > c
- ? (n.push({ s: { r: u - c - 1, c: l }, e: { r: u - 1, c: l } }), (c = 0))
- : (c = 0);
- return n;
- },
- aoa_to_sheet: function (t, e) {
- for (var n = {}, i = { s: { c: 1e7, r: 1e7 }, e: { c: 0, r: 0 } }, o = 0; o !== t.length; ++o)
- for (var r = 0; r !== t[o].length; ++r) {
- i.s.r > o && (i.s.r = o), i.s.c > r && (i.s.c = r), i.e.r < o && (i.e.r = o), i.e.c < r && (i.e.c = r);
- var a = {
- v: pt(t[o][r], ''),
- s: { font: { name: '宋体', sz: 11, color: { auto: 1, rgb: '000000' }, bold: !0 }, alignment: { wrapText: 1, horizontal: 'center', vertical: 'center', indent: 0 } }
- };
- o < e &&
- ((a.s.border = {
- top: { style: 'thin', color: { rgb: 'EBEEF5' } },
- left: { style: 'thin', color: { rgb: 'EBEEF5' } },
- bottom: { style: 'thin', color: { rgb: 'EBEEF5' } },
- right: { style: 'thin', color: { rgb: 'EBEEF5' } }
- }),
- (a.s.fill = {
- patternType: 'solid',
- fgColor: { theme: 3, tint: 0.3999755851924192, rgb: 'F5F7FA' },
- bgColor: { theme: 7, tint: 0.3999755851924192, rgb: 'F5F7FA' }
- }));
- var s = XLSX.utils.encode_cell({ c: r, r: o });
- 'number' == typeof a.v ? (a.t = 'n') : 'boolean' == typeof a.v ? (a.t = 'b') : (a.t = 's'), (n[s] = a);
- }
- return i.s.c < 1e7 && (n['!ref'] = XLSX.utils.encode_range(i)), n;
- },
- s2ab: function (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;
- },
- excel: function (t) {
- var e = this;
- if (window.XLSX)
- return new Promise(function (n, i) {
- var o,
- r = { prop: [] };
- (r.header = e.buildHeader(t.columns)), (r.title = t.title || Gt()().format('YYYY-MM-DD HH:mm:ss'));
- !(function t(e) {
- e.forEach(function (e) {
- e.children && e.children instanceof Array ? t(e.children) : r.prop.push(e.prop);
- });
- })(t.columns),
- (r.data = t.data.map(function (t) {
- return r.prop.map(function (e) {
- var n = t[e];
- return nt(n) && (n = JSON.stringify(n)), n;
- });
- }));
- var a = r.header.length;
- (o = r.header).push.apply(o, gi(r.data).concat([[]]));
- var s = e.doMerges(r.header),
- l = e.aoa_to_sheet(r.header, a);
- (l['!merges'] = s),
- (l['!freeze'] = { xSplit: '1', ySplit: '' + a, topLeftCell: 'B' + (a + 1), activePane: 'bottomRight', state: 'frozen' }),
- (l['!cols'] = [{ wpx: 165 }]);
- var c = { SheetNames: ['Sheet1'], Sheets: {} };
- c.Sheets.Sheet1 = l;
- var u = XLSX.write(c, { bookType: 'xlsx', bookSST: !1, type: 'binary', cellStyles: !0 });
- J(new Blob([e.s2ab(u)], { type: 'application/octet-stream' }), r.title + '.xlsx'), n();
- });
- I.logs('xlsx');
- },
- xlsx: function (t) {
- if (!window.saveAs || !window.XLSX) return I.logs('file-saver'), void I.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' }),
- r = o.SheetNames[0],
- a = o.Sheets[r],
- s = (function (t) {
- var n,
- i = [],
- o = e.utils.decode_range(t['!ref']),
- r = o.s.r;
- for (n = o.s.c; n <= o.e.c; ++n) {
- var a = t[e.utils.encode_cell({ c: n, r: r })],
- s = 'UNKNOWN ' + n;
- a && a.t && (s = e.utils.format_cell(a)), i.push(s);
- }
- return i;
- })(a),
- l = e.utils.sheet_to_json(a);
- n({ header: s, results: l });
- }),
- o.readAsArrayBuffer(t);
- });
- }
- };
- function _i(t) {
- return (_i =
- '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 Si = function t(e, n) {
- if (!(this instanceof t)) return new t(e, n);
- (this.options = this.extend({ noPrint: '.no-print' }, n)),
- 'string' == typeof e ? (this.dom = document.querySelector(e)) : (this.isDOM(e), (this.dom = this.isDOM(e) ? e : e.$el)),
- this.init();
- };
- Si.prototype = {
- init: function () {
- var t = this.getStyle() + this.getHtml();
- this.writeIframe(t);
- },
- extend: function (t, e) {
- for (var n in e) t[n] = e[n];
- return t;
- },
- getStyle: function () {
- for (var t = '', e = document.querySelectorAll('style,link'), n = 0; n < e.length; n++) t += e[n].outerHTML;
- return (t += '<style>' + (this.options.noPrint ? this.options.noPrint : '.no-print') + '{display:none;}</style>');
- },
- getHtml: function () {
- for (var t = document.querySelectorAll('input'), e = document.querySelectorAll('textarea'), n = document.querySelectorAll('select'), i = 0; i < t.length; i++)
- 'checkbox' == t[i].type || 'radio' == t[i].type
- ? 1 == t[i].checked
- ? t[i].setAttribute('checked', 'checked')
- : t[i].removeAttribute('checked')
- : (t[i].type, t[i].setAttribute('value', t[i].value));
- for (var o = 0; o < e.length; o++) 'textarea' == e[o].type && (e[o].innerHTML = e[o].value);
- for (var r = 0; r < n.length; r++)
- if ('select-one' == n[r].type) {
- var a = n[r].children;
- for (var s in a) 'OPTION' == a[s].tagName && (1 == a[s].selected ? a[s].setAttribute('selected', 'selected') : a[s].removeAttribute('selected'));
- }
- return this.wrapperRefDom(this.dom).outerHTML;
- },
- wrapperRefDom: function (t) {
- var e = null,
- n = t;
- if (!this.isInBody(n)) return n;
- for (; n; ) {
- if (e) {
- var i = n.cloneNode(!1);
- i.appendChild(e), (e = i);
- } else e = n.cloneNode(!0);
- n = n.parentElement;
- }
- return e;
- },
- writeIframe: function (t) {
- var e,
- n,
- i = document.createElement('iframe'),
- o = document.body.appendChild(i);
- (i.id = 'myIframe'),
- i.setAttribute('style', 'position:absolute;width:0;height:0;top:-10px;left:-10px;'),
- (e = o.contentWindow || o.contentDocument),
- (n = o.contentDocument || o.contentWindow.document).open(),
- n.write(t),
- n.close();
- var r = this;
- i.onload = function () {
- r.toPrint(e),
- setTimeout(function () {
- document.body.removeChild(i);
- }, 100);
- };
- },
- toPrint: function (t) {
- try {
- setTimeout(function () {
- t.focus();
- try {
- t.document.execCommand('print', !1, null) || t.print();
- } catch (e) {
- t.print();
- }
- t.close();
- }, 10);
- } catch (t) {
- console.log('err', t);
- }
- },
- isInBody: function (t) {
- return t !== document.body && document.body.contains(t);
- },
- isDOM:
- 'object' === ('undefined' == typeof HTMLElement ? 'undefined' : _i(HTMLElement))
- ? function (t) {
- return t instanceof HTMLElement;
- }
- : function (t) {
- return t && 'object' === _i(t) && 1 === t.nodeType && 'string' == typeof t.nodeName;
- }
- };
- var Ci = Si,
- ki = n(50),
- Oi = n.n(ki).a,
- $i = y(
- b({
- name: 'image-preview',
- data: function () {
- return { left: 0, top: 0, scale: 1, datas: [], rotate: 0, isShow: !1, index: 0, isFile: !1 };
- },
- computed: {
- 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 this.datas.length > 1;
- }
- },
- methods: {
- getName: function (t) {
- return t.substring(t.lastIndexOf('/') + 1);
- },
- handlePrint: function () {
- this.$Print('#avue-image-preview__'.concat(this.index));
- },
- handlePrev: function () {
- this.$refs.carousel.prev(), (this.index = this.$refs.carousel.activeIndex), this.stopItem();
- },
- handleNext: function () {
- this.$refs.carousel.next(), (this.index = this.$refs.carousel.activeIndex), this.stopItem();
- },
- stopItem: function () {
- (this.left = 0),
- (this.top = 0),
- this.$refs.item.forEach(function (t) {
- t.pause && t.pause();
- });
- },
- isMediaType: function (t) {
- t.url, t.type;
- return X(t.url, t.type);
- },
- subScale: function () {
- 0.2 != this.scale && (this.scale = parseFloat((this.scale - 0.2).toFixed(2)));
- },
- addScale: function () {
- this.scale = parseFloat((this.scale + 0.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,
- r = t.clientY - i;
- (n = t.clientX), (i = t.clientY), (e.left = e.left + 2 * o), (e.top = e.top + 2 * r);
- }),
- (document.onmouseup = function (t) {
- (document.onmousemove = null), (document.onmouseup = null);
- });
- },
- handleClick: function (t, e) {
- var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
- 'function' == typeof this.ops.click ? this.ops.click(t, e) : n && window.open(t.url);
- },
- open: function () {
- var t = this;
- (this.isShow = !0),
- this.$nextTick(function () {
- t.$refs.item.forEach(function (e, n) {
- t.$refs.item[n].onwheel = function (e) {
- e.wheelDelta > 0 ? t.addScale() : t.subScale();
- };
- });
- });
- },
- close: function () {
- (this.isShow = !1), 'function' == typeof this.ops.beforeClose && this.ops.beforeClose(this.datas, this.index), this.$destroy(), this.$el.remove();
- }
- }
- }),
- function () {
- var t = this,
- e = t._self._c;
- t._self._setupProxy;
- return t.isShow
- ? e('div', { class: t.b() }, [
- t.ops.modal ? e('div', { class: t.b('mask'), on: { click: t.close } }) : t._e(),
- t._v(' '),
- e('span', { staticClass: 'el-image-viewer__btn el-image-viewer__close', on: { click: t.close } }, [e('i', { staticClass: 'el-icon-circle-close' })]),
- t._v(' '),
- t.isRrrow
- ? e(
- 'span',
- {
- staticClass: 'el-image-viewer__btn el-image-viewer__prev',
- on: {
- click: function (e) {
- return t.handlePrev();
- }
- }
- },
- [e('i', { staticClass: 'el-icon-arrow-left' })]
- )
- : t._e(),
- t._v(' '),
- t.isRrrow
- ? e(
- 'span',
- {
- staticClass: 'el-image-viewer__btn el-image-viewer__next',
- on: {
- click: function (e) {
- return t.handleNext();
- }
- }
- },
- [e('i', { staticClass: 'el-icon-arrow-right' })]
- )
- : t._e(),
- t._v(' '),
- e(
- 'div',
- { ref: 'box', class: t.b('box') },
- [
- e(
- 'el-carousel',
- {
- ref: 'carousel',
- attrs: {
- 'show-indicators': !1,
- 'initial-index': t.index,
- 'initial-swipe': t.index,
- interval: t.ops.interval || 0,
- arrow: 'never',
- 'indicator-position': 'none'
- },
- on: { change: t.handleChange }
- },
- t._l(t.datas, function (n, i) {
- return e(
- 'el-carousel-item',
- {
- key: i,
- nativeOn: {
- click: function (e) {
- if (e.target !== e.currentTarget) return null;
- t.ops.closeOnClickModal && t.close();
- }
- }
- },
- [
- t.isMediaType(n)
- ? e(t.isMediaType(n), {
- ref: 'item',
- refInFor: !0,
- tag: 'component',
- style: [t.styleName, t.styleBoxName],
- attrs: { id: 'avue-image-preview__' + i, src: n.url, controls: 'controls', ondragstart: 'return false' },
- on: {
- click: function (e) {
- return t.handleClick(n, i);
- },
- mousedown: t.move
- }
- })
- : e(
- 'div',
- {
- class: t.b('file'),
- attrs: { id: 'avue-image-preview__' + i },
- on: {
- click: function (e) {
- return t.handleClick(n, i, !0);
- }
- }
- },
- [e('span', [e('i', { staticClass: 'el-icon-document' }), t._v(' '), e('p', [t._v(t._s(n.name || t.getName(n.url)))])])]
- )
- ],
- 1
- );
- }),
- 1
- )
- ],
- 1
- ),
- t._v(' '),
- e('div', { staticClass: 'el-image-viewer__btn el-image-viewer__actions' }, [
- e('div', { staticClass: 'el-image-viewer__actions__inner' }, [
- e('i', { staticClass: 'el-icon-zoom-out', on: { click: t.subScale } }),
- t._v(' '),
- e('i', { staticClass: 'el-icon-zoom-in', on: { click: t.addScale } }),
- t._v(' '),
- e('i', { staticClass: 'el-image-viewer__actions__divider' }),
- t._v(' '),
- e('i', { staticClass: 'el-icon-printer', on: { click: t.handlePrint } }),
- t._v(' '),
- e('i', { staticClass: 'el-image-viewer__actions__divider' }),
- t._v(' '),
- e('i', {
- staticClass: 'el-icon-refresh-left',
- on: {
- click: function (e) {
- t.rotate = t.rotate - 90;
- }
- }
- }),
- t._v(' '),
- e('i', {
- staticClass: 'el-icon-refresh-right',
- on: {
- click: function (e) {
- t.rotate = t.rotate + 90;
- }
- }
- })
- ])
- ])
- ])
- : t._e();
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Pi = y(
- {
- name: 'CropperImage',
- mixins: [Lt],
- components: { VueCropper: n(51).VueCropper },
- data: function () {
- return { visible: !1, previews: {}, option: {} };
- },
- methods: {
- show: function () {
- this.visible = !0;
- },
- changeScale: function (t) {
- (t = t || 1), this.$refs.cropper.changeScale(t);
- },
- rotateLeft: function () {
- this.$refs.cropper.rotateLeft();
- },
- rotateRight: function () {
- this.$refs.cropper.rotateRight();
- },
- realTime: function (t) {
- this.previews = t;
- },
- submit: function () {
- var t = this;
- (this.visible = !1),
- this.$refs.cropper.getCropData(function (e) {
- var n = e;
- 'file' === t.option.type && (n = Z(e, ''.concat(new Date().getTime(), '.').concat(t.option.outputType))), t.option.callback && t.option.callback(n);
- });
- },
- cancel: function (t) {
- t && t(),
- (this.visible = !1),
- this.option.cancel && this.option.cancel(),
- 'function' == typeof this.option.beforeClose && this.option.beforeClose(),
- this.$destroy(),
- this.$el.remove();
- }
- }
- },
- function () {
- var t = this,
- e = t._self._c;
- return e(
- 'el-dialog',
- {
- staticClass: 'avue-dialog avue-cropper',
- attrs: {
- visible: t.visible,
- 'before-close': t.cancel,
- 'close-on-press-escape': !1,
- 'close-on-click-modal': !1,
- 'modal-append-to-body': t.$AVUE.modalAppendToBody,
- 'append-to-body': t.$AVUE.appendToBody,
- width: '1000px'
- },
- on: {
- 'update:visible': function (e) {
- t.visible = e;
- }
- }
- },
- [
- e('div', { staticClass: 'cropper-content' }, [
- e('div', { staticClass: 'cropper-box' }, [
- e(
- 'div',
- { staticClass: 'cropper' },
- [
- e('vue-cropper', {
- ref: 'cropper',
- attrs: {
- img: t.option.img,
- outputSize: t.option.outputSize,
- outputType: t.option.outputType,
- info: t.option.info,
- canScale: t.option.canScale,
- autoCrop: t.option.autoCrop,
- autoCropWidth: t.option.autoCropWidth,
- autoCropHeight: t.option.autoCropHeight,
- fixed: t.option.fixed,
- fixedNumber: t.option.fixedNumber,
- full: t.option.full,
- fixedBox: t.option.fixedBox,
- canMove: t.option.canMove,
- canMoveBox: t.option.canMoveBox,
- original: t.option.original,
- centerBox: t.option.centerBox,
- height: t.option.height,
- infoTrue: t.option.infoTrue,
- maxImgSize: t.option.maxImgSize,
- enlarge: t.option.enlarge,
- mode: t.option.mode
- },
- on: { realTime: t.realTime }
- })
- ],
- 1
- ),
- t._v(' '),
- e(
- 'div',
- { staticClass: 'footer-btn' },
- [
- e('el-button', {
- attrs: { size: 'mini', type: 'danger', icon: 'el-icon-zoom-in' },
- on: {
- click: function (e) {
- return t.changeScale(1);
- }
- }
- }),
- t._v(' '),
- e('el-button', {
- attrs: { size: 'mini', type: 'danger', icon: 'el-icon-zoom-out' },
- on: {
- click: function (e) {
- return t.changeScale(-1);
- }
- }
- }),
- t._v(' '),
- e('el-button', { attrs: { size: 'mini', icon: 'el-icon-back', type: 'danger' }, on: { click: t.rotateLeft } }),
- t._v(' '),
- e('el-button', { attrs: { size: 'mini', type: 'danger', icon: 'el-icon-right' }, on: { click: t.rotateRight } })
- ],
- 1
- )
- ]),
- t._v(' '),
- e('div', { staticClass: 'show-preview' }, [
- e('div', { staticClass: 'preview', style: t.previews.div }, [e('img', { style: t.previews.img, attrs: { src: t.previews.url } })])
- ])
- ]),
- t._v(' '),
- e(
- 'span',
- { staticClass: 'avue-dialog__footer' },
- [
- e('el-button', { attrs: { size: 'small', type: 'primary' }, on: { click: t.submit } }, [t._v(t._s(t.t('common.submitBtn')))]),
- t._v(' '),
- e(
- 'el-button',
- {
- attrs: { size: 'small' },
- on: {
- click: function (e) {
- return t.cancel();
- }
- }
- },
- [t._v(t._s(t.t('common.cancelBtn')))]
- )
- ],
- 1
- )
- ]
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- Ti = y(
- {
- data: function () {
- return {
- opt: {},
- disabled: !1,
- callback: null,
- visible: !1,
- dialog: { closeOnClickModal: !1 },
- isDrawer: !1,
- option: { submitText: '提交', emptyText: '关闭', submitIcon: 'el-icon-check', emptyIcon: 'el-icon-close', column: [] },
- data: {}
- };
- },
- computed: {
- dialogType: function () {
- return this.isDrawer ? 'elDrawer' : 'elDialog';
- },
- menuPosition: function () {
- return this.opt.menuPosition || 'center';
- }
- },
- methods: {
- submit: function () {
- this.$refs.form.submit();
- },
- reset: function () {
- this.$refs.form.resetForm();
- },
- beforeClose: function (t) {
- t(), this.close();
- },
- show: function (t) {
- (this.opt = t), (this.callback = t.callback);
- var e = this.deepClone(t);
- ['callback', 'option', 'data'].forEach(function (t) {
- return delete e[t];
- }),
- (this.dialog = Object.assign(this.dialog, e)),
- (this.dialog.size = this.dialog.width),
- (this.isDrawer = 'drawer' === this.dialog.type),
- (this.option = Object.assign(this.option, t.option)),
- (this.data = t.data),
- (this.visible = !0);
- },
- close: function () {
- var t = this,
- e = function () {
- (t.visible = !1), t.$destroy(), t.$el.remove();
- };
- 'function' == typeof this.dialog.beforeClose ? this.dialog.beforeClose(e) : e();
- },
- handleSubmit: function (t, e) {
- this.callback && this.callback({ data: t, close: this.close, done: e });
- }
- }
- },
- function () {
- var t = this,
- e = t._self._c;
- return e(
- t.dialogType,
- t._b(
- {
- tag: 'component',
- staticClass: 'avue-dialog',
- attrs: { visible: t.visible, 'destroy-on-close': '', beforeClose: t.beforeClose },
- on: {
- 'update:visible': function (e) {
- t.visible = e;
- }
- }
- },
- 'component',
- t.dialog,
- !1
- ),
- [
- e('avue-form', {
- ref: 'form',
- attrs: { option: { ...t.deepClone(t.option), menuBtn: !1 }, status: t.disabled },
- on: {
- 'update:status': function (e) {
- t.disabled = e;
- },
- submit: t.handleSubmit,
- 'reset-change': t.close
- },
- model: {
- value: t.data,
- callback: function (e) {
- t.data = e;
- },
- expression: 'data'
- }
- }),
- t._v(' '),
- t.vaildData(t.option.menuBtn, !0)
- ? e(
- 'span',
- { staticClass: 'avue-dialog__footer', class: 'avue-dialog__footer--' + t.menuPosition },
- [
- t.vaildData(t.option.submitBtn, !0)
- ? e('el-button', { attrs: { size: t.$AVUE.size, icon: t.option.submitIcon, loading: t.disabled, type: 'primary' }, on: { click: t.submit } }, [
- t._v(t._s(t.option.submitText))
- ])
- : t._e(),
- t._v(' '),
- t.vaildData(t.option.emptyBtn, !0)
- ? e('el-button', { attrs: { disabled: t.disabled, size: t.$AVUE.size, icon: t.option.emptyIcon }, on: { click: t.reset } }, [
- t._v(t._s(t.option.emptyText))
- ])
- : t._e()
- ],
- 1
- )
- : t._e()
- ],
- 1
- );
- },
- [],
- !1,
- null,
- null,
- null
- ).exports,
- ji = function () {
- this.$root = {};
- };
- function Bi(t) {
- return (Bi =
- '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 Ai(t, e) {
- var n = Object.keys(t);
- if (Object.getOwnPropertySymbols) {
- var i = Object.getOwnPropertySymbols(t);
- e &&
- (i = i.filter(function (e) {
- return Object.getOwnPropertyDescriptor(t, e).enumerable;
- })),
- n.push.apply(n, i);
- }
- return n;
- }
- function Di(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = null != arguments[e] ? arguments[e] : {};
- e % 2
- ? Ai(Object(n), !0).forEach(function (e) {
- Ii(t, e, n[e]);
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
- : Ai(Object(n)).forEach(function (e) {
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e));
- });
- }
- return t;
- }
- function Ii(t, e, n) {
- var i;
- return (
- (i = (function (t, e) {
- if ('object' != Bi(t) || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (void 0 !== n) {
- var i = n.call(t, e || 'default');
- if ('object' != Bi(i)) return i;
- throw new TypeError('@@toPrimitive must return a primitive value.');
- }
- return ('string' === e ? String : Number)(t);
- })(e, 'string')),
- (e = 'symbol' == Bi(i) ? i : String(i)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = n),
- t
- );
- }
- (ji.prototype.initMounted = function () {
- var t;
- this.$root = (((t = new (window.Vue.extend(Ti))()).vm = t.$mount()), document.body.appendChild(t.vm.$el), (t.dom = t.vm.$el), t.vm);
- }),
- (ji.prototype.show = function (t) {
- this.initMounted(), this.$root.show(t);
- });
- var Ei = {
- $ImagePreview: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
- e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
- n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
- i = window.Vue.extend($i),
- o = { datas: t, index: e, ops: Object.assign({ closeOnClickModal: !1, beforeClose: null, click: null, modal: !0 }, n) },
- r = new i({ data: o });
- return (r.vm = r.$mount()), document.body.appendChild(r.vm.$el), r.vm.open(), (r.dom = r.vm.$el), r.vm;
- },
- $ImageCropper: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
- e = window.Vue.extend(Pi),
- n = Object.assign(
- {
- outputSize: 1,
- outputType: 'jpeg',
- info: !0,
- canScale: !0,
- autoCrop: !0,
- fixed: !1,
- full: !1,
- fixedBox: !1,
- canMove: !0,
- canMoveBox: !0,
- original: !1,
- centerBox: !1,
- height: !0,
- infoTrue: !1,
- enlarge: 1
- },
- t
- ),
- i = new e({ data: { option: n } });
- return (i.vm = i.$mount()), document.body.appendChild(i.vm.$el), i.vm.show(), (i.dom = i.vm.$el), i.vm;
- },
- $DialogForm: new ji(),
- $Export: wi,
- $Print: Ci,
- $Clipboard: function (t) {
- var e = t.text;
- return new Promise(function (t, n) {
- var i = document.body,
- o = 'rtl' == document.documentElement.getAttribute('dir'),
- r = document.createElement('textarea');
- (r.style.fontSize = '12pt'),
- (r.style.border = '0'),
- (r.style.padding = '0'),
- (r.style.margin = '0'),
- (r.style.position = 'absolute'),
- (r.style[o ? 'right' : 'left'] = '-9999px');
- var a = window.pageYOffset || document.documentElement.scrollTop;
- (r.style.top = ''.concat(a, 'px')),
- r.setAttribute('readonly', ''),
- (r.value = e),
- i.appendChild(r),
- (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());
- }
- })(r);
- try {
- document.execCommand('copy'), t();
- } catch (t) {
- !1, n();
- }
- });
- },
- $Log: A,
- $NProgress: Oi,
- $Screenshot: function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- if (window.html2canvas) return window.html2canvas(t, e);
- I.logs('Screenshot');
- },
- deepClone: it,
- dataURLtoFile: Z,
- isJson: nt,
- setPx: function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : '';
- return M(t) && (t = e), M(t) ? '' : (-1 === (t += '').indexOf('%') && (t += 'px'), t);
- },
- vaildData: pt,
- findArray: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
- e = arguments.length > 1 ? arguments[1] : void 0,
- n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : a.value,
- i = arguments.length > 3 && void 0 !== arguments[3] && arguments[3];
- return i
- ? t.findIndex(function (t) {
- return t[n] == e;
- })
- : t.find(function (t) {
- return t[n] == e;
- });
- },
- findNode: lt,
- validatenull: M,
- downFile: J,
- loadScript: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 'js',
- e = arguments.length > 1 ? arguments[1] : void 0,
- n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 'body',
- i = !1;
- return new Promise(function (o) {
- for (var r, a = 'head' == n ? document.getElementsByTagName('head')[0] : document.body, s = 0; s < a.children.length; s++) {
- -1 !== (a.children[s].src || '').indexOf(e) && ((i = !0), o());
- }
- i ||
- ('js' === t
- ? (((r = document.createElement('script')).type = 'text/javascript'), (r.src = e))
- : 'css' === t && (((r = document.createElement('link')).rel = 'stylesheet'), (r.type = 'text/css'), (r.href = e)),
- a.appendChild(r),
- (r.onload = function () {
- o();
- }));
- });
- },
- watermark: function () {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
- return new mn(t);
- },
- findObject: tt,
- randomId: et
- },
- Mi = { dialogDrag: bi, contextmenu: yi },
- Li = function (t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- 'dark' === e.theme && (document.documentElement.className = 'avue-theme--dark');
- var n = {
- size: e.size || 'small',
- calcHeight: e.calcHeight || 0,
- menuType: e.menuType || 'text',
- formOption: e.formOption || {},
- crudOption: e.crudOption || {},
- modalAppendToBody: pt(e.modalAppendToBody, !0),
- appendToBody: pt(e.appendToBody, !0),
- 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 || {})
- };
- (t.prototype.$AVUE = Object.assign(e, n)),
- Object.keys(fi).forEach(function (e) {
- var n = fi[e];
- t.component(n.name, n);
- }),
- Object.keys(Ei).forEach(function (e) {
- t.prototype[e] = Ei[e];
- }),
- Object.keys(Mi).forEach(function (e) {
- t.directive(e, Mi[e]);
- }),
- Mt.use(e.locale),
- Mt.i18n(e.i18n),
- (t.prototype.$axios = e.axios || window.axios || vi.a),
- (window.axios = t.prototype.$axios),
- (window.Vue = t),
- (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', 'uploadSized'],
- i = {};
- return (
- n.forEach(function (n) {
- (t && ('upload' !== t.type || t[n])) || (i[n] = e[n]);
- }),
- i
- );
- });
- };
- 'undefined' != typeof window && window.Vue && Li(window.Vue);
- e.default = Di(Di(Di({}, { version: '2.13.2', locale: Mt, install: Li }), fi), Ei);
- }
- ]).default;
- });
|