| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939 |
- <template>
- <div :class="prefixCls" class="case-portrait-page">
- <div class="page-main">
- <div class="page-layout">
- <aside class="left-panel">
- <div class="panel-card">
- <div class="panel-heading">
- <div class="panel-heading__title">对象列表</div>
- <div class="panel-heading__badge">{{ filteredPersonList.length }}</div>
- </div>
- <div class="search-box">
- <Input v-model:value="personKeyword" placeholder="对象名称 / 证件号搜索" allow-clear />
- </div>
- <div class="left-actions">
- <Button type="primary" block class="side-action-btn side-action-btn--primary" @click="openCreateModal"
- >新增对象</Button
- >
- </div>
- <div class="person-list">
- <template v-if="filteredPersonList.length">
- <div
- v-for="item in filteredPersonList"
- :key="item.person.personCertNo || item.person.personName || item.index"
- class="person-card"
- :class="{ active: selectedPersonId === item.index }"
- :title="toPersonName(item.person)"
- @click="selectPerson(item.index)"
- >
- <Popover placement="rightTop" trigger="hover" overlayClassName="person-card-popover">
- <template #content>
- <div class="avatar-pop-content">
- <div class="edit-item" @click.stop="openEditModal(item.person)">编辑</div>
- <div class="edit-item delete" @click.stop="handleDelete(item.person)">删除</div>
- </div>
- </template>
- <div class="person-trigger">
- <div class="person-avatar-wrap">
- <PersonAvatar
- class="person-avatar"
- :src="getPersonPhoto(item.person)"
- :alt="toPersonName(item.person)"
- :size="40"
- />
- </div>
- <div class="person-name">{{ toPersonName(item.person) }}</div>
- </div>
- </Popover>
- </div>
- </template>
- <div v-else class="empty-tip">
- <EmptyState
- :title="personList.length ? '未找到匹配对象' : '暂无对象'"
- :description="personList.length ? '试试更换搜索关键词' : '可点击上方“新增对象”创建画像主体'"
- variant="compact"
- :min-height="180"
- />
- </div>
- </div>
- <div class="group-btn-wrap">
- <Button class="side-action-btn side-action-btn--secondary group-btn" @click="openGroupModal"
- >对象分组</Button
- >
- </div>
- </div>
- </aside>
- <section class="right-panel" ref="rightPanelRef">
- <div id="section-basic" class="section-card">
- <div class="section-header">
- <div class="section-title">基本信息</div>
- <Button type="link" class="section-action" @click="handleEditBasicInfo">编辑</Button>
- </div>
- <div class="basic-content">
- <div class="basic-profile">
- <PersonAvatar class="profile-avatar" :src="basicPhoto" :alt="basicName" :size="56" />
- <div class="profile-name">{{ basicName }}</div>
- </div>
- <div class="info-grid">
- <div v-for="item in basicInfo" :key="item.label" class="info-item">
- <span class="info-label">{{ item.label }}:</span>
- <span class="info-value">{{ item.value }}</span>
- </div>
- </div>
- </div>
- </div>
- <IntimacyPanel
- id="section-relation"
- class="section-card"
- :selected-person="selectedPerson"
- @jump-to-analysis="handleJumpToAnalysis"
- />
- <div id="section-comm" class="section-card comm-section">
- <div class="section-header">
- <div class="section-title">通讯信息</div>
- <div class="section-tools">
- <Button type="link" class="section-action" @click="openCallSummaryModal">通信汇总</Button>
- </div>
- </div>
- <div class="comm-info">
- <div class="comm-row">
- <span class="label">电话:</span>
- <span class="value">{{ commSummary.phoneSummary }}</span>
- <button
- v-for="carrier in carrierTags"
- :key="carrier.carrierName"
- type="button"
- class="carrier carrier--link"
- @click="openCallOperPhoneModal(carrier)"
- >
- {{ carrier.label }}
- </button>
- <span v-if="!carrierTags.length" class="carrier">-</span>
- </div>
- <div class="comm-summary-card">
- <div class="comm-grid">
- <div class="grid-item"
- ><span class="label">通讯总次数:</span><span class="value">{{ commSummary.totalCount }}</span></div
- >
- <div class="grid-item"
- ><span class="label">对方号码汇总:</span
- ><span class="value">{{ commSummary.contactCount }}</span></div
- >
- <div class="grid-item"
- ><span class="label">通讯记录时间段:</span
- ><span class="value">{{ commSummary.timeRange }}</span></div
- >
- </div>
- </div>
- </div>
- <div class="comm-divider"></div>
- <div class="comm-chart-row">
- <div class="comm-chart">
- <div class="comm-chart-header">
- <div class="chart-title"><span class="flag"></span>通信类型占比:</div>
- </div>
- <div
- v-if="hasRenderableCommTypeRatioData"
- class="comm-chart-box visual-chart-surface visual-chart-surface--comm visual-chart-surface--ratio"
- >
- <div ref="commTypeChartRef" class="comm-echart"></div>
- </div>
- <div v-else class="chart-empty">
- <EmptyState description="通信占比数据接入后将在此展示" />
- </div>
- </div>
- <div class="comm-chart">
- <div class="comm-top-header">
- <div class="chart-title"><span class="flag"></span>常联系对象TOP10:</div>
- <div class="comm-top-tools">
- <span class="tool-label">联系日期:</span>
- <DatePicker.RangePicker
- v-model:value="commTopQuery.dateRange"
- class="date-input range-date-input comm-top-range"
- value-format="YYYY-MM-DD"
- :placeholder="['开始日期', '结束日期']"
- />
- <Button type="link" size="small" class="chart-more-link" @click="openCallSummaryModal">
- 查看更多
- </Button>
- </div>
- </div>
- <div
- v-if="hasRenderableTopContacts"
- class="comm-top-chart-box visual-chart-surface visual-chart-surface--comm visual-chart-surface--bar"
- >
- <div ref="commTopChartRef" class="comm-top-echart"></div>
- </div>
- <div v-else class="chart-empty">
- <EmptyState description="筛选联系人后可查看 TOP10 统计结果" />
- </div>
- </div>
- </div>
- <div class="comm-divider"></div>
- <div class="station-row">
- <div class="chart-title"><span class="flag"></span>常通话基站:</div>
- <Button type="link" size="small" color="primary" :skill="true" @click="viewStationMap"> 查看地图 </Button>
- </div>
- <div v-if="stations.length" class="station-list">
- <div class="station-item" v-for="station in stations" :key="station">{{ station }}</div>
- </div>
- <div v-else class="chart-empty">
- <EmptyState description="通话基站信息接入后将在此展示" />
- </div>
- </div>
- <div id="section-trade" class="section-card trade-section">
- <div class="section-header">
- <div class="section-title">交易信息</div>
- <div class="section-tools">
- <Button type="link" class="section-action" @click="openTransSummaryModal">交易汇总</Button>
- </div>
- </div>
- <div v-if="hasTradeSummary" class="trade-summary">
- <div class="trade-row">
- <span class="label">银行卡:</span>
- <span class="value">{{ tradeSummary.cardSummary }}</span>
- <button
- v-for="tag in tradeBankTags"
- :key="tag.bankName"
- type="button"
- class="trade-tag trade-tag--link"
- @click="openTransBankCardModal(tag)"
- >
- {{ tag.label }}
- </button>
- </div>
- </div>
- <div v-if="hasTradeSummary" class="comm-divider"></div>
- <div class="trade-chart-row">
- <div class="trade-chart">
- <div class="trade-chart-header">
- <div class="chart-title"><span class="flag"></span>借贷类型占比:</div>
- </div>
- <template v-if="hasTradeRatioData">
- <div
- class="trade-ratio-panel visual-chart-surface visual-chart-surface--trade visual-chart-surface--ratio"
- >
- <div class="donut-wrap">
- <div ref="tradeRatioChartRef" class="trade-ratio-echart"></div>
- <div class="donut-legend">
- <div class="legend-click" @click.stop="handleDrillByDebitCredit('收入')">
- <div class="legend-main">
- <span class="dot success"></span>
- <span class="legend-title">总收入:</span>
- <span class="legend-rate">{{ tradeSummary.incomeRate }}</span>
- </div>
- <div class="legend-amount">{{ tradeSummary.incomeAmount }}</div>
- </div>
- <div class="legend-click" @click.stop="handleDrillByDebitCredit('支出')">
- <div class="legend-main">
- <span class="dot warning"></span>
- <span class="legend-title">总支出:</span>
- <span class="legend-rate">{{ tradeSummary.expendRate }}</span>
- </div>
- <div class="legend-amount">{{ tradeSummary.expendAmount }}</div>
- </div>
- </div>
- </div>
- <div class="trade-kpi">
- <div class="trade-kpi-item">
- <span class="trade-kpi-label">单笔最高支出:</span>
- <span class="trade-kpi-value down">{{ tradeSummary.maxExpend }}</span>
- </div>
- <div class="trade-kpi-item">
- <span class="trade-kpi-label">单笔最高收入:</span>
- <span class="trade-kpi-value up">{{ tradeSummary.maxIncome }}</span>
- </div>
- </div>
- </div>
- </template>
- <div v-else class="chart-empty">
- <EmptyState description="借贷类型汇总完成后将在此展示" />
- </div>
- </div>
- <div class="trade-chart">
- <div class="trade-top-header">
- <div class="chart-title"><span class="flag"></span>常交易对象TOP10:</div>
- <div class="trade-top-tools">
- <span class="tool-label">统计指标:</span>
- <Select
- v-model:value="tradeTopQuery.indicator"
- class="select-input metric-select"
- :options="tradeMetricOptions"
- />
- <span class="tool-label">交易日期:</span>
- <DatePicker.RangePicker
- v-model:value="tradeTopQuery.dateRange"
- class="date-input range-date-input trade-top-range"
- value-format="YYYY-MM-DD"
- :placeholder="['开始日期', '结束日期']"
- />
- <span class="tool-label">维度:</span>
- <Radio.Group v-model:value="tradeTopQuery.dimension" class="trade-top-dimension">
- <Radio value="交易次数">交易次数</Radio>
- <Radio value="交易金额">交易金额</Radio>
- </Radio.Group>
- <Button type="link" size="small" class="chart-more-link" @click="openTransSummaryModal">
- 查看更多
- </Button>
- </div>
- </div>
- <div
- v-if="tradeTop.length"
- class="trade-top-chart-box visual-chart-surface visual-chart-surface--trade visual-chart-surface--bar"
- >
- <div ref="tradeTopChartRef" class="trade-top-echart"></div>
- </div>
- <div v-else class="chart-empty">
- <EmptyState description="调整日期或统计指标后可查看 TOP10 结果" />
- </div>
- </div>
- </div>
- <div class="comm-divider"></div>
- <div class="trade-trend trade-trend-panel">
- <div class="trade-trend-header">
- <div class="trade-trend-heading">
- <div class="chart-title"><span class="flag"></span>交易趋势:</div>
- <div class="trade-trend-subtitle"
- >按时间维度观察收入与支出走势,可结合对方名称与日期范围进行筛选。</div
- >
- </div>
- </div>
- <div class="trend-tools trade-trend-toolbar">
- <div class="trade-trend-filters">
- <span class="tool-label">对方名称:</span>
- <Select
- v-model:value="tradeTrendQuery.otherName"
- class="trend-search-input"
- placeholder="请输入或选择对方名称"
- allow-clear
- show-search
- :filter-option="false"
- :options="tradeTrendOtherNameOptions"
- :loading="tradeTrendOtherNameLoading"
- :not-found-content="tradeTrendOtherNameLoading ? '加载中...' : '暂无数据'"
- @search="handleTradeTrendOtherNameSearch"
- @popupScroll="handleTradeTrendOtherNamePopupScroll"
- @dropdownVisibleChange="handleTradeTrendOtherNameDropdownVisibleChange"
- />
- <span class="tool-label">交易日期:</span>
- <DatePicker.RangePicker
- v-model:value="tradeTrendQuery.dateRange"
- class="date-input range-date-input trend-range-input"
- value-format="YYYY-MM-DD"
- :placeholder="['开始日期', '结束日期']"
- />
- <span class="tool-label">时间维度:</span>
- <div class="trade-trend-dimension">
- <span
- class="radio"
- :class="{ active: tradeTrendQuery.timeDimension === 'MONTH' }"
- @click="changeTradeTrendDimension('MONTH')"
- >月</span
- >
- <span
- class="radio"
- :class="{ active: tradeTrendQuery.timeDimension === 'YEAR' }"
- @click="changeTradeTrendDimension('YEAR')"
- >年</span
- >
- </div>
- </div>
- </div>
- <div
- v-if="trendPoints.length && trendLabels.length"
- class="trade-trend-chart-box visual-chart-surface visual-chart-surface--trade visual-chart-surface--trend"
- >
- <div ref="tradeTrendScrollRef" class="trend-chart-scroll">
- <div class="trend-chart" :style="trendChartStyle">
- <div ref="tradeTrendChartRef" class="trend-echart"></div>
- </div>
- </div>
- </div>
- <div v-else class="chart-empty trade-trend-empty">
- <EmptyState description="设置查询条件后可查看收入与支出趋势" />
- </div>
- </div>
- </div>
- </section>
- </div>
- <div class="quick-nav">
- <div
- v-for="nav in navItems"
- :key="nav.id"
- class="nav-item"
- :class="{ active: activeNavId === nav.id }"
- @click="scrollToSection(nav.id)"
- >{{ nav.label }}</div
- >
- </div>
- </div>
- <Modal
- v-model:open="personModalVisible"
- @ok="handleSubmit"
- @cancel="closePersonModal"
- :confirmLoading="saving"
- :width="1040"
- :centered="true"
- :okText="isEditMode ? '保存修改' : '创建对象'"
- cancelText="取消"
- wrapClassName="person-edit-modal"
- destroyOnClose
- >
- <template #title>
- <div class="portrait-modal-title-block">
- <div class="portrait-modal-title">{{ isEditMode ? '编辑对象' : '新增对象' }}</div>
- <div class="portrait-modal-subtitle">维护画像主体的基础信息、联系方式与银行卡资料</div>
- </div>
- </template>
- <Form layout="vertical" class="person-form">
- <div class="person-form-section">
- <div class="form-section-head">
- <div>
- <div class="form-section-title">主要信息</div>
- <div class="form-section-desc">基础身份信息、籍贯住址与对象标签归类</div>
- </div>
- </div>
- <div class="person-form-grid">
- <Form.Item label="姓名" required :validateStatus="personNameError ? 'error' : ''" :help="personNameError">
- <Input v-model:value="personForm.personName" placeholder="请输入姓名" @blur="validatePersonName" />
- </Form.Item>
- <Form.Item label="证件号">
- <Input v-model:value="personForm.personCertNo" placeholder="请输入证件号" />
- </Form.Item>
- <Form.Item label="性别">
- <Select
- v-model:value="personForm.personGender"
- placeholder="请选择"
- :getPopupContainer="getModalPopupContainer"
- >
- <Select.Option value="男">男</Select.Option>
- <Select.Option value="女">女</Select.Option>
- </Select>
- </Form.Item>
- <Form.Item label="婚姻状态">
- <Select v-model:value="personForm.marry" placeholder="请选择" :getPopupContainer="getModalPopupContainer">
- <Select.Option :value="0">未知</Select.Option>
- <Select.Option :value="1">已婚</Select.Option>
- <Select.Option :value="2">未婚</Select.Option>
- </Select>
- </Form.Item>
- <Form.Item label="出生日期">
- <Input v-model:value="personForm.personBirth" placeholder="请输入 YYYY-MM-DD" />
- </Form.Item>
- <Form.Item label="年龄">
- <Input v-model:value="personForm.personAge" placeholder="请输入年龄" />
- </Form.Item>
- <Form.Item label="标签">
- <Select
- v-model:value="personForm.personTag"
- placeholder="请选择标签"
- :getPopupContainer="getModalPopupContainer"
- >
- <Select.Option value="MAIN">主体</Select.Option>
- </Select>
- </Form.Item>
- <Form.Item label="民族">
- <Input v-model:value="personForm.nation" placeholder="请输入民族" />
- </Form.Item>
- <Form.Item label="籍贯">
- <Input v-model:value="personForm.nativePlace" placeholder="请输入籍贯" />
- </Form.Item>
- <Form.Item label="户籍地">
- <Input v-model:value="personForm.householdRegistered" placeholder="请输入户籍地" />
- </Form.Item>
- <Form.Item label="地址">
- <Input v-model:value="personForm.personAddress" placeholder="请输入地址" />
- </Form.Item>
- <Form.Item label="上传头像" class="form-item-span-2 person-avatar-form-item">
- <div class="person-avatar-upload">
- <input
- ref="avatarInputRef"
- type="file"
- accept="image/*"
- hidden
- aria-hidden="true"
- class="person-avatar-upload__input"
- @change="handleAvatarFileChange"
- />
- <button type="button" class="person-avatar-upload__preview" @click="openAvatarFileDialog">
- <PersonAvatar :src="personAvatarPreviewSrc" :size="92" alt="人物头像" />
- </button>
- <div class="person-avatar-upload__tips">
- <div class="person-avatar-upload__title">支持上传人物头像</div>
- <div class="person-avatar-upload__desc">点击头像或按钮选择图片,保存时直接写入本地图片地址。</div>
- <div class="person-avatar-upload__actions">
- <Button @click="openAvatarFileDialog">上传头像</Button>
- <Button v-if="personForm.photograph" @click="clearAvatarSelection">清空头像</Button>
- </div>
- </div>
- </div>
- </Form.Item>
- </div>
- </div>
- <div class="person-form-section">
- <div class="form-section-head">
- <div>
- <div class="form-section-title">扩展信息</div>
- <div class="form-section-desc">联系方式与银行卡信息补充</div>
- </div>
- </div>
- <div class="person-form-grid">
- <Form.Item label="联系电话" class="form-item-span-2">
- <div class="dynamic-input-list">
- <div v-for="(phone, index) in personForm.phoneList" :key="index" class="dynamic-input-item">
- <Form.Item
- :validateStatus="phoneListErrors[index] ? 'error' : ''"
- :help="phoneListErrors[index]"
- :style="{ marginBottom: '8px' }"
- >
- <Input
- v-model:value="personForm.phoneList[index]"
- placeholder="请输入手机号"
- @blur="validatePhone(index)"
- />
- </Form.Item>
- <Button v-if="personForm.phoneList.length > 1" class="remove-btn" @click="removePhone(index)">
- <svg viewBox="0 0 24 24" fill="currentColor" width="16" height="16">
- <path d="M19 13H5v-2h14v2z" />
- </svg>
- </Button>
- <Button class="add-btn" @click="addPhone">
- <svg viewBox="0 0 24 24" fill="currentColor" width="16" height="16">
- <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
- </svg>
- </Button>
- </div>
- </div>
- </Form.Item>
- <Form.Item label="银行卡" class="form-item-span-2">
- <div class="dynamic-input-list">
- <div v-for="(card, index) in personForm.cardList" :key="index" class="dynamic-input-item">
- <Form.Item
- :validateStatus="cardListErrors[index] ? 'error' : ''"
- :help="cardListErrors[index]"
- :style="{ marginBottom: '8px' }"
- >
- <Input
- v-model:value="personForm.cardList[index]"
- placeholder="请输入银行卡号"
- @blur="validateCard(index)"
- />
- </Form.Item>
- <Button v-if="personForm.cardList.length > 1" class="remove-btn" @click="removeCard(index)">
- <svg viewBox="0 0 24 24" fill="currentColor" width="16" height="16">
- <path d="M19 13H5v-2h14v2z" />
- </svg>
- </Button>
- <Button class="add-btn" @click="addCard">
- <svg viewBox="0 0 24 24" fill="currentColor" width="16" height="16">
- <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
- </svg>
- </Button>
- </div>
- </div>
- </Form.Item>
- </div>
- </div>
- </Form>
- </Modal>
- <QueryTableModal
- v-model:open="callSummaryModalVisible"
- title="通信汇总"
- :z-index="callSummaryModalZIndex"
- :loading="callSummaryLoading"
- :filters="callSummaryQuery"
- :filter-schema="callSummaryFilterSchema"
- :columns="callSummaryColumns"
- :data-source="callSummaryRows"
- :pagination="callSummaryPagination"
- :total-pages="callSummaryTotalPages"
- :page-size-options="pageSizeOptions"
- :show-table-setting="false"
- :table-setting="{ size: true, setting: true, redo: false, fullScreen: false }"
- :can-fullscreen="true"
- @search="handleSearchCallSummary"
- @reset="handleResetCallSummary"
- @prev-page="handleCallSummaryPrevPage"
- @next-page="handleCallSummaryNextPage"
- @page-size-change="handleCallSummaryPageSizeChange"
- @page-change="handleCallSummaryPageChange"
- @sort-change="handleSortCallSummary"
- />
- <QueryTableModal
- v-model:open="callOperPhoneModalVisible"
- :title="callOperPhoneModalTitle"
- wrap-class-name="call-oper-phone-modal"
- :loading="callOperPhoneLoading"
- :filters="callOperPhoneQuery"
- :filter-schema="callOperPhoneFilterSchema"
- :columns="callOperPhoneColumns"
- :data-source="callOperPhoneRows"
- :pagination="callOperPhonePagination"
- :total-pages="callOperPhoneTotalPages"
- :page-size-options="pageSizeOptions"
- :show-table-setting="true"
- :table-setting="{ size: true, setting: true, redo: false, fullScreen: false }"
- :can-fullscreen="true"
- @search="handleSearchCallOperPhone"
- @reset="handleResetCallOperPhone"
- @prev-page="handleCallOperPhonePrevPage"
- @next-page="handleCallOperPhoneNextPage"
- @page-size-change="handleCallOperPhonePageSizeChange"
- @page-change="handleCallOperPhonePageChange"
- @sort-change="handleSortCallOperPhone"
- />
- <CallRecordModal
- v-model:open="callRecordModalVisible"
- title="通信记录"
- :z-index="callRecordModalZIndex"
- :base-query="callRecordBaseQuery"
- :hide-technical-id-columns="true"
- @jump="handleCallRecordJump"
- />
- <QueryTableModal
- v-model:open="transSummaryModalVisible"
- title="交易汇总"
- :z-index="transSummaryModalZIndex"
- :loading="transSummaryLoading"
- :filters="transSummaryQuery"
- :filter-schema="transSummaryFilterSchema"
- :columns="transSummaryColumns"
- :data-source="transSummaryRows"
- :pagination="transSummaryPagination"
- :total-pages="transSummaryTotalPages"
- :page-size-options="pageSizeOptions"
- :show-table-setting="false"
- :table-setting="{ size: true, setting: true, redo: false, fullScreen: false }"
- :can-fullscreen="true"
- @search="handleSearchTransSummary"
- @reset="handleResetTransSummary"
- @prev-page="handleTransSummaryPrevPage"
- @next-page="handleTransSummaryNextPage"
- @page-size-change="handleTransSummaryPageSizeChange"
- @page-change="handleTransSummaryPageChange"
- @sort-change="handleSortTransSummary"
- />
- <QueryTableModal
- v-model:open="transBankCardModalVisible"
- :title="transBankCardModalTitle"
- :loading="transBankCardLoading"
- :filters="transBankCardQuery"
- :filter-schema="transBankCardFilterSchema"
- :columns="transBankCardColumns"
- :data-source="transBankCardRows"
- :pagination="transBankCardPagination"
- :total-pages="transBankCardTotalPages"
- :page-size-options="pageSizeOptions"
- :show-table-setting="true"
- :table-setting="{ size: true, setting: true, redo: false, fullScreen: false }"
- :can-fullscreen="true"
- @search="handleSearchTransBankCard"
- @reset="handleResetTransBankCard"
- @prev-page="handleTransBankCardPrevPage"
- @next-page="handleTransBankCardNextPage"
- @page-size-change="handleTransBankCardPageSizeChange"
- @page-change="handleTransBankCardPageChange"
- @sort-change="handleSortTransBankCard"
- />
- <TransRecordModal
- v-model:open="transRecordModalVisible"
- :z-index="transRecordModalZIndex"
- :base-query="transRecordBaseQuery"
- :hide-technical-id-columns="true"
- @jump="handleTransRecordJump"
- />
- <StationMapModal v-model:open="stationMapModalVisible" :stations="stationMapPoints" :title="stationMapModalTitle" />
- <Modal
- v-model:open="groupModalVisible"
- :footer="null"
- :centered="true"
- :width="960"
- wrapClassName="object-group-modal"
- @cancel="closeGroupModal"
- >
- <template #title>
- <div class="portrait-modal-title-block">
- <div class="portrait-modal-title">对象分组</div>
- <div class="portrait-modal-subtitle">维护分组结构、查看成员状态并设置主要对象</div>
- </div>
- </template>
- <div class="group-modal-content">
- <div class="group-modal-actions">
- <div class="group-modal-actions__info">左侧切换分组,右侧维护成员与主要对象。</div>
- <div class="group-modal-actions__buttons">
- <Button class="head-btn head-btn--primary" @click="openCreateGroupModal">新增分组</Button>
- <Button class="head-btn" @click="handleEditGroup">编辑分组</Button>
- <Button class="head-btn head-btn--danger" @click="handleDeleteGroup">删除分组</Button>
- <Button class="head-btn head-btn--accent" @click="handleAddObject">添加对象</Button>
- </div>
- </div>
- <div class="group-modal-main">
- <div class="group-left">
- <div class="group-panel-head">
- <div class="group-panel-title">分组列表</div>
- <div class="group-panel-badge">{{ objectGroups.length }}</div>
- </div>
- <List :data-source="objectGroups" size="small" class="group-list">
- <template #renderItem="{ item }">
- <List.Item>
- <Button
- block
- class="group-select-btn"
- :type="item.id === activeGroupId ? 'primary' : 'default'"
- @click="activeGroupId = item.id"
- >
- <span class="group-select-btn__name">{{ item.name }}</span>
- </Button>
- </List.Item>
- </template>
- </List>
- </div>
- <div class="group-right">
- <div class="group-panel-head group-panel-head--right">
- <div class="group-panel-title-wrap">
- <div class="group-panel-title">{{ activeGroup?.name || '分组成员' }}</div>
- <div class="group-panel-subtitle">
- {{ activeGroup ? `当前分组共 ${activeGroupMembers.length} 人` : '请选择左侧分组查看成员' }}
- </div>
- </div>
- </div>
- <List :data-source="activeGroupMembers" class="member-list" item-layout="horizontal">
- <template #renderItem="{ item }">
- <List.Item class="member-item">
- <template #actions>
- <Button
- type="link"
- class="member-main-btn"
- :disabled="item.hasMain"
- @click="handleChangeMain(item.id)"
- >
- 设为主对象
- </Button>
- <Button type="link" class="member-remove-btn" @click="handleRemoveMember(item.id)">移出分组</Button>
- </template>
- <List.Item.Meta>
- <template #avatar>
- <Avatar :size="34" class="member-avatar-icon">
- <svg viewBox="0 0 24 24" fill="currentColor">
- <path
- d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
- />
- </svg>
- </Avatar>
- </template>
- <template #title>
- <div class="member-name-row">
- <span class="member-name">{{ item.personName }}</span>
- <span v-if="item.hasMain" class="member-main-tag">主要</span>
- </div>
- </template>
- <template #description>
- <span class="member-desc">{{ item.hasMain ? '当前主对象' : '分组成员' }}</span>
- </template>
- </List.Item.Meta>
- </List.Item>
- </template>
- </List>
- </div>
- </div>
- </div>
- </Modal>
- <Modal
- v-model:open="createGroupModalVisible"
- :title="isEditGroupMode ? '编辑分组' : '新建分组'"
- :confirmLoading="creatingGroup"
- :width="640"
- :centered="true"
- :okText="isEditGroupMode ? '保存分组' : '创建分组'"
- cancelText="取消"
- wrapClassName="create-group-modal"
- @ok="handleCreateGroup"
- @cancel="closeCreateGroupModal"
- >
- <Form layout="vertical" class="create-group-form">
- <div class="create-group-section">
- <div class="create-group-section__head">
- <div class="create-group-section__title">分组信息</div>
- <div class="create-group-section__desc">建议使用便于识别的名称,主体对象可按需选择。</div>
- </div>
- <Form.Item label="分组名称" required :validateStatus="groupNameError ? 'error' : ''" :help="groupNameError">
- <Input
- v-model:value="createGroupForm.groupName"
- placeholder="请输入分组名称"
- @blur="() => validateGroupName(true)"
- />
- </Form.Item>
- <Form.Item
- label="分组主体对象"
- :required="!isEditGroupMode"
- :validateStatus="mainPersonError ? 'error' : ''"
- :help="mainPersonError"
- >
- <Select
- v-model:value="createGroupForm.mainPerson"
- :options="personOptions"
- :placeholder="isEditGroupMode ? '请选择主体对象' : '请选择主体对象'"
- allowClear
- :getPopupContainer="getModalPopupContainer"
- />
- </Form.Item>
- <Form.Item label="备注">
- <Input.TextArea v-model:value="createGroupForm.remark" :rows="4" placeholder="请输入分组说明" />
- </Form.Item>
- </div>
- </Form>
- </Modal>
- <Modal
- v-model:open="addObjectModalVisible"
- title="添加对象"
- :confirmLoading="addingObjectToGroup"
- :width="720"
- :centered="true"
- okText="加入分组"
- cancelText="取消"
- wrapClassName="add-group-person-modal"
- @ok="handleConfirmAddObject"
- @cancel="closeAddObjectModal"
- >
- <div class="add-object-modal">
- <div class="add-object-modal__search">
- <div class="add-object-modal__search-head">
- <div class="add-object-modal__title-block">
- <div class="add-object-modal__title">选择对象</div>
- <div class="add-object-modal__desc">
- {{ activeGroup ? `当前分组:${activeGroup.name}` : '请选择需要加入分组的对象' }}
- </div>
- </div>
- <div class="add-object-modal__stats">共 {{ filteredAddObjectCandidates.length }} 个对象</div>
- </div>
- <Input v-model:value="addObjectKeyword" allowClear placeholder="请输入姓名 / 证件号 / 手机号" />
- </div>
- <div class="add-object-modal__content">
- <div v-if="filteredAddObjectCandidates.length" class="add-object-list">
- <div
- v-for="item in filteredAddObjectCandidates"
- :key="item.key"
- class="add-object-item"
- :class="{
- 'is-selected': selectedAddPersonNames.includes(item.name),
- 'is-disabled': item.disabled,
- }"
- @click="handleToggleAddObject(item)"
- >
- <Checkbox
- :checked="selectedAddPersonNames.includes(item.name)"
- :disabled="item.disabled"
- @click.stop
- @change="(e) => handleCheckAddObject(item, e.target.checked)"
- />
- <PersonAvatar
- class="add-object-item__avatar"
- :src="item.photograph || undefined"
- :alt="item.name"
- :size="42"
- />
- <div class="add-object-item__body">
- <div class="add-object-item__head">
- <div class="add-object-item__name">{{ item.name }}</div>
- <span v-if="item.disabled" class="add-object-item__tag">已在分组</span>
- </div>
- <div class="add-object-item__meta">
- <span>证件号:{{ maskCertNo(item.personCertNo) }}</span>
- <span>手机号:{{ item.primaryPhone }}</span>
- <span>银行卡:{{ item.cardCount }} 张</span>
- </div>
- </div>
- </div>
- </div>
- <div v-else class="add-object-modal__empty">{{ addObjectEmptyText }}</div>
- </div>
- </div>
- </Modal>
- </div>
- </template>
- <script lang="ts" setup name="ViewsDmPortrait">
- import { computed, ref, onMounted, reactive, watch, nextTick, onBeforeUnmount, h } from 'vue';
- import { useRoute, useRouter } from 'vue-router';
- import {
- Button,
- DatePicker,
- Input,
- Select,
- Modal,
- Form,
- Popover,
- List,
- Avatar,
- Radio,
- Checkbox,
- } from 'ant-design-vue';
- import componentSetting from '@jeesite/core/settings/componentSetting';
- import { useDesign } from '@jeesite/core/hooks/web/useDesign';
- import { useGlobSetting } from '@jeesite/core/hooks/setting';
- import { useMessage } from '@jeesite/core/hooks/web/useMessage';
- import { getModalPopupContainer as resolveModalPopupContainer } from '@jeesite/core/utils';
- import { normalizeAvatarSrc } from '@jeesite/core/utils/avatar';
- import {
- COMPARE_OPERATOR_OPTIONS,
- DEFAULT_COMPARE_OPERATOR,
- normalizeCompareOperator,
- } from '@jeesite/core/utils/compareOperator';
- import { maskCertNo } from '@jeesite/core/utils/sensitive';
- import { EmptyState } from '@jeesite/core/components/EmptyState';
- import { PersonAvatar } from '@jeesite/core/components/PersonAvatar';
- import QueryTableModal from './components/QueryTableModal.vue';
- import IntimacyPanel from './components/IntimacyPanel.vue';
- import StationMapModal from './components/StationMapModal.vue';
- import CallRecordModal from '../../../call/views/components/CallRecordModal.vue';
- import TransRecordModal from '../../../trans/views/components/TransRecordModal.vue';
- import * as echarts from 'echarts';
- import type { CallRecordQuery } from '../../../call/api/types/query';
- import type { TransRecordQuery } from '../../../trans/api/types/query';
- import {
- getPersons,
- createPersonBasicInfo,
- updatePersonBasicInfo,
- deletePersonBasicInfo,
- listPersonGroups,
- createPersonGroup,
- updatePersonGroup,
- deletePersonGroup,
- addPersonToGroup,
- remPersonFromGroup,
- changeMainPerson,
- } from '../../../person/api/personApi';
- import type {
- PersonBasicInfo,
- PersonBasicInfoDTO,
- CallDataProfileStatDTO,
- CallOftenTop10DTO,
- CallOpenInfo,
- CallStatStationDTO,
- TransBankCardInfoDTO,
- TransDataProfileStatDTO,
- TransOftenTop10DTO,
- TransTrendDTO,
- TransRecordSummaryDTO,
- } from '../../../person/api/types/dto';
- import {
- callStat,
- callOftenTop10,
- getCallOperPhoneInfo,
- callStatStation,
- getTransOtherName,
- transStat,
- transOfPersons,
- transAmountTrendYM,
- transAmountTrendY,
- getTransBankCardInfo,
- getTransRecordSummary,
- getCallRecordSummary,
- } from '../../../person/api/dpApi';
- import { getCallRecord } from '../../../call/api/callApi';
- import {
- CallOperPhoneInfoQuery,
- TransBankCardInfoQuery,
- TransRecordSummaryQuery,
- } from '../../../person/api/types/query';
- const { prefixCls } = useDesign('case-portrait');
- const { ctxAdminPath } = useGlobSetting();
- const { createMessage, createConfirm } = useMessage();
- const route = useRoute();
- const router = useRouter();
- const getModalPopupContainer = (triggerNode?: HTMLElement) => resolveModalPopupContainer(triggerNode);
- type PortraitPerson = PersonBasicInfo & {
- personNation?: string;
- personEducation?: string;
- personMarriage?: string;
- personHeight?: string | number;
- personResidence?: string;
- personWorkUnit?: string;
- personGroup?: string;
- };
- const personList = ref<PortraitPerson[]>([]);
- const selectedPersonId = ref<number | null>(null);
- const personModalVisible = ref(false);
- const callSummaryModalVisible = ref(false);
- const callSummaryModalZIndex = 1200;
- const callOperPhoneModalVisible = ref(false);
- const callRecordModalVisible = ref(false);
- const callRecordModalZIndex = 1210;
- const transSummaryModalVisible = ref(false);
- const transSummaryModalZIndex = 1200;
- const transBankCardModalVisible = ref(false);
- const transRecordModalVisible = ref(false);
- const transRecordModalZIndex = 1210;
- const stationMapModalVisible = ref(false);
- const groupModalVisible = ref(false);
- const createGroupModalVisible = ref(false);
- const creatingGroup = ref(false);
- const isEditGroupMode = ref(false);
- const editingGroupData = ref<{ id: string; name: string; remark?: string } | null>(null);
- const isEditMode = ref(false);
- const objectGroups = ref<{ id: string; name: string; remark?: string }[]>([]);
- const activeGroupId = ref<string | null>(null);
- const groupMembers = ref<{ id: string; groupId: string; personName: string; hasMain?: boolean }[]>([]);
- const saving = ref(false);
- const editingPerson = ref<PersonBasicInfo | null>(null);
- const loadingProfile = ref(false);
- const stationMapPoints = computed<CallStatStationDTO[]>(() =>
- stationData.value.filter((item): item is CallStatStationDTO => {
- if (!item || typeof item !== 'object') return false;
- const longitude = Number(String(item.personStationLongitude || '').trim());
- const latitude = Number(String(item.personStationLatitude || '').trim());
- return Number.isFinite(longitude) && Number.isFinite(latitude);
- }),
- );
- const canViewStationMap = computed(() => stationMapPoints.value.length > 0);
- const stationMapModalTitle = computed(() => {
- const personName = selectedPerson.value?.personName?.trim();
- const suffix = stationMapPoints.value.length ? `(${stationMapPoints.value.length}个节点)` : '';
- return personName ? `${personName} - 通信基站${suffix}` : `通信基站${suffix}`;
- });
- const callStatData = ref<CallDataProfileStatDTO | null>(null);
- const transStatData = ref<TransDataProfileStatDTO | null>(null);
- const callOperPhoneModalTitle = ref('运营商手机号信息');
- const transBankCardModalTitle = ref('银行卡交易信息');
- const commTypeRatioData = ref<{ value: number; name: string; itemStyle?: { color: string } }[]>([]);
- const commTop10Data = ref<CallOftenTop10DTO[]>([]);
- const stationData = ref<CallStatStationDTO[]>([]);
- const stationDisplayLimit = 3;
- const tradeTop10Data = ref<TransOftenTop10DTO[]>([]);
- const tradeTrendData = ref<TransTrendDTO[]>([]);
- const tradeTrendChartRef = ref<HTMLElement | null>(null);
- const tradeTrendScrollRef = ref<HTMLElement | null>(null);
- const tradeRatioChartRef = ref<HTMLElement | null>(null);
- const tradeTopChartRef = ref<HTMLElement | null>(null);
- const commTypeChartRef = ref<HTMLElement | null>(null);
- const commTopChartRef = ref<HTMLElement | null>(null);
- let tradeTrendChart: echarts.ECharts | null = null;
- let tradeRatioChart: echarts.ECharts | null = null;
- let tradeTopChart: echarts.ECharts | null = null;
- let commTypeChart: echarts.ECharts | null = null;
- let commTopChart: echarts.ECharts | null = null;
- let chartResizeObserver: ResizeObserver | null = null;
- let chartResizeFrame: number | null = null;
- const observedChartElements = new Set<Element>();
- let tradeTrendSearchTimer: number | null = null;
- const trendLegendArr = ref([
- { isShow: true, name: '收入', color: '#5ad8a6' },
- { isShow: true, name: '支出', color: '#e8684a' },
- ]);
- const commTopQuery = reactive({
- dateRange: undefined as [string, string] | undefined,
- });
- type TradeTopDimension = '交易金额' | '交易次数';
- const tradeTopQuery = reactive({
- indicator: 'personName',
- dateRange: undefined as [string, string] | undefined,
- dimension: '交易金额' as TradeTopDimension,
- });
- const tradeTrendQuery = reactive({
- otherName: '',
- dateRange: undefined as [string, string] | undefined,
- timeDimension: 'YEAR' as 'MONTH' | 'YEAR',
- });
- const tradeTrendOtherNameOptions = ref<{ label: string; value: string }[]>([]);
- const tradeTrendOtherNameLoading = ref(false);
- const tradeTrendOtherNameSearch = ref('');
- const tradeTrendOtherNamePage = ref(1);
- const tradeTrendOtherNameHasMore = ref(true);
- const tradeTrendOtherNameLoadedPerson = ref('');
- const avatarInputRef = ref<HTMLInputElement | null>(null);
- const avatarPreviewObjectUrl = ref('');
- let tradeTrendOtherNameSearchTimer: number | null = null;
- let tradeTrendOtherNameRequestId = 0;
- const personForm = reactive({
- personName: '',
- personCertNo: '',
- personBirth: '',
- personGender: '',
- personAge: '',
- personAddress: '',
- photograph: '',
- marry: 0,
- nation: '',
- nativePlace: '',
- householdRegistered: '',
- personTag: '',
- phoneList: [''],
- cardList: [''],
- });
- const phoneListErrors = ref<string[]>([]);
- const cardListErrors = ref<string[]>([]);
- const personNameError = ref('');
- const groupNameError = ref('');
- const mainPersonError = ref('');
- const createGroupForm = reactive({
- groupName: '',
- mainPerson: undefined as string | undefined,
- remark: '',
- });
- const addObjectModalVisible = ref(false);
- const addingObjectToGroup = ref(false);
- const addObjectKeyword = ref('');
- const selectedAddPersonNames = ref<string[]>([]);
- const createCallSummaryQuery = () => ({
- keyword: '',
- otherName: '',
- otherPhone: '',
- callDirection: '',
- callType: '',
- startDate: '',
- endDate: '',
- orderKey: '',
- sort: 'DESC' as 'ASC' | 'DESC',
- });
- type CallSummaryQueryState = ReturnType<typeof createCallSummaryQuery>;
- const callSummaryLoading = ref(false);
- const callSummaryQuery = reactive<CallSummaryQueryState>(createCallSummaryQuery());
- const callSummaryBaseQuery = ref<CallSummaryQueryState>(createCallSummaryQuery());
- const callSummaryRows = ref<any[]>([]);
- const callSummaryPagination = reactive({
- page: 1,
- limit: componentSetting.table.defaultPageSize,
- total: 0,
- });
- const callSummaryTotalPages = computed(() => {
- if (!callSummaryPagination.total) return 1;
- return Math.max(1, Math.ceil(callSummaryPagination.total / callSummaryPagination.limit));
- });
- const createCallOperPhoneQuery = () => ({
- personName: '',
- operatorName: '',
- phoneNumber: '',
- orderKey: '',
- sort: 'DESC' as 'ASC' | 'DESC',
- phoneList: [] as string[],
- operatorId: '',
- });
- type CallOperPhoneQueryState = ReturnType<typeof createCallOperPhoneQuery>;
- const callOperPhoneLoading = ref(false);
- const callOperPhoneQuery = reactive<CallOperPhoneQueryState>(createCallOperPhoneQuery());
- const callOperPhoneBaseQuery = ref<CallOperPhoneQueryState>(createCallOperPhoneQuery());
- const callOperPhoneAllRows = ref<any[]>([]);
- const callOperPhoneRows = ref<any[]>([]);
- const callOperPhonePagination = reactive({
- page: 1,
- limit: componentSetting.table.defaultPageSize,
- total: 0,
- });
- const callOperPhoneTotalPages = computed(() => {
- if (!callOperPhonePagination.total) return 1;
- return Math.max(1, Math.ceil(callOperPhonePagination.total / callOperPhonePagination.limit));
- });
- const createTransBankCardQuery = () => ({
- keyword: '',
- orderKey: '',
- sort: 'DESC' as 'ASC' | 'DESC',
- bankName: '',
- cardNoList: [] as string[],
- });
- type TransBankCardQueryState = ReturnType<typeof createTransBankCardQuery>;
- const transBankCardLoading = ref(false);
- const transBankCardQuery = reactive<TransBankCardQueryState>(createTransBankCardQuery());
- const transBankCardBaseQuery = ref<TransBankCardQueryState>(createTransBankCardQuery());
- const transBankCardRows = ref<any[]>([]);
- const transBankCardPagination = reactive({
- page: 1,
- limit: componentSetting.table.defaultPageSize,
- total: 0,
- });
- const transBankCardTotalPages = computed(() => {
- if (!transBankCardPagination.total) return 1;
- return Math.max(1, Math.ceil(transBankCardPagination.total / transBankCardPagination.limit));
- });
- const createTransSummaryQuery = () => ({
- personCardNo: '',
- otherName: '',
- transAmount: '',
- transAmountSymbol: DEFAULT_COMPARE_OPERATOR,
- transCount: '',
- transCountSymbol: DEFAULT_COMPARE_OPERATOR,
- orderKey: '',
- sort: 'DESC' as 'ASC' | 'DESC',
- });
- type TransSummaryQueryState = ReturnType<typeof createTransSummaryQuery>;
- const transSummaryLoading = ref(false);
- const transSummaryQuery = reactive<TransSummaryQueryState>(createTransSummaryQuery());
- const transSummaryBaseQuery = ref<TransSummaryQueryState>(createTransSummaryQuery());
- type TransRecordDrilldownQuery = Partial<TransRecordQuery> & Record<string, any>;
- const transSummaryRows = ref<any[]>([]);
- const callRecordBaseQuery = ref<Partial<CallRecordQuery>>({});
- const transRecordBaseQuery = ref<TransRecordDrilldownQuery>({});
- const transSummaryPagination = reactive({
- page: 1,
- limit: componentSetting.table.defaultPageSize,
- total: 0,
- });
- const transSummaryTotalPages = computed(() => {
- if (!transSummaryPagination.total) return 1;
- return Math.max(1, Math.ceil(transSummaryPagination.total / transSummaryPagination.limit));
- });
- const pageSizeOptions = componentSetting.table.pageSizeOptions.map((value) => ({ label: value, value }));
- const compareOperatorOptions = COMPARE_OPERATOR_OPTIONS;
- const callSummaryFilterSchema = [
- { field: 'otherPhone', label: '对方号码', type: 'input' as const, placeholder: '请输入对方号码', width: 260 },
- { field: 'otherName', label: '对方姓名', type: 'input' as const, placeholder: '请输入对方姓名', width: 260 },
- ];
- const callSummaryColumns = [
- { title: '本方姓名', dataIndex: 'personName', key: 'personName', width: 160, sorter: true },
- { title: '本方号码', dataIndex: 'personPhone', key: 'personPhone', width: 180, sorter: true },
- { title: '对方姓名', dataIndex: 'otherName', key: 'otherName', width: 160, sorter: true },
- { title: '对方号码', dataIndex: 'otherPhone', key: 'otherPhone', width: 200, sorter: true },
- { title: '通话次数', dataIndex: 'callCount', key: 'callCount', width: 120, sorter: true },
- {
- title: '操作',
- dataIndex: 'action',
- key: 'action',
- width: 120,
- fixed: 'right' as const,
- align: 'center' as const,
- customRender: ({ record }: any) =>
- h(
- Button,
- {
- type: 'link',
- size: 'small',
- onClick: () => handleViewCallSummaryDetail(record),
- },
- { default: () => '查看详情' },
- ),
- },
- ];
- const callOperPhoneFilterSchema = [
- { field: 'phoneNumber', label: '手机号码', type: 'input' as const, placeholder: '请输入手机号码', width: 220 },
- ];
- const callOperPhoneColumns = [
- { title: '本方姓名', dataIndex: 'personName', key: 'personName', width: 180, sorter: true },
- { title: '手机号码', dataIndex: 'personPhone', key: 'personPhone', width: 180, sorter: true },
- { title: '号码类型', dataIndex: 'phoneType', key: 'phoneType', width: 140, sorter: true },
- { title: '运营商标识', dataIndex: 'operatorId', key: 'operatorId', width: 180, sorter: true },
- { title: '用户类型', dataIndex: 'personType', key: 'personType', width: 140, sorter: true },
- { title: '使用人证件号码', dataIndex: 'personCertNo', key: 'personCertNo', width: 220, sorter: true },
- { title: '使用人证件地址', dataIndex: 'personCertAddress', key: 'personCertAddress', width: 260 },
- { title: '通信地址', dataIndex: 'mailingAddress', key: 'mailingAddress', width: 260 },
- { title: '号码归属省', dataIndex: 'province', key: 'province', width: 140, sorter: true },
- { title: '号码归属市', dataIndex: 'city', key: 'city', width: 140, sorter: true },
- { title: '号码状态', dataIndex: 'phoneStatus', key: 'phoneStatus', width: 140, sorter: true },
- { title: '入网时间', dataIndex: 'activationDateTime', key: 'activationDateTime', width: 200, sorter: true },
- { title: '销户时间', dataIndex: 'closingDateTime', key: 'closingDateTime', width: 200, sorter: true },
- { title: '首次通话时间', dataIndex: 'firstCallDateTime', key: 'firstCallDateTime', width: 200, sorter: true },
- {
- title: '最后停机时间',
- dataIndex: 'lastSuspensionDateTime',
- key: 'lastSuspensionDateTime',
- width: 200,
- sorter: true,
- },
- {
- title: '操作',
- dataIndex: 'action',
- key: 'action',
- width: 120,
- fixed: 'right' as const,
- align: 'center' as const,
- customRender: ({ record }: any) =>
- h(
- Button,
- {
- type: 'link',
- size: 'small',
- onClick: () => handleViewCallOperPhoneDetail(record),
- },
- { default: () => '查看详情' },
- ),
- },
- ];
- const transBankCardFilterSchema = [
- { field: 'keyword', label: '卡号', type: 'input' as const, placeholder: '请输入卡号' },
- ];
- const transBankCardColumns = [
- { title: '本方卡号', dataIndex: 'personCardNo', key: 'personCardNo', width: 200, sorter: true },
- { title: '本方姓名', dataIndex: 'personName', key: 'personName', width: 140 },
- { title: '所属银行', dataIndex: 'bankName', key: 'bankName', width: 180, sorter: true },
- { title: '收入总金额', dataIndex: 'incomeTotalAmount', key: 'incomeTotalAmount', width: 140, sorter: true },
- { title: '支出总金额', dataIndex: 'expenseTotalAmount', key: 'expenseTotalAmount', width: 140, sorter: true },
- { title: '净额', dataIndex: 'netAmount', key: 'netAmount', width: 140, sorter: true },
- { title: '交易总金额', dataIndex: 'transTotalAmount', key: 'transTotalAmount', width: 140, sorter: true },
- { title: '交易笔数', dataIndex: 'transCount', key: 'transCount', width: 100, sorter: true },
- { title: '账户余额', dataIndex: 'totalBalance', key: 'totalBalance', width: 140, sorter: true },
- { title: '账户状态', dataIndex: 'accountStatus', key: 'accountStatus', width: 100, sorter: true },
- { title: '开户日期', dataIndex: 'openingDate', key: 'openingDate', width: 140, sorter: true },
- { title: '销户日期', dataIndex: 'closeAccountDate', key: 'closeAccountDate', width: 140, sorter: true },
- {
- title: '操作',
- dataIndex: 'action',
- key: 'action',
- width: 120,
- fixed: 'right' as const,
- align: 'center' as const,
- customRender: ({ record }: any) =>
- h(
- Button,
- {
- type: 'link',
- size: 'small',
- onClick: () => handleViewTransBankCardDetail(record),
- },
- { default: () => '查看详情' },
- ),
- },
- ];
- const transSummaryFilterSchema = [
- {
- field: 'personCardNo',
- label: '银行卡(账号)',
- type: 'input' as const,
- placeholder: '请输入银行卡(账号)',
- width: 260,
- },
- {
- field: 'otherName',
- label: '对方名称',
- type: 'input' as const,
- placeholder: '请输入对方名称',
- width: 260,
- },
- {
- field: 'transAmount',
- label: '交易总金额',
- type: 'compare-input' as const,
- operatorField: 'transAmountSymbol',
- options: compareOperatorOptions,
- operatorWidth: 72,
- inputWidth: 180,
- inputMaxWidth: 180,
- placeholder: '请输入交易总金额',
- },
- {
- field: 'transCount',
- label: '交易次数',
- type: 'compare-input' as const,
- operatorField: 'transCountSymbol',
- options: compareOperatorOptions,
- operatorWidth: 72,
- inputWidth: 180,
- inputMaxWidth: 180,
- placeholder: '请输入交易次数',
- },
- ];
- const transSummaryColumns = [
- { title: '本方卡号', dataIndex: 'personCardNo', key: 'personCardNo', width: 180, sorter: true },
- { title: '本方姓名', dataIndex: 'personName', key: 'personName', width: 160, sorter: true },
- { title: '对方卡号', dataIndex: 'otherCardNo', key: 'otherCardNo', width: 180, sorter: true },
- { title: '对方名称', dataIndex: 'otherName', key: 'otherName', width: 160, sorter: true },
- { title: '所属银行', dataIndex: 'bankName', key: 'bankName', width: 180, sorter: true },
- { title: '交易次数', dataIndex: 'transCount', key: 'transCount', width: 120, sorter: true },
- { title: '交易总金额', dataIndex: 'transTotalAmount', key: 'transTotalAmount', width: 140, sorter: true },
- { title: '收入总金额', dataIndex: 'incomeTotalAmount', key: 'incomeTotalAmount', width: 180, sorter: true },
- { title: '支出总金额', dataIndex: 'expenseTotalAmount', key: 'expenseTotalAmount', width: 180, sorter: true },
- {
- title: '操作',
- dataIndex: 'action',
- key: 'action',
- width: 120,
- fixed: 'right' as const,
- align: 'center' as const,
- customRender: ({ record }: any) =>
- h(
- Button,
- {
- type: 'link',
- size: 'small',
- onClick: () => handleViewTransSummaryDetail(record),
- },
- { default: () => '查看详情' },
- ),
- },
- ];
- const toPersonName = (person: PersonBasicInfo) => person.personName ?? '-';
- const getSelectedPersonPhones = (person = selectedPerson.value) => {
- const phones = (person?.phoneList || []).map((item) => String(item.personNo || '').trim()).filter(Boolean);
- return phones.length ? Array.from(new Set(phones)) : undefined;
- };
- const toLibNoList = (text: string, libType: 2 | 3) => {
- return text
- .split(',')
- .map((item) => item.trim())
- .filter(Boolean)
- .map((personNo) => ({ personNo, libType }));
- };
- const normalizePersonIdCard = (value?: string | null) =>
- String(value ?? '')
- .trim()
- .replace(/\s/g, '')
- .toUpperCase();
- const isLeapYear = (year: number) => (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
- const isValidDateParts = (year: number, month: number, day: number) => {
- if (!Number.isInteger(year) || !Number.isInteger(month) || !Number.isInteger(day)) return false;
- if (month < 1 || month > 12 || day < 1) return false;
- const dayList = [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
- return day <= dayList[month - 1];
- };
- const getPersonIdCardCheckCode = (body: string) => {
- const weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
- const codes = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'];
- const total = body.split('').reduce((sum, char, index) => sum + Number(char) * weights[index], 0);
- return codes[total % 11];
- };
- const parsePersonProfileFromIdCard = (value?: string | null) => {
- const certNo = normalizePersonIdCard(value);
- if (!certNo) return null;
- let birthText = '';
- let gender = '';
- if (/^\d{15}$/u.test(certNo)) {
- const year = Number(`19${certNo.slice(6, 8)}`);
- const month = Number(certNo.slice(8, 10));
- const day = Number(certNo.slice(10, 12));
- if (!isValidDateParts(year, month, day)) return null;
- birthText = `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
- gender = Number(certNo[14]) % 2 === 1 ? '男' : '女';
- } else if (/^\d{17}[\dX]$/u.test(certNo)) {
- const year = Number(certNo.slice(6, 10));
- const month = Number(certNo.slice(10, 12));
- const day = Number(certNo.slice(12, 14));
- if (!isValidDateParts(year, month, day)) return null;
- if (getPersonIdCardCheckCode(certNo.slice(0, 17)) !== certNo[17]) return null;
- birthText = `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
- gender = Number(certNo[16]) % 2 === 1 ? '男' : '女';
- } else {
- return null;
- }
- const [yearText, monthText, dayText] = birthText.split('-');
- const birthDate = new Date(Number(yearText), Number(monthText) - 1, Number(dayText));
- if (Number.isNaN(birthDate.getTime())) return null;
- const now = new Date();
- let age = now.getFullYear() - birthDate.getFullYear();
- const currentMonthDay = `${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`;
- if (`${monthText}-${dayText}` > currentMonthDay) {
- age -= 1;
- }
- age = Math.max(0, age);
- return {
- personBirth: birthText,
- personGender: gender,
- personAge: String(age),
- };
- };
- const autofillPersonProfileByIdCard = (certNo?: string | null) => {
- const parsed = parsePersonProfileFromIdCard(certNo);
- if (!parsed) return;
- personForm.personBirth = parsed.personBirth;
- personForm.personGender = parsed.personGender;
- personForm.personAge = parsed.personAge;
- };
- const resetPersonForm = () => {
- revokeAvatarPreviewObjectUrl();
- personForm.personName = '';
- personForm.personCertNo = '';
- personForm.personBirth = '';
- personForm.personGender = '';
- personForm.personAge = '';
- personForm.personAddress = '';
- updatePersonPhotograph('');
- personForm.marry = 0;
- personForm.nation = '';
- personForm.nativePlace = '';
- personForm.householdRegistered = '';
- personForm.personTag = '';
- personForm.phoneList = [''];
- personForm.cardList = [''];
- phoneListErrors.value = [];
- cardListErrors.value = [];
- personNameError.value = '';
- };
- const fillPersonForm = (person: PersonBasicInfo) => {
- revokeAvatarPreviewObjectUrl();
- personForm.personName = person.personName ?? '';
- personForm.personCertNo = person.personCertNo ?? '';
- personForm.personBirth = person.personBirth ?? '';
- personForm.personGender = person.personGender ?? '';
- personForm.personAge = person.personAge !== undefined && person.personAge !== null ? String(person.personAge) : '';
- personForm.personAddress = person.personAddress ?? '';
- updatePersonPhotograph(person.photograph);
- personForm.marry = person.marry ?? 0;
- personForm.nation = person.nation ?? '';
- personForm.nativePlace = person.nativePlace ?? '';
- personForm.householdRegistered = person.householdRegistered ?? '';
- personForm.personTag = person.personTag ?? '';
- const phoneArr = (person.phoneList || []).map((item) => item.personNo ?? '').filter(Boolean);
- personForm.phoneList = phoneArr.length > 0 ? phoneArr : [''];
- const cardArr = (person.cardList || []).map((item) => item.personNo ?? '').filter(Boolean);
- personForm.cardList = cardArr.length > 0 ? cardArr : [''];
- if (personForm.personCertNo && (!personForm.personBirth || !personForm.personGender || !personForm.personAge)) {
- autofillPersonProfileByIdCard(personForm.personCertNo);
- }
- phoneListErrors.value = [];
- cardListErrors.value = [];
- personNameError.value = '';
- };
- watch(
- () => personForm.personCertNo,
- (value) => {
- const certNo = normalizePersonIdCard(value);
- if (!certNo) return;
- autofillPersonProfileByIdCard(certNo);
- },
- );
- const resetRightPanelData = () => {
- callStatData.value = null;
- transStatData.value = null;
- commTypeRatioData.value = [];
- commTop10Data.value = [];
- stationData.value = [];
- tradeTop10Data.value = [];
- tradeTrendData.value = [];
- };
- const normalizeObjectList = <T extends Record<string, any>>(source: unknown): T[] => {
- if (!Array.isArray(source)) return [];
- return source.filter((item): item is T => !!item && typeof item === 'object');
- };
- const normalizeTrendRows = (resp: any): TransTrendDTO[] => {
- if (Array.isArray(resp)) return normalizeObjectList<TransTrendDTO>(resp);
- if (Array.isArray(resp?.records)) return normalizeObjectList<TransTrendDTO>(resp.records);
- if (Array.isArray(resp?.data)) return normalizeObjectList<TransTrendDTO>(resp.data);
- return [];
- };
- const loadTradeTrendData = async (personName: string) => {
- const startDate = tradeTrendQuery.dateRange?.[0];
- const endDate = tradeTrendQuery.dateRange?.[1];
- const otherName = String(tradeTrendQuery.otherName || '').trim();
- const payload = {
- personName,
- otherName: otherName || undefined,
- startDate: startDate || undefined,
- endDate: endDate || undefined,
- } as any;
- const resp =
- tradeTrendQuery.timeDimension === 'YEAR' ? await transAmountTrendY(payload) : await transAmountTrendYM(payload);
- return normalizeTrendRows(resp);
- };
- const normalizeStringList = (resp: any) => {
- const candidates = [resp, resp?.records, resp?.list, resp?.data, resp?.data?.records, resp?.data?.list];
- for (const item of candidates) {
- if (Array.isArray(item)) {
- return item.map((value) => String(value || '').trim()).filter(Boolean);
- }
- }
- return [] as string[];
- };
- const setTradeTrendOtherNameOptions = (names: string[], replace = false) => {
- const optionMap = new Map<string, { label: string; value: string }>();
- const appendOption = (value: string) => {
- const normalized = String(value || '').trim();
- if (!normalized) return;
- optionMap.set(normalized, { label: normalized, value: normalized });
- };
- if (!replace) {
- tradeTrendOtherNameOptions.value.forEach((item) => appendOption(item.value));
- }
- names.forEach((item) => appendOption(item));
- const currentValue = String(tradeTrendQuery.otherName || '').trim();
- if (currentValue) {
- appendOption(currentValue);
- }
- tradeTrendOtherNameOptions.value = Array.from(optionMap.values());
- };
- const resetTradeTrendOtherNameState = () => {
- tradeTrendOtherNameRequestId += 1;
- if (tradeTrendOtherNameSearchTimer !== null) {
- window.clearTimeout(tradeTrendOtherNameSearchTimer);
- tradeTrendOtherNameSearchTimer = null;
- }
- tradeTrendOtherNameOptions.value = [];
- tradeTrendOtherNameSearch.value = '';
- tradeTrendOtherNamePage.value = 1;
- tradeTrendOtherNameHasMore.value = true;
- tradeTrendOtherNameLoadedPerson.value = '';
- tradeTrendOtherNameLoading.value = false;
- };
- const resetProfilePanelQueries = () => {
- commTopQuery.dateRange = undefined;
- tradeTopQuery.indicator = 'personName';
- tradeTopQuery.dateRange = undefined;
- tradeTopQuery.dimension = '交易金额';
- tradeTrendQuery.otherName = '';
- tradeTrendQuery.dateRange = undefined;
- tradeTrendQuery.timeDimension = 'YEAR';
- trendLegendArr.value = [
- { isShow: true, name: '收入', color: '#5ad8a6' },
- { isShow: true, name: '支出', color: '#e8684a' },
- ];
- resetTradeTrendOtherNameState();
- };
- const loadTradeTrendOtherNameOptions = async (options?: { reset?: boolean; search?: string }) => {
- const { reset = false, search = tradeTrendOtherNameSearch.value } = options || {};
- const personName = selectedPerson.value?.personName?.trim();
- if (!personName) {
- resetTradeTrendOtherNameState();
- return;
- }
- if (tradeTrendOtherNameLoading.value) return;
- if (!reset && !tradeTrendOtherNameHasMore.value) return;
- const page = reset ? 1 : tradeTrendOtherNamePage.value;
- const currentRequestId = ++tradeTrendOtherNameRequestId;
- tradeTrendOtherNameLoading.value = true;
- try {
- const resp = await getTransOtherName({
- personName,
- search: search || undefined,
- page,
- limit: 20,
- } as any);
- if (currentRequestId !== tradeTrendOtherNameRequestId) return;
- const list = normalizeStringList(resp);
- const total = Number((resp as any)?.total ?? (resp as any)?.data?.total ?? 0);
- const prevSize = reset ? 0 : tradeTrendOtherNameOptions.value.length;
- setTradeTrendOtherNameOptions(list, reset);
- tradeTrendOtherNamePage.value = page + 1;
- tradeTrendOtherNameHasMore.value =
- Number.isFinite(total) && total > 0 ? tradeTrendOtherNameOptions.value.length < total : list.length >= 20;
- if (!reset && tradeTrendOtherNameOptions.value.length <= prevSize) {
- tradeTrendOtherNameHasMore.value = false;
- }
- tradeTrendOtherNameLoadedPerson.value = personName;
- } catch (error) {
- if (currentRequestId !== tradeTrendOtherNameRequestId) return;
- console.error('获取交易趋势对方名称失败', error);
- if (reset) {
- setTradeTrendOtherNameOptions([], true);
- }
- tradeTrendOtherNameHasMore.value = false;
- } finally {
- if (currentRequestId === tradeTrendOtherNameRequestId) {
- tradeTrendOtherNameLoading.value = false;
- }
- }
- };
- const normalizeCallTopRows = (resp: any): CallOftenTop10DTO[] => {
- if (Array.isArray(resp)) return normalizeObjectList<CallOftenTop10DTO>(resp).slice(0, 10);
- if (Array.isArray(resp?.records)) return normalizeObjectList<CallOftenTop10DTO>(resp.records).slice(0, 10);
- if (Array.isArray(resp?.data)) return normalizeObjectList<CallOftenTop10DTO>(resp.data).slice(0, 10);
- return [];
- };
- const buildCallTopRowsFromRecords = (records: any[]): CallOftenTop10DTO[] => {
- const counter = new Map<string, { otherName?: string; otherPhone?: string; callCount: number }>();
- records.forEach((item) => {
- const otherPhone = item?.otherPhone || '';
- const otherName = item?.otherName || '';
- const key = `${otherPhone}__${otherName}`;
- const current = counter.get(key) || {
- otherName,
- otherPhone,
- callCount: 0,
- };
- current.callCount += 1;
- counter.set(key, current);
- });
- return Array.from(counter.values())
- .sort((a, b) => b.callCount - a.callCount)
- .slice(0, 10)
- .map((item) => ({
- otherName: item.otherName,
- otherPhone: item.otherPhone,
- callCount: item.callCount,
- }));
- };
- const loadCommTopData = async (personName: string) => {
- const startDate = commTopQuery.dateRange?.[0];
- const endDate = commTopQuery.dateRange?.[1];
- if (!startDate && !endDate) {
- const resp = await callOftenTop10({ personName });
- return normalizeCallTopRows(resp);
- }
- const resp = (await getCallRecord({
- page: 1,
- limit: 50000,
- personName,
- personPhones: getSelectedPersonPhones(),
- startDate: startDate || undefined,
- endDate: endDate || undefined,
- } as any)) as any;
- const records = Array.isArray(resp?.records)
- ? resp.records
- : Array.isArray(resp?.data)
- ? resp.data
- : Array.isArray(resp)
- ? resp
- : [];
- return buildCallTopRowsFromRecords(records);
- };
- const normalizeTradeTopRows = (resp: any): TransOftenTop10DTO[] => {
- if (Array.isArray(resp)) return normalizeObjectList<TransOftenTop10DTO>(resp);
- if (Array.isArray(resp?.records)) return normalizeObjectList<TransOftenTop10DTO>(resp.records);
- if (Array.isArray(resp?.data)) return normalizeObjectList<TransOftenTop10DTO>(resp.data);
- return [];
- };
- const loadTradeTopData = async (personName: string) => {
- const startDate = tradeTopQuery.dateRange?.[0];
- const endDate = tradeTopQuery.dateRange?.[1];
- const resp = await transOfPersons({
- personName,
- dimension: tradeTopQuery.dimension,
- indicator: tradeTopQuery.indicator,
- startDate: startDate || undefined,
- endDate: endDate || undefined,
- page: 1,
- limit: 10,
- });
- return normalizeTradeTopRows(resp);
- };
- const buildCommTypeRatioData = (callStatInfo?: CallDataProfileStatDTO | null) => {
- const callTypeColorMap: Record<string, string> = {
- 主叫: '#5b8ff9',
- 被叫: '#5ad8a6',
- 其他: '#f6bd16',
- };
- const callTypeOrder = ['被叫', '主叫', '其他'];
- const ratioEntries = Object.entries(callStatInfo?.callRatioMap || {}).sort(([nameA], [nameB]) => {
- const indexA = callTypeOrder.indexOf(nameA);
- const indexB = callTypeOrder.indexOf(nameB);
- return (indexA === -1 ? 99 : indexA) - (indexB === -1 ? 99 : indexB);
- });
- if (ratioEntries.length) {
- const normalizedRatioEntries = ratioEntries
- .map(([name, value]) => {
- const rawValue = typeof value === 'string' ? value.replace('%', '') : value;
- const ratioValue = Number(rawValue || 0);
- return {
- name,
- value: Number.isFinite(ratioValue) ? ratioValue : 0,
- itemStyle: {
- color: callTypeColorMap[name] || '#5b8ff9',
- },
- };
- })
- .filter((item) => String(item.name || '').trim() && item.value > 0);
- if (normalizedRatioEntries.length) {
- return normalizedRatioEntries;
- }
- }
- const countEntries = [
- { name: '被叫', count: Number(callStatInfo?.inCount || 0) },
- { name: '主叫', count: Number(callStatInfo?.outCount || 0) },
- { name: '其他', count: Number(callStatInfo?.otherCount || 0) },
- ];
- const total = countEntries.reduce((sum, item) => sum + (Number.isFinite(item.count) ? item.count : 0), 0);
- if (!total) return [];
- return countEntries.map(({ name, count }) => ({
- name,
- value: Number((((Number.isFinite(count) ? count : 0) / total) * 100).toFixed(2)),
- itemStyle: {
- color: callTypeColorMap[name] || '#5b8ff9',
- },
- }));
- };
- const normalizeStationList = (resp: any): CallStatStationDTO[] => {
- if (Array.isArray(resp)) return normalizeObjectList<CallStatStationDTO>(resp);
- if (Array.isArray(resp?.data)) return normalizeObjectList<CallStatStationDTO>(resp.data);
- if (Array.isArray(resp?.list)) return normalizeObjectList<CallStatStationDTO>(resp.list);
- if (Array.isArray(resp?.records)) return normalizeObjectList<CallStatStationDTO>(resp.records);
- if (Array.isArray(resp?.data?.list)) return normalizeObjectList<CallStatStationDTO>(resp.data.list);
- if (Array.isArray(resp?.data?.records)) return normalizeObjectList<CallStatStationDTO>(resp.data.records);
- return [];
- };
- const fetchProfileData = async () => {
- const personName = selectedPerson.value?.personName;
- if (!personName) {
- resetRightPanelData();
- return;
- }
- loadingProfile.value = true;
- try {
- const [callStatResp, transStatResp, callTop10Resp, callStationResp, transTop10Resp, transTrendResp] =
- await Promise.all([
- callStat(personName),
- transStat(personName),
- loadCommTopData(personName),
- callStatStation({ personName }),
- loadTradeTopData(personName),
- loadTradeTrendData(personName),
- ]);
- callStatData.value = callStatResp || null;
- transStatData.value = transStatResp || null;
- commTypeRatioData.value = buildCommTypeRatioData(callStatResp);
- commTop10Data.value = normalizeCallTopRows(callTop10Resp);
- stationData.value = normalizeStationList(callStationResp);
- tradeTop10Data.value = normalizeTradeTopRows(transTop10Resp);
- tradeTrendData.value = normalizeTrendRows(transTrendResp);
- } catch (error) {
- console.error('获取数据画像右侧数据失败', error);
- resetRightPanelData();
- } finally {
- loadingProfile.value = false;
- }
- };
- function selectPerson(id: number) {
- if (selectedPersonId.value === id) return;
- resetProfilePanelQueries();
- selectedPersonId.value = id;
- fetchProfileData();
- }
- const findPortraitPersonIndex = () => {
- const routePersonName = String(route.query.personName || '').trim();
- const routePersonCertNo = String(route.query.personCertNo || '').trim();
- if (!routePersonName && !routePersonCertNo) return -1;
- return personList.value.findIndex((person) => {
- const currentName = String(person.personName || '').trim();
- const currentCertNo = String(person.personCertNo || '').trim();
- if (routePersonCertNo && currentCertNo && currentCertNo === routePersonCertNo) return true;
- if (routePersonName && currentName && currentName === routePersonName) return true;
- return false;
- });
- };
- const syncSelectedPersonFromRoute = async () => {
- const targetIndex = findPortraitPersonIndex();
- if (targetIndex < 0) return false;
- if (selectedPersonId.value === targetIndex) return true;
- resetProfilePanelQueries();
- selectedPersonId.value = targetIndex;
- await fetchProfileData();
- return true;
- };
- const fetchPersons = async () => {
- try {
- const data = await getPersons();
- personList.value = Array.isArray(data) ? data : [];
- if (!personList.value.length) {
- selectedPersonId.value = null;
- return;
- }
- if (await syncSelectedPersonFromRoute()) {
- return;
- }
- if (selectedPersonId.value === null) {
- resetProfilePanelQueries();
- selectedPersonId.value = 0;
- await fetchProfileData();
- }
- } catch (error) {
- console.error('获取人员信息失败', error);
- personList.value = [];
- }
- };
- const openCreateModal = () => {
- isEditMode.value = false;
- editingPerson.value = null;
- resetPersonForm();
- personModalVisible.value = true;
- };
- const revokeAvatarPreviewObjectUrl = () => {
- if (!avatarPreviewObjectUrl.value) return;
- URL.revokeObjectURL(avatarPreviewObjectUrl.value);
- avatarPreviewObjectUrl.value = '';
- };
- const updatePersonPhotograph = (source?: string | null) => {
- personForm.photograph = String(source || '').trim();
- };
- const personAvatarPreviewSrc = computed(
- () => avatarPreviewObjectUrl.value || String(personForm.photograph || '').trim(),
- );
- const stripLocalFileProtocol = (value: string) => {
- const source = String(value || '').trim();
- if (!/^file:\/\//i.test(source)) return source;
- const decoded = decodeURI(source.replace(/^file:\/\//i, ''));
- if (/^\/[a-zA-Z]:/.test(decoded)) {
- return decoded.slice(1);
- }
- return decoded;
- };
- const resolveLocalAvatarPath = (file: File) => {
- const electronApi = window.electron;
- const localPath =
- electronApi?.getPathForFile?.(file) || String((file as File & { path?: string }).path || '').trim();
- if (localPath) {
- return stripLocalFileProtocol(localPath);
- }
- return '';
- };
- const updateAvatarPreviewFromFile = (file: File) => {
- revokeAvatarPreviewObjectUrl();
- avatarPreviewObjectUrl.value = URL.createObjectURL(file);
- };
- const openAvatarFileDialog = () => {
- avatarInputRef.value?.click();
- };
- const clearAvatarSelection = () => {
- revokeAvatarPreviewObjectUrl();
- updatePersonPhotograph('');
- if (avatarInputRef.value) {
- avatarInputRef.value.value = '';
- }
- };
- const handleAvatarFileChange = (event: Event) => {
- const input = event.target as HTMLInputElement | null;
- const file = input?.files?.[0];
- if (!file) return;
- if (file.type && !file.type.startsWith('image/')) {
- createMessage.warning('请选择图片文件');
- input.value = '';
- return;
- }
- updateAvatarPreviewFromFile(file);
- updatePersonPhotograph(resolveLocalAvatarPath(file) || avatarPreviewObjectUrl.value);
- input.value = '';
- };
- const openEditModal = (person: PersonBasicInfo) => {
- isEditMode.value = true;
- editingPerson.value = person;
- fillPersonForm(person);
- personModalVisible.value = true;
- };
- const handleEditBasicInfo = () => {
- if (!selectedPerson.value) {
- createMessage.warning('请先选择对象');
- return;
- }
- openEditModal(selectedPerson.value);
- };
- interface JumpToAnalysisPayload {
- personName: string;
- otherName: string;
- behaviorType: string;
- detailRecord: Record<string, unknown>;
- path: string;
- query?: Record<string, string>;
- }
- const handleJumpToAnalysis = async (payload: JumpToAnalysisPayload) => {
- if (!payload.path) {
- createMessage.warning('当前行为暂未配置分析页跳转。');
- return;
- }
- const query: Record<string, string> = {
- ...(payload.query || {}),
- };
- const personName = String(payload.personName || '').trim();
- const otherName = String(payload.otherName || '').trim();
- if (personName) {
- query.personName = personName;
- if (!query.personNames) {
- query.personNames = personName;
- }
- }
- if (otherName) {
- query.otherName = otherName;
- }
- query.jumpAt = String(Date.now());
- createMessage.info(`正在跳转至${payload.behaviorType}分析页面...`);
- await router.push({
- path: payload.path,
- query,
- });
- };
- const closePersonModal = () => {
- personModalVisible.value = false;
- };
- const loadGroupData = async () => {
- try {
- const groups = await listPersonGroups();
- objectGroups.value = (groups || []).map((item) => ({
- id: item.id || '',
- name: item.groupName || `分组${item.id}`,
- remark: item.remark,
- }));
- if (objectGroups.value.length) {
- const currentExists = objectGroups.value.some((item) => item.id === activeGroupId.value);
- activeGroupId.value = currentExists ? activeGroupId.value : objectGroups.value[0].id;
- } else {
- activeGroupId.value = null;
- }
- groupMembers.value = (groups || []).flatMap((group) =>
- (group.personList || []).map((rel) => ({
- id: rel.id || '',
- groupId: rel.groupId || group.id || '',
- personName: rel.personName || '-',
- hasMain: rel.hasMain,
- })),
- );
- } catch (error) {
- console.error('获取分组列表失败', error);
- createMessage.error('获取分组列表失败');
- }
- };
- const openGroupModal = async () => {
- groupModalVisible.value = true;
- await loadGroupData();
- };
- const openGroupModalFromRoute = async () => {
- if (route.query.openGroupModal !== '1') return;
- await openGroupModal();
- if (route.query.openCreateGroupModal === '1') {
- await nextTick();
- openCreateGroupModal();
- }
- const { openGroupModal: _openGroupModal, openCreateGroupModal: _openCreateGroupModal, ...query } = route.query;
- await router.replace({ path: route.path, query });
- };
- const closeGroupModal = () => {
- groupModalVisible.value = false;
- };
- const resolvePageTotal = (resp: any, records: unknown[] = []) => {
- const total = Number(resp?.total ?? resp?.count ?? resp?.page?.total ?? resp?.page?.count);
- if (Number.isFinite(total) && total >= 0) {
- return total;
- }
- return records.length;
- };
- const loadCallSummary = async () => {
- const person = selectedPerson.value;
- if (!person?.personName) {
- callSummaryRows.value = [];
- callSummaryPagination.total = 0;
- return;
- }
- const personPhones = getSelectedPersonPhones(person);
- callSummaryLoading.value = true;
- try {
- const resp = await getCallRecordSummary(
- Object.assign(callSummaryQuery, {
- page: callSummaryPagination.page,
- limit: callSummaryPagination.limit,
- personName: person.personName,
- personPhones,
- keyword: callSummaryQuery.keyword || undefined,
- otherName: callSummaryQuery.otherName || undefined,
- otherPhones: callSummaryQuery.otherPhone ? [callSummaryQuery.otherPhone] : undefined,
- callDirection: callSummaryQuery.callDirection || undefined,
- callType: callSummaryQuery.callType || undefined,
- startDate: callSummaryQuery.startDate || undefined,
- endDate: callSummaryQuery.endDate || undefined,
- orderKey: callSummaryQuery.orderKey || undefined,
- sort: callSummaryQuery.sort || undefined,
- }) as any,
- );
- const records = Array.isArray(resp?.records) ? resp.records : Array.isArray(resp) ? resp : [];
- callSummaryRows.value = records.map((item: any, index: number) => ({
- rowKey: `${item.personName || ''}-${item.personPhone || ''}-${item.otherPhone || ''}-${index}`,
- personName: fallbackValue(item.personName || person.personName),
- personPhone: fallbackValue(item.personPhone),
- otherName: fallbackValue(item.otherName),
- otherPhone: fallbackValue(item.otherPhone),
- callCount: fallbackValue(item.callCount),
- }));
- callSummaryPagination.total = resolvePageTotal(resp, records);
- } catch (error) {
- console.error('查询通话记录列表失败', error);
- callSummaryRows.value = [];
- callSummaryPagination.total = 0;
- } finally {
- callSummaryLoading.value = false;
- }
- };
- const loadCallOperPhoneInfo = async () => {
- const person = selectedPerson.value;
- if (!person?.personName || !callOperPhoneQuery.phoneList.length) {
- callOperPhoneAllRows.value = [];
- callOperPhoneRows.value = [];
- callOperPhonePagination.total = 0;
- return;
- }
- callOperPhoneLoading.value = true;
- try {
- const resp = await getCallOperPhoneInfo({
- personName: person.personName,
- phoneList: callOperPhoneQuery.phoneList.length ? callOperPhoneQuery.phoneList : undefined,
- operatorId: callOperPhoneQuery.operatorId || undefined,
- } as CallOperPhoneInfoQuery);
- const rawRecords = Array.isArray((resp as any)?.records)
- ? (resp as any).records
- : Array.isArray(resp)
- ? resp
- : [];
- callOperPhoneAllRows.value = rawRecords.map((item: CallOpenInfo, index: number) => ({
- rowKey: `${item.personName || person.personName || ''}-${item.operatorId || ''}-${item.personPhone || ''}-${index}`,
- personName: item.personName || person.personName || '-',
- personPhone: fallbackValue(item.personPhone),
- phoneNumber: fallbackValue(item.personPhone),
- phoneType: fallbackValue(item.phoneType),
- operatorId: fallbackValue(item.operatorId),
- operatorName: fallbackValue(item.operatorId),
- personType: fallbackValue(item.personType),
- personCertNo: fallbackValue(item.personCertNo),
- personCertAddress: fallbackValue(item.personCertAddress),
- mailingAddress: fallbackValue(item.mailingAddress),
- province: fallbackValue(item.province),
- city: fallbackValue(item.city),
- phoneStatus: fallbackValue(item.phoneStatus),
- activationDateTime: fallbackValue(item.activationDateTime),
- closingDateTime: fallbackValue(item.closingDateTime),
- firstCallDateTime: fallbackValue(item.firstCallDateTime),
- lastSuspensionDateTime: fallbackValue(item.lastSuspensionDateTime),
- }));
- applyCallOperPhoneRows();
- } catch (error) {
- console.error('查询运营商手机号信息失败', error);
- callOperPhoneAllRows.value = [];
- callOperPhoneRows.value = [];
- callOperPhonePagination.total = 0;
- } finally {
- callOperPhoneLoading.value = false;
- }
- };
- const applyCallOperPhoneRows = () => {
- const personNameKeyword = callOperPhoneQuery.personName.trim().toLocaleLowerCase();
- const operatorNameKeyword = callOperPhoneQuery.operatorName.trim().toLocaleLowerCase();
- const phoneNumberKeyword = callOperPhoneQuery.phoneNumber.trim().toLocaleLowerCase();
- const filteredRows = callOperPhoneAllRows.value.filter((item) => {
- const matchPersonName =
- !personNameKeyword ||
- String(item.personName || '')
- .toLocaleLowerCase()
- .includes(personNameKeyword);
- const matchOperatorName =
- !operatorNameKeyword ||
- String(item.operatorName || '')
- .toLocaleLowerCase()
- .includes(operatorNameKeyword);
- const matchPhoneNumber =
- !phoneNumberKeyword ||
- String(item.phoneNumber || '')
- .toLocaleLowerCase()
- .includes(phoneNumberKeyword);
- return matchPersonName && matchOperatorName && matchPhoneNumber;
- });
- const sortedRows = [...filteredRows];
- if (callOperPhoneQuery.orderKey) {
- const sortFactor = callOperPhoneQuery.sort === 'ASC' ? 1 : -1;
- sortedRows.sort((left, right) => {
- const leftValue = String(left?.[callOperPhoneQuery.orderKey as keyof typeof left] || '');
- const rightValue = String(right?.[callOperPhoneQuery.orderKey as keyof typeof right] || '');
- return leftValue.localeCompare(rightValue, 'zh-CN', { numeric: true }) * sortFactor;
- });
- }
- callOperPhonePagination.total = sortedRows.length;
- const start = (callOperPhonePagination.page - 1) * callOperPhonePagination.limit;
- const end = start + callOperPhonePagination.limit;
- callOperPhoneRows.value = sortedRows.slice(start, end);
- };
- const loadTransBankCardInfo = async () => {
- if (!transBankCardQuery.bankName || !transBankCardQuery.cardNoList.length) {
- transBankCardRows.value = [];
- transBankCardPagination.total = 0;
- return;
- }
- transBankCardLoading.value = true;
- try {
- const resp = await getTransBankCardInfo({
- page: transBankCardPagination.page,
- limit: transBankCardPagination.limit,
- keyword: transBankCardQuery.keyword || undefined,
- orderKey: transBankCardQuery.orderKey || undefined,
- sort: transBankCardQuery.sort || undefined,
- bankName: transBankCardQuery.bankName || undefined,
- cardNoList: transBankCardQuery.cardNoList.length ? transBankCardQuery.cardNoList : undefined,
- } as TransBankCardInfoQuery);
- const rawRecords = Array.isArray((resp as any)?.records)
- ? (resp as any).records
- : Array.isArray(resp)
- ? resp
- : [];
- const records = Array.isArray((resp as any)?.records)
- ? rawRecords
- : rawRecords.slice(
- (transBankCardPagination.page - 1) * transBankCardPagination.limit,
- transBankCardPagination.page * transBankCardPagination.limit,
- );
- transBankCardRows.value = records.map((item: TransBankCardInfoDTO, index: number) => ({
- rowKey: `${item.personCardNo || ''}-${index}`,
- personCardNo: fallbackValue(item.personCardNo),
- personName: fallbackValue(item.personName),
- bankName: fallbackValue(item.bankName),
- transIncome: fallbackValue(item.transIncome),
- transExpend: fallbackValue(item.transExpend),
- transBalance: fallbackValue(item.transBalance),
- transCount: fallbackValue(item.transCount),
- accountLeftMoney: fallbackValue(item.accountLeftMoney),
- totalBalance: fallbackValue(item.totalBalance),
- accountStatus: fallbackValue(item.accountStatus),
- openAccountDate: fallbackValue(item.openAccountDate || item.openingDate),
- openingDate: fallbackValue(item.openingDate || item.openAccountDate),
- closeAccountDate: fallbackValue(item.closeAccountDate),
- incomeTotalAmount: fallbackValue(item.incomeTotalAmount),
- expenseTotalAmount: fallbackValue(item.expenseTotalAmount),
- netAmount: fallbackValue(item.netAmount),
- transTotalAmount: fallbackValue(item.transTotalAmount),
- }));
- transBankCardPagination.total = Number((resp as any)?.count || (resp as any)?.total || rawRecords.length || 0);
- } catch (error) {
- console.error('查询银行卡交易信息失败', error);
- transBankCardRows.value = [];
- transBankCardPagination.total = 0;
- } finally {
- transBankCardLoading.value = false;
- }
- };
- const applyCallSummaryQuery = (query: Partial<CallSummaryQueryState> = {}) => {
- Object.assign(callSummaryQuery, createCallSummaryQuery(), query);
- };
- const applyCallOperPhoneQuery = (query: Partial<CallOperPhoneQueryState> = {}) => {
- Object.assign(callOperPhoneQuery, createCallOperPhoneQuery(), query);
- };
- const applyTransBankCardQuery = (query: Partial<TransBankCardQueryState> = {}) => {
- Object.assign(transBankCardQuery, createTransBankCardQuery(), query);
- };
- const setCallSummaryBaseQuery = (query: Partial<CallSummaryQueryState> = {}) => {
- callSummaryBaseQuery.value = {
- ...createCallSummaryQuery(),
- ...query,
- };
- };
- const setCallOperPhoneBaseQuery = (query: Partial<CallOperPhoneQueryState> = {}) => {
- callOperPhoneBaseQuery.value = {
- ...createCallOperPhoneQuery(),
- ...query,
- };
- };
- const setTransBankCardBaseQuery = (query: Partial<TransBankCardQueryState> = {}) => {
- transBankCardBaseQuery.value = {
- ...createTransBankCardQuery(),
- ...query,
- };
- };
- const resetCallSummaryFilters = () => {
- applyCallSummaryQuery(callSummaryBaseQuery.value);
- };
- const resetCallOperPhoneFilters = () => {
- applyCallOperPhoneQuery(callOperPhoneBaseQuery.value);
- };
- const resetTransBankCardFilters = () => {
- applyTransBankCardQuery(transBankCardBaseQuery.value);
- };
- const getCommTopDateRangeQuery = (): Partial<CallSummaryQueryState> => {
- return {
- startDate: commTopQuery.dateRange?.[0] || '',
- endDate: commTopQuery.dateRange?.[1] || '',
- };
- };
- const openCallSummaryWithFilters = async (
- overrides: Partial<CallSummaryQueryState> = {},
- options?: { useCommTopDateRange?: boolean },
- ) => {
- const nextBaseQuery: Partial<CallSummaryQueryState> = options?.useCommTopDateRange
- ? getCommTopDateRangeQuery()
- : {};
- Object.assign(nextBaseQuery, overrides);
- setCallSummaryBaseQuery(nextBaseQuery);
- resetCallSummaryFilters();
- callSummaryModalVisible.value = true;
- callSummaryPagination.page = 1;
- await loadCallSummary();
- };
- const openCallOperPhoneModal = async (carrierInfo = carrierTags.value[0]) => {
- const person = selectedPerson.value;
- if (!person?.personName || !carrierInfo.carrierName || !carrierInfo.phoneList.length) {
- createMessage.warning('暂无运营商手机号数据');
- return;
- }
- callOperPhoneModalTitle.value = `${carrierInfo.carrierName}手机号信息`;
- setCallOperPhoneBaseQuery({
- phoneList: carrierInfo.phoneList,
- operatorId: carrierInfo.operatorId || '',
- });
- resetCallOperPhoneFilters();
- callOperPhoneModalVisible.value = true;
- callOperPhonePagination.page = 1;
- await loadCallOperPhoneInfo();
- };
- const openTransBankCardModal = async (tag: { bankName: string; cardNoList: string[] }) => {
- if (!tag.bankName || !tag.cardNoList.length) {
- createMessage.warning('暂无银行卡数据');
- return;
- }
- transBankCardModalTitle.value = '银行卡交易信息';
- setTransBankCardBaseQuery({
- bankName: tag.bankName,
- cardNoList: tag.cardNoList,
- });
- resetTransBankCardFilters();
- transBankCardModalVisible.value = true;
- transBankCardPagination.page = 1;
- await loadTransBankCardInfo();
- };
- const openCallRecordWithFilters = (
- overrides: Partial<CallRecordQuery> = {},
- options?: { useCommTopDateRange?: boolean; omitPersonPhones?: boolean },
- ) => {
- const person = selectedPerson.value;
- if (!person?.personName) return;
- callRecordBaseQuery.value = {
- personName: person.personName,
- ...(!options?.omitPersonPhones ? { personPhones: getSelectedPersonPhones(person) } : {}),
- ...(options?.useCommTopDateRange ? getCommTopDateRangeQuery() : {}),
- ...overrides,
- };
- callRecordModalVisible.value = true;
- };
- const toSummaryQueryText = (value?: string) => {
- const text = String(value || '').trim();
- return text && text !== '-' ? text : '';
- };
- const toSummaryNumericText = (value?: string | number) => {
- const text = String(value ?? '')
- .replace(/,/g, '')
- .trim();
- if (!text) return '';
- const num = Number(text);
- return Number.isFinite(num) ? text : '';
- };
- const handleViewCallSummaryDetail = (record: any) => {
- const person = selectedPerson.value;
- if (!person?.personName) {
- createMessage.warning('请先选择对象');
- return;
- }
- const personPhone = toSummaryQueryText(record?.personPhone);
- const otherName = toSummaryQueryText(record?.otherName);
- const otherPhone = toSummaryQueryText(record?.otherPhone);
- openCallRecordWithFilters({
- personPhones: personPhone ? [personPhone] : getSelectedPersonPhones(person),
- otherName: otherName || undefined,
- otherPhones: otherPhone ? [otherPhone] : undefined,
- callDirection: callSummaryQuery.callDirection || undefined,
- callType: callSummaryQuery.callType || undefined,
- startDate: callSummaryQuery.startDate || undefined,
- endDate: callSummaryQuery.endDate || undefined,
- });
- };
- const handleViewCallOperPhoneDetail = (record: any) => {
- const person = selectedPerson.value;
- if (!person?.personName) {
- createMessage.warning('请先选择对象');
- return;
- }
- const personPhone = toSummaryQueryText(record?.personPhone || record?.phoneNumber);
- if (!personPhone) {
- createMessage.warning('当前手机号信息缺失,无法查看详情');
- return;
- }
- const operatorId = toSummaryQueryText(record?.operatorId);
- openCallRecordWithFilters({
- personPhones: [personPhone],
- operatorId: operatorId || undefined,
- });
- };
- const handleViewTransSummaryDetail = (record: any) => {
- const personName = selectedPerson.value?.personName;
- if (!personName) {
- createMessage.warning('请先选择对象');
- return;
- }
- openTransRecordDrilldown({
- personCardNo: toSummaryQueryText(record?.personCardNo) || undefined,
- otherName: toSummaryQueryText(record?.otherName) || undefined,
- otherCardNo: toSummaryQueryText(record?.otherCardNo) || undefined,
- bankName: toSummaryQueryText(record?.bankName) || undefined,
- });
- };
- const handleViewTransBankCardDetail = (record: any) => {
- const personCardNo = toSummaryQueryText(record?.personCardNo);
- if (!personCardNo) {
- createMessage.warning('当前卡号信息缺失,无法查看详情');
- return;
- }
- openTransRecordDrilldown({
- personCardNo,
- bankName: toSummaryQueryText(transBankCardQuery.bankName) || undefined,
- });
- };
- const openCallSummaryModal = async () => {
- await openCallSummaryWithFilters();
- };
- const loadTransSummary = async () => {
- const person = selectedPerson.value;
- if (!person?.personName) {
- transSummaryRows.value = [];
- transSummaryPagination.total = 0;
- return;
- }
- transSummaryLoading.value = true;
- try {
- const transAmount = toSummaryNumericText(transSummaryQuery.transAmount);
- const transCountText = toSummaryNumericText(transSummaryQuery.transCount);
- const query: TransRecordSummaryQuery = {
- page: transSummaryPagination.page,
- limit: transSummaryPagination.limit,
- personNames: person.personName ? [person.personName] : undefined,
- personCardNo: toSummaryQueryText(transSummaryQuery.personCardNo) || undefined,
- otherName: toSummaryQueryText(transSummaryQuery.otherName) || undefined,
- transAmount: transAmount || undefined,
- transCount: transCountText ? Number(transCountText) : undefined,
- transAmountSymbol: transAmount
- ? normalizeCompareOperator(transSummaryQuery.transAmountSymbol, DEFAULT_COMPARE_OPERATOR)
- : undefined,
- transCountSymbol: transCountText
- ? normalizeCompareOperator(transSummaryQuery.transCountSymbol, DEFAULT_COMPARE_OPERATOR)
- : undefined,
- orderKey: transSummaryQuery.orderKey || undefined,
- sort: transSummaryQuery.sort || undefined,
- };
- const resp = await getTransRecordSummary(query);
- const records = Array.isArray(resp?.records) ? resp.records : Array.isArray(resp) ? resp : [];
- transSummaryRows.value = records.map((item: TransRecordSummaryDTO, index: number) => ({
- rowKey: `${item.personName || ''}-${item.otherCardNo || ''}-${index}`,
- personCardNo: fallbackValue(item.personCardNo),
- personName: fallbackValue(item.personName || person.personName),
- otherCardNo: fallbackValue(item.otherCardNo),
- otherName: fallbackValue(item.otherName),
- bankName: fallbackValue(item.bankName),
- transCount: fallbackValue(item.transCount),
- transTotalAmount: fallbackValue(item.transTotalAmount),
- incomeTotalAmount: fallbackValue(item.incomeTotalAmount),
- expenseTotalAmount: fallbackValue(item.expenseTotalAmount),
- cashKey: Array.isArray(item.cashKey) && item.cashKey.length ? item.cashKey.join('、') : '-',
- }));
- transSummaryPagination.total = resolvePageTotal(resp, records);
- } catch (error) {
- console.error('查询交易汇总失败', error);
- transSummaryRows.value = [];
- transSummaryPagination.total = 0;
- } finally {
- transSummaryLoading.value = false;
- }
- };
- const applyTransSummaryQuery = (query: Partial<TransSummaryQueryState> = {}) => {
- Object.assign(transSummaryQuery, createTransSummaryQuery(), {
- ...query,
- transAmountSymbol: normalizeCompareOperator(query.transAmountSymbol, DEFAULT_COMPARE_OPERATOR),
- transCountSymbol: normalizeCompareOperator(query.transCountSymbol, DEFAULT_COMPARE_OPERATOR),
- });
- };
- const setTransSummaryBaseQuery = (query: Partial<TransSummaryQueryState> = {}) => {
- transSummaryBaseQuery.value = {
- ...createTransSummaryQuery(),
- ...query,
- transAmountSymbol: normalizeCompareOperator(query.transAmountSymbol, DEFAULT_COMPARE_OPERATOR),
- transCountSymbol: normalizeCompareOperator(query.transCountSymbol, DEFAULT_COMPARE_OPERATOR),
- };
- };
- const resetTransSummaryFilters = () => {
- applyTransSummaryQuery(transSummaryBaseQuery.value);
- };
- const openTransSummaryWithFilters = async (overrides: Partial<TransSummaryQueryState> = {}) => {
- setTransSummaryBaseQuery(overrides);
- resetTransSummaryFilters();
- transSummaryModalVisible.value = true;
- transSummaryPagination.page = 1;
- await loadTransSummary();
- };
- const openTransSummaryModal = async () => {
- await openTransSummaryWithFilters();
- };
- const handleSearchCallSummary = async () => {
- callSummaryPagination.page = 1;
- await loadCallSummary();
- };
- const handleSearchCallOperPhone = async () => {
- callOperPhonePagination.page = 1;
- applyCallOperPhoneRows();
- };
- const handleSearchTransBankCard = async () => {
- transBankCardPagination.page = 1;
- await loadTransBankCardInfo();
- };
- const handleSearchTransSummary = async () => {
- transSummaryPagination.page = 1;
- await loadTransSummary();
- };
- const handleResetCallSummary = async () => {
- resetCallSummaryFilters();
- callSummaryPagination.page = 1;
- await loadCallSummary();
- };
- const handleResetCallOperPhone = async () => {
- resetCallOperPhoneFilters();
- callOperPhonePagination.page = 1;
- applyCallOperPhoneRows();
- };
- const handleResetTransBankCard = async () => {
- resetTransBankCardFilters();
- transBankCardPagination.page = 1;
- await loadTransBankCardInfo();
- };
- const handleResetTransSummary = async () => {
- resetTransSummaryFilters();
- transSummaryPagination.page = 1;
- await loadTransSummary();
- };
- const handleCallSummaryPrevPage = async () => {
- if (callSummaryPagination.page <= 1) return;
- callSummaryPagination.page -= 1;
- await loadCallSummary();
- };
- const handleCallSummaryNextPage = async () => {
- if (callSummaryPagination.page >= callSummaryTotalPages.value) return;
- callSummaryPagination.page += 1;
- await loadCallSummary();
- };
- const handleCallSummaryPageChange = async (page: number, pageSize: number) => {
- if (callSummaryLoading.value) return;
- if (pageSize !== callSummaryPagination.limit) {
- await handleCallSummaryPageSizeChange(pageSize);
- return;
- }
- if (page === callSummaryPagination.page - 1) {
- await handleCallSummaryPrevPage();
- return;
- }
- if (page === callSummaryPagination.page + 1) {
- await handleCallSummaryNextPage();
- return;
- }
- if (page === callSummaryPagination.page) return;
- callSummaryPagination.page = page;
- await loadCallSummary();
- };
- const handleCallOperPhonePrevPage = async () => {
- if (callOperPhonePagination.page <= 1) return;
- callOperPhonePagination.page -= 1;
- applyCallOperPhoneRows();
- };
- const handleCallOperPhoneNextPage = async () => {
- if (callOperPhonePagination.page >= callOperPhoneTotalPages.value) return;
- callOperPhonePagination.page += 1;
- applyCallOperPhoneRows();
- };
- const handleCallOperPhonePageChange = async (page: number, pageSize: number) => {
- if (callOperPhoneLoading.value) return;
- if (pageSize !== callOperPhonePagination.limit) {
- await handleCallOperPhonePageSizeChange(pageSize);
- return;
- }
- if (page === callOperPhonePagination.page - 1) {
- await handleCallOperPhonePrevPage();
- return;
- }
- if (page === callOperPhonePagination.page + 1) {
- await handleCallOperPhoneNextPage();
- return;
- }
- if (page === callOperPhonePagination.page) return;
- callOperPhonePagination.page = page;
- applyCallOperPhoneRows();
- };
- const handleTransBankCardPrevPage = async () => {
- if (transBankCardPagination.page <= 1) return;
- transBankCardPagination.page -= 1;
- await loadTransBankCardInfo();
- };
- const handleTransBankCardNextPage = async () => {
- if (transBankCardPagination.page >= transBankCardTotalPages.value) return;
- transBankCardPagination.page += 1;
- await loadTransBankCardInfo();
- };
- const handleTransBankCardPageChange = async (page: number, pageSize: number) => {
- if (transBankCardLoading.value) return;
- if (pageSize !== transBankCardPagination.limit) {
- await handleTransBankCardPageSizeChange(pageSize);
- return;
- }
- if (page === transBankCardPagination.page - 1) {
- await handleTransBankCardPrevPage();
- return;
- }
- if (page === transBankCardPagination.page + 1) {
- await handleTransBankCardNextPage();
- return;
- }
- if (page === transBankCardPagination.page) return;
- transBankCardPagination.page = page;
- await loadTransBankCardInfo();
- };
- const handleCallSummaryPageSizeChange = async (value: number) => {
- callSummaryPagination.limit = Number(value);
- callSummaryPagination.page = 1;
- await loadCallSummary();
- };
- const handleCallOperPhonePageSizeChange = async (value: number) => {
- callOperPhonePagination.limit = Number(value);
- callOperPhonePagination.page = 1;
- applyCallOperPhoneRows();
- };
- const handleTransBankCardPageSizeChange = async (value: number) => {
- transBankCardPagination.limit = Number(value);
- transBankCardPagination.page = 1;
- await loadTransBankCardInfo();
- };
- const handleSortCallSummary = async ({ orderKey, sort }: { orderKey: string; sort: 'ASC' | 'DESC' }) => {
- callSummaryQuery.orderKey = orderKey;
- callSummaryQuery.sort = sort;
- callSummaryPagination.page = 1;
- await loadCallSummary();
- };
- const handleSortCallOperPhone = async ({ orderKey, sort }: { orderKey: string; sort: 'ASC' | 'DESC' }) => {
- callOperPhoneQuery.orderKey = orderKey;
- callOperPhoneQuery.sort = sort;
- callOperPhonePagination.page = 1;
- applyCallOperPhoneRows();
- };
- const handleSortTransBankCard = async ({ orderKey, sort }: { orderKey: string; sort: 'ASC' | 'DESC' }) => {
- transBankCardQuery.orderKey = orderKey;
- transBankCardQuery.sort = sort;
- transBankCardPagination.page = 1;
- await loadTransBankCardInfo();
- };
- const handleTransSummaryPrevPage = async () => {
- if (transSummaryPagination.page <= 1) return;
- transSummaryPagination.page -= 1;
- await loadTransSummary();
- };
- const handleTransSummaryNextPage = async () => {
- if (transSummaryPagination.page >= transSummaryTotalPages.value) return;
- transSummaryPagination.page += 1;
- await loadTransSummary();
- };
- const handleTransSummaryPageChange = async (page: number, pageSize: number) => {
- if (transSummaryLoading.value) return;
- if (pageSize !== transSummaryPagination.limit) {
- await handleTransSummaryPageSizeChange(pageSize);
- return;
- }
- if (page === transSummaryPagination.page - 1) {
- await handleTransSummaryPrevPage();
- return;
- }
- if (page === transSummaryPagination.page + 1) {
- await handleTransSummaryNextPage();
- return;
- }
- if (page === transSummaryPagination.page) return;
- transSummaryPagination.page = page;
- await loadTransSummary();
- };
- const handleTransSummaryPageSizeChange = async (value: number) => {
- transSummaryPagination.limit = Number(value);
- transSummaryPagination.page = 1;
- await loadTransSummary();
- };
- const handleSortTransSummary = async ({ orderKey, sort }: { orderKey: string; sort: 'ASC' | 'DESC' }) => {
- transSummaryQuery.orderKey = orderKey;
- transSummaryQuery.sort = sort;
- transSummaryPagination.page = 1;
- await loadTransSummary();
- };
- const openTransRecordDrilldown = (baseQuery: TransRecordDrilldownQuery) => {
- const personName = selectedPerson.value?.personName;
- if (!personName) {
- createMessage.warning('请先选择对象');
- return;
- }
- transRecordBaseQuery.value = {
- personName,
- ...baseQuery,
- };
- transRecordModalVisible.value = true;
- };
- const handleTransRecordJump = () => {
- transRecordModalVisible.value = false;
- transBankCardModalVisible.value = false;
- transSummaryModalVisible.value = false;
- };
- const handleCallRecordJump = () => {
- callRecordModalVisible.value = false;
- callOperPhoneModalVisible.value = false;
- callSummaryModalVisible.value = false;
- };
- const handleDrillByDebitCredit = (flag: '收入' | '支出') => {
- openTransRecordDrilldown({
- debitCreditFlag: flag,
- });
- };
- const handleDrillByTradeTop = (item: { name: string; filterValue?: string }) => {
- const filterValue = String(item?.filterValue || item?.name || '').trim();
- const baseQuery: Partial<TransRecordQuery> = {
- indicator: tradeTopQuery.indicator,
- };
- const startDate = tradeTopQuery.dateRange?.[0];
- const endDate = tradeTopQuery.dateRange?.[1];
- if (startDate && endDate) {
- baseQuery.startDate = startDate;
- baseQuery.endDate = endDate;
- }
- if (filterValue) {
- if (tradeTopQuery.indicator === 'otherCardNo') {
- baseQuery.otherCardNo = filterValue;
- } else if (tradeTopQuery.indicator === 'personName') {
- baseQuery.otherName = filterValue;
- } else if (tradeTopQuery.indicator === 'branchName') {
- baseQuery.branchName = filterValue;
- } else if (tradeTopQuery.indicator === 'personIpAddress') {
- baseQuery.personIpAddress = filterValue;
- } else if (tradeTopQuery.indicator === 'personMacAddress') {
- baseQuery.personMacAddress = filterValue;
- }
- }
- openTransRecordDrilldown(baseQuery);
- };
- const handleSearchTradeTrend = async () => {
- const personName = selectedPerson.value?.personName;
- if (!personName) {
- tradeTrendData.value = [];
- return;
- }
- loadingProfile.value = true;
- try {
- tradeTrendData.value = await loadTradeTrendData(personName);
- tradeTrendChart?.resize();
- } catch (error) {
- console.error('查询交易趋势失败', error);
- tradeTrendData.value = [];
- } finally {
- loadingProfile.value = false;
- }
- };
- const handleTradeTrendOtherNameSearch = (value: string) => {
- tradeTrendOtherNameSearch.value = String(value || '').trim();
- if (tradeTrendOtherNameSearchTimer !== null) {
- window.clearTimeout(tradeTrendOtherNameSearchTimer);
- }
- tradeTrendOtherNameSearchTimer = window.setTimeout(() => {
- tradeTrendOtherNameSearchTimer = null;
- void loadTradeTrendOtherNameOptions({
- reset: true,
- search: tradeTrendOtherNameSearch.value,
- });
- }, 240);
- };
- const handleTradeTrendOtherNamePopupScroll = (event: UIEvent) => {
- const target = event.target as HTMLElement | null;
- if (!target || tradeTrendOtherNameLoading.value || !tradeTrendOtherNameHasMore.value) return;
- if (target.scrollTop + target.clientHeight >= target.scrollHeight - 24) {
- void loadTradeTrendOtherNameOptions();
- }
- };
- const handleTradeTrendOtherNameDropdownVisibleChange = (open: boolean) => {
- if (!open) return;
- const personName = selectedPerson.value?.personName?.trim();
- if (!personName) return;
- if (tradeTrendOtherNameLoadedPerson.value !== personName || !tradeTrendOtherNameOptions.value.length) {
- tradeTrendOtherNameSearch.value = '';
- void loadTradeTrendOtherNameOptions({ reset: true, search: '' });
- }
- };
- const scheduleTradeTrendSearch = (delay = 240) => {
- if (tradeTrendSearchTimer !== null) {
- window.clearTimeout(tradeTrendSearchTimer);
- }
- tradeTrendSearchTimer = window.setTimeout(() => {
- tradeTrendSearchTimer = null;
- void handleSearchTradeTrend();
- }, delay);
- };
- const viewStationMap = () => {
- if (!canViewStationMap.value) {
- createMessage.warning('当前基站暂无可展示的坐标信息');
- return;
- }
- stationMapModalVisible.value = true;
- };
- const changeTradeTrendDimension = (dimension: 'MONTH' | 'YEAR') => {
- if (tradeTrendQuery.timeDimension === dimension) return;
- trendLegendArr.value = [
- { isShow: true, name: '收入', color: '#5ad8a6' },
- { isShow: true, name: '支出', color: '#e8684a' },
- ];
- tradeTrendQuery.timeDimension = dimension;
- };
- const handleTrendChartResize = () => {
- tradeTrendChart?.resize();
- tradeRatioChart?.resize();
- tradeTopChart?.resize();
- commTopChart?.resize();
- if (commTypeChartRef.value && commTypeRatioData.value.length) {
- commTypeChart?.resize();
- initCommTypeChart();
- }
- };
- const handleSubmit = async () => {
- console.error('[portrait] handleSubmit clicked');
- (window as any).__portraitSaveDebug = {
- stage: 'clicked',
- form: { ...personForm },
- at: new Date().toISOString(),
- };
- console.error('[portrait] form snapshot before validation:', { ...personForm });
- // 校验姓名
- if (!personForm.personName.trim()) {
- console.error('[portrait] save blocked: empty personName');
- personNameError.value = '请输入姓名';
- createMessage.warning('请输入姓名');
- return;
- }
- // const nameRegex = /^[\u4e00-\u9fa5a-zA-Z\s·]+$/;
- // if (!nameRegex.test(personForm.personName.trim())) {
- // console.error('[portrait] save blocked: invalid personName');
- // personNameError.value = '姓名只能包含中文、字母或空格';
- // createMessage.warning('姓名格式不正确');
- // return;
- // }
- // if (personForm.personName.trim().length < 2) {
- // console.error('[portrait] save blocked: short personName');
- // personNameError.value = '姓名至少2个字符';
- // createMessage.warning('姓名至少2个字符');
- // return;
- // }
- personNameError.value = '';
- // 校验手机号
- const phoneErrors: string[] = [];
- personForm.phoneList.forEach((phone, index) => {
- if (phone.trim()) {
- const phoneRegex = /^1[3-9]\d{9}$/;
- if (!phoneRegex.test(phone.trim())) {
- phoneErrors[index] = '手机号格式不正确';
- }
- }
- });
- phoneListErrors.value = phoneErrors;
- // 校验银行卡
- const cardErrors: string[] = [];
- personForm.cardList.forEach((card, index) => {
- if (card.trim()) {
- if (card.trim().length < 16 || card.trim().length > 19) {
- cardErrors[index] = '银行卡号长度应为16-19位';
- }
- }
- });
- cardListErrors.value = cardErrors;
- if (phoneErrors.some(Boolean) || cardErrors.some(Boolean)) {
- console.error('[portrait] save blocked: phone/card validation failed', { phoneErrors, cardErrors });
- createMessage.warning('请检查输入格式');
- return;
- }
- saving.value = true;
- try {
- const uploadedPhotograph = String(personForm.photograph || '').trim();
- updatePersonPhotograph(uploadedPhotograph);
- const payload: PersonBasicInfoDTO = {
- personName: personForm.personName,
- personCertNo: personForm.personCertNo,
- personBirth: personForm.personBirth,
- personGender: personForm.personGender,
- personAge: personForm.personAge ? Number(personForm.personAge) : 0,
- personAddress: personForm.personAddress,
- photograph: uploadedPhotograph,
- marry: personForm.marry,
- nation: personForm.nation,
- nativePlace: personForm.nativePlace,
- householdRegistered: personForm.householdRegistered,
- personTag: personForm.personTag === '' ? null : personForm.personTag,
- phoneList: toLibNoList(personForm.phoneList.filter((p) => p.trim()).join(','), 2),
- cardList: toLibNoList(personForm.cardList.filter((c) => c.trim()).join(','), 3),
- };
- (window as any).__portraitSaveDebug = {
- stage: 'payload-ready',
- payload: JSON.parse(JSON.stringify(payload)),
- at: new Date().toISOString(),
- };
- console.error('[portrait] save person payload:', JSON.parse(JSON.stringify(payload)));
- if (isEditMode.value) {
- await updatePersonBasicInfo(payload);
- createMessage.success('更新成功');
- } else {
- await createPersonBasicInfo(payload);
- createMessage.success('新增成功');
- }
- personModalVisible.value = false;
- await fetchPersons();
- } catch (error: any) {
- console.error('[portrait] avatar upload/save error detail:', error?.response?.data || error?.message || error);
- console.error('[portrait] save debug snapshot:', (window as any).__portraitSaveDebug);
- console.error('保存人员失败', error);
- createMessage.error(isEditMode.value ? '更新失败' : '新增失败');
- } finally {
- saving.value = false;
- }
- };
- // 姓名校验方法
- const validatePersonName = () => {
- if (!personForm.personName.trim()) {
- personNameError.value = '请输入姓名';
- return;
- }
- const nameRegex = /^[\u4e00-\u9fa5a-zA-Z\s·]+$/;
- if (!nameRegex.test(personForm.personName.trim())) {
- personNameError.value = '姓名只能包含中文、字母或空格';
- return;
- }
- if (personForm.personName.trim().length < 2) {
- personNameError.value = '姓名至少2个字符';
- return;
- }
- personNameError.value = '';
- };
- // 手机号操作方法
- const addPhone = () => {
- personForm.phoneList.push('');
- phoneListErrors.value.push('');
- };
- const removePhone = (index: number) => {
- if (personForm.phoneList.length > 1) {
- personForm.phoneList.splice(index, 1);
- phoneListErrors.value.splice(index, 1);
- }
- };
- const validatePhone = (index: number) => {
- const phone = personForm.phoneList[index];
- if (phone.trim()) {
- const phoneRegex = /^1[3-9]\d{9}$/;
- phoneListErrors.value[index] = phoneRegex.test(phone.trim()) ? '' : '手机号格式不正确';
- } else {
- phoneListErrors.value[index] = '';
- }
- };
- // 银行卡操作方法
- const addCard = () => {
- personForm.cardList.push('');
- cardListErrors.value.push('');
- };
- const removeCard = (index: number) => {
- if (personForm.cardList.length > 1) {
- personForm.cardList.splice(index, 1);
- cardListErrors.value.splice(index, 1);
- }
- };
- const validateCard = (index: number) => {
- const card = personForm.cardList[index];
- if (card.trim()) {
- const len = card.trim().length;
- cardListErrors.value[index] = len >= 16 && len <= 19 ? '' : '银行卡号长度应为16-19位';
- } else {
- cardListErrors.value[index] = '';
- }
- };
- const handleDelete = (person: PersonBasicInfo) => {
- const name = person.personName;
- if (!name) {
- createMessage.warning('缺少人员姓名');
- return;
- }
- createConfirm({
- iconType: 'warning',
- centered: true,
- title: '确认删除对象',
- content: `确定要删除对象“${name}”吗?删除后无法恢复。`,
- okButtonProps: { type: 'primary' },
- autoFocusButton: 'ok',
- async onOk() {
- try {
- await deletePersonBasicInfo(name);
- createMessage.success('删除成功');
- await fetchPersons();
- } catch (error) {
- console.error('删除人员失败', error);
- createMessage.error('删除失败');
- }
- },
- });
- };
- // ==================== Quick Nav 滚动联动 ====================
- const rightPanelRef = ref<HTMLElement | null>(null);
- const activeNavId = ref('section-basic');
- const scheduleChartResize = () => {
- if (chartResizeFrame !== null) {
- window.cancelAnimationFrame(chartResizeFrame);
- }
- chartResizeFrame = window.requestAnimationFrame(() => {
- chartResizeFrame = null;
- handleTrendChartResize();
- if (tradeRatioChartRef.value && hasTradeRatioData.value && !tradeRatioChart) {
- initTradeRatioChart();
- }
- if (tradeTopChartRef.value && tradeTop.value.length && !tradeTopChart) {
- initTradeTopChart();
- }
- if (commTypeChartRef.value && hasRenderableCommTypeRatioData.value && !commTypeChart) {
- initCommTypeChart();
- }
- if (commTopChartRef.value && hasRenderableTopContacts.value && !commTopChart) {
- initCommTopChart();
- }
- if (tradeTrendChartRef.value && trendLabels.value.length && !tradeTrendChart) {
- initTradeTrendChart();
- }
- });
- };
- const observeChartElement = (element: Element | null) => {
- if (!chartResizeObserver || !element || observedChartElements.has(element)) return;
- chartResizeObserver.observe(element);
- observedChartElements.add(element);
- };
- const setupChartResizeObserver = () => {
- if (typeof ResizeObserver === 'undefined') return;
- if (!chartResizeObserver) {
- chartResizeObserver = new ResizeObserver(() => {
- scheduleChartResize();
- });
- }
- [
- rightPanelRef.value,
- tradeTrendChartRef.value,
- tradeRatioChartRef.value,
- tradeTopChartRef.value,
- commTypeChartRef.value,
- commTopChartRef.value,
- ].forEach(observeChartElement);
- scheduleChartResize();
- };
- const navItems = [
- { id: 'section-basic', label: '基本信息' },
- { id: 'section-relation', label: '亲密关系人' },
- { id: 'section-comm', label: '通讯信息' },
- { id: 'section-trade', label: '交易信息' },
- ];
- const scrollToSection = (id: string) => {
- const container = rightPanelRef.value;
- if (!container) return;
- const el = container.querySelector(`#${id}`) as HTMLElement | null;
- if (!el) return;
- container.scrollTo({ top: el.offsetTop - container.offsetTop - 12, behavior: 'smooth' });
- activeNavId.value = id;
- };
- let navObserver: IntersectionObserver | null = null;
- const initNavObserver = () => {
- const container = rightPanelRef.value;
- if (!container) return;
- navObserver?.disconnect();
- const sections = navItems
- .map((n) => container.querySelector(`#${n.id}`) as HTMLElement | null)
- .filter(Boolean) as HTMLElement[];
- if (!sections.length) return;
- navObserver = new IntersectionObserver(
- (entries) => {
- // 找到第一个可见的 section
- const visible = entries
- .filter((e) => e.isIntersecting)
- .sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top);
- if (visible.length) {
- activeNavId.value = visible[0].target.id;
- }
- },
- {
- root: container,
- threshold: 0.15,
- },
- );
- sections.forEach((el) => navObserver!.observe(el));
- };
- onMounted(() => {
- fetchPersons();
- resetRightPanelData();
- void openGroupModalFromRoute();
- window.addEventListener('resize', handleTrendChartResize);
- nextTick(() => {
- initNavObserver();
- setupChartResizeObserver();
- });
- });
- onBeforeUnmount(() => {
- revokeAvatarPreviewObjectUrl();
- navObserver?.disconnect();
- navObserver = null;
- if (tradeTrendSearchTimer !== null) {
- window.clearTimeout(tradeTrendSearchTimer);
- tradeTrendSearchTimer = null;
- }
- if (tradeTrendOtherNameSearchTimer !== null) {
- window.clearTimeout(tradeTrendOtherNameSearchTimer);
- tradeTrendOtherNameSearchTimer = null;
- }
- window.removeEventListener('resize', handleTrendChartResize);
- chartResizeObserver?.disconnect();
- chartResizeObserver = null;
- observedChartElements.clear();
- if (chartResizeFrame !== null) {
- window.cancelAnimationFrame(chartResizeFrame);
- chartResizeFrame = null;
- }
- if ((window as any)._handleTrendDetail) {
- delete (window as any)._handleTrendDetail;
- }
- if (tradeTrendChart) {
- tradeTrendChart.dispose();
- tradeTrendChart = null;
- }
- if (tradeRatioChart) {
- tradeRatioChart.dispose();
- tradeRatioChart = null;
- }
- if (tradeTopChart) {
- tradeTopChart.dispose();
- tradeTopChart = null;
- }
- if (commTypeChart) {
- commTypeChart.dispose();
- commTypeChart = null;
- }
- if (commTopChart) {
- commTopChart.dispose();
- commTopChart = null;
- }
- });
- const fallbackValue = (value: string | number | null | undefined) => {
- if (value === 0) return '0';
- if (value === null || value === undefined || value === '') return '-';
- return String(value);
- };
- const normalizePhotoSrc = (value?: string | null) => normalizeAvatarSrc(value);
- const getPersonPhoto = (person?: Partial<PersonBasicInfo> | null) => String(person?.photograph || '').trim();
- const selectedPerson = computed(() => {
- if (selectedPersonId.value === null) return null;
- return personList.value[selectedPersonId.value] ?? null;
- });
- const personKeyword = ref('');
- const filteredPersonList = computed(() => {
- const keyword = personKeyword.value.trim();
- const source = personList.value.map((person, index) => ({ person, index }));
- if (!keyword) return source;
- return source.filter(({ person }) => {
- const personName = String(person.personName || '');
- const certNo = String(person.personCertNo || '');
- return personName.includes(keyword) || certNo.includes(keyword);
- });
- });
- const basicInfo = computed(() => {
- const person = selectedPerson.value;
- if (!person) {
- return [
- { label: '身份证', value: '-' },
- { label: '性别', value: '-' },
- { label: '民族', value: '-' },
- { label: '年龄', value: '-' },
- { label: '出生日期', value: '-' },
- { label: '文化程度', value: '-' },
- { label: '婚姻状况', value: '-' },
- { label: '身高', value: '-' },
- { label: '户籍地', value: '-' },
- { label: '现住址', value: '-' },
- { label: '工作单位', value: '-' },
- { label: '对象分组', value: '-' },
- ];
- }
- return [
- { label: '身份证', value: maskCertNo(person.personCertNo) },
- { label: '性别', value: fallbackValue(person.personGender) },
- { label: '民族', value: fallbackValue(person.personNation) },
- { label: '年龄', value: fallbackValue(person.personAge) },
- { label: '出生日期', value: fallbackValue(person.personBirth) },
- { label: '文化程度', value: fallbackValue(person.personEducation) },
- { label: '婚姻状况', value: fallbackValue(person.personMarriage) },
- { label: '身高', value: fallbackValue(person.personHeight) },
- { label: '户籍地', value: fallbackValue(person.personResidence) },
- { label: '现住址', value: fallbackValue(person.personAddress) },
- { label: '工作单位', value: fallbackValue(person.personWorkUnit) },
- { label: '对象分组', value: fallbackValue(person.personGroup) },
- ];
- });
- const basicPhoto = computed(() => getPersonPhoto(selectedPerson.value));
- const basicName = computed(() => {
- return selectedPerson.value?.personName ?? '-';
- });
- const topContacts = computed(() => {
- if (!commTop10Data.value.length) return [];
- const max = Math.max(...commTop10Data.value.map((item) => Number(item.callCount || 0)), 1);
- return commTop10Data.value
- .slice(0, 10)
- .map((item, index) => {
- const count = Number(item.callCount || 0);
- return {
- name: item.otherName || item.otherPhone || `联系人${index + 1}`,
- otherName: item.otherName || '',
- otherPhone: item.otherPhone || '',
- count,
- rate: Math.round((count / max) * 100),
- };
- })
- .filter((item) => String(item.name || '').trim() && Number.isFinite(item.count) && item.count > 0)
- .sort((a, b) => b.count - a.count);
- });
- const hasRenderableCommTypeRatioData = computed(() =>
- commTypeRatioData.value.some((item) => String(item.name || '').trim() && Number(item.value || 0) > 0),
- );
- const hasRenderableTopContacts = computed(() =>
- topContacts.value.some((item) => String(item.name || '').trim() && Number(item.count || 0) > 0),
- );
- const tradeMetricOptions = ref([
- { label: '交易对方卡(账)号', value: 'otherCardNo' },
- { label: '交易对方', value: 'personName' },
- { label: 'ip地址', value: 'personIpAddress' },
- { label: 'mac地址', value: 'personMacAddress' },
- { label: '交易网点名称', value: 'branchName' },
- ]);
- const getTradeTopNumericValue = (item: TransOftenTop10DTO) => {
- return tradeTopQuery.dimension === '交易金额'
- ? parseMoneyValue(item.transTotalAmount)
- : Number(item.transCount || 0);
- };
- const tradeTop = computed(() => {
- if (!tradeTop10Data.value.length) return [];
- const max = Math.max(...tradeTop10Data.value.map((item) => getTradeTopNumericValue(item)), 1);
- return tradeTop10Data.value
- .map((item, index) => {
- const value = getTradeTopNumericValue(item);
- return {
- name: item.indicator || item.dimension || `对象${index + 1}`,
- filterValue: item.indicator || item.dimension || '',
- value,
- rate: Math.round((value / max) * 100),
- raw: item,
- };
- })
- .sort((a, b) => b.value - a.value);
- });
- const carrierTags = computed(() => {
- const operCountMap = callStatData.value?.operCountMap ?? {};
- return Object.entries(operCountMap)
- .map(([carrierName, phones]) => {
- const phoneList = Array.isArray(phones) ? phones.map((item) => String(item || '').trim()).filter(Boolean) : [];
- const name = String(carrierName || '').trim();
- return {
- carrierName: name,
- phoneList,
- carrierCount: phoneList.length,
- operatorId: name,
- label: `${name}(${phoneList.length})`,
- };
- })
- .filter((item) => item.carrierName);
- });
- const tradeBankTags = computed(() => {
- const bankCountMap = transStatData.value?.bankCountMap ?? {};
- return Object.entries(bankCountMap).map(([bankName, cards]) => {
- const cardNoList = Array.isArray(cards) ? cards.map((item) => String(item || '').trim()).filter(Boolean) : [];
- return {
- bankName,
- cardNoList,
- label: `${bankName}(${cardNoList.length})`,
- };
- });
- });
- const commSummary = computed(() => {
- const callStatInfo = callStatData.value;
- const phoneTotal = callStatInfo?.phoneCount ?? 0;
- const callCount = callStatInfo?.callCount;
- const otherCount = callStatInfo?.otherCount;
- const timeRange = callStatInfo?.callDateBnd
- ? String(callStatInfo.callDateBnd).replace(',', '至')
- : callStatInfo?.callDateStart
- ? `${callStatInfo.callDateStart} 至 ${callStatInfo.callDateEnd ?? '-'}`
- : '-';
- return {
- phoneSummary: phoneTotal ? `共计 ${phoneTotal} 个号码` : '-',
- totalCount: callCount ? `${callCount} 次` : '-',
- contactCount: otherCount ? `${otherCount} 个` : '-',
- timeRange,
- };
- });
- const parseMoneyValue = (value: unknown) => {
- if (value === null || value === undefined || value === '') return 0;
- if (typeof value === 'number') return Number.isFinite(value) ? value : 0;
- const num = Number(
- String(value)
- .replace(/[,%¥元\s]/g, '')
- .trim(),
- );
- return Number.isFinite(num) ? num : 0;
- };
- const parsePercentValue = (value: unknown) => {
- if (value === null || value === undefined || value === '') return null;
- const num = Number(
- String(value)
- .replace(/[,%\s]/g, '')
- .trim(),
- );
- return Number.isFinite(num) ? num : null;
- };
- const formatAmountValue = (value: number) => {
- return value.toLocaleString('zh-CN', {
- minimumFractionDigits: 2,
- maximumFractionDigits: 2,
- });
- };
- const formatMoneyText = (value: unknown) => {
- const amount = parseMoneyValue(value);
- return `${formatAmountValue(amount)}元`;
- };
- const formatMoneyHighlightText = (value: unknown) => {
- const amount = parseMoneyValue(value);
- if (amount <= 0) return '-';
- return `¥${formatAmountValue(amount)}`;
- };
- const formatPercentText = (value: unknown, fallback: number) => {
- const raw = value === null || value === undefined ? '' : String(value).trim();
- if (raw) {
- return raw.includes('%') ? raw : `${raw}%`;
- }
- return `${fallback.toFixed(4)}%`;
- };
- const tradeSummary = computed(() => {
- const transStatInfo = transStatData.value;
- const cardCount = transStatInfo?.cardCount ?? 0;
- const balance = transStatInfo?.totalBalance ?? 0;
- const bankCountMap = transStatInfo?.bankCountMap ?? {};
- const banks = Object.entries(bankCountMap).map(
- ([name, cards]) => `${name}(${Array.isArray(cards) ? cards.length : 0})`,
- );
- const infoStat = transStatInfo?.transInfoStat;
- const totalIncome = parseMoneyValue(infoStat?.totalIncome ?? infoStat?.incomeTotalAmount);
- const totalExpend = parseMoneyValue(infoStat?.totalExpend ?? infoStat?.expenseTotalAmount);
- const totalAmount = totalIncome + totalExpend;
- const incomeRate = totalAmount ? Number(((totalIncome / totalAmount) * 100).toFixed(4)) : 0;
- const expendRate = totalAmount ? Number(((totalExpend / totalAmount) * 100).toFixed(4)) : 0;
- const incomeRatio = parsePercentValue(infoStat?.incomeRatio) ?? incomeRate;
- const expendRatio = parsePercentValue(infoStat?.expenseRatio) ?? expendRate;
- const maxExpend = parseMoneyValue(infoStat?.maxExpend ?? infoStat?.maxSingleExpense);
- const maxIncome = parseMoneyValue(infoStat?.maxIncome ?? infoStat?.maxSingleIncome);
- return {
- cardSummary: cardCount ? `共计 ${cardCount} 张卡 总余额约 ${balance} 万` : '-',
- bankTags: banks,
- incomeRate: totalAmount ? formatPercentText(infoStat?.incomeRatio, incomeRate) : '-',
- incomeAmount: formatMoneyText(totalIncome),
- expendRate: totalAmount ? formatPercentText(infoStat?.expenseRatio, expendRate) : '-',
- expendAmount: formatMoneyText(totalExpend),
- maxExpend: formatMoneyHighlightText(maxExpend),
- maxIncome: formatMoneyHighlightText(maxIncome),
- incomeRatio,
- expendRatio,
- incomeValue: totalIncome,
- expendValue: totalExpend,
- };
- });
- const hasTradeSummary = computed(() => {
- const cardCount = Number(transStatData.value?.cardCount ?? 0);
- return cardCount > 0 || tradeBankTags.value.length > 0;
- });
- const hasTradeRatioData = computed(() => {
- return Number(tradeSummary.value.incomeValue || 0) > 0 || Number(tradeSummary.value.expendValue || 0) > 0;
- });
- const parseTrendAmount = (value: unknown) => {
- if (value === null || value === undefined) return 0;
- if (typeof value === 'number') return Number.isFinite(value) ? value : 0;
- const num = Number(String(value).replace(/,/g, '').trim());
- return Number.isFinite(num) ? num : 0;
- };
- const trendSummaryByDate = computed(() => {
- const map = new Map<string, { income: number; expend: number }>();
- tradeTrendData.value.forEach((item: any) => {
- const date = item?.transDate || '-';
- const flag = String(item?.debitCreditFlag || '').trim();
- const amount = parseTrendAmount(item?.transTotalAmount);
- const current = map.get(date) || { income: 0, expend: 0 };
- if (flag === '收入') {
- current.income += amount;
- } else if (flag === '支出') {
- current.expend += amount;
- }
- map.set(date, current);
- });
- return Array.from(map.entries())
- .map(([date, value]) => ({ date, ...value }))
- .sort((a, b) => a.date.localeCompare(b.date));
- });
- const trendLabels = computed(() => trendSummaryByDate.value.map((item) => item.date));
- const trendIncomePoints = computed(() => trendSummaryByDate.value.map((item) => item.income));
- const trendExpendPoints = computed(() => trendSummaryByDate.value.map((item) => item.expend));
- const trendPoints = computed(() => {
- const income = trendIncomePoints.value;
- const expend = trendExpendPoints.value;
- return income.map((v, i) => Math.max(Number(v || 0), Number(expend[i] || 0)));
- });
- const trendChartStyle = computed(() => {
- const widthN = Math.max(1, Math.floor(trendLabels.value.length / 15));
- const basePercent = (widthN + 1) * 100 - 100;
- const widthPercent = tradeTrendQuery.timeDimension === 'YEAR' ? Math.max(220, basePercent) : basePercent;
- const widthPx = tradeTrendQuery.timeDimension === 'YEAR' ? Math.max(1200, trendLabels.value.length * 420) : 0;
- return {
- height: '340px',
- width: tradeTrendQuery.timeDimension === 'YEAR' ? `${widthPx}px` : `${widthPercent}%`,
- minWidth: '100%',
- paddingRight: tradeTrendQuery.timeDimension === 'YEAR' ? '24px' : '0',
- };
- });
- const formatAmount = (value: number | string | null | undefined) => {
- const num = Number(value || 0);
- return num.toLocaleString('zh-CN');
- };
- const buildTooltipCard = ({
- title,
- value,
- color,
- suffix = '',
- subText,
- }: {
- title: string;
- value: string;
- color: string;
- suffix?: string;
- subText?: string;
- }) => {
- const sub = subText
- ? `<div style="font-size:12px; line-height:18px; color:#94a3b8; margin-top:6px;">${subText}</div>`
- : '';
- return [
- '<div style="padding:12px 14px; min-width:110px; background:linear-gradient(180deg, rgba(19,33,62,0.98) 0%, rgba(15,23,42,0.98) 100%); border:1px solid rgba(148,163,184,0.2); border-radius:12px; box-shadow:0 16px 34px rgba(2,6,23,0.3);">',
- `<div style="font-size:14px; line-height:20px; color:#f8fafc; margin-bottom:8px;">${title}</div>`,
- '<div style="display:flex; align-items:center; gap:8px;">',
- `<span style="width:10px; height:10px; border-radius:50%; background:${color}; box-shadow:0 0 0 4px rgba(255,255,255,0.06); display:inline-block;"></span>`,
- `<span style="font-size:14px; line-height:20px; color:#eff6ff; font-weight:600;">${value}${suffix}</span>`,
- '</div>',
- sub,
- '</div>',
- ].join('');
- };
- const getConfinedTooltipPosition = (
- point: number[],
- _params: unknown,
- dom: HTMLElement,
- _rect: unknown,
- size: { viewSize: number[] },
- ) => {
- const [pointX, pointY] = point;
- const [viewWidth, viewHeight] = size.viewSize;
- const cardWidth = dom.offsetWidth || 160;
- const cardHeight = dom.offsetHeight || 96;
- const gap = 10;
- const left = Math.min(Math.max(pointX - cardWidth / 2, gap), Math.max(gap, viewWidth - cardWidth - gap));
- const top = Math.min(Math.max(pointY - cardHeight - 18, gap), Math.max(gap, viewHeight - cardHeight - gap));
- return [left, top];
- };
- const formatTrendAxisValue = (value: number) => {
- const numericValue = Number(value || 0);
- const absValue = Math.abs(numericValue);
- if (absValue >= 100000000) {
- return `${(numericValue / 100000000).toFixed(absValue % 100000000 === 0 ? 0 : 1)}亿`;
- }
- if (absValue >= 10000) {
- return `${(numericValue / 10000).toFixed(absValue % 10000 === 0 ? 0 : 1)}万`;
- }
- return numericValue.toLocaleString('zh-CN');
- };
- const buildTrendTooltipCard = (time: string, params: any[]) => {
- const rowHtml = params
- .filter((item) => item && item.seriesName)
- .map((item) => {
- const color = String(item?.color || (item?.seriesName === '收入' ? '#2ac8a0' : '#ff8a66'));
- return [
- '<div style="display:flex; align-items:center; justify-content:space-between; gap:16px;">',
- '<span style="display:flex; align-items:center; gap:8px; font-size:13px; line-height:20px; color:#cbd5e1;">',
- `<span style="width:10px; height:10px; border-radius:50%; background:${color}; box-shadow:0 0 0 4px rgba(255,255,255,0.06); display:inline-block;"></span>`,
- `${item.seriesName}`,
- '</span>',
- `<span style="font-size:13px; line-height:20px; color:#eff6ff; font-weight:600;">${formatAmount(item?.value)}元</span>`,
- '</div>',
- ].join('');
- })
- .join('<div style="height:8px;"></div>');
- if (!rowHtml) return '';
- return [
- '<div style="padding:14px 16px; min-width:188px; background:linear-gradient(180deg, rgba(19,33,62,0.98) 0%, rgba(15,23,42,0.98) 100%); border:1px solid rgba(148,163,184,0.2); border-radius:14px; box-shadow:0 16px 34px rgba(2,6,23,0.32);">',
- '<div style="display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px;">',
- `<span style="font-size:14px; line-height:20px; color:#f8fafc; font-weight:600;">${time}</span>`,
- `<span style="font-size:12px; line-height:18px; color:#8ac5ff; cursor:pointer;" onclick='window._handleTrendDetail(${JSON.stringify(time)})'>查看详情</span>`,
- '</div>',
- rowHtml,
- '</div>',
- ].join('');
- };
- const wrapAxisLabel = (value: string, maxCharsPerLine = 5) => {
- const chars = Array.from(value || '');
- if (chars.length <= maxCharsPerLine) return value;
- const lines: string[] = [];
- for (let index = 0; index < chars.length; index += maxCharsPerLine) {
- lines.push(chars.slice(index, index + maxCharsPerLine).join(''));
- }
- return lines.join('\n');
- };
- const resolveAxisLabelCharsPerLine = (container: HTMLElement | null | undefined, itemCount: number, fallback = 5) => {
- const width = container?.clientWidth || 0;
- if (!width || itemCount <= 0) return fallback;
- const usableWidth = Math.max(width - 72, 0);
- const slotWidth = usableWidth / Math.max(itemCount, 1);
- const approximateCharWidth = 7.5;
- const charsPerLine = Math.floor(slotWidth / approximateCharWidth);
- return Math.max(4, Math.min(24, charsPerLine || fallback));
- };
- const formatTradeTopAxisLabel = (value: string, maxCharsPerLine = 5, maxLines = 2) => {
- const chars = Array.from(value || '');
- if (!chars.length) return '';
- const normalizedCharsPerLine = Math.max(4, maxCharsPerLine);
- const normalizedMaxLines = Math.max(1, maxLines);
- const maxChars = normalizedCharsPerLine * normalizedMaxLines;
- if (chars.length <= maxChars) {
- return wrapAxisLabel(value, normalizedCharsPerLine);
- }
- const visibleChars = chars.slice(0, Math.max(maxChars - 1, 1));
- const truncatedValue = `${visibleChars.join('')}…`;
- return wrapAxisLabel(truncatedValue, normalizedCharsPerLine);
- };
- const getTradeTopAxisMax = (maxValue: number) => {
- if (maxValue <= 0) return 1;
- const magnitude = 10 ** Math.floor(Math.log10(maxValue));
- return Math.ceil((maxValue * 1.15) / magnitude) * magnitude;
- };
- const getNiceAxisInterval = (maxValue: number, targetSplitCount = 5) => {
- if (maxValue <= 0) return 1;
- const safeSplitCount = Math.max(1, targetSplitCount);
- const roughInterval = maxValue / safeSplitCount;
- const magnitude = 10 ** Math.floor(Math.log10(roughInterval));
- const normalized = roughInterval / magnitude;
- if (normalized <= 1) return magnitude;
- if (normalized <= 2) return 2 * magnitude;
- if (normalized <= 2.5) return 2.5 * magnitude;
- if (normalized <= 5) return 5 * magnitude;
- return 10 * magnitude;
- };
- const getCommTopAxisInterval = (maxValue: number) => {
- return Math.max(1, Math.ceil(getNiceAxisInterval(maxValue, 5)));
- };
- const getCommTopAxisMax = (maxValue: number) => {
- const interval = getCommTopAxisInterval(maxValue);
- return Math.max(interval, Math.ceil(maxValue / interval) * interval);
- };
- const formatTradeTopValue = (value: number) => {
- if (tradeTopQuery.dimension === '交易金额') {
- return `${value.toLocaleString('zh-CN', { maximumFractionDigits: 2 })} 元`;
- }
- return `${value.toLocaleString('zh-CN')} 次`;
- };
- const changeLegend = (title: string, index: number) => {
- trendLegendArr.value[index].isShow = !trendLegendArr.value[index].isShow;
- tradeTrendChart?.dispatchAction({
- type: 'legendToggleSelect',
- name: title,
- });
- };
- const handleTrendDetail = async (name: string) => {
- const baseQuery: Partial<TransRecordQuery> = {};
- if (tradeTrendQuery.timeDimension === 'YEAR') {
- baseQuery.startDate = `${name}-01-01`;
- baseQuery.endDate = `${name}-12-31`;
- } else {
- baseQuery.startDate = `${name}-01`;
- const [yearStr, monthStr] = name.split('-');
- const year = Number(yearStr || 0);
- const month = Number(monthStr || 1);
- const lastDay = new Date(year, month, 0).getDate();
- baseQuery.endDate = `${name}-${String(lastDay).padStart(2, '0')}`;
- }
- const startDate = tradeTrendQuery.dateRange?.[0];
- const endDate = tradeTrendQuery.dateRange?.[1];
- if (startDate && endDate) {
- baseQuery.startDate = startDate;
- baseQuery.endDate = endDate;
- }
- const otherName = String(tradeTrendQuery.otherName || '').trim();
- if (otherName) {
- baseQuery.otherName = otherName;
- }
- openTransRecordDrilldown(baseQuery);
- };
- const openCallSummaryFromTopContacts = async () => {
- await openCallSummaryWithFilters({}, { useCommTopDateRange: true });
- };
- const initCommTypeChart = () => {
- if (!commTypeChartRef.value || !hasRenderableCommTypeRatioData.value) return;
- if (commTypeChart && commTypeChart.getDom() !== commTypeChartRef.value) {
- commTypeChart.dispose();
- commTypeChart = null;
- }
- if (!commTypeChart) commTypeChart = echarts.init(commTypeChartRef.value);
- const pieData = commTypeRatioData.value.map((item) => ({
- ...item,
- name: `${item.name}:${Number(item.value || 0).toFixed(2)}%`,
- rawName: item.name,
- itemStyle: {
- color: item.name === '主叫' ? '#4f7cff' : item.name === '被叫' ? '#39c7d9' : '#f6b659',
- },
- }));
- const chartWidth = commTypeChartRef.value.clientWidth || 320;
- const chartHeight = commTypeChartRef.value.clientHeight || 300;
- const outerRadius = Math.min(Math.floor(chartHeight * 0.34), Math.floor(chartWidth * 0.29), 108);
- const innerRadius = Math.max(Math.floor(outerRadius * 0.62), outerRadius - 28);
- const centerX = Math.max(outerRadius + 20, Math.floor(chartWidth * 0.36));
- const legendLeft = Math.max(
- Math.min(Math.max(centerX + outerRadius + 10, Math.floor(chartWidth * 0.58)), chartWidth - 104),
- Math.floor(chartWidth * 0.56),
- );
- const option: echarts.EChartsOption = {
- backgroundColor: 'transparent',
- tooltip: {
- trigger: 'item',
- confine: true,
- backgroundColor: 'transparent',
- borderWidth: 0,
- padding: 0,
- extraCssText: 'box-shadow:none;background:transparent;',
- position: getConfinedTooltipPosition,
- formatter: (params: any) => {
- const rawName = String(params?.data?.rawName || params?.name || '');
- const value = Number(params?.value || 0).toFixed(2);
- return buildTooltipCard({
- title: rawName,
- value,
- color: String(params?.color || '#5b8ff9'),
- suffix: '%',
- });
- },
- },
- legend: {
- icon: 'circle',
- left: legendLeft,
- top: 'center',
- orient: 'vertical',
- itemWidth: 10,
- itemHeight: 10,
- itemGap: 16,
- selectedMode: false,
- textStyle: {
- color: '#43506a',
- fontSize: 13,
- lineHeight: 18,
- },
- data: pieData.map((i) => i.name),
- },
- series: [
- {
- type: 'pie',
- center: [centerX, '50%'],
- radius: [innerRadius, outerRadius],
- avoidLabelOverlap: false,
- emphasis: {
- scale: false,
- },
- itemStyle: {
- borderWidth: 4,
- borderColor: 'rgba(246, 249, 255, 0.95)',
- },
- labelLine: { show: false },
- label: { show: false },
- data: pieData,
- },
- ],
- };
- commTypeChart.setOption(option, true);
- commTypeChart.off('click');
- commTypeChart.on('click', (params: any) => {
- void (async () => {
- const rawName = String(params?.data?.rawName || '');
- const n = rawName || String(params?.data?.name || '');
- const callDirection = n.includes('主叫') ? '主叫' : n.includes('被叫') ? '被叫' : '';
- openCallRecordWithFilters(callDirection ? { callDirection } : {}, { omitPersonPhones: true });
- })();
- });
- };
- const initCommTopChart = () => {
- if (!commTopChartRef.value || !hasRenderableTopContacts.value) return;
- if (commTopChart && commTopChart.getDom() !== commTopChartRef.value) {
- commTopChart.dispose();
- commTopChart = null;
- }
- if (!commTopChart) commTopChart = echarts.init(commTopChartRef.value);
- const xData = topContacts.value.map((v) => v.name);
- const yData = topContacts.value.map((v) => Number(v.count || 0));
- const maxValue = Math.max(...yData, 0);
- const axisInterval = getCommTopAxisInterval(maxValue);
- const axisMax = getCommTopAxisMax(maxValue);
- const labelCharsPerLine = resolveAxisLabelCharsPerLine(commTopChartRef.value, xData.length, 5);
- const option: echarts.EChartsOption = {
- backgroundColor: 'transparent',
- tooltip: {
- trigger: 'item',
- confine: true,
- backgroundColor: 'transparent',
- borderWidth: 0,
- padding: 0,
- extraCssText: 'box-shadow:none;background:transparent;',
- position: getConfinedTooltipPosition,
- formatter: (params: any) => {
- const name = String(params?.name || '');
- const value = Number(params?.value || 0);
- return buildTooltipCard({
- title: name,
- value: value.toLocaleString('zh-CN'),
- color: '#62c4ff',
- subText: '联系次数',
- });
- },
- },
- grid: { top: 42, left: 18, right: 24, bottom: 8, outerBoundsMode: 'same', outerBoundsContain: 'axisLabel' },
- xAxis: [
- {
- type: 'category',
- data: xData,
- axisTick: {
- alignWithLabel: true,
- lineStyle: {
- color: '#8d95a3',
- },
- },
- axisLine: { lineStyle: { color: '#8d95a3' } },
- axisLabel: {
- interval: 0,
- color: '#6b7280',
- fontSize: 12,
- lineHeight: 16,
- margin: 10,
- formatter: (value: string) => wrapAxisLabel(value, labelCharsPerLine),
- },
- },
- ],
- yAxis: [
- {
- name: '次数',
- type: 'value',
- min: 0,
- max: axisMax,
- minInterval: 1,
- interval: axisInterval,
- splitNumber: Math.min(6, Math.max(1, Math.round(axisMax / axisInterval))),
- nameLocation: 'end',
- nameRotate: 0,
- nameGap: 14,
- nameTextStyle: {
- color: '#6b7280',
- fontSize: 12,
- align: 'left',
- padding: [0, 0, 0, -8],
- },
- axisLine: { show: false },
- axisTick: { show: false },
- axisLabel: {
- color: '#6b7280',
- formatter: (value: number) => value.toLocaleString('zh-CN'),
- },
- splitLine: {
- lineStyle: {
- color: '#dde5f2',
- },
- },
- },
- ],
- series: [
- {
- type: 'bar',
- barWidth: 34,
- data: yData,
- itemStyle: {
- borderRadius: [6, 6, 0, 0],
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#4d7dff' },
- { offset: 1, color: '#61c8ff' },
- ]),
- },
- emphasis: {
- itemStyle: {
- color: '#4f8cff',
- },
- },
- },
- ],
- };
- commTopChart.setOption(option, true);
- commTopChart.getZr().off('click');
- commTopChart.getZr().on('click', (params: any) => {
- void (async () => {
- const pointInPixel = [params.offsetX, params.offsetY];
- const pointInGrid = commTopChart!.convertFromPixel({ seriesIndex: 0 }, pointInPixel) as number[];
- const dataIndex = pointInGrid?.[0];
- const row = topContacts.value[dataIndex];
- if (!row) return;
- const baseQuery: Partial<CallRecordQuery> = row.otherPhone
- ? {
- otherPhones: [row.otherPhone],
- }
- : row.otherName
- ? {
- otherName: row.otherName,
- }
- : {};
- openCallRecordWithFilters(baseQuery, { useCommTopDateRange: true, omitPersonPhones: true });
- })();
- });
- requestAnimationFrame(() => {
- commTopChart?.resize();
- });
- };
- const initTradeRatioChart = () => {
- if (!tradeRatioChartRef.value || !hasTradeRatioData.value) return;
- if (tradeRatioChart && tradeRatioChart.getDom() !== tradeRatioChartRef.value) {
- tradeRatioChart.dispose();
- tradeRatioChart = null;
- }
- if (!tradeRatioChart) tradeRatioChart = echarts.init(tradeRatioChartRef.value);
- const income = Number(tradeSummary.value.incomeValue || 0);
- const expend = Number(tradeSummary.value.expendValue || 0);
- const option: echarts.EChartsOption = {
- backgroundColor: 'transparent',
- tooltip: {
- trigger: 'item',
- confine: true,
- backgroundColor: 'transparent',
- borderWidth: 0,
- padding: 0,
- extraCssText: 'box-shadow:none;background:transparent;',
- position: getConfinedTooltipPosition,
- formatter: (params: any) => {
- const name = String(params?.name || '');
- const value = Number(params?.value || 0);
- const ratio = Number(params?.percent || 0);
- return buildTooltipCard({
- title: name,
- value: `${formatAmountValue(value)}元`,
- color: String(params?.color || '#2ac8a0'),
- subText: `占比 ${ratio.toFixed(4)}%`,
- });
- },
- },
- legend: { show: false },
- series: [
- {
- type: 'pie',
- radius: ['56%', '82%'],
- center: ['50%', '50%'],
- avoidLabelOverlap: false,
- emphasis: {
- scale: false,
- },
- itemStyle: {
- borderWidth: 4,
- borderColor: '#f6f8fd',
- },
- label: { show: false },
- labelLine: { show: false },
- data: [
- { value: income, name: '收入', itemStyle: { color: '#2ac8a0' } },
- { value: expend, name: '支出', itemStyle: { color: '#ff8a66' } },
- ].filter((item) => item.value > 0),
- },
- ],
- };
- tradeRatioChart.setOption(option, true);
- tradeRatioChart.off('click');
- tradeRatioChart.on('click', (params: any) => {
- const name = String(params?.name || '');
- if (name === '收入' || name === '支出') {
- void handleDrillByDebitCredit(name as '收入' | '支出');
- }
- });
- requestAnimationFrame(() => {
- tradeRatioChart?.resize();
- });
- };
- const initTradeTopChart = () => {
- if (!tradeTopChartRef.value || !tradeTop.value.length) return;
- if (tradeTopChart && tradeTopChart.getDom() !== tradeTopChartRef.value) {
- tradeTopChart.dispose();
- tradeTopChart = null;
- }
- if (!tradeTopChart) tradeTopChart = echarts.init(tradeTopChartRef.value);
- const xData = tradeTop.value.map((v) => v.name);
- const yData = tradeTop.value.map((v) => Number(v.value || 0));
- const maxValue = Math.max(...yData, 0);
- const labelCharsPerLine = resolveAxisLabelCharsPerLine(tradeTopChartRef.value, xData.length, 5);
- const option: echarts.EChartsOption = {
- backgroundColor: 'transparent',
- tooltip: {
- trigger: 'item',
- backgroundColor: 'transparent',
- borderWidth: 0,
- padding: 0,
- extraCssText: 'box-shadow:none;background:transparent;',
- formatter: (params: any) => {
- const name = String(params?.name || '');
- const value = Number(params?.value || 0);
- return buildTooltipCard({
- title: name,
- value: formatTradeTopValue(value),
- color: '#7b8cff',
- subText: tradeTopQuery.dimension,
- });
- },
- },
- grid: { top: 48, left: 20, right: 24, bottom: 64, outerBoundsMode: 'same', outerBoundsContain: 'axisLabel' },
- xAxis: [
- {
- type: 'category',
- data: xData,
- axisTick: { alignWithLabel: true },
- axisLine: { lineStyle: { color: '#8d95a3' } },
- axisLabel: {
- interval: 0,
- color: '#6b7280',
- fontSize: 12,
- lineHeight: 16,
- margin: 10,
- formatter: (value: string) => formatTradeTopAxisLabel(value, labelCharsPerLine, 2),
- },
- },
- ],
- yAxis: [
- {
- name: tradeTopQuery.dimension === '交易金额' ? '金额' : '次数',
- type: 'value',
- min: 0,
- max: getTradeTopAxisMax(maxValue),
- splitNumber: 5,
- nameLocation: 'end',
- nameRotate: 0,
- nameGap: 18,
- nameTextStyle: {
- color: '#6b7280',
- fontSize: 12,
- align: 'left',
- padding: [0, 0, 0, -8],
- },
- axisLine: { show: false },
- axisTick: { show: false },
- axisLabel: {
- color: '#6b7280',
- formatter: (value: number) => value.toLocaleString('zh-CN'),
- },
- splitLine: {
- lineStyle: {
- color: '#dde5f2',
- },
- },
- },
- ],
- series: [
- {
- type: 'bar',
- barWidth: 36,
- data: yData,
- itemStyle: {
- borderRadius: [6, 6, 0, 0],
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#7b8cff' },
- { offset: 1, color: '#58b1ff' },
- ]),
- },
- emphasis: {
- itemStyle: {
- color: '#6978ff',
- },
- },
- },
- ],
- };
- tradeTopChart.setOption(option, true);
- tradeTopChart.getZr().off('click');
- tradeTopChart.getZr().on('click', (params: any) => {
- void (async () => {
- if (!tradeTop10Data.value.length) return;
- const pointInPixel = [params.offsetX, params.offsetY];
- const pointInGrid = tradeTopChart!.convertFromPixel({ seriesIndex: 0 }, pointInPixel) as number[];
- const dataIndex = pointInGrid?.[0];
- const row = tradeTop.value[dataIndex];
- if (!row) return;
- handleDrillByTradeTop(row);
- })();
- });
- requestAnimationFrame(() => {
- tradeTopChart?.resize();
- });
- };
- const initTradeTrendChart = () => {
- if (!tradeTrendChartRef.value) return;
- if (tradeTrendChart) {
- tradeTrendChart.dispose();
- tradeTrendChart = null;
- }
- tradeTrendChart = echarts.init(tradeTrendChartRef.value);
- const option: echarts.EChartsOption = {
- backgroundColor: 'transparent',
- tooltip: {
- backgroundColor: 'transparent',
- borderWidth: 0,
- padding: 0,
- extraCssText: 'box-shadow:none;background:transparent;',
- position: (pt: number[], _params: any, _dom: any, _rect: any, size: any) => {
- const [width] = size?.contentSize || [0];
- return [pt[0] - width / 2, pt[1] + 10];
- },
- trigger: 'axis',
- axisPointer: {
- type: 'line',
- lineStyle: {
- color: 'rgba(255, 148, 104, 0.42)',
- width: 1.5,
- type: 'dashed',
- },
- },
- showContent: true,
- alwaysShowContent: false,
- showDelay: 0,
- hideDelay: 1000,
- enterable: true,
- confine: false,
- transitionDuration: 0.4,
- formatter: (params: any) => {
- const list = Array.isArray(params) ? params : [params];
- const time = list[0]?.axisValueLabel || list[0]?.name || '-';
- return buildTrendTooltipCard(time, list);
- },
- },
- legend: {
- show: false,
- data: ['收入', '支出'],
- selected: {
- 收入: trendLegendArr.value[0]?.isShow ?? true,
- 支出: trendLegendArr.value[1]?.isShow ?? true,
- },
- },
- grid: {
- left: 44,
- right: 34,
- bottom: 36,
- top: 48,
- outerBoundsMode: 'same',
- outerBoundsContain: 'axisLabel',
- },
- xAxis: {
- name: '时间',
- type: 'category',
- boundaryGap: false,
- data: trendLabels.value,
- nameTextStyle: {
- color: '#7b8797',
- fontSize: 12,
- padding: [18, 0, 0, 0],
- },
- axisLine: {
- lineStyle: {
- color: 'rgba(206, 214, 229, 0.96)',
- },
- },
- axisTick: { show: false },
- axisLabel: {
- interval: 0,
- color: '#6b7280',
- fontSize: 12,
- margin: 16,
- formatter: (value: string) => {
- const maxLength = tradeTrendQuery.timeDimension === 'YEAR' ? 4 : 7;
- const val = String(value ?? '');
- const rowN = Math.ceil(val.length / maxLength);
- if (rowN <= 1) return val;
- let ret = '';
- for (let i = 0; i < rowN; i++) {
- ret += val.substring(i * maxLength, (i + 1) * maxLength) + '\n';
- }
- return ret;
- },
- },
- },
- yAxis: {
- name: '金额',
- nameLocation: 'end',
- nameRotate: 0,
- nameGap: 16,
- nameTextStyle: {
- color: '#7b8797',
- fontSize: 12,
- align: 'left',
- padding: [0, 0, 0, -6],
- },
- type: 'value',
- axisLine: { show: false },
- axisTick: { show: false },
- axisLabel: {
- color: '#6b7280',
- fontSize: 12,
- formatter: (value: number) => formatTrendAxisValue(value),
- },
- splitNumber: 5,
- splitLine: {
- lineStyle: {
- color: 'rgba(217, 225, 238, 0.92)',
- type: 'dashed',
- },
- },
- },
- series: [
- {
- name: '收入',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 10,
- showSymbol: true,
- itemStyle: {
- color: '#2ac8a0',
- borderColor: '#ffffff',
- borderWidth: 2,
- shadowBlur: 10,
- shadowColor: 'rgba(42, 200, 160, 0.22)',
- },
- lineStyle: { width: 3, color: '#2ac8a0' },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: 'rgba(42, 200, 160, 0.22)' },
- { offset: 1, color: 'rgba(42, 200, 160, 0.02)' },
- ]),
- },
- emphasis: {
- focus: 'series',
- },
- data: trendIncomePoints.value,
- },
- {
- name: '支出',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 10,
- showSymbol: true,
- itemStyle: {
- color: '#ff8a66',
- borderColor: '#ffffff',
- borderWidth: 2,
- shadowBlur: 10,
- shadowColor: 'rgba(255, 138, 102, 0.22)',
- },
- lineStyle: { width: 3, color: '#ff8a66' },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: 'rgba(255, 138, 102, 0.2)' },
- { offset: 1, color: 'rgba(255, 138, 102, 0.02)' },
- ]),
- },
- emphasis: {
- focus: 'series',
- },
- data: trendExpendPoints.value,
- },
- ],
- };
- tradeTrendChart.setOption(option, true);
- (window as any)._handleTrendDetail = handleTrendDetail;
- };
- watch(
- () => [trendLabels.value, trendIncomePoints.value, trendExpendPoints.value],
- async () => {
- if (!trendLabels.value.length) return;
- await nextTick();
- setupChartResizeObserver();
- if (!tradeTrendChartRef.value) return;
- initTradeTrendChart();
- requestAnimationFrame(() => {
- tradeTrendChart?.resize();
- });
- if (tradeTrendScrollRef.value) {
- tradeTrendScrollRef.value.scrollLeft = 0;
- }
- },
- { deep: true },
- );
- watch(
- () => [
- String(tradeTrendQuery.otherName || '').trim(),
- tradeTrendQuery.dateRange?.[0],
- tradeTrendQuery.dateRange?.[1],
- tradeTrendQuery.timeDimension,
- ],
- () => {
- const personName = selectedPerson.value?.personName;
- if (!personName) {
- tradeTrendData.value = [];
- return;
- }
- scheduleTradeTrendSearch(tradeTrendQuery.timeDimension === 'YEAR' ? 0 : 240);
- },
- );
- watch(
- () => selectedPerson.value?.personName || '',
- (personName) => {
- resetTradeTrendOtherNameState();
- if (!personName) return;
- const currentValue = String(tradeTrendQuery.otherName || '').trim();
- if (currentValue) {
- setTradeTrendOtherNameOptions([currentValue], true);
- }
- void loadTradeTrendOtherNameOptions({ reset: true, search: '' });
- },
- );
- watch(
- () => tradeTrendChartRef.value,
- async (el) => {
- if (!el || !trendLabels.value.length) return;
- await nextTick();
- setupChartResizeObserver();
- initTradeTrendChart();
- requestAnimationFrame(() => {
- tradeTrendChart?.resize();
- });
- },
- );
- watch(
- () => [tradeSummary.value.incomeValue, tradeSummary.value.expendValue, tradeRatioChartRef.value],
- async () => {
- if (!hasTradeRatioData.value || !tradeRatioChartRef.value) {
- if (tradeRatioChart) {
- tradeRatioChart.dispose();
- tradeRatioChart = null;
- }
- return;
- }
- await nextTick();
- setupChartResizeObserver();
- initTradeRatioChart();
- },
- );
- watch(
- () => tradeTop.value,
- async () => {
- await nextTick();
- setupChartResizeObserver();
- if (!tradeTop.value.length || !tradeTopChartRef.value) return;
- initTradeTopChart();
- },
- { deep: true },
- );
- watch(
- () => [
- tradeTopQuery.indicator,
- tradeTopQuery.dimension,
- tradeTopQuery.dateRange?.[0],
- tradeTopQuery.dateRange?.[1],
- ],
- async () => {
- const personName = selectedPerson.value?.personName;
- if (!personName) {
- tradeTop10Data.value = [];
- return;
- }
- try {
- tradeTop10Data.value = await loadTradeTopData(personName);
- } catch (error) {
- console.error('获取常交易对象TOP10失败', error);
- tradeTop10Data.value = [];
- }
- },
- );
- watch(
- () => [hasRenderableCommTypeRatioData.value, commTypeRatioData.value, commTypeChartRef.value],
- async () => {
- if (!hasRenderableCommTypeRatioData.value || !commTypeChartRef.value) {
- if (commTypeChart) {
- commTypeChart.dispose();
- commTypeChart = null;
- }
- return;
- }
- await nextTick();
- setupChartResizeObserver();
- initCommTypeChart();
- requestAnimationFrame(() => {
- commTypeChart?.resize();
- });
- },
- { deep: true },
- );
- watch(
- () => [hasRenderableTopContacts.value, topContacts.value, commTopChartRef.value],
- async () => {
- if (!hasRenderableTopContacts.value || !commTopChartRef.value) {
- if (commTopChart) {
- commTopChart.dispose();
- commTopChart = null;
- }
- return;
- }
- await nextTick();
- setupChartResizeObserver();
- initCommTopChart();
- },
- { deep: true },
- );
- watch(
- () => [commTopQuery.dateRange?.[0], commTopQuery.dateRange?.[1]],
- async () => {
- const personName = selectedPerson.value?.personName;
- if (!personName) {
- commTop10Data.value = [];
- return;
- }
- try {
- commTop10Data.value = await loadCommTopData(personName);
- } catch (error) {
- console.error('获取常联系对象TOP10失败', error);
- commTop10Data.value = [];
- }
- },
- );
- const stations = computed(() => {
- if (!stationData.value.length) return [];
- return stationData.value
- .filter((item): item is CallStatStationDTO => !!item && typeof item === 'object')
- .map((item) => {
- if (item.personStationName) return item.personStationName;
- const regionId = item.personRegionId || '';
- const cellId = item.personCellId || '';
- if (regionId && cellId) return `${regionId}-${cellId}`;
- return regionId || cellId || '-';
- })
- .filter(Boolean)
- .slice(0, stationDisplayLimit);
- });
- const activeGroupMembers = computed(() => {
- return groupMembers.value.filter((item) => item.groupId === activeGroupId.value);
- });
- const activeGroup = computed(() => {
- return objectGroups.value.find((item) => item.id === activeGroupId.value) || null;
- });
- const groupedPersonNameSet = computed(() => {
- return new Set(
- groupMembers.value
- .map((item) => item.personName?.trim())
- .filter((item): item is string => !!item && item !== '-'),
- );
- });
- const personOptions = computed(() => {
- const currentMainPerson = createGroupForm.mainPerson?.trim() || '';
- return personList.value
- .map((item) => {
- const personName = item.personName?.trim() || '';
- return { label: personName || '-', value: personName };
- })
- .filter((item) => !!item.value)
- .filter((item) => {
- if (isEditGroupMode.value && currentMainPerson && item.value === currentMainPerson) {
- return true;
- }
- return !groupedPersonNameSet.value.has(item.value);
- })
- .filter((item) => !!item.value);
- });
- const addObjectCandidates = computed(() => {
- return personList.value
- .map((item, index) => {
- const name = item.personName?.trim() || '';
- const phoneValues = (item.phoneList || []).map((phone) => phone.personNo || '').filter(Boolean);
- const cardCount = (item.cardList || []).filter((card) => !!card?.personNo).length;
- return {
- key: String(item.id ?? item.objId ?? name ?? index),
- name: name || `未命名对象${index + 1}`,
- personCertNo: item.personCertNo || '-',
- primaryPhone: phoneValues[0] || '-',
- cardCount,
- photograph: item.photograph || '',
- disabled: false,
- };
- })
- .filter((item) => !!item.name && !groupedPersonNameSet.value.has(item.name))
- .sort((a, b) => a.name.localeCompare(b.name, 'zh-CN'));
- });
- const filteredAddObjectCandidates = computed(() => {
- const keyword = addObjectKeyword.value.trim().toLocaleLowerCase();
- if (!keyword) return addObjectCandidates.value;
- return addObjectCandidates.value.filter((item) =>
- [item.name, item.personCertNo, item.primaryPhone].some((value) => value.toLocaleLowerCase().includes(keyword)),
- );
- });
- const addObjectEmptyText = computed(() => {
- if (!addObjectCandidates.value.length) {
- return '暂无未分组对象,对象限定在单一分组';
- }
- return '暂无匹配对象';
- });
- const normalizeGroupName = (value?: string | null) => value?.trim().toLocaleLowerCase() || '';
- const isDuplicateGroupName = (groupName: string) => {
- const normalizedName = normalizeGroupName(groupName);
- if (!normalizedName) return false;
- const editingId = editingGroupData.value?.id !== undefined ? String(editingGroupData.value.id) : '';
- return objectGroups.value.some((item) => {
- const groupId = item.id !== undefined && item.id !== null ? String(item.id) : '';
- if (editingId && groupId === editingId) return false;
- return normalizeGroupName(item.name) === normalizedName;
- });
- };
- const validateGroupName = (showRequired = false) => {
- const groupName = createGroupForm.groupName.trim();
- if (!groupName) {
- groupNameError.value = showRequired ? '请输入分组名称' : '';
- return !showRequired;
- }
- if (isDuplicateGroupName(groupName)) {
- groupNameError.value = '分组名称已存在,请重新输入';
- return false;
- }
- groupNameError.value = '';
- return true;
- };
- const validateMainPerson = (showRequired = false) => {
- if (isEditGroupMode.value) {
- mainPersonError.value = '';
- return true;
- }
- if (!createGroupForm.mainPerson) {
- mainPersonError.value = showRequired ? '请选择分组主体对象' : '';
- return !showRequired;
- }
- mainPersonError.value = '';
- return true;
- };
- watch(
- () => createGroupForm.groupName,
- () => {
- if (!createGroupModalVisible.value) return;
- if (!createGroupForm.groupName.trim() && !groupNameError.value) return;
- validateGroupName(Boolean(createGroupForm.groupName.trim()));
- },
- );
- watch(
- () => createGroupForm.mainPerson,
- () => {
- if (!createGroupModalVisible.value) return;
- if (!createGroupForm.mainPerson && !mainPersonError.value) return;
- validateMainPerson(Boolean(createGroupForm.mainPerson));
- },
- );
- const openCreateGroupModal = () => {
- isEditGroupMode.value = false;
- editingGroupData.value = null;
- createGroupForm.groupName = '';
- createGroupForm.mainPerson = undefined;
- createGroupForm.remark = '';
- groupNameError.value = '';
- mainPersonError.value = '';
- createGroupModalVisible.value = true;
- };
- const closeCreateGroupModal = () => {
- createGroupModalVisible.value = false;
- isEditGroupMode.value = false;
- editingGroupData.value = null;
- groupNameError.value = '';
- mainPersonError.value = '';
- };
- const closeAddObjectModal = () => {
- addObjectModalVisible.value = false;
- addObjectKeyword.value = '';
- selectedAddPersonNames.value = [];
- };
- const handleCreateGroup = async () => {
- const groupName = createGroupForm.groupName.trim();
- if (!validateGroupName(true)) {
- createMessage.warning(groupNameError.value || '请输入分组名称');
- return;
- }
- if (!validateMainPerson(true)) {
- createMessage.warning(mainPersonError.value || '请选择分组主体对象');
- return;
- }
- creatingGroup.value = true;
- try {
- if (isEditGroupMode.value && editingGroupData.value) {
- await updatePersonGroup({
- id: editingGroupData.value.id,
- groupName,
- remark: createGroupForm.remark || undefined,
- });
- createMessage.success('更新分组成功');
- } else {
- await createPersonGroup({
- groupName,
- remark: createGroupForm.remark || undefined,
- personList: createGroupForm.mainPerson
- ? [
- {
- personName: createGroupForm.mainPerson,
- hasMain: true,
- },
- ]
- : undefined,
- });
- createMessage.success('新增分组成功');
- }
- createGroupModalVisible.value = false;
- isEditGroupMode.value = false;
- editingGroupData.value = null;
- groupNameError.value = '';
- mainPersonError.value = '';
- await loadGroupData();
- } catch (error) {
- console.error(isEditGroupMode.value ? '更新分组失败' : '新增分组失败', error);
- createMessage.error(isEditGroupMode.value ? '更新分组失败' : '新增分组失败');
- } finally {
- creatingGroup.value = false;
- }
- };
- const handleEditGroup = () => {
- if (!activeGroupId.value) {
- createMessage.warning('请先选择分组');
- return;
- }
- const current = objectGroups.value.find((item) => item.id === activeGroupId.value);
- if (!current) return;
- const mainMember = activeGroupMembers.value.find(
- (item) => item.hasMain && item.personName && item.personName !== '-',
- );
- editingGroupData.value = { id: current.id, name: current.name, remark: current.remark };
- isEditGroupMode.value = true;
- createGroupForm.groupName = current.name;
- createGroupForm.mainPerson = mainMember?.personName || undefined;
- createGroupForm.remark = current.remark || '';
- groupNameError.value = '';
- mainPersonError.value = '';
- createGroupModalVisible.value = true;
- };
- const handleDeleteGroup = () => {
- if (!activeGroupId.value) {
- createMessage.warning('请先选择分组');
- return;
- }
- const current = objectGroups.value.find((item) => item.id === activeGroupId.value);
- createConfirm({
- iconType: 'warning',
- centered: true,
- title: '确认删除分组',
- content: `确定要删除分组“${current?.name || ''}”吗?删除后无法恢复。`,
- okButtonProps: { type: 'primary' },
- autoFocusButton: 'ok',
- async onOk() {
- try {
- await deletePersonGroup(activeGroupId.value!);
- createMessage.success('删除分组成功');
- await loadGroupData();
- } catch (error) {
- console.error('删除分组失败', error);
- createMessage.error('删除分组失败');
- }
- },
- });
- };
- const handleAddObject = () => {
- if (!activeGroupId.value) {
- createMessage.warning('请先选择分组');
- return;
- }
- addObjectKeyword.value = '';
- selectedAddPersonNames.value = [];
- addObjectModalVisible.value = true;
- };
- const handleCheckAddObject = (item: { name: string; disabled: boolean }, checked: boolean) => {
- if (item.disabled) return;
- if (checked) {
- selectedAddPersonNames.value = Array.from(new Set([...selectedAddPersonNames.value, item.name]));
- return;
- }
- selectedAddPersonNames.value = selectedAddPersonNames.value.filter((name) => name !== item.name);
- };
- const handleToggleAddObject = (item: { name: string; disabled: boolean }) => {
- if (item.disabled) return;
- const checked = !selectedAddPersonNames.value.includes(item.name);
- handleCheckAddObject(item, checked);
- };
- const handleConfirmAddObject = async () => {
- if (!activeGroupId.value) {
- createMessage.warning('请先选择分组');
- return;
- }
- if (!selectedAddPersonNames.value.length) {
- createMessage.warning('请选择要添加的对象');
- return;
- }
- addingObjectToGroup.value = true;
- try {
- await addPersonToGroup({
- groupId: activeGroupId.value,
- personList: selectedAddPersonNames.value,
- });
- createMessage.success('添加对象成功');
- closeAddObjectModal();
- await loadGroupData();
- } catch (error) {
- console.error('添加对象失败', error);
- createMessage.error('添加对象失败');
- } finally {
- addingObjectToGroup.value = false;
- }
- };
- const handleRemoveMember = async (memberId: string) => {
- try {
- await remPersonFromGroup(memberId);
- createMessage.success('移出分组成功');
- await loadGroupData();
- } catch (error) {
- console.error('移出分组失败', error);
- createMessage.error('移出分组失败');
- }
- };
- const handleChangeMain = async (relId: string) => {
- if (!activeGroupId.value) return;
- try {
- await changeMainPerson(relId, activeGroupId.value);
- createMessage.success('变更主要人员成功');
- await loadGroupData();
- } catch (error) {
- console.error('变更主要人员失败', error);
- createMessage.error('变更主要人员失败');
- }
- };
- </script>
- <style lang="less">
- @prefix-cls: ~'jeesite-case-portrait';
- .@{prefix-cls}.case-portrait-page {
- padding: 0;
- background: #f5f6f8;
- height: 100%;
- width: calc(100% + 24px);
- margin: 0 -12px;
- box-sizing: border-box;
- overflow: hidden;
- .page-main {
- position: relative;
- display: flex;
- flex-direction: column;
- gap: 12px;
- min-width: 0;
- height: 100%;
- padding: 16px 0;
- box-sizing: border-box;
- overflow: hidden;
- }
- .page-layout {
- display: grid;
- grid-template-columns: 196px minmax(0, 1fr);
- gap: 16px;
- align-items: start;
- flex: 1 1 auto;
- min-height: 0;
- }
- .left-panel {
- position: sticky;
- top: 0;
- align-self: start;
- height: calc(100vh - 100px);
- max-height: calc(100vh - 100px);
- .panel-card {
- position: relative;
- overflow: hidden;
- background: linear-gradient(180deg, #fcfdff 0%, #f4f8ff 100%);
- border: 1px solid #dfe9fb;
- border-radius: 22px;
- padding: 16px 14px 18px;
- display: flex;
- flex-direction: column;
- gap: 14px;
- box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
- height: 100%;
- box-sizing: border-box;
- &::before {
- content: '';
- position: absolute;
- left: -12px;
- top: -24px;
- width: 180px;
- height: 140px;
- background: radial-gradient(circle, rgba(96, 165, 250, 0.18) 0%, rgba(96, 165, 250, 0) 74%);
- pointer-events: none;
- }
- }
- .search-box {
- position: relative;
- z-index: 1;
- .ant-input,
- .ant-input-affix-wrapper {
- height: 40px;
- border-radius: 999px;
- border-color: #d8e4fb;
- background: rgba(255, 255, 255, 0.92);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
- padding-inline: 14px;
- }
- .ant-input-affix-wrapper {
- display: flex;
- align-items: center;
- overflow: hidden;
- box-sizing: border-box;
- }
- .ant-input-affix-wrapper > .ant-input {
- height: 100%;
- padding: 0;
- border: 0;
- border-radius: 0;
- background: transparent;
- box-shadow: none;
- }
- .ant-input-affix-wrapper .ant-input-suffix,
- .ant-input-affix-wrapper .ant-input-clear-icon {
- display: inline-flex;
- align-items: center;
- }
- .ant-input:focus,
- .ant-input-focused,
- .ant-input-affix-wrapper-focused {
- border-color: #8ab4ff;
- box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
- }
- }
- .left-actions {
- display: flex;
- position: relative;
- z-index: 1;
- .ant-btn {
- height: 40px;
- border: 0;
- border-radius: 999px;
- font-weight: 600;
- letter-spacing: 0.04em;
- background: linear-gradient(135deg, #2f7df6 0%, #56b1ff 100%);
- box-shadow: 0 12px 22px rgba(59, 130, 246, 0.24);
- }
- }
- .person-list {
- position: relative;
- display: flex;
- flex-direction: column;
- align-items: stretch;
- gap: 8px;
- flex: 1;
- overflow-y: auto;
- overflow-x: hidden;
- min-height: 0;
- padding: 4px 2px 0 0;
- &::before {
- display: none;
- }
- &::-webkit-scrollbar {
- width: 4px;
- }
- &::-webkit-scrollbar-thumb {
- background: #ccc;
- border-radius: 2px;
- }
- .empty-tip {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 10px;
- position: relative;
- z-index: 1;
- width: 100%;
- min-height: 148px;
- padding: 24px 14px;
- box-sizing: border-box;
- border-radius: 24px;
- border: 1px dashed rgba(183, 202, 234, 0.72);
- background:
- radial-gradient(circle at top right, rgba(119, 177, 255, 0.12), transparent 32%),
- linear-gradient(180deg, rgba(251, 253, 255, 0.96) 0%, rgba(243, 247, 255, 0.92) 100%);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
- &::before {
- content: '';
- flex: 0 0 52px;
- width: 52px;
- height: 52px;
- border-radius: 18px;
- border: 1px solid rgba(187, 208, 247, 0.82);
- background:
- radial-gradient(circle at 50% 16px, #5b8ff9 0 5px, transparent 6px),
- linear-gradient(#d5e3ff 0 0) center 34px / 26px 3px no-repeat,
- linear-gradient(180deg, #76a9ff 0%, #4f7cff 100%) 17px 30px / 6px 11px no-repeat,
- linear-gradient(180deg, #8fc6ff 0%, #60a5fa 100%) 25px 26px / 6px 15px no-repeat,
- linear-gradient(180deg, #c4b5fd 0%, #93c5fd 100%) 33px 23px / 6px 18px no-repeat,
- linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(237, 245, 255, 0.92) 100%);
- background-repeat: no-repeat;
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.92),
- 0 14px 24px rgba(59, 130, 246, 0.1);
- }
- }
- }
- .person-card {
- width: 100%;
- max-width: none;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: flex-start;
- gap: 10px;
- min-height: 60px;
- padding: 10px 12px;
- border-radius: 12px;
- background: #fafafa;
- border: 1px solid #e7edf5;
- cursor: pointer;
- transition:
- border-color 0.22s ease,
- box-shadow 0.22s ease,
- background 0.22s ease;
- position: relative;
- overflow: visible;
- z-index: 1;
- &::before {
- display: none;
- }
- &::after {
- display: none;
- }
- &:hover {
- background: #fff;
- border-color: #d7e4f6;
- box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
- .person-avatar .jeesite-person-avatar__media {
- background: linear-gradient(135deg, #4d92ff 0%, #73c0ff 100%);
- box-shadow: 0 8px 14px rgba(59, 130, 246, 0.18);
- }
- .person-name {
- color: #0f172a;
- }
- }
- &.active {
- background: #ffffff;
- border-color: #9ec5fe;
- box-shadow:
- inset 0 0 0 1px rgba(47, 125, 246, 0.12),
- 0 8px 18px rgba(59, 130, 246, 0.08);
- .person-avatar .jeesite-person-avatar__media {
- background: linear-gradient(135deg, #2f7df6 0%, #57b3ff 100%);
- box-shadow: 0 8px 14px rgba(59, 130, 246, 0.2);
- }
- .person-name {
- color: #0f172a;
- font-weight: 600;
- }
- }
- }
- .person-avatar-wrap {
- position: relative;
- width: 44px;
- height: 44px;
- flex: 0 0 44px;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: none;
- &::before {
- display: none;
- }
- }
- .person-avatar {
- display: flex;
- position: relative;
- z-index: 1;
- transition: all 0.22s ease;
- }
- .person-name {
- position: relative;
- z-index: 1;
- flex: 1;
- min-width: 0;
- max-width: none;
- min-height: auto;
- font-size: 13px;
- line-height: 1.5;
- color: #5b6472;
- font-weight: 500;
- text-align: left;
- word-break: break-word;
- overflow: hidden;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- transition:
- color 0.22s ease,
- font-weight 0.22s ease;
- }
- .group-btn-wrap {
- margin-top: auto;
- padding-top: 14px;
- border-top: 1px solid rgba(209, 223, 246, 0.88);
- position: relative;
- z-index: 1;
- .group-btn {
- width: 100%;
- height: 40px;
- border-radius: 999px;
- border-color: #d6e4ff;
- color: #205ecf;
- background: rgba(255, 255, 255, 0.88);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
- }
- }
- }
- .right-panel {
- display: flex;
- flex-direction: column;
- align-self: stretch;
- flex: 1 1 auto;
- gap: 16px;
- min-width: 0;
- min-height: 0;
- overflow-y: auto;
- padding-right: 8px;
- &::-webkit-scrollbar {
- width: 6px;
- }
- &::-webkit-scrollbar-thumb {
- background: #ccc;
- border-radius: 3px;
- }
- }
- .section-card {
- background: #fff;
- border-radius: 12px;
- padding: 16px;
- box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
- }
- .quick-nav-shell {
- display: none;
- }
- #section-relation {
- min-height: 312px;
- }
- .comm-section {
- padding: 14px 18px 18px;
- background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
- border: 1px solid #e6eefc;
- box-shadow: 0 12px 28px rgba(37, 74, 151, 0.06);
- }
- .comm-info {
- display: flex;
- flex-direction: column;
- gap: 10px;
- font-size: 12px;
- color: #475569;
- }
- .comm-row {
- display: flex;
- align-items: center;
- gap: 12px;
- .label {
- font-weight: 600;
- color: #1f2937;
- }
- .value {
- font-weight: 600;
- }
- .carrier {
- color: #2563eb;
- }
- }
- .comm-grid {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 8px 24px;
- .grid-item {
- display: flex;
- gap: 6px;
- color: #475569;
- }
- .label {
- color: #6b7280;
- }
- .value {
- font-weight: 600;
- color: #1f2937;
- }
- }
- .comm-divider {
- border-top: 1px dashed #e2e8f0;
- margin: 12px 0;
- }
- .comm-chart-row {
- display: grid;
- grid-template-columns: 380px 1fr;
- gap: 18px;
- align-items: stretch;
- }
- .comm-chart-header,
- .trade-chart-header,
- .comm-top-header,
- .trade-top-header {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 16px;
- min-height: 36px;
- }
- .trade-section {
- padding: 14px 18px 18px;
- background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
- border: 1px solid #eef0f5;
- box-shadow: 0 12px 28px rgba(59, 78, 122, 0.06);
- }
- .trade-summary {
- font-size: 12px;
- color: #475569;
- }
- .trade-row {
- display: flex;
- flex-wrap: wrap;
- gap: 8px 12px;
- align-items: center;
- .label {
- font-weight: 600;
- color: #1f2937;
- }
- .value {
- font-weight: 600;
- }
- }
- .trade-tag {
- background: #eef2ff;
- color: #2563eb;
- padding: 2px 8px;
- border-radius: 6px;
- font-size: 12px;
- }
- .trade-chart-row {
- display: grid;
- grid-template-columns: 380px 1fr;
- gap: 18px;
- align-items: stretch;
- }
- .trade-chart {
- display: flex;
- flex-direction: column;
- gap: 12px;
- min-width: 0;
- height: 100%;
- }
- .trade-kpi {
- display: flex;
- align-items: center;
- justify-content: space-between;
- flex-wrap: wrap;
- gap: 10px 24px;
- font-size: 14px;
- color: #374151;
- .trade-kpi-item {
- display: flex;
- align-items: center;
- gap: 4px;
- }
- .trade-kpi-label {
- color: #374151;
- }
- .trade-kpi-value {
- font-weight: 600;
- }
- .down {
- color: #ff8a66;
- }
- .up {
- color: #2ac8a0;
- }
- }
- .legend-sub {
- margin-left: 18px;
- color: #64748b;
- font-size: 12px;
- }
- .bar.clickable {
- cursor: pointer;
- }
- .trade-top-echart {
- width: 100%;
- height: 320px;
- }
- .trade-section .chart-tools,
- .trade-section .trend-tools {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 6px;
- font-size: 12px;
- color: #64748b;
- .select-input {
- width: 120px;
- }
- .search-input {
- width: 300px;
- max-width: 100%;
- }
- .range-date-input {
- width: 260px;
- }
- }
- .trade-top-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 18px;
- flex-wrap: wrap;
- }
- .trade-top-tools {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- flex-wrap: wrap;
- gap: 10px;
- font-size: 14px;
- color: #1f2937;
- .tool-label {
- color: #1f2937;
- white-space: nowrap;
- font-weight: 500;
- }
- .metric-select {
- width: 118px;
- }
- .trade-top-range {
- width: 264px;
- }
- .metric-select,
- .trade-top-range {
- .ant-select-selector,
- &.ant-picker {
- border-radius: 12px;
- border-color: rgba(137, 153, 204, 0.22);
- background: rgba(255, 255, 255, 0.72);
- backdrop-filter: blur(12px);
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.82),
- 0 10px 24px rgba(76, 88, 128, 0.08);
- }
- }
- }
- .comm-top-header {
- flex-wrap: wrap;
- .chart-title {
- font-size: 15px;
- }
- }
- .comm-top-tools {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- flex: 1;
- flex-wrap: wrap;
- gap: 10px;
- font-size: 14px;
- color: #1f2937;
- .tool-label {
- color: #1f2937;
- white-space: nowrap;
- font-weight: 500;
- }
- .comm-top-range {
- width: 420px;
- max-width: 100%;
- &.ant-picker {
- border-radius: 12px;
- border-color: rgba(137, 153, 204, 0.22);
- background: rgba(255, 255, 255, 0.72);
- backdrop-filter: blur(12px);
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.82),
- 0 10px 24px rgba(76, 88, 128, 0.08);
- }
- }
- }
- .trade-top-dimension {
- display: inline-flex;
- align-items: center;
- gap: 18px;
- .ant-radio-wrapper {
- margin-inline-end: 0;
- color: #3f4756;
- }
- }
- .visual-chart-surface {
- position: relative;
- display: flex;
- flex: 1;
- flex-direction: column;
- margin-top: 12px;
- border: 1px solid rgba(137, 153, 204, 0.18);
- border-radius: 22px;
- background: rgba(255, 255, 255, 0.7);
- backdrop-filter: blur(14px);
- box-sizing: border-box;
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.82),
- 0 18px 36px rgba(42, 66, 118, 0.1);
- overflow: hidden;
- &::before {
- content: '';
- position: absolute;
- inset: 0;
- pointer-events: none;
- background:
- radial-gradient(circle at top right, rgba(255, 255, 255, 0.76), transparent 32%),
- linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 24%);
- }
- &::after {
- content: '';
- position: absolute;
- width: 180px;
- height: 180px;
- top: -88px;
- right: -78px;
- border-radius: 50%;
- filter: blur(4px);
- opacity: 0.6;
- pointer-events: none;
- }
- }
- .visual-chart-surface > * {
- position: relative;
- z-index: 1;
- }
- .visual-chart-surface--comm {
- background: linear-gradient(
- 145deg,
- rgba(241, 247, 255, 0.92) 0%,
- rgba(234, 246, 255, 0.8) 45%,
- rgba(255, 255, 255, 0.78) 100%
- );
- border-color: rgba(124, 165, 255, 0.2);
- &::after {
- background: radial-gradient(circle, rgba(102, 199, 255, 0.18) 0%, rgba(102, 199, 255, 0) 70%);
- }
- }
- .visual-chart-surface--trade {
- background: linear-gradient(
- 145deg,
- rgba(255, 248, 242, 0.94) 0%,
- rgba(248, 244, 255, 0.82) 44%,
- rgba(255, 255, 255, 0.8) 100%
- );
- border-color: rgba(255, 181, 134, 0.2);
- &::after {
- background: radial-gradient(circle, rgba(255, 153, 102, 0.18) 0%, rgba(255, 153, 102, 0) 70%);
- }
- }
- .visual-chart-surface--ratio {
- min-height: 356px;
- }
- .visual-chart-surface--bar {
- min-height: 356px;
- }
- .visual-chart-surface--trend {
- min-height: 446px;
- padding: 18px 18px 16px;
- }
- .radio {
- padding: 2px 8px;
- border-radius: 999px;
- background: #f1f5f9;
- color: #64748b;
- cursor: pointer;
- &.active {
- background: #e0e7ff;
- color: #1d4ed8;
- font-weight: 600;
- }
- }
- .trade-trend {
- display: flex;
- flex-direction: column;
- gap: 16px;
- }
- .trade-trend-header {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 16px 20px;
- flex-wrap: wrap;
- }
- .trade-trend-heading {
- display: flex;
- flex-direction: column;
- gap: 8px;
- min-width: 0;
- }
- .trade-trend-subtitle {
- font-size: 13px;
- line-height: 1.6;
- color: #7b8797;
- }
- .trade-trend-toolbar {
- display: flex;
- align-items: center;
- justify-content: space-between;
- flex-wrap: wrap;
- gap: 14px 18px;
- padding: 16px 18px;
- border: 1px solid rgba(255, 198, 170, 0.58);
- border-radius: 20px;
- background:
- radial-gradient(circle at right top, rgba(255, 189, 143, 0.18), transparent 28%),
- linear-gradient(145deg, rgba(255, 251, 247, 0.96) 0%, rgba(255, 244, 238, 0.92) 100%);
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.9),
- 0 14px 28px rgba(255, 147, 106, 0.08);
- }
- .trade-trend-filters {
- display: flex;
- align-items: center;
- flex: 1;
- min-width: 0;
- flex-wrap: wrap;
- gap: 10px;
- .tool-label {
- font-size: 13px;
- color: #374151;
- white-space: nowrap;
- font-weight: 500;
- }
- .trend-search-input {
- width: 220px;
- }
- .trend-range-input {
- width: 286px;
- max-width: 100%;
- }
- .trend-search-input {
- :deep(.ant-select-selector) {
- border-radius: 12px;
- border-color: rgba(174, 157, 196, 0.24);
- background: rgba(255, 255, 255, 0.82);
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.9),
- 0 10px 24px rgba(132, 110, 144, 0.08);
- }
- }
- .trend-range-input {
- border-radius: 12px;
- border-color: rgba(174, 157, 196, 0.24);
- background: rgba(255, 255, 255, 0.82);
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.9),
- 0 10px 24px rgba(132, 110, 144, 0.08);
- }
- }
- .trade-trend-dimension {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- padding: 4px;
- border-radius: 999px;
- background: rgba(255, 255, 255, 0.76);
- border: 1px solid rgba(255, 208, 184, 0.78);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
- .radio {
- min-width: 38px;
- padding: 5px 12px;
- text-align: center;
- background: transparent;
- }
- }
- .trade-trend-chart-box {
- margin-top: 0;
- }
- .trade-top-chart-box {
- padding: 16px;
- height: 100%;
- box-sizing: border-box;
- }
- .comm-top-chart-box {
- padding: 16px;
- height: 100%;
- box-sizing: border-box;
- }
- .chart-more-link {
- margin-left: auto;
- height: 30px;
- padding: 0 12px;
- border: 1px solid rgba(133, 153, 197, 0.18);
- border-radius: 999px;
- background: rgba(255, 255, 255, 0.56);
- backdrop-filter: blur(12px);
- box-shadow: 0 8px 20px rgba(76, 88, 128, 0.08);
- font-size: 13px;
- color: #2a5fd6;
- }
- .chart-more-link.ant-btn-link {
- display: inline-flex;
- flex: 0 0 auto;
- align-items: center;
- justify-content: center;
- text-decoration: none;
- }
- .comm-top-echart {
- width: 100%;
- height: 300px;
- }
- .trend-chart-scroll {
- flex: 1;
- min-height: 0;
- width: 100%;
- overflow-x: auto;
- box-sizing: border-box;
- padding: 16px 4px 0;
- }
- .trend-chart {
- position: relative;
- border: 0;
- border-radius: 0;
- background: transparent;
- box-shadow: none;
- overflow: visible;
- }
- .trend-echart {
- width: 100%;
- height: 100%;
- min-height: 340px;
- }
- .comm-chart-box {
- padding: 18px 16px;
- height: 100%;
- justify-content: center;
- box-sizing: border-box;
- }
- .comm-echart {
- width: 100%;
- height: 300px;
- }
- .chart-more-btn {
- position: absolute;
- top: 8px;
- right: 8px;
- z-index: 2;
- }
- .comm-chart {
- display: flex;
- flex-direction: column;
- gap: 12px;
- min-width: 0;
- height: 100%;
- }
- .chart-title {
- display: flex;
- align-items: center;
- gap: 8px;
- font-size: 15px;
- font-weight: 600;
- color: #1e293b;
- letter-spacing: 0.01em;
- .flag {
- width: 3px;
- height: 12px;
- background: linear-gradient(180deg, #64a8ff 0%, #2866ff 100%);
- border-radius: 999px;
- box-shadow: 0 0 0 3px rgba(100, 168, 255, 0.1);
- }
- }
- .trade-section {
- .chart-title {
- .flag {
- background: linear-gradient(180deg, #ffb069 0%, #ff7f50 100%);
- box-shadow: 0 0 0 3px rgba(255, 176, 105, 0.1);
- }
- }
- }
- .trend-title-row {
- .trend-legend-item {
- display: inline-flex;
- align-items: center;
- gap: 8px;
- margin-left: 0;
- padding: 8px 14px;
- border-radius: 999px;
- border: 1px solid rgba(255, 201, 177, 0.58);
- background: rgba(255, 255, 255, 0.72);
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.9),
- 0 10px 22px rgba(255, 150, 112, 0.08);
- cursor: pointer;
- font-weight: 500;
- transition:
- transform 0.2s ease,
- border-color 0.2s ease,
- box-shadow 0.2s ease,
- opacity 0.2s ease;
- &:hover {
- transform: translateY(-1px);
- border-color: rgba(255, 167, 128, 0.66);
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.92),
- 0 12px 24px rgba(255, 146, 108, 0.12);
- }
- &.is-muted {
- opacity: 0.62;
- box-shadow: none;
- }
- }
- .circles {
- width: 10px;
- height: 10px;
- flex: 0 0 10px;
- border-radius: 50%;
- display: inline-block;
- }
- .circles-text {
- color: #3f4756;
- font-size: 13px;
- }
- }
- .chart-tools {
- display: flex;
- align-items: center;
- gap: 6px;
- font-size: 12px;
- color: #64748b;
- .date-input {
- width: 120px;
- }
- }
- .donut-wrap {
- display: flex;
- align-items: center;
- gap: 22px;
- }
- .donut-legend {
- display: flex;
- flex-direction: column;
- flex: 1;
- min-width: 0;
- gap: 18px;
- font-size: 14px;
- color: #1f2937;
- .legend-main {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 4px;
- line-height: 1.2;
- }
- .legend-title {
- color: #374151;
- }
- .legend-rate {
- font-weight: 500;
- color: #374151;
- }
- .legend-amount {
- padding-left: 24px;
- line-height: 1.3;
- color: #4b5563;
- word-break: break-all;
- }
- .dot {
- width: 16px;
- height: 16px;
- border-radius: 50%;
- display: inline-block;
- flex: 0 0 16px;
- &.success {
- background: #2ac8a0;
- }
- &.warning {
- background: #ff8a66;
- }
- }
- }
- .trade-ratio-panel {
- padding: 18px 20px 16px;
- display: flex;
- flex-direction: column;
- gap: 20px;
- height: 100%;
- justify-content: space-between;
- box-sizing: border-box;
- }
- .legend-click {
- display: flex;
- flex-direction: column;
- gap: 8px;
- padding: 12px 14px;
- border: 1px solid rgba(160, 171, 207, 0.18);
- border-radius: 16px;
- background: rgba(255, 255, 255, 0.44);
- backdrop-filter: blur(12px);
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.72),
- 0 10px 20px rgba(74, 86, 120, 0.06);
- cursor: pointer;
- transition:
- opacity 0.2s ease,
- border-color 0.2s ease,
- transform 0.2s ease;
- &:hover {
- opacity: 0.92;
- border-color: rgba(120, 145, 215, 0.3);
- transform: translateY(-1px);
- }
- }
- .empty-state__title {
- font-size: 15px;
- line-height: 1.3;
- font-weight: 700;
- color: #526072;
- letter-spacing: 0.01em;
- }
- .empty-state__desc {
- display: none;
- }
- .chart-empty,
- .group-left .group-list .ant-list-empty-text,
- .member-list .ant-list-empty-text {
- position: relative;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 10px;
- padding: 24px 18px;
- box-sizing: border-box;
- text-align: center;
- font-size: 14px;
- line-height: 1.6;
- color: #8ea0b2;
- border: 1px dashed rgba(183, 202, 234, 0.72);
- border-radius: 20px;
- background:
- radial-gradient(circle at top right, rgba(119, 177, 255, 0.12), transparent 32%),
- linear-gradient(180deg, rgba(251, 253, 255, 0.96) 0%, rgba(243, 247, 255, 0.92) 100%);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
- overflow: hidden;
- &::before {
- content: '';
- flex: 0 0 56px;
- width: 56px;
- height: 56px;
- border-radius: 18px;
- border: 1px solid rgba(187, 208, 247, 0.82);
- background:
- radial-gradient(circle at 50% 16px, #5b8ff9 0 5px, transparent 6px),
- linear-gradient(#d5e3ff 0 0) center 35px / 28px 3px no-repeat,
- linear-gradient(180deg, #76a9ff 0%, #4f7cff 100%) 18px 31px / 6px 12px no-repeat,
- linear-gradient(180deg, #8fc6ff 0%, #60a5fa 100%) 27px 26px / 6px 17px no-repeat,
- linear-gradient(180deg, #c4b5fd 0%, #93c5fd 100%) 36px 22px / 6px 21px no-repeat,
- linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(237, 245, 255, 0.92) 100%);
- background-repeat: no-repeat;
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.92),
- 0 14px 24px rgba(59, 130, 246, 0.1);
- }
- }
- .chart-empty {
- min-height: 156px;
- margin-top: 8px;
- }
- .trade-trend-empty {
- min-height: 446px;
- margin-top: 0;
- border-radius: 22px;
- border-color: rgba(255, 198, 170, 0.58);
- background:
- radial-gradient(circle at right top, rgba(255, 188, 143, 0.18), transparent 28%),
- linear-gradient(145deg, rgba(255, 251, 247, 0.96) 0%, rgba(255, 245, 240, 0.92) 100%);
- color: #94a3b8;
- &::before {
- border-color: rgba(255, 205, 177, 0.9);
- background:
- radial-gradient(circle at 50% 16px, #ff9a66 0 5px, transparent 6px),
- linear-gradient(#ffe2d1 0 0) center 35px / 28px 3px no-repeat,
- linear-gradient(180deg, #ffba74 0%, #ff8b66 100%) 18px 31px / 6px 12px no-repeat,
- linear-gradient(180deg, #ffd28f 0%, #ffba74 100%) 27px 26px / 6px 17px no-repeat,
- linear-gradient(180deg, #fdc7d7 0%, #ffbe86 100%) 36px 22px / 6px 21px no-repeat,
- linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 247, 240, 0.92) 100%);
- background-repeat: no-repeat;
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.92),
- 0 14px 24px rgba(255, 153, 102, 0.12);
- }
- }
- .station-list {
- display: flex;
- flex-wrap: wrap;
- gap: 12px;
- }
- .station-item {
- background: #f8fafc;
- border-radius: 8px;
- padding: 6px 10px;
- font-size: 12px;
- color: #475569;
- }
- .trade-ratio-echart {
- width: 180px;
- height: 180px;
- flex: 0 0 180px;
- }
- .donut.trade {
- background: conic-gradient(#22c55e 0 9.7591%, #f97316 9.7591% 100%);
- }
- .station-row {
- display: flex;
- align-items: center;
- gap: 12px;
- font-size: 12px;
- color: #1f2937;
- margin-bottom: 8px;
- }
- .section-header {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- flex-wrap: wrap;
- gap: 14px 18px;
- margin-bottom: 16px;
- padding-bottom: 12px;
- border-bottom: 1px solid rgba(221, 230, 244, 0.92);
- }
- .section-title {
- display: inline-flex;
- align-items: center;
- gap: 10px;
- font-size: 18px;
- font-weight: 700;
- line-height: 1.2;
- color: #0f172a;
- letter-spacing: 0.02em;
- &::before {
- content: '';
- width: 4px;
- height: 16px;
- border-radius: 999px;
- background: linear-gradient(180deg, #68abff 0%, #2f7df6 100%);
- box-shadow: 0 0 0 3px rgba(104, 171, 255, 0.12);
- }
- }
- .section-tools {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- flex-wrap: wrap;
- gap: 12px;
- margin-left: auto;
- }
- .section-action {
- padding: 0 14px;
- color: #2563eb;
- font-weight: 600;
- }
- .section-action.ant-btn-link {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- height: 32px;
- border: 1px solid rgba(191, 203, 228, 0.74);
- border-radius: 999px;
- background: rgba(255, 255, 255, 0.82);
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.9),
- 0 10px 22px rgba(76, 88, 128, 0.06);
- text-decoration: none;
- &:hover {
- border-color: rgba(147, 197, 253, 0.92);
- background: #eff6ff;
- color: #1d4ed8;
- }
- }
- .basic-content {
- display: grid;
- grid-template-columns: 108px minmax(0, 1fr);
- gap: 10px;
- }
- .basic-profile {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 4px;
- padding: 8px 6px;
- border: 1px solid #eef2f7;
- border-radius: 10px;
- background: #fafafa;
- }
- .profile-avatar {
- display: flex;
- }
- .profile-name {
- font-size: 13px;
- font-weight: 600;
- color: #1f2937;
- }
- .info-grid {
- display: grid;
- grid-template-columns: repeat(4, minmax(0, 1fr));
- gap: 5px;
- }
- .info-item {
- font-size: 13px;
- color: #334155;
- display: flex;
- align-items: flex-start;
- gap: 2px;
- min-width: 0;
- min-height: 40px;
- padding: 6px 8px;
- border: 1px solid #eef2f7;
- border-radius: 10px;
- background: #fafafa;
- flex-direction: column;
- }
- .info-label {
- color: #64748b;
- font-size: 12px;
- line-height: 16px;
- white-space: nowrap;
- flex: 0 0 auto;
- }
- .info-value {
- min-width: 0;
- white-space: normal;
- word-break: break-all;
- overflow-wrap: anywhere;
- line-height: 16px;
- }
- .relation-search {
- width: 220px;
- border-radius: 8px;
- }
- .relation-list {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
- gap: 16px;
- }
- .relation-card {
- border: 1px solid #e2e8f0;
- border-radius: 12px;
- padding: 12px;
- display: flex;
- flex-direction: column;
- gap: 10px;
- position: relative;
- }
- .relation-avatar {
- width: 40px;
- height: 40px;
- border-radius: 50%;
- background: #e0e7ff;
- color: #1d4ed8;
- display: flex;
- align-items: center;
- justify-content: center;
- font-weight: 600;
- }
- .relation-main {
- display: flex;
- flex-direction: column;
- gap: 6px;
- }
- .relation-name {
- font-weight: 600;
- color: #1f2937;
- }
- .relation-score {
- font-size: 13px;
- color: #64748b;
- span {
- color: #1d4ed8;
- font-weight: 600;
- }
- }
- .relation-tags {
- display: flex;
- flex-wrap: wrap;
- gap: 6px;
- }
- .tag {
- padding: 2px 6px;
- border-radius: 6px;
- background: #f1f5f9;
- color: #475569;
- font-size: 12px;
- }
- .relation-action {
- padding: 0;
- align-self: flex-end;
- color: #3b82f6;
- }
- }
- .quick-nav {
- position: absolute;
- top: 66px;
- right: 0;
- width: 84px;
- background: #fff;
- border: 1px solid #e5e7eb;
- border-radius: 12px;
- padding: 8px 0;
- display: flex;
- flex-direction: column;
- gap: 4px;
- box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
- z-index: 20;
- .nav-item {
- font-size: 12px;
- color: #475569;
- padding: 6px 12px;
- text-align: center;
- cursor: pointer;
- &.active {
- color: #2563eb;
- font-weight: 600;
- }
- }
- }
- .portrait-modal-title-block {
- display: flex;
- flex-direction: column;
- gap: 4px;
- }
- .portrait-modal-title {
- font-size: 20px;
- line-height: 1.3;
- font-weight: 700;
- color: #111827;
- }
- .portrait-modal-subtitle {
- font-size: 12px;
- line-height: 1.6;
- color: #6b7280;
- }
- :deep(.object-group-modal .ant-modal) {
- width: 960px !important;
- max-width: calc(100vw - 40px);
- }
- :deep(.object-group-modal .ant-modal-content) {
- max-height: 640px;
- display: flex;
- flex-direction: column;
- padding: 0;
- overflow: hidden;
- border-radius: 16px;
- background: #fff;
- box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
- }
- :deep(.object-group-modal .ant-modal-header) {
- flex: 0 0 auto;
- padding: 16px 18px;
- border-bottom: 1px solid #e5e7eb;
- background: @modal-header-bg-color;
- }
- :deep(.object-group-modal .ant-modal-title) {
- color: inherit;
- }
- :deep(.object-group-modal .ant-modal-close) {
- top: 16px;
- right: 18px;
- color: #64748b;
- }
- :deep(.object-group-modal .ant-modal-close-x) {
- width: 36px;
- height: 36px;
- }
- :deep(.object-group-modal .ant-modal-body) {
- flex: 1 1 auto;
- min-height: 0;
- overflow-y: auto;
- padding: 16px 18px 18px;
- background: #fff;
- }
- :deep(.object-group-modal .ant-modal-body::-webkit-scrollbar) {
- width: 6px;
- }
- :deep(.object-group-modal .ant-modal-body::-webkit-scrollbar-thumb) {
- background: #cbd5e1;
- border-radius: 999px;
- }
- .group-modal-content {
- display: flex;
- flex-direction: column;
- gap: 12px;
- padding: 0;
- }
- .group-modal-actions {
- display: flex;
- align-items: center;
- gap: 12px;
- flex-wrap: wrap;
- padding: 12px 14px;
- border: 1px solid #e5e7eb;
- border-radius: 14px;
- background: #fafafa;
- }
- .group-modal-actions__info {
- margin-right: auto;
- font-size: 12px;
- line-height: 1.6;
- color: #6b7280;
- }
- .group-modal-actions__buttons {
- display: flex;
- align-items: center;
- gap: 8px;
- flex-wrap: wrap;
- }
- .group-modal-actions .head-btn {
- min-width: 112px;
- height: 40px;
- border-radius: 12px;
- padding: 0 22px;
- border: 1px solid #d6deea;
- background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
- color: #1f2937;
- font-size: 13px;
- font-weight: 600;
- box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
- display: inline-flex;
- align-items: center;
- justify-content: center;
- > span {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- line-height: 1;
- }
- }
- .group-modal-actions .head-btn:hover,
- .group-modal-actions .head-btn:focus {
- border-color: #c4cfdd;
- background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
- color: #111827;
- }
- .group-modal-actions .head-btn--primary,
- .group-modal-actions .head-btn--accent {
- color: #1f2937;
- background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
- border-color: #d6deea;
- }
- .group-modal-actions .head-btn--danger {
- color: #1f2937;
- background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
- border-color: #d6deea;
- }
- .group-modal-main {
- display: grid;
- grid-template-columns: 308px minmax(0, 1fr);
- gap: 14px;
- height: min(500px, calc(100vh - 240px));
- min-height: 400px;
- }
- .group-left,
- .group-right {
- display: flex;
- flex-direction: column;
- min-height: 0;
- overflow: hidden;
- border: 1px solid #dfe6ef;
- border-radius: 16px;
- background: #fff;
- box-shadow: none;
- }
- .group-panel-head {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 10px;
- padding: 14px 16px 10px;
- border-bottom: 1px solid #eef2f7;
- }
- .group-panel-head--right {
- padding-bottom: 10px;
- }
- .group-panel-title {
- font-size: 15px;
- font-weight: 600;
- color: #111827;
- }
- .group-panel-title-wrap {
- min-width: 0;
- }
- .group-panel-subtitle {
- margin-top: 4px;
- font-size: 12px;
- line-height: 1.5;
- color: #6b7280;
- }
- .group-panel-badge {
- min-width: 28px;
- height: 28px;
- padding: 0 10px;
- border-radius: 999px;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- background: #eff6ff;
- color: #2563eb;
- font-size: 12px;
- font-weight: 700;
- }
- .group-left {
- padding: 0;
- }
- .group-left .group-list .ant-list-item {
- padding: 0;
- border: 0;
- }
- .group-left .group-list .ant-list-item + .ant-list-item {
- margin-top: 8px;
- }
- .group-left .group-list {
- flex: 1;
- min-height: 0;
- padding: 12px;
- overflow-y: auto;
- }
- .group-left .group-list .ant-list-empty-text {
- min-height: 164px;
- }
- .group-select-btn {
- min-height: 44px;
- height: 44px;
- border-radius: 12px;
- padding: 0 12px;
- font-size: 14px;
- line-height: 42px;
- box-shadow: none;
- }
- .group-select-btn > span {
- display: block;
- width: 100%;
- height: 42px;
- line-height: 42px;
- }
- .group-select-btn__name {
- display: block;
- width: 100%;
- height: 42px;
- line-height: 42px;
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- text-align: center;
- font-weight: 600;
- }
- .group-select-btn.ant-btn-default {
- border-color: #d7dee8;
- color: #111827;
- background: #fff;
- }
- .group-select-btn.ant-btn-default:hover {
- border-color: #c7d1dd;
- color: #1f2937;
- background: #fafafa;
- }
- .group-select-btn.ant-btn-primary {
- border-color: #4665eb;
- background: linear-gradient(180deg, #4b68f3 0%, #3f5de6 100%);
- color: #fff;
- box-shadow: 0 8px 18px rgba(63, 93, 230, 0.18);
- }
- .group-right {
- padding: 0 14px 14px;
- }
- .member-list {
- flex: 1;
- min-height: 0;
- overflow-y: auto;
- padding-top: 12px;
- padding-right: 4px;
- }
- .member-list .ant-list-items {
- display: flex;
- flex-direction: column;
- gap: 10px;
- }
- .member-list .ant-list-item {
- padding: 14px 16px;
- border: 1px solid #edf1f5;
- border-radius: 14px;
- background: #fff;
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
- }
- .member-list .ant-list-empty-text {
- min-height: 188px;
- }
- .member-list .ant-list-item-meta {
- align-items: center;
- }
- .member-list .ant-list-item-meta-title {
- margin-bottom: 2px;
- }
- .member-list .ant-list-item-action {
- margin-left: 18px;
- }
- .member-list .ant-list-item-action > li {
- padding: 0 0 0 10px;
- }
- .member-avatar-icon {
- background: #b7b7b7;
- color: #fff;
- box-shadow: none;
- }
- .member-avatar-icon svg {
- width: 18px;
- height: 18px;
- }
- .member-name-row {
- display: flex;
- align-items: center;
- gap: 8px;
- }
- .member-name {
- font-size: 15px;
- font-weight: 600;
- color: #111827;
- }
- .member-main-tag {
- padding: 2px 8px;
- border-radius: 999px;
- background: #eff6ff;
- color: #1d4ed8;
- font-size: 12px;
- font-weight: 700;
- }
- .member-desc {
- font-size: 12px;
- color: #6b7280;
- }
- .member-main-btn,
- .member-remove-btn {
- height: auto;
- padding: 0;
- border: 0;
- border-radius: 0;
- background: transparent;
- font-size: 12px;
- font-weight: 600;
- box-shadow: none;
- text-decoration: none;
- }
- .member-main-btn {
- color: #2563eb;
- &:hover {
- color: #1d4ed8;
- background: transparent;
- border-color: transparent;
- }
- &.ant-btn-link:disabled,
- &.ant-btn-link.ant-btn-disabled,
- &.ant-btn-link[disabled] {
- color: #9ca3af;
- cursor: not-allowed;
- background: transparent;
- border-color: transparent;
- box-shadow: none;
- }
- }
- .member-remove-btn {
- color: #2563eb;
- &:hover {
- color: #1d4ed8;
- background: transparent;
- border-color: transparent;
- }
- }
- @media (max-width: 960px) {
- :deep(.object-group-modal .ant-modal) {
- max-width: calc(100vw - 24px);
- }
- :deep(.object-group-modal .ant-modal-body) {
- padding: 20px;
- }
- .group-modal-actions {
- align-items: flex-start;
- }
- .group-modal-actions__info {
- margin-right: 0;
- }
- .group-modal-actions__buttons {
- width: 100%;
- }
- .group-modal-main {
- grid-template-columns: minmax(0, 1fr);
- }
- .group-left .group-list {
- max-height: 220px;
- }
- .member-list .ant-list-item {
- flex-wrap: wrap;
- gap: 12px;
- }
- .member-list .ant-list-item-action {
- margin-left: 0;
- }
- .member-list .ant-list-item-action > li {
- padding-left: 0;
- }
- .create-group-modal {
- .ant-modal {
- max-width: calc(100vw - 24px);
- }
- .ant-modal-body {
- padding: 20px;
- }
- .create-group-section {
- padding: 16px 16px 4px;
- }
- }
- }
- .dynamic-input-list {
- display: flex;
- flex-direction: column;
- gap: 10px;
- }
- .dynamic-input-item {
- display: flex;
- align-items: flex-start;
- gap: 10px;
- .ant-form-item {
- flex: 1;
- min-width: 0;
- margin-bottom: 0;
- }
- .remove-btn,
- .add-btn {
- width: 36px;
- height: 36px;
- min-width: 36px;
- padding: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 12px;
- border: 1px solid #dbe5f5;
- background: rgba(255, 255, 255, 0.86);
- color: #64748b;
- margin-top: 2px;
- box-shadow:
- inset 0 1px 0 rgba(255, 255, 255, 0.8),
- 0 8px 18px rgba(95, 108, 143, 0.08);
- &:hover {
- color: #3b82f6;
- background: #eff6ff;
- border-color: #bfdbfe;
- }
- }
- .remove-btn:hover {
- color: #ef4444;
- background: #fef2f2;
- border-color: #fecaca;
- }
- }
- .person-card-popover {
- .ant-popover-inner {
- border-radius: 10px;
- box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
- padding: 0;
- }
- .ant-popover-inner-content {
- padding: 6px 0;
- }
- .avatar-pop-content {
- min-width: 86px;
- }
- .edit-item {
- padding: 8px 14px;
- font-size: 14px;
- line-height: 1;
- color: #334155;
- cursor: pointer;
- transition: all 0.2s ease;
- user-select: none;
- &:hover {
- background: #f1f5f9;
- color: #1d4ed8;
- }
- &.delete {
- color: #ef4444;
- &:hover {
- background: #fff1f2;
- color: #dc2626;
- }
- }
- }
- }
- .create-group-modal {
- .ant-modal-content {
- max-height: 720px;
- display: flex;
- flex-direction: column;
- padding: 0;
- overflow: hidden;
- border-radius: 14px;
- background: linear-gradient(180deg, #f8fbff 0%, #ffffff 78%);
- box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
- }
- .ant-modal-header {
- flex: 0 0 auto;
- padding: 20px;
- border-bottom: 1px solid #e5e7eb;
- background: @modal-header-bg-color;
- }
- .ant-modal-title {
- font-size: 16px;
- font-weight: 600;
- line-height: 24px;
- color: #111827;
- }
- .ant-modal-close {
- top: 14px;
- right: 16px;
- color: #64748b;
- border-radius: 8px;
- transition: background-color 0.2s ease;
- }
- .ant-modal-close:hover {
- background: rgba(37, 99, 235, 0.08);
- }
- .ant-modal-close-x {
- width: 36px;
- height: 36px;
- }
- .ant-modal-body {
- flex: 1 1 auto;
- min-height: 0;
- overflow-y: auto;
- padding: 20px;
- }
- .ant-modal-body::-webkit-scrollbar {
- width: 6px;
- }
- .ant-modal-body::-webkit-scrollbar-thumb {
- background: #cbd5e1;
- border-radius: 3px;
- }
- .ant-modal-footer {
- flex: 0 0 auto;
- margin: 0;
- padding: 20px;
- border-top: 1px solid #e5e7eb;
- background: #fff;
- }
- .create-group-form {
- display: flex;
- flex-direction: column;
- gap: 14px;
- .ant-form-item {
- margin-bottom: 10px;
- }
- .ant-form-item-label > label {
- color: #374151;
- font-weight: 600;
- }
- .ant-input,
- .ant-select-selector,
- .ant-input-affix-wrapper {
- height: 42px;
- border-radius: 8px;
- border-color: #dbe2ea;
- background: #fff;
- box-shadow: none;
- transition:
- border-color 0.2s ease,
- box-shadow 0.2s ease,
- background 0.2s ease;
- }
- .ant-select-single .ant-select-selector {
- display: flex;
- align-items: center;
- }
- .ant-select-single .ant-select-selector .ant-select-selection-item,
- .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
- line-height: 40px;
- }
- .ant-input-textarea textarea {
- min-height: 108px;
- border-radius: 8px;
- border-color: #dbe2ea;
- background: #fff;
- box-shadow: none;
- resize: none;
- }
- .ant-input:focus,
- .ant-input-focused,
- .ant-select-focused .ant-select-selector,
- .ant-select-open .ant-select-selector,
- .ant-input-affix-wrapper-focused,
- .ant-input-textarea textarea:focus {
- border-color: #1677ff;
- box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
- background: #fff;
- }
- }
- .create-group-section {
- padding: 16px 16px 4px;
- border: 1px solid #e2e8f0;
- border-radius: 12px;
- background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
- box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
- }
- .create-group-section__head {
- margin-bottom: 14px;
- padding-bottom: 10px;
- border-bottom: 1px solid #eef2f7;
- }
- .create-group-section__title {
- font-size: 15px;
- line-height: 1.3;
- color: #111827;
- font-weight: 700;
- }
- .create-group-section__desc {
- margin-top: 4px;
- font-size: 12px;
- line-height: 1.5;
- color: #64748b;
- }
- }
- .add-group-person-modal {
- .ant-modal {
- max-width: calc(100vw - 24px);
- }
- .ant-modal-content {
- max-height: min(760px, calc(100vh - 32px));
- display: flex;
- flex-direction: column;
- padding: 0;
- overflow: hidden;
- border-radius: 14px;
- background: linear-gradient(180deg, #f8fbff 0%, #ffffff 78%);
- box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
- }
- .ant-modal-header {
- flex: 0 0 auto;
- padding: 20px;
- border-bottom: 1px solid #e5e7eb;
- background: @modal-header-bg-color;
- }
- .ant-modal-title {
- font-size: 16px;
- font-weight: 600;
- line-height: 24px;
- color: #111827;
- }
- .ant-modal-close {
- top: 14px;
- right: 16px;
- color: #64748b;
- border-radius: 8px;
- transition: background-color 0.2s ease;
- }
- .ant-modal-close:hover {
- background: rgba(37, 99, 235, 0.08);
- }
- .ant-modal-close-x {
- width: 36px;
- height: 36px;
- }
- .ant-modal-body {
- flex: 1 1 auto;
- display: flex;
- flex-direction: column;
- min-height: 0;
- padding: 20px;
- overflow: hidden;
- }
- .ant-modal-footer {
- flex: 0 0 auto;
- margin: 0;
- padding: 20px;
- border-top: 1px solid #e5e7eb;
- background: #fff;
- }
- }
- .add-object-modal {
- display: flex;
- flex-direction: column;
- flex: 1 1 auto;
- gap: 14px;
- min-height: 0;
- overflow: hidden;
- }
- .add-object-modal__search {
- display: flex;
- flex-direction: column;
- gap: 12px;
- padding: 14px 16px;
- border: 1px solid #e2e8f0;
- border-radius: 12px;
- background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
- .ant-input,
- .ant-input-affix-wrapper {
- border-radius: 8px;
- }
- }
- .add-object-modal__search-head {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 12px;
- }
- .add-object-modal__title {
- font-size: 15px;
- font-weight: 700;
- color: #111827;
- }
- .add-object-modal__desc,
- .add-object-modal__stats {
- font-size: 12px;
- line-height: 1.6;
- color: #64748b;
- }
- .add-object-modal__content {
- flex: 1 1 auto;
- display: flex;
- flex-direction: column;
- min-height: 0;
- overflow: hidden;
- padding: 0 2px 2px;
- }
- .add-object-list {
- flex: 1 1 auto;
- min-height: 0;
- overflow-y: auto;
- padding-right: 4px;
- padding-bottom: 2px;
- }
- .add-object-item {
- display: flex;
- align-items: center;
- gap: 14px;
- padding: 14px 16px;
- border: 1px solid #e5e7eb;
- border-radius: 14px;
- background: #fff;
- cursor: pointer;
- transition: all 0.2s ease;
- & + .add-object-item {
- margin-top: 10px;
- }
- &:hover {
- border-color: #cbd5e1;
- box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
- }
- &.is-selected {
- border-color: #93c5fd;
- background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
- box-shadow: 0 10px 22px rgba(59, 130, 246, 0.08);
- }
- &.is-disabled {
- cursor: not-allowed;
- opacity: 0.72;
- background: #f8fafc;
- }
- }
- .add-object-item__avatar {
- flex: 0 0 auto;
- background: linear-gradient(135deg, #e0ecff 0%, #c7dbff 100%);
- color: #3157d5;
- font-weight: 700;
- }
- .add-object-item__body {
- flex: 1;
- min-width: 0;
- }
- .add-object-item__head {
- display: flex;
- align-items: center;
- gap: 8px;
- min-width: 0;
- }
- .add-object-item__name {
- min-width: 0;
- font-size: 15px;
- font-weight: 700;
- color: #111827;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .add-object-item__tag {
- flex: 0 0 auto;
- padding: 1px 8px;
- border-radius: 999px;
- background: #e2e8f0;
- color: #475569;
- font-size: 12px;
- line-height: 20px;
- }
- .add-object-item__meta {
- display: flex;
- flex-wrap: wrap;
- gap: 8px 16px;
- margin-top: 6px;
- font-size: 12px;
- line-height: 1.7;
- color: #64748b;
- }
- .add-object-modal__empty {
- display: flex;
- align-items: center;
- justify-content: center;
- min-height: 320px;
- border: 1px dashed #d7dee8;
- border-radius: 14px;
- background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
- color: #94a3b8;
- font-size: 14px;
- }
- .person-edit-modal {
- .ant-modal-content {
- max-height: 720px;
- display: flex;
- flex-direction: column;
- padding: 0;
- overflow: hidden;
- border-radius: 14px;
- background: linear-gradient(180deg, #f8fbff 0%, #ffffff 78%);
- box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
- }
- .ant-modal-header {
- flex: 0 0 auto;
- padding: 20px;
- border-bottom: 1px solid #e5e7eb;
- background: @modal-header-bg-color;
- }
- .ant-modal-title {
- color: inherit;
- }
- .ant-modal-close {
- top: 14px;
- right: 16px;
- color: #64748b;
- border-radius: 8px;
- transition: background-color 0.2s ease;
- }
- .ant-modal-close:hover {
- background: rgba(37, 99, 235, 0.08);
- }
- .ant-modal-close-x {
- width: 36px;
- height: 36px;
- }
- .ant-modal-body {
- flex: 1 1 auto;
- min-height: 0;
- overflow-y: auto;
- padding: 20px;
- }
- .ant-modal-body::-webkit-scrollbar {
- width: 6px;
- }
- .ant-modal-body::-webkit-scrollbar-thumb {
- background: #cbd5e1;
- border-radius: 3px;
- }
- .ant-modal-footer {
- flex: 0 0 auto;
- margin: 0;
- padding: 20px;
- border-top: 1px solid #e5e7eb;
- background: #fff;
- }
- .person-form {
- display: flex;
- flex-direction: column;
- gap: 14px;
- }
- .person-form-section {
- padding: 16px 16px 4px;
- border: 1px solid #e2e8f0;
- border-radius: 12px;
- background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
- box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
- }
- .form-section-head {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 12px;
- margin-bottom: 14px;
- padding-bottom: 10px;
- border-bottom: 1px solid #eef2f7;
- }
- .form-section-title {
- font-size: 15px;
- line-height: 1.3;
- color: #111827;
- font-weight: 700;
- }
- .form-section-desc {
- margin-top: 4px;
- font-size: 12px;
- line-height: 1.5;
- color: #6b7280;
- }
- .person-form-grid {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- column-gap: 16px;
- row-gap: 6px;
- }
- .form-item-span-2 {
- grid-column: 1 / -1;
- }
- .person-form-grid .ant-form-item {
- margin-bottom: 10px;
- }
- .person-form-grid .ant-form-item-label > label {
- font-size: 13px;
- font-weight: 600;
- color: #374151;
- }
- .person-form-grid .ant-form-item .ant-input,
- .person-form-grid .ant-form-item .ant-input-affix-wrapper,
- .person-form-grid .ant-form-item .ant-picker {
- width: 100%;
- height: 42px;
- border-radius: 8px;
- border-color: #dbe2ea;
- background: #fff;
- box-shadow: none;
- transition:
- border-color 0.2s ease,
- box-shadow 0.2s ease,
- background 0.2s ease;
- }
- .person-form-grid .ant-form-item .ant-input:focus,
- .person-form-grid .ant-form-item .ant-input-focused,
- .person-form-grid .ant-form-item .ant-input-affix-wrapper-focused,
- .person-form-grid .ant-form-item .ant-picker-focused {
- border-color: #1677ff;
- box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
- background: #fff;
- }
- .person-form-grid .ant-form-item .ant-select {
- width: 100%;
- }
- .person-form-grid .ant-form-item .ant-select-selector {
- height: 42px;
- border-radius: 8px;
- border-color: #dbe2ea;
- background: #fff;
- box-shadow: none;
- transition:
- border-color 0.2s ease,
- box-shadow 0.2s ease,
- background 0.2s ease;
- }
- .person-form-grid .ant-form-item .ant-select-focused .ant-select-selector,
- .person-form-grid .ant-form-item .ant-select-open .ant-select-selector {
- border-color: #1677ff;
- box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
- background: #fff;
- }
- .person-form-grid .ant-form-item .ant-select-single .ant-select-selector .ant-select-selection-item,
- .person-form-grid .ant-form-item .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
- line-height: 40px;
- }
- .person-form-grid .dynamic-input-list {
- gap: 12px;
- }
- .person-avatar-form-item {
- margin-bottom: 12px;
- }
- .person-avatar-upload {
- display: flex;
- align-items: center;
- gap: 16px;
- padding: 14px 16px;
- border: 1px solid #e2e8f0;
- border-radius: 12px;
- background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
- }
- .person-avatar-upload__input {
- display: none;
- width: 0;
- height: 0;
- opacity: 0;
- pointer-events: none;
- }
- .person-avatar-upload__preview {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- padding: 0;
- border: 0;
- background: transparent;
- cursor: pointer;
- flex: 0 0 auto;
- }
- .person-avatar-upload__preview :deep(.jeesite-person-avatar) {
- border-radius: 999px;
- transition:
- transform 0.2s ease,
- box-shadow 0.2s ease;
- }
- .person-avatar-upload__preview:hover :deep(.jeesite-person-avatar) {
- transform: translateY(-1px);
- box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
- }
- .person-avatar-upload__tips {
- min-width: 0;
- flex: 1 1 auto;
- }
- .person-avatar-upload__title {
- font-size: 14px;
- line-height: 22px;
- font-weight: 600;
- color: #111827;
- }
- .person-avatar-upload__desc {
- margin-top: 4px;
- font-size: 12px;
- line-height: 20px;
- color: #6b7280;
- }
- .person-avatar-upload__actions {
- display: flex;
- align-items: center;
- gap: 12px;
- margin-top: 12px;
- flex-wrap: wrap;
- }
- .person-form-grid .dynamic-input-item {
- padding: 12px 12px 10px;
- border: 1px solid #e2e8f0;
- border-radius: 10px;
- background: #fff;
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
- }
- .person-form-grid .dynamic-input-item .ant-form-item {
- margin-bottom: 0;
- }
- .person-form-grid .dynamic-input-item .ant-form-item-explain {
- margin-top: 6px;
- }
- .person-form-grid .dynamic-input-item .add-btn,
- .person-form-grid .dynamic-input-item .remove-btn {
- width: 32px;
- height: 32px;
- min-width: 32px;
- padding: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 8px;
- border: 1px solid #dbe2ea;
- background: #fff;
- color: #475569;
- margin-top: 4px;
- box-shadow: none;
- }
- .person-form-grid .dynamic-input-item .add-btn:hover {
- color: #2563eb;
- border-color: #bfdbfe;
- background: #eff6ff;
- }
- .person-form-grid .dynamic-input-item .remove-btn:hover {
- color: #dc2626;
- border-color: #fecaca;
- background: #fff1f2;
- }
- }
- @media (max-width: 1200px) {
- .person-edit-modal {
- .ant-modal-body {
- padding: 20px;
- }
- .person-form-grid {
- grid-template-columns: minmax(0, 1fr);
- }
- .form-item-span-2 {
- grid-column: auto;
- }
- .person-avatar-upload {
- align-items: flex-start;
- flex-direction: column;
- }
- }
- }
- .call-oper-phone-modal {
- .query-table-wrap {
- gap: 14px;
- }
- .query-table-search {
- margin: 6px 6px 0;
- padding: 14px 16px;
- border: 1px solid #e2e8f0;
- border-radius: 12px;
- background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
- .label {
- color: #475569;
- font-size: 12px;
- font-weight: 600;
- }
- .ant-input,
- .ant-input-affix-wrapper,
- .ant-picker,
- .ant-select-selector {
- border-radius: 8px !important;
- }
- .ant-btn {
- height: 32px;
- padding: 0 16px;
- border-radius: 8px;
- }
- }
- .ant-modal-body > .scroll-container,
- .ant-modal-body > .scroll-container > .scrollbar__wrap,
- .ant-modal-body > .scroll-container > .scrollbar__wrap > .scrollbar__view,
- .ant-modal-body > .scroll-container > .scrollbar__wrap > .scrollbar__view > div {
- height: 100%;
- min-height: 0;
- }
- .ant-modal-body > .scroll-container > .scrollbar__wrap {
- overflow: hidden;
- }
- .ant-modal-body > .scroll-container > .scrollbar__wrap > .scrollbar__view {
- margin: 0 !important;
- }
- .ant-modal-body > .scroll-container > .scrollbar__bar.is-vertical,
- .ant-modal-body > .scroll-container > .is-vertical {
- display: none !important;
- opacity: 0 !important;
- pointer-events: none;
- }
- }
- .@{prefix-cls}.case-portrait-page {
- background: #fff;
- // padding: 0 8px 2px;
- display: flex;
- flex-direction: column;
- min-height: 0;
- :deep(.ant-btn) {
- border-radius: 8px;
- }
- :deep(.ant-btn-primary) {
- box-shadow: none;
- }
- :deep(.ant-input),
- :deep(.ant-input-affix-wrapper),
- :deep(.ant-picker),
- :deep(.ant-select-selector) {
- border-color: #dbe2ea;
- border-radius: 8px;
- background: #fff;
- box-shadow: none;
- }
- :deep(.ant-input:hover),
- :deep(.ant-input-affix-wrapper:hover),
- :deep(.ant-picker:hover),
- :deep(.ant-select:not(.ant-select-disabled):hover .ant-select-selector) {
- border-color: #cbd5e1;
- }
- :deep(.ant-input:focus),
- :deep(.ant-input-focused),
- :deep(.ant-input-affix-wrapper-focused),
- :deep(.ant-picker-focused),
- :deep(.ant-select-focused .ant-select-selector),
- :deep(.ant-select-open .ant-select-selector) {
- border-color: #1677ff;
- box-shadow: 0 0 0 2px rgb(22 119 255 / 12%);
- }
- .page-main {
- display: flex;
- flex-direction: column;
- flex: 1 1 auto;
- min-height: 0;
- height: auto;
- gap: 12px;
- padding: 0;
- overflow: hidden;
- }
- .page-layout {
- flex: 1 1 auto;
- min-height: 0;
- height: auto;
- align-items: stretch;
- grid-template-columns: 156px minmax(0, 1fr);
- gap: 2px;
- padding: 2px;
- background: #f3f4f6;
- overflow: hidden;
- box-sizing: border-box;
- }
- .left-panel {
- position: relative;
- top: auto;
- align-self: stretch;
- display: flex;
- height: auto;
- max-height: none;
- min-height: 0;
- overflow: hidden;
- }
- .left-panel .panel-card {
- flex: 1 1 auto;
- width: 100%;
- height: auto;
- min-height: 0;
- max-height: 100%;
- background: #fff;
- border: 1px solid #e2e8f0;
- border-radius: 12px;
- padding: 8px;
- gap: 8px;
- box-shadow: none;
- }
- .left-panel .panel-card::before,
- .person-list::before,
- .person-card::before,
- .person-card::after,
- .person-avatar-wrap::before {
- display: none;
- }
- .panel-heading {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 8px;
- padding: 0 4px 2px;
- }
- .panel-heading__title {
- font-size: 14px;
- font-weight: 600;
- color: #111827;
- }
- .panel-heading__badge {
- min-width: 28px;
- height: 24px;
- padding: 0 8px;
- border-radius: 999px;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- background: #eff6ff;
- color: #1d4ed8;
- font-size: 12px;
- font-weight: 600;
- }
- .search-box :deep(.ant-input),
- .search-box :deep(.ant-input-affix-wrapper) {
- height: 34px;
- padding-inline: 10px;
- border-radius: 8px;
- background: #fff;
- }
- .search-box :deep(.ant-input-affix-wrapper) {
- display: flex;
- align-items: center;
- overflow: hidden;
- box-sizing: border-box;
- }
- .search-box :deep(.ant-input-affix-wrapper > .ant-input) {
- height: 100%;
- padding: 0;
- border: 0;
- border-radius: 0;
- background: transparent;
- box-shadow: none;
- }
- .search-box :deep(.ant-input-affix-wrapper .ant-input-suffix),
- .search-box :deep(.ant-input-affix-wrapper .ant-input-clear-icon) {
- display: inline-flex;
- align-items: center;
- }
- .left-panel .panel-card .side-action-btn.ant-btn {
- height: 34px;
- border-radius: 8px;
- font-weight: 600;
- letter-spacing: normal;
- box-shadow: none;
- transition:
- border-color 0.2s ease,
- background-color 0.2s ease,
- color 0.2s ease;
- }
- .left-panel .panel-card .side-action-btn--primary.ant-btn {
- border-color: #1677ff;
- background: #1677ff;
- color: #fff;
- &:hover,
- &:focus {
- border-color: #4096ff;
- background: #4096ff;
- color: #fff;
- }
- &:active {
- border-color: #0958d9;
- background: #0958d9;
- color: #fff;
- }
- }
- .person-list {
- flex: 1 1 auto;
- min-height: 0;
- align-items: stretch;
- gap: 8px;
- padding: 2px 0 0;
- }
- .person-list .empty-tip {
- width: 100%;
- min-height: 148px;
- padding: 0;
- gap: 0;
- border: 0;
- border-radius: 0;
- background: transparent;
- box-shadow: none;
- }
- .person-list .empty-tip::before {
- content: none;
- display: none;
- }
- .person-card {
- width: 100%;
- max-width: none;
- min-height: 0;
- padding: 8px 10px;
- border: 1px solid #eef2f7;
- border-radius: 10px;
- background: #fff;
- flex-direction: row;
- align-items: center;
- justify-content: flex-start;
- gap: 10px;
- transition:
- border-color 0.2s ease,
- background 0.2s ease,
- box-shadow 0.2s ease;
- &:hover {
- transform: none;
- background: #fff;
- border-color: #91caff;
- box-shadow: none;
- }
- &.active {
- transform: none;
- background: rgba(247, 251, 255, 0.72);
- border-color: #1677ff;
- box-shadow: none;
- }
- }
- .person-card:hover .person-avatar .jeesite-person-avatar__media,
- .person-card.active .person-avatar .jeesite-person-avatar__media {
- background: #1677ff;
- border-color: #bfdbfe;
- box-shadow: none;
- }
- .person-card:hover .person-name,
- .person-card.active .person-name {
- color: #111827;
- font-weight: 600;
- }
- .person-avatar-wrap {
- width: 40px;
- height: 40px;
- flex: 0 0 40px;
- transform: none;
- }
- .person-trigger {
- display: flex;
- align-items: center;
- gap: 10px;
- flex: 1;
- min-width: 0;
- cursor: pointer;
- }
- .person-avatar {
- background: transparent;
- box-shadow: none;
- }
- .person-name {
- flex: 1;
- min-width: 0;
- max-width: none;
- min-height: auto;
- font-size: 13px;
- line-height: 20px;
- text-align: left;
- color: #374151;
- letter-spacing: 0;
- }
- .left-panel .panel-card .group-btn-wrap {
- margin-top: auto;
- flex-shrink: 0;
- padding-top: 8px;
- padding-bottom: 2px;
- border-top: 1px solid #eef2f7;
- background: #fff;
- position: relative;
- z-index: 2;
- }
- .left-panel .panel-card .group-btn-wrap .group-btn.ant-btn {
- width: 100%;
- border-color: #dbe2ea;
- background: #fff;
- color: #1677ff;
- &:hover,
- &:focus {
- border-color: #bfdbfe;
- background: #f8fbff;
- color: #1d4ed8;
- }
- &:active {
- border-color: #91caff;
- background: #e6f4ff;
- color: #0958d9;
- }
- }
- .right-panel {
- min-height: 0;
- height: auto;
- gap: 2px;
- padding-right: 0;
- background: #f3f4f6;
- }
- .right-panel::-webkit-scrollbar-thumb {
- background: #d1d5db;
- }
- .section-card,
- .comm-section,
- .trade-section {
- padding: 16px;
- border: 1px solid #e2e8f0;
- border-radius: 12px;
- background: #fff;
- box-shadow: none;
- }
- .section-header {
- margin-bottom: 16px;
- padding-bottom: 12px;
- gap: 12px 16px;
- border-bottom: 1px solid #eef2f7;
- }
- .section-title {
- gap: 8px;
- font-size: 16px;
- font-weight: 600;
- color: #111827;
- letter-spacing: 0;
- &::before {
- width: 3px;
- height: 14px;
- background: #1677ff;
- box-shadow: none;
- }
- }
- .section-tools {
- gap: 8px;
- }
- .section-action {
- padding: 0 12px;
- color: #1677ff;
- font-weight: 500;
- }
- .section-action.ant-btn-link {
- height: 32px;
- border: 1px solid #dbe2ea;
- border-radius: 8px;
- background: #fff;
- box-shadow: none;
- &:hover {
- border-color: #bfdbfe;
- background: #f9fafb;
- color: #0958d9;
- }
- }
- .basic-content {
- grid-template-columns: 108px minmax(0, 1fr);
- gap: 10px;
- }
- .basic-profile {
- gap: 4px;
- padding: 8px 6px;
- border: 1px solid #eef2f7;
- border-radius: 10px;
- background: #fafafa;
- justify-content: center;
- }
- .profile-avatar {
- width: 56px;
- height: 56px;
- border-radius: 50%;
- background: #1677ff;
- box-shadow: none;
- font-size: 22px;
- }
- .profile-name {
- color: #111827;
- font-size: 13px;
- }
- .info-grid {
- grid-template-columns: repeat(4, minmax(0, 1fr));
- gap: 5px;
- }
- .info-item {
- gap: 2px;
- min-height: 40px;
- padding: 6px 8px;
- border: 1px solid #eef2f7;
- border-radius: 10px;
- background: #fafafa;
- flex-direction: column;
- }
- .info-label {
- font-size: 12px;
- color: #6b7280;
- line-height: 16px;
- }
- .info-value {
- color: #111827;
- font-size: 13px;
- line-height: 16px;
- }
- .relation-search {
- width: 240px;
- max-width: 100%;
- }
- .relation-list {
- grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
- gap: 12px;
- }
- .relation-card {
- gap: 12px;
- padding: 14px;
- border: 1px solid #e5e7eb;
- border-radius: 12px;
- background: #fff;
- box-shadow: none;
- transition:
- border-color 0.2s ease,
- box-shadow 0.2s ease;
- &:hover {
- border-color: #bfdbfe;
- box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
- }
- }
- .relation-avatar {
- width: 42px;
- height: 42px;
- border-radius: 12px;
- background: #eff6ff;
- color: #1677ff;
- }
- .relation-name {
- font-size: 14px;
- color: #111827;
- }
- .relation-score {
- font-size: 12px;
- color: #6b7280;
- span {
- color: #1677ff;
- }
- }
- .relation-tags {
- gap: 8px;
- }
- .tag {
- padding: 4px 8px;
- border-radius: 999px;
- background: #f3f4f6;
- color: #4b5563;
- font-size: 12px;
- }
- .relation-action {
- align-self: flex-start;
- color: #1677ff;
- font-weight: 500;
- }
- .comm-info,
- .trade-summary {
- display: flex;
- flex-direction: column;
- gap: 8px;
- font-size: 13px;
- color: #4b5563;
- }
- .comm-row,
- .trade-row {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 8px 12px;
- padding: 10px 12px;
- border: 1px solid #eef2f7;
- border-radius: 10px;
- background: #fafafa;
- }
- .comm-row .label,
- .trade-row .label {
- color: #374151;
- font-weight: 600;
- }
- .comm-row .value,
- .trade-row .value {
- color: #111827;
- font-weight: 600;
- }
- .comm-row .carrier {
- display: inline-flex;
- align-items: center;
- height: 24px;
- padding: 0 8px;
- border-radius: 999px;
- background: #eff6ff;
- color: #1677ff;
- font-size: 12px;
- }
- .comm-row .carrier--link {
- border: none;
- cursor: pointer;
- transition:
- background-color 0.2s ease,
- color 0.2s ease,
- box-shadow 0.2s ease;
- }
- .comm-row .carrier--link:hover {
- background: #dbeafe;
- color: #145bdb;
- box-shadow: 0 0 0 1px rgba(22, 119, 255, 0.12);
- }
- .trade-tag {
- display: inline-flex;
- align-items: center;
- height: 24px;
- padding: 0 8px;
- border-radius: 999px;
- border: none;
- background: #eff6ff;
- color: #1677ff;
- font-size: 12px;
- }
- .trade-tag--link {
- cursor: pointer;
- transition:
- background-color 0.2s ease,
- color 0.2s ease,
- box-shadow 0.2s ease;
- }
- .trade-tag--link:hover {
- background: #eff6ff;
- color: #1677ff;
- box-shadow: 0 0 0 1px rgba(22, 119, 255, 0.12);
- }
- .comm-grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 8px 12px;
- }
- .comm-summary-card {
- padding: 10px 12px;
- border: 1px solid #eef2f7;
- border-radius: 10px;
- background: #fafafa;
- }
- .comm-grid .grid-item {
- gap: 6px;
- min-width: 0;
- padding: 0;
- border: 0;
- border-radius: 0;
- background: transparent;
- flex-direction: column;
- }
- .comm-grid .label {
- font-size: 12px;
- color: #6b7280;
- }
- .comm-grid .value {
- color: #111827;
- font-weight: 600;
- }
- .comm-divider {
- margin: 16px 0;
- border-top: 1px solid #eef2f7;
- }
- .comm-chart-row,
- .trade-chart-row {
- grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1fr);
- gap: 12px;
- }
- .comm-chart,
- .trade-chart,
- .trade-trend {
- gap: 12px;
- }
- .chart-title {
- gap: 8px;
- font-size: 14px;
- color: #111827;
- .flag {
- width: 3px;
- height: 12px;
- background: #1677ff;
- box-shadow: none;
- }
- }
- .trade-section .chart-title .flag {
- background: #1677ff;
- box-shadow: none;
- }
- .comm-top-header,
- .trade-top-header,
- .trade-trend-header {
- align-items: flex-start;
- gap: 12px 16px;
- }
- .comm-top-tools,
- .trade-top-tools,
- .trade-trend-filters {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 8px;
- font-size: 12px;
- color: #6b7280;
- }
- .comm-top-tools,
- .trade-top-tools {
- flex: 1;
- justify-content: flex-end;
- }
- .comm-top-tools .tool-label,
- .trade-top-tools .tool-label,
- .trade-trend-filters .tool-label {
- color: #6b7280;
- font-size: 12px;
- font-weight: 400;
- }
- .comm-top-tools .comm-top-range {
- width: 320px;
- max-width: 100%;
- border-radius: 8px;
- background: #fff;
- box-shadow: none;
- }
- .trade-top-tools .metric-select {
- width: 116px;
- }
- .trade-top-tools .trade-top-range {
- width: 260px;
- max-width: 100%;
- border-radius: 8px;
- background: #fff;
- box-shadow: none;
- }
- .trade-top-tools .metric-select :deep(.ant-select-selector) {
- border-radius: 8px;
- background: #fff;
- box-shadow: none;
- }
- .trade-top-dimension {
- gap: 10px;
- padding: 6px 10px;
- border: 1px solid #e5e7eb;
- border-radius: 8px;
- background: #fafafa;
- }
- .trade-top-dimension .ant-radio-wrapper {
- color: #374151;
- font-size: 12px;
- }
- .visual-chart-surface,
- .visual-chart-surface--comm,
- .visual-chart-surface--trade {
- margin-top: 0;
- border: 1px solid #e5e7eb;
- border-radius: 12px;
- background: #fff;
- backdrop-filter: none;
- box-shadow: none;
- }
- .visual-chart-surface::before,
- .visual-chart-surface::after {
- display: none;
- }
- .visual-chart-surface--ratio,
- .visual-chart-surface--bar {
- min-height: 340px;
- }
- .visual-chart-surface--trend {
- min-height: 420px;
- padding: 0;
- }
- .comm-chart-box,
- .comm-top-chart-box,
- .trade-top-chart-box,
- .trade-ratio-panel {
- padding: 16px;
- box-sizing: border-box;
- height: 100%;
- }
- .trade-ratio-panel {
- gap: 16px;
- }
- .chart-more-link {
- height: 28px;
- padding: 0 10px;
- border: 1px solid #dbe2ea;
- border-radius: 8px;
- background: #fff;
- backdrop-filter: none;
- box-shadow: none;
- color: #1677ff;
- font-size: 12px;
- }
- .comm-echart,
- .comm-top-echart {
- height: 280px;
- }
- .trade-top-echart {
- height: 300px;
- }
- .trade-ratio-echart {
- width: 176px;
- height: 176px;
- flex: 0 0 176px;
- }
- .donut-wrap {
- align-items: center;
- gap: 16px;
- }
- .donut-legend {
- gap: 12px;
- font-size: 13px;
- color: #374151;
- }
- .donut-legend .legend-title {
- color: #374151;
- }
- .donut-legend .legend-rate,
- .donut-legend .legend-amount {
- color: #111827;
- }
- .legend-click {
- gap: 8px;
- padding: 12px;
- border: 1px solid #eef2f7;
- border-radius: 10px;
- background: #fafafa;
- backdrop-filter: none;
- box-shadow: none;
- &:hover {
- border-color: #dbe2ea;
- opacity: 1;
- transform: none;
- }
- }
- .trade-kpi {
- gap: 12px;
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
- .trade-kpi .trade-kpi-item {
- padding: 12px 14px;
- border: 1px solid #eef2f7;
- border-radius: 10px;
- background: #fafafa;
- justify-content: space-between;
- }
- .trade-kpi .trade-kpi-label {
- color: #6b7280;
- }
- .trade-kpi .trade-kpi-value {
- color: #111827;
- }
- .trade-kpi .trade-kpi-value.down {
- color: #f97316;
- }
- .trade-kpi .trade-kpi-value.up {
- color: #10b981;
- }
- .trade-trend-subtitle {
- color: #6b7280;
- font-size: 12px;
- }
- .trade-trend-toolbar {
- gap: 10px 12px;
- padding: 12px 14px;
- border: 1px solid #e5e7eb;
- border-radius: 10px;
- background: #fafafa;
- box-shadow: none;
- }
- .trade-trend-filters {
- gap: 8px;
- }
- .trade-trend-filters .trend-search-input {
- width: 220px;
- }
- .trade-trend-filters .trend-range-input {
- width: 280px;
- max-width: 100%;
- border-radius: 8px;
- background: #fff;
- box-shadow: none;
- }
- .trade-trend-dimension {
- gap: 4px;
- padding: 4px;
- border: 1px solid #e5e7eb;
- border-radius: 8px;
- background: #fff;
- box-shadow: none;
- }
- .radio {
- padding: 4px 12px;
- border-radius: 6px;
- background: transparent;
- color: #6b7280;
- &.active {
- background: #e6f4ff;
- color: #1677ff;
- }
- }
- .trend-title-row .trend-legend-item {
- padding: 6px 10px;
- border: 1px solid #e5e7eb;
- border-radius: 8px;
- background: #fff;
- box-shadow: none;
- &:hover {
- border-color: #bfdbfe;
- box-shadow: none;
- transform: none;
- }
- &.is-muted {
- opacity: 0.55;
- }
- }
- .trend-title-row .circles-text {
- color: #374151;
- font-size: 12px;
- }
- .trend-chart-scroll {
- padding: 0;
- }
- .trend-chart {
- border: 1px solid #e5e7eb;
- border-radius: 12px;
- background: #fff;
- box-shadow: none;
- }
- .trend-echart {
- min-height: 320px;
- }
- .empty-state__title {
- font-size: 14px;
- font-weight: 600;
- color: #4b5563;
- }
- .empty-state__desc {
- display: block;
- color: #9ca3af;
- font-size: 12px;
- line-height: 18px;
- }
- .chart-empty {
- min-height: 180px;
- margin-top: 0;
- padding: 0;
- gap: 0;
- border: 0;
- border-radius: 0;
- background: transparent;
- box-shadow: none;
- color: inherit;
- }
- .chart-empty::before {
- content: none;
- display: none;
- }
- .trade-trend-empty {
- min-height: 420px;
- border: 0;
- border-radius: 0;
- background: transparent;
- }
- .trade-trend-chart-box {
- border: 0;
- border-radius: 0;
- background: transparent;
- box-shadow: none;
- backdrop-filter: none;
- padding: 0;
- }
- .station-row {
- gap: 10px;
- margin-bottom: 10px;
- color: #374151;
- }
- .station-list {
- gap: 8px;
- }
- .station-item {
- padding: 6px 10px;
- border: 1px solid #eef2f7;
- border-radius: 8px;
- background: #fafafa;
- color: #4b5563;
- }
- }
- .quick-nav {
- background: rgb(255 255 255 / 96%);
- backdrop-filter: blur(8px);
- box-shadow: 0 8px 20px rgb(15 23 42 / 8%);
- .nav-item {
- padding: 6px 10px;
- border-radius: 8px;
- color: #6b7280;
- transition:
- background 0.2s ease,
- color 0.2s ease;
- &:hover {
- background: #f9fafb;
- color: #374151;
- }
- &.active {
- background: #e6f4ff;
- color: #1677ff;
- }
- }
- }
- @media (max-width: 1440px) {
- .@{prefix-cls}.case-portrait-page {
- .comm-chart-row,
- .trade-chart-row {
- grid-template-columns: 1fr;
- }
- .basic-content {
- grid-template-columns: 92px minmax(0, 1fr);
- }
- .info-grid {
- grid-template-columns: repeat(3, minmax(0, 1fr));
- }
- }
- }
- @media (max-width: 1200px) {
- .@{prefix-cls}.case-portrait-page {
- .page-layout {
- grid-template-columns: 156px minmax(0, 1fr);
- }
- .left-panel {
- height: auto;
- min-width: 0;
- }
- .left-panel .panel-card {
- max-height: 100%;
- }
- .info-grid,
- .comm-grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
- .chart-more-link {
- margin-left: auto;
- }
- .quick-nav-shell {
- display: none;
- }
- }
- .quick-nav {
- display: none;
- }
- }
- @media (max-width: 992px) {
- .@{prefix-cls}.case-portrait-page {
- padding: 12px;
- .page-layout,
- .right-panel {
- gap: 10px;
- }
- .section-card,
- .comm-section,
- .trade-section {
- padding: 14px;
- }
- .relation-search,
- .comm-top-tools .comm-top-range,
- .trade-top-tools .metric-select,
- .trade-top-tools .trade-top-range,
- .trade-trend-filters .trend-search-input,
- .trade-trend-filters .trend-range-input {
- width: 100%;
- }
- .info-grid,
- .comm-grid,
- .relation-list,
- .trade-kpi {
- grid-template-columns: 1fr;
- }
- .comm-top-tools,
- .trade-top-tools,
- .trade-trend-filters,
- .section-tools {
- width: 100%;
- }
- }
- }
- html[data-theme='dark'] {
- .@{prefix-cls}.case-portrait-page {
- background: #0f172a;
- .panel-card,
- .section-card {
- background: #111827;
- box-shadow: none;
- }
- .person-item {
- background: #1f2937;
- &:hover {
- background: #1e293b;
- }
- }
- .person-name,
- .section-title,
- .profile-name,
- .relation-name {
- color: #e5e7eb;
- }
- .info-item,
- .info-label,
- .relation-score,
- .tag {
- color: #9ca3af;
- }
- .relation-card {
- border-color: #1f2937;
- }
- .tag {
- background: #1f2937;
- }
- }
- }
- </style>
|