移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

list.vue 245 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846
  1. <template>
  2. <div class="app-container">
  3. <van-sticky>
  4. <div class="bannerBg" style="">
  5. <van-nav-bar
  6. style="background:transparent;border-bottom-width:0;"
  7. @click-left="onClickLeft"
  8. >
  9. <template #left>
  10. <van-icon name="arrow-left" size=".5rem" color="#fff" />
  11. </template>
  12. <template #title>
  13. <p style="color:#fff">{{item.deptName}}</p>
  14. </template>
  15. </van-nav-bar>
  16. <van-popup v-model:show="showImageList" position="bottom" style="height:40vh;padding:50px 10px 0" closeable
  17. close-icon="close">
  18. <p style="color:#000;position:absolute;top:0.426667rem;left:0.426667rem">图片上传</p>
  19. <div style="width:100%;height:calc( 40vh - 100px);overflow-y: scroll;">
  20. <van-uploader accept="image/*" v-model="uploadImgList" :after-read="beforeReadImageList" @delete="deleteFileImageList" multiple :max-count="50" />
  21. </div>
  22. <van-row justify="space-around" style=" position:fixed;bottom:0;left:0;width:100%;height:50px;text-align: center;">
  23. <van-col span="12"><van-button type="primary" style="width:100px;" round @click="qkClick">清空</van-button></van-col>
  24. <van-col span="12"><van-button type="primary" style="width:100px;" round @click="submitUploadList(zjdId)">上传</van-button></van-col>
  25. </van-row>
  26. </van-popup>
  27. <div style="display:flex;width:95%;margin:0 auto;justify-content:space-between;padding: 0px 0 15px">
  28. <div :class="{activeBtn : activeBtn==1,disactiveBtn :activeBtn!=1 }" @click="$router.push({path:'/homesteadSurvey/list'})">入户核查</div>
  29. <div :class="{activeBtn : activeBtn==2,disactiveBtn :activeBtn!=2 }" @click="$router.push({path:'/homesteadSurvey/list2'})">农户信息</div>
  30. <div :class="{activeBtn : activeBtn==3,disactiveBtn :activeBtn!=3 }" @click="$router.push({path:'/homesteadSurvey/list3'})">所有权人</div>
  31. <div :class="{activeBtn : activeBtn==4,disactiveBtn :activeBtn!=4 }" @click="$router.push({path:'/homesteadSurvey/list4'})">切换地图</div>
  32. </div>
  33. </div>
  34. <div style="background:#fff;padding:10px 2.5%;display: flex;justify-content: space-between;">
  35. <div style="text-align:center;background: rgba(122,201,67,0.2);width: 49%;font-size: 14px;border-radius: 8px;display: flex;align-items: center;justify-content: center;padding: 2px 0;">
  36. <img src="../../assets/images/housesteadSurvey/list01.png" alt="">
  37. <p style="margin-left: 10px;">
  38. <span style="color:#60B722;line-height:.8rem;">宅基地数:</span>
  39. <span style="color:#60B722;line-height:.8rem;"><span style="font-size:16px;color: #448815;">{{totalH}}</span> 宗</span>
  40. </p>
  41. </div>
  42. <div style="text-align:center;background: rgba(122,201,67,0.2);width: 49%;font-size: 14px;border-radius: 8px;display: flex;align-items: center;justify-content: center;padding: 2px 0;">
  43. <img src="../../assets/images/housesteadSurvey/list02.png" alt="">
  44. <p style="margin-left: 10px;">
  45. <span style="color:#60B722;line-height:.8rem">使用权人数:</span>
  46. <span style="color:#60B722;line-height:.8rem"><span style="font-size:16px;color: #448815;">{{totalR}}</span> 人</span>
  47. </p>
  48. </div>
  49. </div>
  50. <van-search v-model="zjdvalue" placeholder="请输入宅基地代码或农户姓名" show-action @search="onSearchzjd" style="padding-top: 0;padding-bottom: 0;">
  51. <template #action>
  52. <van-icon name="add" color="rgba(122,201,67,1)" size=".8rem" @click="onClickzjd" style="vertical-align:middle;"/>
  53. </template>
  54. </van-search>
  55. </van-sticky>
  56. <van-tabs sticky offset-top="185%" v-model="active" title-active-color="#7AC943" color="#7AC943" @click="getZjdList">
  57. <van-tab v-for="(item,index) in surveyStatusOptions" >
  58. <template #title>
  59. <div style="display: flex;align-items: center;">
  60. <van-badge v-if="item.dictValue == '1'" :content="whcNums" :color="active==0?'#7AC943':'#878787'" />
  61. <van-badge v-if="item.dictValue == '2'" :content="hcycNums" :color="active==1?'#7AC943':'#878787'" />
  62. <van-badge v-if="item.dictValue == '3'" :content="hcwcNums" :color="active==2?'#7AC943':'#878787'" />
  63. <van-badge v-if="item.dictValue == '4'" :content="spbhNums" :color="active==3?'#7AC943':'#878787'" />
  64. <van-badge v-if="item.dictValue == '5'" :content="sptgNums" :color="active==4?'#7AC943':'#878787'" />
  65. </div>
  66. <div style="display: flex;align-items: center;">
  67. <p>{{item.dictLabel}}</p>
  68. </div>
  69. </template>
  70. <!--<van-pull-refresh v-model="isLoadingzjd" @refresh="onRefreshzjd">-->
  71. <van-list
  72. v-model:loading="loading2"
  73. :finished="finished2"
  74. finished-text="没有更多了"
  75. :immediate-check="false"
  76. @load="onRefreshzjd"
  77. >
  78. <van-cell v-for="(item,index) in list1" :key="index" size="small" :clickable="true" style="border-radius: 16px;
  79. box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:15px auto 0;">
  80. <template #title>
  81. <div style="display: flex;align-items: center;">
  82. <p style="display: flex;align-items: center;" >
  83. <img src="../../assets/images/housesteadSurvey/list03.png" alt="" style="margin-right: 5px;">
  84. <span style="line-height: 1;">{{limitWords(item.shyqrdbxm)}}</span>
  85. </p>
  86. <p v-if="item.surveyStatus == '5' || item.surveyStatus == '3'" style="display: flex;align-items: center;color:#22B7F2;font-size:12px;margin-left: auto;margin-right: 10px;border-bottom: 1px dashed #22B7F2;" @click="queryDetail(item)"><img src="../../assets/images/housesteadSurvey/list06.png" alt="" style="margin-right: 3px;">详情</p>
  87. <!-- <p v-if="item.zjdAudit=='0'" style="color:#ff976a;background:rgba(255,151,106,0.2);font-size:12px;padding: 5px;line-height: 1;border-radius: 5px;">待审核</p>-->
  88. <!-- <p v-if="item.zjdAudit=='1'" style="color:#7AC943;background:rgba(122,201,67,0.2);font-size:12px;padding: 5px;line-height: 1;border-radius: 5px;">已审核</p>-->
  89. <!-- <p v-if="item.zjdAudit=='2'" style="color:#ee0a24;font-size:12px;">已驳回</p>-->
  90. <p v-if="item.surveyStatus != '5' && item.surveyStatus != '3'" style="display: flex;align-items: center;color:#22B7F2;font-size:12px;margin-left: auto;margin-right: 10px;border-bottom: 1px dashed #22B7F2;" @click="setCookies(item)"><img src="../../assets/images/housesteadSurvey/list07.png" alt="" style="margin-right: 3px;">调查</p>
  91. <p style="margin-right: 3%;color:#22B7F2;font-size:12px;" ><van-icon name="photo-o" size=".4rem" style="bottom: -3px;" color="#000000" @click="showUploadList(item.id)"/> 附件</p>
  92. <p style="display: flex;align-items: center;color:#FA5353;font-size:12px;border-bottom: 1px dashed #FA5353;" @click="deleteZjd(item,index)"><img src="../../assets/images/housesteadSurvey/list08.png" alt="" style="margin-right: 3px;">删除</p>
  93. </div>
  94. </template>
  95. <!--<template #default>
  96. <van-button v-if="item.houseDataConfirmStatus=='CONFIRMED'" plain round color="#7AC943" size="mini" style="vertical-align:middle;margin-top:15px;">查看详情</van-button>
  97. <van-button v-if="item.houseDataConfirmStatus!='CONFIRMED'"plain round color="#FA5353" size="mini" style="vertical-align:middle;margin-top:15px;">开始调查</van-button>
  98. </template>-->
  99. <template #label>
  100. <p style="display: flex;align-items: center;margin-top: 10px;"><img src="../../assets/images/housesteadSurvey/list04.png" alt="" style="margin-right: 5px;">宅基地代码: {{item.zjddm}} </p>
  101. <p style="display: flex;align-items: center;margin-top: 5px;"><img src="../../assets/images/housesteadSurvey/list05.png" alt="" style="margin-right: 5px;">宗地面积: {{item.zdmj}}㎡<span style="margin-left: auto;color: #333333;" v-if="item.surveyStatus != '1'">调查员:{{item.surveyBy}}</span></p>
  102. </template>
  103. </van-cell>
  104. </van-list>
  105. <!--</van-pull-refresh>-->
  106. </van-tab>
  107. </van-tabs>
  108. </div>
  109. </template>
  110. <script>
  111. import {rhhcList,getQueryLand,getZjdzd,delZjdzd,uploadFile,submitUploadImageList} from "@/api/homesteadSurvey/zjdzd";
  112. import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh";
  113. import {addNhhncy, delNhhncy, exportNhhncy, getNhhncy, listNhhncy, updateNhhncy} from "@/api/homesteadSurvey/nhhncy";
  114. import {listShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr";
  115. import {listSuyqr,updateSuyqr,addSuyqr} from "@/api/homesteadSurvey/suyqr";
  116. import {getZrz} from "@/api/homesteadSurvey/zrz";
  117. import {getFsss} from "@/api/homesteadSurvey/fsss";
  118. import {getGeoServerConfigKey} from "@/api/system/config";
  119. import {deptGetId,} from "@/api/homestead/index";
  120. import {attachmentFind} from "@/api/sunVillage_info/homestead/application";
  121. import {base64Attach} from "@/api/user";
  122. import {systemAttachment} from "@/api/onlineHome/bankAgriculture/paymentApproval";
  123. import $ from "jquery";
  124. import {Dialog} from "vant";
  125. import {ref} from "vue";
  126. import axios from "axios";
  127. export default {
  128. name: "homesteadList",
  129. data() {
  130. return {
  131. loading1:false,
  132. finished1:false,
  133. loading2:false,
  134. finished2:false,
  135. loading3:false,
  136. finished3:false,
  137. //全部
  138. qbNums:0,
  139. //已调查数量
  140. yhcNums:0,
  141. //未核查数量
  142. whcNums:0,
  143. //核查异常数量
  144. hcycNums:0,
  145. //核查完成数量
  146. hcwcNums:0,
  147. //审批通过数量
  148. sptgNums:0,
  149. //审批驳回数量
  150. spbhNums:0,
  151. // 总户数
  152. totalH:0,
  153. // 总人数
  154. totalR:0,
  155. zjdSx:true,
  156. zrzSx :true,
  157. fsssSx:true,
  158. showhncysjly:false,
  159. showhzsjly:false,
  160. showhncycybz:false,
  161. showhncyzjlx:false,
  162. showhncyyhzgx:false,
  163. showhzjzhcssfyzf:false,
  164. showhncyoccupation:false,
  165. showhncyjzqk:false,
  166. showhzoccupation:false,
  167. showhzjzqk:false,
  168. // 下拉刷新
  169. isLoadingnh:false,
  170. countnh:0,
  171. isLoadingzjd:false,
  172. countqb:1,
  173. countyhc:1,
  174. countwhc:1,
  175. // 使用权人表单弹出
  176. shownh:false,
  177. showhzht:false,
  178. showhzlx:false,
  179. showhncylist:false,
  180. showhncy:false,
  181. activeBtn:1,
  182. value:'',
  183. // 宅基地搜索框
  184. zjdvalue:"",
  185. // 使用权人搜索框
  186. nhvalue:"",
  187. active:0,
  188. // 全部列表
  189. list:[],
  190. // 已核查列表
  191. list1:[],
  192. // 未核查列表
  193. list2:[],
  194. // 户主列表
  195. nhlist:[],
  196. // 户内成员表单
  197. form5: {},
  198. // 户内成员列表
  199. hncylist:[],
  200. currentRate:20,
  201. // 使用权人
  202. nhform:[],
  203. // 户主列表
  204. hzform:{},
  205. // 权利人列表
  206. qlrform:{},
  207. // 权利人性质弹出框
  208. showsuyqxz:false,
  209. // 代理人证件类型弹出框
  210. showdlrzjlx:false,
  211. // 代表人证件类型弹出框
  212. showdbrzjlx:false,
  213. // 数据来源弹出框
  214. showsjly:false,
  215. surveyStatusOptions:[],
  216. // 证件类型字典
  217. zjlxOptions: [],
  218. // 所有权性质字典
  219. suyqxzOption: [],
  220. // 婚姻状况字典
  221. hyzkOptions:[],
  222. // 数据来源字典
  223. sjlyOptions:[],
  224. // 居住情况字典
  225. jzqkOptions:[],
  226. // 与户主关系字典
  227. yhzgxOptions:[],
  228. // 职业字典
  229. occupationOptions:[],
  230. // 集镇或城市是否有住房字典
  231. jzhcssfyzfOptions:[],
  232. // 成员备注字典
  233. cybzOptions:[],
  234. columns:[],
  235. show1:false,
  236. showhzzjlx: false,
  237. // 路由传过来的任务基本信息。
  238. item: {},
  239. //地图使用 --start
  240. openMap: false,
  241. mapTheGeomZrzId: null,
  242. mapTheGeomZjdId: null,
  243. mapTheGeomFsssId: null,
  244. drawInsert:null,
  245. mapZjdData:"",
  246. mapZrzData:"",
  247. mapFsssData:"",
  248. mapZjdDataTure:"",
  249. mapZjdTeAll:{
  250. active:"",
  251. mapZjdAData:{},
  252. mapZrzAData:{},
  253. mapFsssAData:{},
  254. },
  255. mapHaDataValue:false,
  256. mapHasDateStatus: 0, //0附属设施 1自然幢 2宅基地
  257. selectionIconShow:false,
  258. homesteadListStatus:false,
  259. //地图绘制状态
  260. draw: {
  261. drawMapPolygon: false, //绘制地图
  262. },
  263. mapTownList: null,
  264. mapVillageList: null,
  265. coordinate:"",
  266. checked:['zjdSx', 'zrzSx', 'fsssSx'],
  267. checkAllMap: false,
  268. sx:"",
  269. drawingClick:true,
  270. //搜索---start
  271. seachText: "",
  272. //搜索栏目-操作栏显隐
  273. searchBarOperVisbile: false,
  274. mapDataAll: [],
  275. showSearch:false,
  276. bottomHeight:'0px',
  277. //搜索---end
  278. //测面
  279. textMjAll:"",
  280. clickBbox:"",
  281. textMjAllNum:"",
  282. //核查
  283. zjdHcDy:"",
  284. //绘图
  285. htZjdZrzFsss:"",
  286. //筛选
  287. checkAllFlag: true,
  288. CheckedAllArr: [],//全选数组
  289. dataForm: {
  290. imageUrl: []
  291. },
  292. dataList: [["fsssSx"],["zjdSx"],["zrzSx"]], //地图使用 --end
  293. checkBoxAll:[],
  294. //地图跳转存之
  295. mapAddJump:"",
  296. mapAddJumpNum:"",
  297. nhdm:"",
  298. backTheGeom:"",
  299. //地图服务地址
  300. mapGeoServerUrl:"",
  301. backMap:"",
  302. // 任务完成标记
  303. //宅基地点击事件
  304. mapXs: false,
  305. mapClick:"",
  306. isFinished:false,
  307. //
  308. showImageList:false,
  309. zjdId:null,
  310. uploadImgList:[],
  311. uploadImgList1:[],
  312. // 字典列表json
  313. dictTypeList:null,
  314. };
  315. },
  316. mounted(){
  317. },
  318. created(){
  319. axios.get('../static/dictyType.json').then(res => {
  320. this.dictTypeList = res.data
  321. this.zjlxOptions = this.dictTypeList.zjlx;
  322. this.suyqxzOptions = this.dictTypeList.qsxz;
  323. this.sjlyOptions = this.dictTypeList.sjly;
  324. this.hyzkOptions = this.dictTypeList.hyzk;
  325. this.occupationOptions = this.dictTypeList.occupation;
  326. this.jzqkOptions = this.dictTypeList.living_condition;
  327. this.jzhcssfyzfOptions = this.dictTypeList.jzhcssfyzf;
  328. this.cybzOptions = this.dictTypeList.member_remark;
  329. })
  330. this.getDicts("survey_status").then(response => {
  331. var arr = [];
  332. response.data.forEach(function (item) {
  333. if (item.dictValue !== '1') {
  334. item.dictLabel = item.dictLabel.substring(2,item.dictLabel.length);
  335. arr.push(item);
  336. }else{
  337. arr.push(item);
  338. }
  339. });
  340. this.surveyStatusOptions = arr;
  341. });
  342. this.getList();
  343. this.getSyqr();
  344. // this.getDicts("family_status").then(response => {
  345. // var arr = [];
  346. // response.data.forEach(function (item) {
  347. // if (item.dictLabel !== '户主') {
  348. // arr.push(item)
  349. // }
  350. // });
  351. // this.yhzgxOptions = arr;
  352. // });
  353. // if(this.$cookies.get("search") != null && this.$cookies.get("search") !="" && this.$cookies.get("search")!=undefined){
  354. // if(this.$cookies.get("search").activeBtn !=null){
  355. // if(this.$cookies.get("search").activeBtn == 4){
  356. // // if(location.href.indexOf("#reloaded")==-1){
  357. // // location.href=location.href+"#reloaded";
  358. // // location.reload();
  359. // // }
  360. // this.activeBtn = this.$cookies.get("search").activeBtn;
  361. // this.item = this.$cookies.get("item");
  362. // this.mapAddJump = this.$cookies.get("search").backMapZjdAData.deptId;
  363. // this.backTheGeom = this.$cookies.get("search").backMapZjdAData.theGeom;
  364. // this.mapZjdData = this.$cookies.get("search").backMapZjdAData;
  365. // this.mapZjdTeAll.mapZjdAData = this.$cookies.get("search").backMapZjdAData;
  366. // this.mapClick = this.mapZjdTeAll.mapZjdAData.zjddm;
  367. // this.mapXs =true;
  368. // this.zjdHcDy = 1;
  369. // this.mapZjdDataTure = 1;
  370. // this.mapAddJumpNum =1;
  371. // this.mapShow();
  372. // this.getZjdList();
  373. // this.getTotalHR();
  374. // if(this.item.taskStatus=="FINISHED"){
  375. // this.isFinished = true
  376. // }else{
  377. // this.isFinished = false
  378. // }
  379. // }
  380. // }else {
  381. // this.item = this.$cookies.get("item");
  382. // this.getZjdList();
  383. // this.getTotalHR();
  384. // if(this.item.taskStatus=="FINISHED"){
  385. // this.isFinished = true
  386. // }else{
  387. // this.isFinished = false
  388. // }
  389. // }
  390. // }else {
  391. // this.item = this.$cookies.get("item");
  392. // this.getZjdList();
  393. // this.getTotalHR();
  394. // if(this.item.taskStatus=="FINISHED"){
  395. // this.isFinished = true
  396. // }else{
  397. // this.isFinished = false
  398. // }
  399. // }
  400. },
  401. methods: {
  402. getList(){
  403. let params = {
  404. "surveyStatus":"1",
  405. "pageNum": 1,
  406. "pageSize":10,
  407. }
  408. rhhcList(params).then(res => {
  409. this.list1 = res.data.zjdzdxxList;
  410. if(res.data.zjdzdxxList.length>0&&res.data.zjdzdxxList.length<res.data.zjdzs){
  411. this.loading2 = false
  412. this.finished2 = false;
  413. }else{
  414. this.loading2 = false
  415. this.finished2 = true
  416. }
  417. });
  418. rhhcList({surveyStatus:"1,2,3,4,5"}).then(res => {
  419. this.whcNums = res.data.wdcs;
  420. this.hcycNums = res.data.dcycs;
  421. this.hcwcNums = res.data.dcwcs;
  422. this.sptgNums = res.data.dctgs;
  423. this.spbhNums = res.data.dcbhs;
  424. this.totalH = res.data.zjdzs;
  425. this.totalR = res.data.shyqrs;
  426. });
  427. },
  428. showUploadList(id){
  429. this.getAttachments(id);
  430. this.showImageList = true;
  431. this.zjdId = id;
  432. },
  433. submitUploadList(val){
  434. let f = []
  435. for (let i of this.uploadImgList){
  436. if(i.content !== undefined){
  437. f.push(i.content)
  438. }
  439. }
  440. console.info(this.uploadImgList);
  441. let _this = this;
  442. let file = {
  443. tableId:val,
  444. tableName:"t_homestead_zjdzdxx",
  445. bizPath:"upload",
  446. fileType:"0",
  447. files: f
  448. };
  449. base64Attach(file).then((resp) => {
  450. this.$toast({
  451. icon: 'success', // 找到自己需要的图标
  452. message: '上传成功',
  453. duration:"1000",
  454. onClose:function(){
  455. _this.showImageList = false
  456. }
  457. })
  458. });
  459. },
  460. // 图片上传前
  461. beforeReadImageList(file){
  462. let _this = this;
  463. if(file.length!=undefined){
  464. file.map(res => {
  465. let zjddm = res.file.name
  466. //zjddm=zjddm.substring(0,zjddm.lastIndexOf("\("));
  467. // 创建Canvas对象(画布)
  468. let canvas = document.createElement('canvas')
  469. // 获取对应的CanvasRenderingContext2D对象(画笔)
  470. let context = canvas.getContext('2d')
  471. // 创建新的图片对象
  472. let img = new Image()
  473. // 指定图片的DataURL(图片的base64编码数据)
  474. img.src = res.content
  475. // 监听浏览器加载图片完成,然后进行进行绘制
  476. img.onload = () => {
  477. /*const h = img.height
  478. const w = img.width*/
  479. let ch = img.height/5
  480. let cw = img.width/5
  481. let canvas = document.createElement('canvas')
  482. let ctx = canvas.getContext('2d')
  483. canvas.height = ch
  484. canvas.width = cw
  485. ctx.clearRect(0,0,cw,ch)
  486. ctx.drawImage(img,0,0,cw,ch)
  487. let base_img = canvas.toDataURL('image/jpeg')
  488. let blobBin = atob(base_img.split(',')[1])
  489. let d = []
  490. for (let i=0;i<blobBin.length;i++){
  491. d.push(blobBin.charCodeAt(i))
  492. }
  493. let data2 = new FormData();
  494. data2.append("file", new Blob([new Uint8Array(d)],{type:'image/jpeg'}));
  495. uploadFile(data2);
  496. }
  497. })
  498. }else{
  499. let zjddm = file.file.name
  500. //zjddm=zjddm.substring(0,zjddm.lastIndexOf("\("));
  501. // 创建Canvas对象(画布)
  502. let canvas = document.createElement('canvas')
  503. // 获取对应的CanvasRenderingContext2D对象(画笔)
  504. let context = canvas.getContext('2d')
  505. // 创建新的图片对象
  506. let img = new Image()
  507. // 指定图片的DataURL(图片的base64编码数据)
  508. img.src = file.content
  509. // 监听浏览器加载图片完成,然后进行进行绘制
  510. img.onload = () => {
  511. /*const h = img.height
  512. const w = img.width*/
  513. let ch = img.height/5
  514. let cw = img.width/5
  515. let canvas = document.createElement('canvas')
  516. let ctx = canvas.getContext('2d')
  517. canvas.height = ch
  518. canvas.width = cw
  519. ctx.clearRect(0,0,cw,ch)
  520. ctx.drawImage(img,0,0,cw,ch)
  521. let base_img = canvas.toDataURL('image/jpeg')
  522. let blobBin = atob(base_img.split(',')[1])
  523. let d = []
  524. for (let i=0;i<blobBin.length;i++){
  525. d.push(blobBin.charCodeAt(i))
  526. }
  527. let data2 = new FormData();
  528. data2.append("file", new Blob([new Uint8Array(d)],{type:'image/jpeg'}));
  529. uploadFile(data2);
  530. }
  531. }
  532. },
  533. deleteFileImageList(file){
  534. if(file.id !== undefined ){
  535. systemAttachment(file.id);
  536. }
  537. },
  538. validatorIdcardqlr(val){
  539. if(this.qlrform.dbrzjlx=='01'){
  540. if(this.vcheckID(val)){
  541. return true
  542. }else {
  543. return false
  544. }
  545. }else{
  546. return true
  547. }
  548. },
  549. validatorIdcardnh(val){
  550. if(this.nhform.hzzjlx=='01'){
  551. if(this.vcheckID(val)){
  552. return true
  553. }else {
  554. return false
  555. }
  556. }else{
  557. return true
  558. }
  559. },
  560. validatorIdcardhncy(val){
  561. if(this.form5.zjlx=='01'){
  562. if(this.vcheckID(val)){
  563. return true
  564. }else {
  565. return false
  566. }
  567. }else{
  568. return true
  569. }
  570. },
  571. checkCode(val) {
  572. var p = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  573. var factor = [ 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 ];
  574. var parity = [ 1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2 ];
  575. var code = val.substring(17);
  576. if(p.test(val)) {
  577. var sum = 0;
  578. for(var i=0;i<17;i++) {
  579. sum += val[i]*factor[i];
  580. }
  581. if(parity[sum % 11] == code.toUpperCase()) {
  582. return true;
  583. }
  584. }
  585. return false;
  586. },
  587. checkDate (val) {
  588. var pattern = /^(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)$/;
  589. if(pattern.test(val)) {
  590. var year = val.substring(0, 4);
  591. var month = val.substring(4, 6);
  592. var date = val.substring(6, 8);
  593. var date2 = new Date(year+"-"+month+"-"+date);
  594. if(date2 && date2.getMonth() == (parseInt(month) - 1)) {
  595. return true;
  596. }
  597. }
  598. return false;
  599. },
  600. checkProv(val) {
  601. var pattern = /^[1-9][0-9]/;
  602. var provs = {11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江 ",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北 ",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏 ",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门"};
  603. if(pattern.test(val)) {
  604. if(provs[val]) {
  605. return true;
  606. }
  607. }
  608. return false;
  609. },
  610. vcheckID(val){
  611. if(this.checkCode(val)) {
  612. var date = val.substring(6,14);
  613. if(this.checkDate(date)) {
  614. if(this.checkProv(val.substring(0,2))) {
  615. return true;
  616. }
  617. }
  618. }
  619. return false;
  620. },
  621. deleteZjd(item,index){
  622. Dialog.confirm({
  623. title: '警告',
  624. message: '将删除与此宅基地关联的使用权人,自然幢,房屋,附属设施等所有信息,同时删除后无法恢复,确认删除么?',
  625. })
  626. .then(() => {
  627. // on confirm
  628. delZjdzd(item.id).then(res => {
  629. if(res.code=="200"){
  630. this.list1.splice(index,1);
  631. this.$notify({type: 'success', message: '删除成功'});
  632. location.reload();
  633. }
  634. })
  635. })
  636. .catch(() => {
  637. // on cancel
  638. });
  639. },
  640. //删除户主
  641. deletenh(item,index){
  642. let yes = true
  643. let params={
  644. nhdm : item.nhdm,
  645. deptId: item.deptId
  646. }
  647. listNhhncy(params).then((res) => {
  648. console.log(res.rows.length)
  649. if(res.rows.length>0){
  650. yes = false
  651. this.$toast({
  652. icon: 'error', // 找到自己需要的图标
  653. message: '无法删除,此户主存在户内成员!',
  654. duration:"1000",
  655. onClose:function(){
  656. }
  657. })
  658. }else{
  659. listShyqr(params).then((res) => {
  660. if(res.rows.length>0){
  661. yes = false
  662. this.$toast({
  663. icon: 'error', // 找到自己需要的图标
  664. message: '无法删除,此户主已经成为使用权人!',
  665. duration:"1000",
  666. onClose:function(){
  667. }
  668. })
  669. }else{
  670. if(yes){
  671. Dialog.confirm({
  672. title: '警告',
  673. message: '确认删除此使用权人么?',
  674. })
  675. .then(() => {
  676. // on confirm
  677. delNh(item.id).then(res => {
  678. if(res.code=="200"){
  679. this.nhlist.splice(index,1);
  680. this.totalH--
  681. this.totalR--
  682. }
  683. })
  684. })
  685. .catch(() => {
  686. // on cancel
  687. });
  688. }
  689. }
  690. });
  691. }
  692. });
  693. },
  694. // 设为户主
  695. setNh(item,index){
  696. Dialog.confirm({
  697. title: '警告',
  698. message: '此操作将删除原户主,并将此成员设为新户主,是否确认操作?',
  699. })
  700. .then(() => {
  701. // on confirm
  702. delNhhncy(item.id).then(res => {
  703. if(res.code=="200"){
  704. this.hncylist.splice(index,1);
  705. this.totalR--
  706. }
  707. })
  708. // 更新户主信息
  709. let pnh = {
  710. deptId : item.deptId,
  711. nhdm : item.nhdm,
  712. hzxm:item.xm,
  713. hzzjlx :item.zjlx,
  714. hzzjhm :item.zjhm
  715. }
  716. setNhInfo(pnh).then(res => {
  717. })
  718. // 更新使用权人
  719. let psyqr = {
  720. deptId : item.deptId,
  721. nhdm : item.nhdm,
  722. shyqrdbxm : item.xm,
  723. shyqrdbzjlx : item.zjlx,
  724. shyqrdbzjhm : item.zjhm,
  725. xb : item.xb
  726. }
  727. setSyqrInfo(psyqr).then(res => {
  728. })
  729. })
  730. .catch(() => {
  731. // on cancel
  732. });
  733. },
  734. //删除户内成员
  735. deletehncy(id,index){
  736. Dialog.confirm({
  737. title: '警告',
  738. message: '删除后无法恢复,确认删除此成员么?',
  739. })
  740. .then(() => {
  741. // on confirm
  742. delNhhncy(id).then(res => {
  743. if(res.code=="200"){
  744. this.hncylist.splice(index,1);
  745. this.totalR--
  746. }
  747. })
  748. })
  749. .catch(() => {
  750. // on cancel
  751. });
  752. },
  753. // 字数限制
  754. limitWords(val){
  755. if(val==null||val==""){
  756. return "无"
  757. }else{
  758. if(val.length>11){
  759. val = val.slice(0,10) +"..."
  760. }
  761. return val
  762. }
  763. },
  764. // 与户主关系翻译
  765. yhzgxfy(value){
  766. let label
  767. this.yhzgxOptions.map(res => {
  768. if(res.dictValue == value){
  769. label = res.dictLabel
  770. }
  771. })
  772. return label
  773. },
  774. onRefreshzjd(){
  775. this.isLoadingzjd = false;
  776. let _this = this
  777. if(this.active==0&&this.loading2){
  778. let params = {
  779. "shyqrdbxm" : this.zjdvalue,
  780. "surveyStatus":"1",
  781. "pageNum": this.countyhc+1,
  782. "pageSize":10,
  783. }
  784. rhhcList(params).then((response) => {
  785. if(response.data.zjdzdxxList.length>0&&this.list2.length<response.data.zjdzs){
  786. response.data.zjdzdxxList.map(res => {
  787. _this.list1.push(res)
  788. })
  789. this.countyhc++
  790. this.loading2 = false
  791. }else{
  792. this.loading2 = false
  793. this.finished2 = true
  794. }
  795. });
  796. }else if(this.active==1&&this.loading2){
  797. let params = {
  798. "shyqrdbxm" : this.zjdvalue,
  799. "surveyStatus":"2",
  800. "pageNum": this.countyhc+1,
  801. "pageSize":10,
  802. }
  803. rhhcList(params).then((response) => {
  804. if(response.data.zjdzdxxList.length>0&&this.list1.length<response.data.zjdzs){
  805. response.data.zjdzdxxList.map(res => {
  806. _this.list1.push(res)
  807. })
  808. this.countyhc++
  809. this.loading2 = false
  810. }else{
  811. this.finished2 = true
  812. }
  813. });
  814. }else if(this.active==2&&this.loading2){
  815. let params = {
  816. "shyqrdbxm" : this.zjdvalue,
  817. "surveyStatus":"3",
  818. "pageNum": this.countyhc+1,
  819. "pageSize":10,
  820. }
  821. rhhcList(params).then((response) => {
  822. if(response.data.zjdzdxxList.length>0&&this.list1.length<response.data.zjdzs){
  823. response.data.zjdzdxxList.map(res => {
  824. _this.list1.push(res)
  825. })
  826. this.countyhc++
  827. this.loading2 = false
  828. }else{
  829. this.finished2 = true
  830. }
  831. });
  832. }else if(this.active==3&&this.loading2){
  833. let params = {
  834. "shyqrdbxm" : this.zjdvalue,
  835. "surveyStatus":"4",
  836. "pageNum": this.countyhc+1,
  837. "pageSize":10,
  838. }
  839. rhhcList(params).then((response) => {
  840. if(response.data.zjdzdxxList.length>0&&this.list1.length<response.data.zjdzs){
  841. response.data.zjdzdxxList.map(res => {
  842. _this.list1.push(res)
  843. })
  844. this.countyhc++
  845. this.loading2 = false
  846. }else{
  847. this.finished2 = true
  848. }
  849. });
  850. }else if(this.active==4&&this.loading2){
  851. let params = {
  852. "shyqrdbxm" : this.zjdvalue,
  853. "surveyStatus":"5",
  854. "pageNum": this.countyhc+1,
  855. "pageSize":10,
  856. }
  857. rhhcList(params).then((response) => {
  858. if(response.data.zjdzdxxList.length>0&&this.list1.length<response.data.zjdzs){
  859. response.data.zjdzdxxList.map(res => {
  860. _this.list1.push(res)
  861. })
  862. this.countyhc++
  863. this.loading2 = false
  864. }else{
  865. this.finished2 = true
  866. }
  867. });
  868. }
  869. },
  870. getTotalHR(){
  871. let params = {
  872. "deptId" : this.item.deptId,
  873. "pageNum": 1,
  874. "pageSize":10,
  875. }
  876. listNh(params).then((response) => {
  877. if(response.rows.length>=0){
  878. this.totalH = response.total
  879. }
  880. listNhhncy(params).then((res) => {
  881. if(res.rows.length>=0){
  882. this.totalR = res.total + this.totalH
  883. }
  884. });
  885. });
  886. },
  887. onRefreshnh(){
  888. this.isLoadingnh = false
  889. let params = {
  890. "deptId" : this.item.deptId,
  891. "pageNum": this.countnh+1,
  892. "pageSize":10,
  893. }
  894. listNh(params).then((response) => {
  895. if(response.rows.length>0&&this.nhlist.length<response.total){
  896. response.rows.map(res => {
  897. this.nhlist.unshift(res)
  898. })
  899. this.countnh++
  900. }
  901. });
  902. },
  903. queryDetail(item){
  904. //this.$cookies.set("search",JSON.stringify(item));
  905. this.$cookies.set("search","");
  906. // let _this = this
  907. // setTimeout(function(){
  908. // _this.$router.push({name:'homesteadAdd'});
  909. // },1000)
  910. getZjdzd(item.id).then((response) => {
  911. localStorage.setItem("zjdzdxxItem",JSON.stringify(response.data));
  912. localStorage.setItem("executePermission",false);
  913. this.$router.push({path:'/homesteadSurvey/add'});
  914. });
  915. },
  916. setCookies(item){
  917. //this.$cookies.set("search",JSON.stringify(item));
  918. this.$cookies.set("search","");
  919. // let _this = this
  920. // setTimeout(function(){
  921. // _this.$router.push({name:'homesteadAdd'});
  922. // },1000)
  923. getZjdzd(item.id).then((response) => {
  924. localStorage.setItem("zjdzdxxItem",JSON.stringify(response.data));
  925. localStorage.setItem("executePermission",true);
  926. this.$router.push({path:'/homesteadSurvey/add'});
  927. });
  928. },
  929. // 入户核查搜索框新增。
  930. onClickzjd(){
  931. this.$cookies.remove("search");
  932. localStorage.setItem("zjdzdxxItem",JSON.stringify({suyqrdm:this.qlrform.suyqrdm,zjddm:null,zjdlyzk:"1",landStatus:"1"
  933. ,houseOwnership:"2",landPhms:"10",isMore:"0",sffz:"0",sfcz:"0"
  934. ,zjdqdfs:"01",sjly:"01",qlsdfs:"1",qllx:"1",qlxz:"203",dj:"1",yt:"01"}));
  935. this.$router.push({name:'homesteadAdd'});
  936. },
  937. // 农户信息搜索框新增。
  938. onClicknh(){
  939. this.shownh = true;
  940. let params = {
  941. "deptId" : this.item.deptId
  942. }
  943. this.qlrform={}
  944. this.nhform={
  945. "suyqrdm":null,
  946. "deptId":this.item.deptId,
  947. "hzzjlx":'01',
  948. "hzzjlxName":"身份证",
  949. "hyzk":'02',
  950. "occupation":'1',
  951. "occupationName":'务农',
  952. "jzqk":'3',
  953. "jzqkName":'常年居住',
  954. "jzhcssfyzf":'1',
  955. "jzhcssfyzfName":'无住房',
  956. "zqtczsfyzf":'Y',
  957. "sfbccm":'Y',
  958. "sfpkh":'N',
  959. "sfwbh":'N',
  960. "sjly":'07',
  961. "sjlyName":'农村集体产权制度改革',
  962. }
  963. listSuyqr(params).then((response) => {
  964. if(response.rows.length>0){
  965. this.qlrform = response.rows[0]
  966. this.nhform.suyqrdm = this.qlrform.suyqrdm
  967. this.nhform.txdz = response.rows[0].suyqrmc
  968. }
  969. });
  970. },
  971. // 返回
  972. onClickLeft(){
  973. this.$cookies.set("search","")
  974. this.$router.push({path:'/homesteadSurvey/index'});
  975. },
  976. onConfirmhncysjly(value){
  977. this.form5.sjlyName = value.dictLabel
  978. this.form5.sjly = value.dictValue
  979. this.showhncysjly= false
  980. },
  981. onConfirmhzsjly(value){
  982. this.nhform.sjlyName = value.dictLabel
  983. this.nhform.sjly = value.dictValue
  984. this.showhzsjly= false
  985. },
  986. onConfirmhncycybz(value){
  987. this.form5.cybzName = value.dictLabel
  988. this.form5.cybz = value.dictValue
  989. this.showhncycybz= false
  990. },
  991. onConfirmhzjzhcssfyzf(value){
  992. this.nhform.jzhcssfyzfName = value.dictLabel
  993. this.nhform.jzhcssfyzf = value.dictValue
  994. this.showhzjzhcssfyzf= false
  995. },
  996. onConfirmhncyyhzgx(value){
  997. this.form5.yhzgxName = value.dictLabel
  998. this.form5.yhzgx = value.dictValue
  999. this.showhncyyhzgx = false
  1000. },
  1001. onConfirmhncyzjlx(value){
  1002. this.form5.zjlxName = value.dictLabel
  1003. this.form5.zjlx = value.dictValue
  1004. this.showhncyzjlx = false
  1005. },
  1006. onConfirmhncyjzqk(value){
  1007. this.form5.jzqkName = value.dictLabel
  1008. this.form5.jzqk = value.dictValue
  1009. this.showhncyjzqk = false
  1010. },
  1011. onConfirmhzjzqk(value){
  1012. this.nhform.jzqkName = value.dictLabel
  1013. this.nhform.jzqk = value.dictValue
  1014. this.showhzjzqk = false
  1015. },
  1016. onConfirmhncyoccupation(value){
  1017. this.form5.occupationName = value.dictLabel
  1018. this.form5.occupation = value.dictValue
  1019. this.showhncyoccupation = false
  1020. },
  1021. onConfirmhzoccupation(value){
  1022. this.nhform.occupationName = value.dictLabel
  1023. this.nhform.occupation = value.dictValue
  1024. this.showhzoccupation = false
  1025. },
  1026. onConfirmhzzjlx(value){
  1027. this.nhform.hzzjlxName = value.dictLabel
  1028. this.nhform.hzzjlx = value.dictValue
  1029. this.showhzzjlx = false
  1030. },
  1031. onConfirmdbrzjlx(value){
  1032. this.qlrform.dbrzjlxName = value.dictLabel
  1033. this.qlrform.dbrzjlx = value.dictValue
  1034. this.showdbrzjlx = false
  1035. },
  1036. onConfirmsuyqxz(value){
  1037. this.qlrform.suyqxzName = value.dictLabel
  1038. this.qlrform.suyqxz = value.dictValue
  1039. this.showsuyqxz = false
  1040. },
  1041. onConfirmdlrzjlx(value){
  1042. this.qlrform.dlrzjlxName = value.dictLabel
  1043. this.qlrform.dlrzjlx = value.dictValue
  1044. this.showdlrzjlx = false
  1045. },
  1046. onConfirmsjly(value){
  1047. this.qlrform.sjlyName = value.dictLabel
  1048. this.qlrform.sjly = value.dictValue
  1049. this.showsjly = false
  1050. },
  1051. // 户主保存
  1052. onSubmitnh(){
  1053. if(this.nhform.id!=null){
  1054. updateNh(this.nhform).then(
  1055. response => {
  1056. let _this =this
  1057. this.$toast({
  1058. icon: 'success', // 找到自己需要的图标
  1059. message: '修改成功',
  1060. duration:"1000",
  1061. onClose:function(){
  1062. _this.getNh()
  1063. let psyqr = {
  1064. deptId : _this.nhform.deptId,
  1065. nhdm : _this.nhform.nhdm,
  1066. shyqrdbxm : _this.nhform.hzxm,
  1067. shyqrdbzjlx : _this.nhform.hzzjlx,
  1068. shyqrdbzjhm : _this.nhform.hzzjhm,
  1069. dh : _this.nhform.phone,
  1070. dz : _this.nhform.txdz
  1071. }
  1072. setSyqrInfo(psyqr).then(res => {
  1073. _this.shownh = false
  1074. })
  1075. }
  1076. })
  1077. }
  1078. );
  1079. }else{
  1080. this.nhform.deptId = this.item.deptId
  1081. addNh(this.nhform).then(
  1082. response => {
  1083. this.totalR+=1
  1084. this.totalH+=1
  1085. let _this =this
  1086. this.$toast({
  1087. icon: 'success', // 找到自己需要的图标
  1088. message: '保存成功',
  1089. duration:"1000",
  1090. onClose:function(){
  1091. _this.shownh = false
  1092. _this.getNh()
  1093. }
  1094. })
  1095. }
  1096. );
  1097. }
  1098. },
  1099. // 所有权人保存
  1100. onSubmitsyqr(){
  1101. if(this.qlrform.id!=null){
  1102. updateSuyqr(this.qlrform).then(
  1103. response => {
  1104. let _this =this
  1105. this.$toast({
  1106. icon: 'success', // 找到自己需要的图标
  1107. message: '修改成功',
  1108. duration:"1000"
  1109. })
  1110. }
  1111. );
  1112. }else{
  1113. this.qlrform.deptId = this.item.deptId
  1114. addSuyqr(this.qlrform).then(
  1115. response => {
  1116. let _this =this
  1117. this.$toast({
  1118. icon: 'success', // 找到自己需要的图标
  1119. message: '保存成功',
  1120. duration:"1000"
  1121. })
  1122. }
  1123. );
  1124. }
  1125. },
  1126. // 查询所有权人
  1127. getSyqr(){
  1128. //删除地图选中状态
  1129. $("#deleteHistoryMap").trigger("click");
  1130. let params = {
  1131. "deptId" : this.item.deptId
  1132. }
  1133. this.qlrform ={
  1134. "deptId":this.item.deptId,
  1135. "suyqxz":'40',
  1136. "suyqxzName":'集体土地所有权',
  1137. "dbrzjlx":'01',
  1138. "dbrzjlxName":'身份证',
  1139. "sfclncjtjjzz":'Y',
  1140. "sjly":'04',
  1141. "sjlyName":"农村宅基地使用权确权登记发证"
  1142. }
  1143. listSuyqr(params).then((response) => {
  1144. if(response.rows.length>0){
  1145. this.qlrform = response.rows[0]
  1146. if(this.qlrform.suyqxz==null||this.qlrform.suyqxz==""){
  1147. this.qlrform.suyqxz = "40"
  1148. this.qlrform.suyqxzName = "集体土地所有权"
  1149. }
  1150. if(this.qlrform.dbrzjlx==null||this.qlrform.dbrzjlx==""){
  1151. this.qlrform.dbrzjlx = "01"
  1152. this.qlrform.dbrzjlxName = "身份证"
  1153. }
  1154. if(this.qlrform.sfclncjtjjzz==null||this.qlrform.sfclncjtjjzz==""){
  1155. this.qlrform.sfclncjtjjzz = "Y"
  1156. }
  1157. if(this.qlrform.sjly==null||this.qlrform.sjly==""){
  1158. this.qlrform.sjly = "04"
  1159. this.qlrform.sjlyName = "农村宅基地使用权确权登记发证"
  1160. }
  1161. this.zjlxOptions.map(res => {
  1162. if(res.dictValue == this.qlrform.dbrzjlx){
  1163. this.qlrform.dbrzjlxName = res.dictLabel
  1164. }
  1165. if(res.dictValue == this.qlrform.dlrzjlx){
  1166. this.qlrform.dlrzjlxName = res.dictLabel
  1167. }
  1168. })
  1169. this.suyqxzOptions.map(res => {
  1170. if(res.dictValue == this.qlrform.suyqxz){
  1171. this.qlrform.suyqxzName = res.dictLabel
  1172. }
  1173. })
  1174. this.sjlyOptions.map(res => {
  1175. if(res.dictValue == this.qlrform.sjly){
  1176. this.qlrform.sjlyName = res.dictLabel
  1177. }
  1178. })
  1179. }
  1180. });
  1181. this.mapZjdData = "";
  1182. this.mapZrzData = "";
  1183. this.mapFsssData = "";
  1184. //that.mapZjdTeAll.active ="1";
  1185. this.mapZjdTeAll.mapZjdAData = {};
  1186. this.mapZjdTeAll.mapZrzAData = {};
  1187. this.mapZjdTeAll.mapFsssAData = {};
  1188. this.mapZjdDataTure = "";
  1189. this.mapXs =false;
  1190. this.mapClick ="";
  1191. this.mapAddJump = "";
  1192. this.backTheGeom = "";
  1193. this.zjdHcDy = "";
  1194. this.mapZjdDataTure = "";
  1195. this.mapAddJumpNum ="";
  1196. },
  1197. // 查询农户列表
  1198. getNh(){
  1199. //删除地图选中状态
  1200. $("#deleteHistoryMap").trigger("click");
  1201. let params = {
  1202. "deptId" : this.item.deptId
  1203. }
  1204. listNh(params).then((response) => {
  1205. this.nhlist = response.rows
  1206. this.totalN = response.total
  1207. });
  1208. this.mapZjdData = "";
  1209. this.mapZrzData = "";
  1210. this.mapFsssData = "";
  1211. //that.mapZjdTeAll.active ="1";
  1212. this.mapZjdTeAll.mapZjdAData = {};
  1213. this.mapZjdTeAll.mapZrzAData = {};
  1214. this.mapZjdTeAll.mapFsssAData = {};
  1215. this.mapZjdDataTure = "";
  1216. this.mapXs =false;
  1217. this.mapClick ="";
  1218. this.mapAddJump = "";
  1219. this.backTheGeom = "";
  1220. this.zjdHcDy = "";
  1221. this.mapZjdDataTure = "";
  1222. this.mapAddJumpNum ="";
  1223. },
  1224. //调查
  1225. getDc(){
  1226. //删除地图选中状态
  1227. $("#deleteHistoryMap").trigger("click");
  1228. this.mapZjdData = "";
  1229. this.mapZrzData = "";
  1230. this.mapFsssData = "";
  1231. //that.mapZjdTeAll.active ="1";
  1232. this.mapZjdTeAll.mapZjdAData = {};
  1233. this.mapZjdTeAll.mapZrzAData = {};
  1234. this.mapZjdTeAll.mapFsssAData = {};
  1235. this.mapZjdDataTure = "";
  1236. this.mapXs =false;
  1237. this.mapClick ="";
  1238. this.mapAddJump = "";
  1239. this.backTheGeom = "";
  1240. this.zjdHcDy = "";
  1241. this.mapZjdDataTure = "";
  1242. this.mapAddJumpNum ="";
  1243. },
  1244. // 农户信息搜索框
  1245. onSearchnh(){
  1246. let params = {
  1247. "deptId" : this.item.deptId,
  1248. "nhValue" : this.nhvalue
  1249. }
  1250. listNh(params).then((response) => {
  1251. this.nhlist = response.rows
  1252. });
  1253. },
  1254. // 宅基地搜索框
  1255. onSearchzjd(){
  1256. rhhcList({"shyqrdbxm" : this.zjdvalue,surveyStatus:"1,2,3,4,5"}).then(res => {
  1257. this.whcNums = res.data.wdcs;
  1258. this.hcycNums = res.data.dcycs;
  1259. this.hcwcNums = res.data.dcwcs;
  1260. this.sptgNums = res.data.dctgs;
  1261. this.spbhNums = res.data.dcbhs;
  1262. });
  1263. if(this.active==0){
  1264. let params = {
  1265. "shyqrdbxm" : this.zjdvalue,
  1266. "surveyStatus":"1",
  1267. "pageNum": 1,
  1268. "pageSize":10,
  1269. }
  1270. rhhcList(params).then((response) => {
  1271. console.info(this.list2.length);
  1272. if (response.code == 200) {
  1273. this.list1 = response.data.zjdzdxxList;
  1274. if(response.data.zjdzdxxList.length>0&&response.data.zjdzdxxList.length<response.data.zjdzs){
  1275. this.countyhc++
  1276. this.loading2 = false
  1277. this.finished2 = false;
  1278. }else{
  1279. this.loading2 = false
  1280. this.finished2 = true
  1281. }
  1282. }
  1283. });
  1284. } else if(this.active==1){
  1285. let params = {
  1286. "shyqrdbxm" : this.zjdvalue,
  1287. "surveyStatus":"2",
  1288. "pageNum": 1,
  1289. "pageSize":10,
  1290. }
  1291. rhhcList(params).then((response) => {
  1292. console.info(this.list2.length);
  1293. if (response.code == 200) {
  1294. this.list1 = response.data.zjdzdxxList;
  1295. if(response.data.zjdzdxxList.length>0&&response.data.zjdzdxxList.length<response.data.zjdzs){
  1296. this.countyhc++
  1297. this.loading2 = false
  1298. this.finished2 = false;
  1299. }else{
  1300. this.loading2 = false
  1301. this.finished2 = true
  1302. }
  1303. }
  1304. });
  1305. } else if(this.active==2){
  1306. let params = {
  1307. "shyqrdbxm" : this.zjdvalue,
  1308. "surveyStatus":"3",
  1309. "pageNum": 1,
  1310. "pageSize":10,
  1311. }
  1312. rhhcList(params).then((response) => {
  1313. console.info(this.list2.length);
  1314. if (response.code == 200) {
  1315. this.list1 = response.data.zjdzdxxList;
  1316. if(response.data.zjdzdxxList.length>0&&response.data.zjdzdxxList.length<response.data.zjdzs){
  1317. this.countyhc++
  1318. this.loading2 = false
  1319. this.finished2 = false;
  1320. }else{
  1321. this.loading2 = false
  1322. this.finished2 = true
  1323. }
  1324. }
  1325. });
  1326. } else if(this.active==3){
  1327. let params = {
  1328. "shyqrdbxm" : this.zjdvalue,
  1329. "surveyStatus":"4",
  1330. "pageNum": 1,
  1331. "pageSize":10,
  1332. }
  1333. rhhcList(params).then((response) => {
  1334. console.info(this.list2.length);
  1335. if (response.code == 200) {
  1336. this.list1 = response.data.zjdzdxxList;
  1337. if(response.data.zjdzdxxList.length>0&&response.data.zjdzdxxList.length<response.data.zjdzs){
  1338. this.countyhc++
  1339. this.loading2 = false
  1340. this.finished2 = false;
  1341. }else{
  1342. this.loading2 = false
  1343. this.finished2 = true
  1344. }
  1345. }
  1346. });
  1347. }else{
  1348. let params = {
  1349. "shyqrdbxm" : this.zjdvalue,
  1350. "surveyStatus":"5",
  1351. "pageNum": 1,
  1352. "pageSize":10,
  1353. }
  1354. rhhcList(params).then((response) => {
  1355. if (response.code == 200) {
  1356. this.list1 = response.data.zjdzdxxList;
  1357. if(response.data.zjdzdxxList.length>0&&response.data.zjdzdxxList.length<response.data.zjdzs){
  1358. this.countyhc++
  1359. this.loading2 = false
  1360. this.finished2 = false;
  1361. }else{
  1362. this.loading2 = false
  1363. this.finished2 = true
  1364. }
  1365. }
  1366. });
  1367. }
  1368. },
  1369. // 户内成员弹窗
  1370. showPopuphncy(item){
  1371. this.showhncy = true
  1372. if(item.id==null||item.id==""){
  1373. this.form5 = {
  1374. "nhdm":this.nhdm,
  1375. "deptId":this.item.deptId,
  1376. "zjlx":'01',
  1377. "zjlxName":"身份证",
  1378. "yhzgx":"14",
  1379. "yhzgxName":"妻",
  1380. "hyzk":'02',
  1381. "hklx":'1',
  1382. "occupation":'1',
  1383. "occupationName":'务农',
  1384. "jzqk":'3',
  1385. "jzqkName":'常年居住',
  1386. "sfbjtjjzzcy":'Y',
  1387. "xb":'0',
  1388. "sfbccm":'Y',
  1389. "sfpkh":'N',
  1390. "sfwbh":'N',
  1391. "sjly":'07',
  1392. "sjlyName":'农村集体产权制度改革',
  1393. "cybz":'9',
  1394. "cybzName":'其他备注'
  1395. }
  1396. }else{
  1397. let _this = this
  1398. this.form5 = item
  1399. if(this.form5.nhdm==null||this.form5.nhdm==""){
  1400. this.form5.nhdm = this.nhform.nhdm
  1401. }
  1402. if(this.form5.deptId==null||this.form5.deptId==""){
  1403. this.form5.deptId = this.nhform.deptId
  1404. }
  1405. if(this.form5.zjlx==null||this.form5.zjlx==""){
  1406. this.form5.zjlx = "01"
  1407. this.form5.zjlxName = "身份证"
  1408. }
  1409. if(this.form5.yhzgx==null||this.form5.yhzgx==""){
  1410. this.form5.yhzgx = "14"
  1411. this.form5.yhzgxName = "妻"
  1412. }
  1413. if(this.form5.hyzk==null||this.form5.hyzk==""){
  1414. this.form5.hyzk = "02"
  1415. }
  1416. if(this.form5.hklx==null||this.form5.hklx==""){
  1417. this.form5.hklx = "1"
  1418. }
  1419. if(this.form5.occupation==null||this.form5.occupation==""){
  1420. this.form5.occupation = "1"
  1421. this.form5.occupationName = "务农"
  1422. }
  1423. if(this.form5.jzqk==null||this.form5.jzqk==""){
  1424. this.form5.jzqk = "3"
  1425. this.form5.jzqkName = "常年居住"
  1426. }
  1427. if(this.form5.sfbjtjjzzcy==null||this.form5.sfbjtjjzzcy==""){
  1428. this.form5.sfbjtjjzzcy = "Y"
  1429. }
  1430. if(this.form5.xb==null||this.form5.xb==""){
  1431. this.form5.xb = "0"
  1432. }
  1433. if(this.form5.sfbccm==null||this.form5.sfbccm==""){
  1434. this.form5.sfbccm = "Y"
  1435. }
  1436. if(this.form5.sfpkh==null||this.form5.sfpkh==""){
  1437. this.form5.sfpkh = "N"
  1438. }
  1439. if(this.form5.sfwbh==null||this.form5.sfwbh==""){
  1440. this.form5.sfwbh = "N"
  1441. }
  1442. if(this.form5.sjly==null||this.form5.sjly==""){
  1443. this.form5.sjly = "07"
  1444. this.form5.sjlyName = "农村集体产权制度改革"
  1445. }
  1446. if(this.form5.cybz==null||this.form5.cybz==""){
  1447. this.form5.cybz = "9"
  1448. this.form5.cybzName = "其他备注"
  1449. }
  1450. this.jzhcssfyzfOptions.map(res => {
  1451. if(res.dictValue == item.jzhcssfyzf){
  1452. this.form5.jzhcssfyzfName = res.dictLabel
  1453. }
  1454. })
  1455. this.zjlxOptions.map(res => {
  1456. if(res.dictValue == item.zjlx){
  1457. this.form5.zjlxName = res.dictLabel
  1458. }
  1459. })
  1460. this.occupationOptions.map(res => {
  1461. if(res.dictValue == item.occupation){
  1462. this.form5.occupationName = res.dictLabel
  1463. }
  1464. })
  1465. this.jzqkOptions.map(res => {
  1466. if(res.dictValue == item.jzqk){
  1467. this.form5.jzqkName = res.dictLabel
  1468. }
  1469. })
  1470. this.yhzgxOptions.map(res => {
  1471. if(res.dictValue == item.yhzgx){
  1472. this.form5.yhzgxName = res.dictLabel
  1473. }
  1474. })
  1475. this.cybzOptions.map(res => {
  1476. if(res.dictValue == item.cybz){
  1477. this.form5.cybzName = res.dictLabel
  1478. }
  1479. })
  1480. this.sjlyOptions.map(res => {
  1481. if(res.dictValue == item.sjly){
  1482. this.form5.sjlyName = res.dictLabel
  1483. }
  1484. })
  1485. }
  1486. },
  1487. // 户内成员列表
  1488. showPopuphncylist(item){
  1489. if(item.nhdm==null||item.nhdm==""){
  1490. this.$toast({
  1491. icon: 'error', // 找到自己需要的图标
  1492. message: '请先保存户主信息',
  1493. duration:"1000"
  1494. })
  1495. }else{
  1496. this.nhdm = item.nhdm
  1497. this.showhncylist = true
  1498. let params = {
  1499. "nhdm":item.nhdm,
  1500. "deptId":this.item.deptId
  1501. }
  1502. listNhhncy(params).then((response) => {
  1503. if (response.code == 200) {
  1504. this.hncylist = response.rows
  1505. }
  1506. });
  1507. }
  1508. },
  1509. showPopupnh(item){
  1510. this.shownh = true
  1511. this.nhform = item
  1512. this.jzhcssfyzfOptions.map(res => {
  1513. if(res.dictValue == item.jzhcssfyzf){
  1514. this.nhform.jzhcssfyzfName = res.dictLabel
  1515. }
  1516. })
  1517. this.zjlxOptions.map(res => {
  1518. if(res.dictValue == item.hzzjlx){
  1519. this.nhform.hzzjlxName = res.dictLabel
  1520. }
  1521. })
  1522. this.occupationOptions.map(res => {
  1523. if(res.dictValue == item.occupation){
  1524. this.nhform.occupationName = res.dictLabel
  1525. }
  1526. })
  1527. this.jzqkOptions.map(res => {
  1528. if(res.dictValue == item.jzqk){
  1529. this.nhform.jzqkName = res.dictLabel
  1530. }
  1531. })
  1532. this.sjlyOptions.map(res => {
  1533. if(res.dictValue == item.sjly){
  1534. this.nhform.sjlyName = res.dictLabel
  1535. }
  1536. })
  1537. },
  1538. getAttachments(id) {
  1539. this.uploadImgList = [];
  1540. let cond = {
  1541. tableId: id,
  1542. tableName: 't_homestead_zjdzdxx',
  1543. fileType: 0,
  1544. };
  1545. attachmentFind(cond).then(resp => {
  1546. this.uploadImgList = resp.data.map(function(item){
  1547. return {id:item.id,url:'/api'+item.fileUrl,isImage: true}
  1548. });
  1549. });
  1550. },
  1551. getZjdList(){
  1552. this.countyhc = 0;
  1553. if(this.active === 0){
  1554. let params = {
  1555. "shyqrdbxm" : this.zjdvalue,
  1556. "surveyStatus":"1",
  1557. "pageNum": 1,
  1558. "pageSize":10,
  1559. }
  1560. rhhcList(params).then((response) => {
  1561. if (response.code == 200) {
  1562. this.whcNums = response.data.zjdzs;
  1563. this.list1 = response.data.zjdzdxxList;
  1564. this.loading2 = false
  1565. if(response.data.zjdzdxxList.length>0&&response.data.zjdzdxxList.length<response.data.zjdzs){
  1566. this.countyhc++
  1567. this.finished2 = false;
  1568. }else{
  1569. this.finished2 = true
  1570. }
  1571. }
  1572. });
  1573. }else if(this.active === 1){
  1574. let params = {
  1575. "shyqrdbxm" : this.zjdvalue,
  1576. "surveyStatus":"2",
  1577. "pageNum": 1,
  1578. "pageSize":10,
  1579. }
  1580. rhhcList(params).then((response) => {
  1581. if (response.code == 200) {
  1582. this.hcycNums = response.data.zjdzs;
  1583. this.list1 = response.data.zjdzdxxList;
  1584. this.loading2 = false
  1585. if(response.data.zjdzdxxList.length>0&&response.data.zjdzdxxList.length<response.data.zjdzs){
  1586. this.countyhc++
  1587. this.finished2 = false;
  1588. }else{
  1589. this.finished2 = true
  1590. }
  1591. }
  1592. });
  1593. }else if(this.active === 2){
  1594. let params = {
  1595. "shyqrdbxm" : this.zjdvalue,
  1596. "surveyStatus":"3",
  1597. "pageNum": 1,
  1598. "pageSize":10,
  1599. }
  1600. rhhcList(params).then((response) => {
  1601. if (response.code == 200) {
  1602. this.hcwcNums = response.data.zjdzs;
  1603. this.list1 = response.data.zjdzdxxList;
  1604. this.loading2 = false
  1605. if(response.data.zjdzdxxList.length>0&&response.data.zjdzdxxList.length<response.data.zjdzs){
  1606. this.countyhc++
  1607. this.finished2 = false;
  1608. }else{
  1609. this.finished2 = true
  1610. }
  1611. }
  1612. });
  1613. }else if(this.active === 3){
  1614. let params = {
  1615. "shyqrdbxm" : this.zjdvalue,
  1616. "surveyStatus":"4",
  1617. "pageNum": 1,
  1618. "pageSize":10,
  1619. }
  1620. rhhcList(params).then((response) => {
  1621. if (response.code == 200) {
  1622. this.spbhNums = response.data.zjdzs;
  1623. this.list1 = response.data.zjdzdxxList;
  1624. this.loading2 = false
  1625. if(response.data.zjdzdxxList.length>0&&response.data.zjdzdxxList.length<response.data.zjdzs){
  1626. this.countyhc++
  1627. this.finished2 = false;
  1628. }else{
  1629. this.finished2 = true
  1630. }
  1631. }
  1632. });
  1633. }else if(this.active === 4){
  1634. let params = {
  1635. "shyqrdbxm" : this.zjdvalue,
  1636. "surveyStatus":"5",
  1637. "pageNum": 1,
  1638. "pageSize":10,
  1639. }
  1640. rhhcList(params).then((response) => {
  1641. if (response.code == 200) {
  1642. this.sptgNums = response.data.zjdzs;
  1643. this.list1 = response.data.zjdzdxxList;
  1644. this.loading2 = false
  1645. if(response.data.zjdzdxxList.length>0&&response.data.zjdzdxxList.length<response.data.zjdzs){
  1646. this.countyhc++
  1647. this.finished2 = false;
  1648. }else{
  1649. this.finished2 = true
  1650. }
  1651. }
  1652. });
  1653. }
  1654. },
  1655. onConfirm(){},
  1656. /*onSubmithncy(){
  1657. if (this.form5.id != null) {
  1658. if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
  1659. if(this.form5.xb!='1'){
  1660. Dialog.confirm({
  1661. title: '警告',
  1662. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  1663. })
  1664. .then(() => {
  1665. // on confirm
  1666. updateNhhncy(this.form5).then(response => {
  1667. let _this =this
  1668. this.$toast({
  1669. icon: 'success', // 找到自己需要的图标
  1670. message: '修改成功',
  1671. duration:"1000",
  1672. onClose:function(){
  1673. _this.showhncy = false
  1674. let params = {
  1675. "nhdm":_this.form5.nhdm,
  1676. deptId:_this.form5.deptId
  1677. }
  1678. listNhhncy(params).then((response) => {
  1679. _this.hncylist = response.rows
  1680. })
  1681. }
  1682. })
  1683. });
  1684. })
  1685. .catch(() => {
  1686. // on cancel
  1687. });
  1688. }else{
  1689. updateNhhncy(this.form5).then(response => {
  1690. let _this =this
  1691. this.$toast({
  1692. icon: 'success', // 找到自己需要的图标
  1693. message: '修改成功',
  1694. duration:"1000",
  1695. onClose:function(){
  1696. _this.showhncy = false
  1697. let params = {
  1698. "nhdm":_this.form5.nhdm,
  1699. deptId:_this.form5.deptId
  1700. }
  1701. listNhhncy(params).then((response) => {
  1702. _this.hncylist = response.rows
  1703. })
  1704. }
  1705. })
  1706. });
  1707. }
  1708. } else {
  1709. if(this.form5.xb=='1'){
  1710. Dialog.confirm({
  1711. title: '警告',
  1712. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  1713. })
  1714. .then(() => {
  1715. // on confirm
  1716. updateNhhncy(this.form5).then(response => {
  1717. let _this =this
  1718. this.$toast({
  1719. icon: 'success', // 找到自己需要的图标
  1720. message: '修改成功',
  1721. duration:"1000",
  1722. onClose:function(){
  1723. _this.showhncy = false
  1724. let params = {
  1725. "nhdm":_this.form5.nhdm,
  1726. deptId:_this.form5.deptId
  1727. }
  1728. listNhhncy(params).then((response) => {
  1729. _this.hncylist = response.rows
  1730. })
  1731. }
  1732. })
  1733. });
  1734. })
  1735. .catch(() => {
  1736. // on cancel
  1737. });
  1738. }else{
  1739. updateNhhncy(this.form5).then(response => {
  1740. let _this =this
  1741. this.$toast({
  1742. icon: 'success', // 找到自己需要的图标
  1743. message: '修改成功',
  1744. duration:"1000",
  1745. onClose:function(){
  1746. _this.showhncy = false
  1747. let params = {
  1748. "nhdm":_this.form5.nhdm,
  1749. deptId:_this.form5.deptId
  1750. }
  1751. listNhhncy(params).then((response) => {
  1752. _this.hncylist = response.rows
  1753. })
  1754. }
  1755. })
  1756. });
  1757. }
  1758. }
  1759. } else {
  1760. if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
  1761. if(this.form5.xb!='1'){
  1762. Dialog.confirm({
  1763. title: '警告',
  1764. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  1765. })
  1766. .then(() => {
  1767. // on confirm
  1768. addNhhncy(this.form5).then(response => {
  1769. let _this =this
  1770. this.$toast({
  1771. icon: 'success', // 找到自己需要的图标
  1772. message: '保存成功',
  1773. duration:"1000",
  1774. onClose:function(){
  1775. _this.showhncy = false
  1776. _this.totalR+=1
  1777. _this.totalH+=1
  1778. let params = {
  1779. "nhdm":_this.form5.nhdm,
  1780. deptId:_this.form5.deptId
  1781. }
  1782. listNhhncy(params).then((response) => {
  1783. _this.hncylist = response.rows
  1784. })
  1785. }
  1786. })
  1787. });
  1788. })
  1789. .catch(() => {
  1790. // on cancel
  1791. });
  1792. }else{
  1793. addNhhncy(this.form5).then(response => {
  1794. let _this =this
  1795. this.$toast({
  1796. icon: 'success', // 找到自己需要的图标
  1797. message: '保存成功',
  1798. duration:"1000",
  1799. onClose:function(){
  1800. _this.showhncy = false
  1801. _this.totalR+=1
  1802. _this.totalH+=1
  1803. let params = {
  1804. "nhdm":_this.form5.nhdm,
  1805. deptId:_this.form5.deptId
  1806. }
  1807. listNhhncy(params).then((response) => {
  1808. _this.hncylist = response.rows
  1809. })
  1810. }
  1811. })
  1812. });
  1813. }
  1814. } else {
  1815. if(this.form5.xb=='1'){
  1816. Dialog.confirm({
  1817. title: '警告',
  1818. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  1819. })
  1820. .then(() => {
  1821. // on confirm
  1822. addNhhncy(this.form5).then(response => {
  1823. let _this =this
  1824. this.$toast({
  1825. icon: 'success', // 找到自己需要的图标
  1826. message: '保存成功',
  1827. duration:"1000",
  1828. onClose:function(){
  1829. _this.showhncy = false
  1830. _this.totalR+=1
  1831. _this.totalH+=1
  1832. let params = {
  1833. "nhdm":_this.form5.nhdm,
  1834. deptId:_this.form5.deptId
  1835. }
  1836. listNhhncy(params).then((response) => {
  1837. _this.hncylist = response.rows
  1838. })
  1839. }
  1840. })
  1841. });
  1842. })
  1843. .catch(() => {
  1844. // on cancel
  1845. });
  1846. }else{
  1847. addNhhncy(this.form5).then(response => {
  1848. let _this =this
  1849. this.$toast({
  1850. icon: 'success', // 找到自己需要的图标
  1851. message: '保存成功',
  1852. duration:"1000",
  1853. onClose:function(){
  1854. _this.showhncy = false
  1855. _this.totalR+=1
  1856. _this.totalH+=1
  1857. let params = {
  1858. "nhdm":_this.form5.nhdm,
  1859. deptId:_this.form5.deptId
  1860. }
  1861. listNhhncy(params).then((response) => {
  1862. _this.hncylist = response.rows
  1863. })
  1864. }
  1865. })
  1866. });
  1867. }
  1868. }
  1869. }
  1870. },*/
  1871. onSubmithncy(){
  1872. if (this.form5.id != null) {
  1873. if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
  1874. if(this.form5.xb!='1'){
  1875. Dialog.confirm({
  1876. title: '警告',
  1877. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  1878. })
  1879. .then(() => {
  1880. // on confirm
  1881. updateNhhncy(this.form5).then(response => {
  1882. let _this =this
  1883. this.$toast({
  1884. icon: 'success', // 找到自己需要的图标
  1885. message: '修改成功',
  1886. duration:"1000",
  1887. onClose:function(){
  1888. _this.showhncy = false
  1889. let params = {
  1890. "nhdm":_this.form5.nhdm,
  1891. deptId:_this.form5.deptId
  1892. }
  1893. listNhhncy(params).then((response) => {
  1894. _this.hncylist = response.rows
  1895. })
  1896. }
  1897. })
  1898. });
  1899. })
  1900. .catch(() => {
  1901. // on cancel
  1902. });
  1903. }else{
  1904. updateNhhncy(this.form5).then(response => {
  1905. let _this =this
  1906. this.$toast({
  1907. icon: 'success', // 找到自己需要的图标
  1908. message: '修改成功',
  1909. duration:"1000",
  1910. onClose:function(){
  1911. _this.showhncy = false
  1912. let params = {
  1913. "nhdm":_this.form5.nhdm,
  1914. deptId:_this.form5.deptId
  1915. }
  1916. listNhhncy(params).then((response) => {
  1917. _this.hncylist = response.rows
  1918. })
  1919. }
  1920. })
  1921. });
  1922. }
  1923. } else if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 0){
  1924. if(this.form5.xb!='0'){
  1925. Dialog.confirm({
  1926. title: '警告',
  1927. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  1928. })
  1929. .then(() => {
  1930. // on confirm
  1931. updateNhhncy(this.form5).then(response => {
  1932. let _this =this
  1933. this.$toast({
  1934. icon: 'success', // 找到自己需要的图标
  1935. message: '修改成功',
  1936. duration:"1000",
  1937. onClose:function(){
  1938. _this.showhncy = false
  1939. let params = {
  1940. "nhdm":_this.form5.nhdm,
  1941. deptId:_this.form5.deptId
  1942. }
  1943. listNhhncy(params).then((response) => {
  1944. _this.hncylist = response.rows
  1945. })
  1946. }
  1947. })
  1948. });
  1949. })
  1950. .catch(() => {
  1951. // on cancel
  1952. });
  1953. }else{
  1954. updateNhhncy(this.form5).then(response => {
  1955. let _this =this
  1956. this.$toast({
  1957. icon: 'success', // 找到自己需要的图标
  1958. message: '修改成功',
  1959. duration:"1000",
  1960. onClose:function(){
  1961. _this.showhncy = false
  1962. let params = {
  1963. "nhdm":_this.form5.nhdm,
  1964. deptId:_this.form5.deptId
  1965. }
  1966. listNhhncy(params).then((response) => {
  1967. _this.hncylist = response.rows
  1968. })
  1969. }
  1970. })
  1971. });
  1972. }
  1973. }else{
  1974. updateNhhncy(this.form5).then(response => {
  1975. let _this =this
  1976. this.$toast({
  1977. icon: 'success', // 找到自己需要的图标
  1978. message: '修改成功',
  1979. duration:"1000",
  1980. onClose:function(){
  1981. _this.showhncy = false
  1982. let params = {
  1983. "nhdm":_this.form5.nhdm,
  1984. deptId:_this.form5.deptId
  1985. }
  1986. listNhhncy(params).then((response) => {
  1987. _this.hncylist = response.rows
  1988. })
  1989. }
  1990. })
  1991. });
  1992. }
  1993. } else {
  1994. if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
  1995. if(this.form5.xb!='1'){
  1996. Dialog.confirm({
  1997. title: '警告',
  1998. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  1999. })
  2000. .then(() => {
  2001. // on confirm
  2002. addNhhncy(this.form5).then(response => {
  2003. let _this =this
  2004. this.$toast({
  2005. icon: 'success', // 找到自己需要的图标
  2006. message: '保存成功',
  2007. duration:"1000",
  2008. onClose:function(){
  2009. _this.totalR+=1
  2010. _this.showhncy = false
  2011. let params = {
  2012. "nhdm":_this.form5.nhdm,
  2013. deptId:_this.form5.deptId
  2014. }
  2015. listNhhncy(params).then((response) => {
  2016. _this.hncylist = response.rows
  2017. })
  2018. }
  2019. })
  2020. });
  2021. })
  2022. .catch(() => {
  2023. // on cancel
  2024. });
  2025. }else{
  2026. addNhhncy(this.form5).then(response => {
  2027. let _this =this
  2028. this.$toast({
  2029. icon: 'success', // 找到自己需要的图标
  2030. message: '保存成功',
  2031. duration:"1000",
  2032. onClose:function(){
  2033. _this.totalR+=1
  2034. _this.showhncy = false
  2035. let params = {
  2036. "nhdm":_this.form5.nhdm,
  2037. deptId:_this.form5.deptId
  2038. }
  2039. listNhhncy(params).then((response) => {
  2040. _this.hncylist = response.rows
  2041. })
  2042. }
  2043. })
  2044. });
  2045. }
  2046. } else if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 0){
  2047. if(this.form5.xb!='0'){
  2048. Dialog.confirm({
  2049. title: '警告',
  2050. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  2051. })
  2052. .then(() => {
  2053. // on confirm
  2054. addNhhncy(this.form5).then(response => {
  2055. let _this =this
  2056. this.$toast({
  2057. icon: 'success', // 找到自己需要的图标
  2058. message: '保存成功',
  2059. duration:"1000",
  2060. onClose:function(){
  2061. _this.totalR+=1
  2062. _this.showhncy = false
  2063. let params = {
  2064. "nhdm":_this.form5.nhdm,
  2065. deptId:_this.form5.deptId
  2066. }
  2067. listNhhncy(params).then((response) => {
  2068. _this.hncylist = response.rows
  2069. })
  2070. }
  2071. })
  2072. });
  2073. })
  2074. .catch(() => {
  2075. // on cancel
  2076. });
  2077. }else{
  2078. addNhhncy(this.form5).then(response => {
  2079. let _this =this
  2080. this.$toast({
  2081. icon: 'success', // 找到自己需要的图标
  2082. message: '保存成功',
  2083. duration:"1000",
  2084. onClose:function(){
  2085. _this.totalR+=1
  2086. _this.showhncy = false
  2087. let params = {
  2088. "nhdm":_this.form5.nhdm,
  2089. deptId:_this.form5.deptId
  2090. }
  2091. listNhhncy(params).then((response) => {
  2092. _this.hncylist = response.rows
  2093. })
  2094. }
  2095. })
  2096. });
  2097. }
  2098. }else{
  2099. addNhhncy(this.form5).then(response => {
  2100. let _this =this
  2101. this.$toast({
  2102. icon: 'success', // 找到自己需要的图标
  2103. message: '保存成功',
  2104. duration:"1000",
  2105. onClose:function(){
  2106. _this.totalR+=1
  2107. _this.showhncy = false
  2108. let params = {
  2109. "nhdm":_this.form5.nhdm,
  2110. deptId:_this.form5.deptId
  2111. }
  2112. listNhhncy(params).then((response) => {
  2113. _this.hncylist = response.rows
  2114. })
  2115. }
  2116. })
  2117. });
  2118. }
  2119. }
  2120. },
  2121. mapShow() {
  2122. //删除地图选中状态
  2123. $("#deleteHistoryMap").trigger("click");
  2124. //通过数据直接查询方式--------加载较慢 start
  2125. //镇边界获取
  2126. // listTown().then(response => {
  2127. // if (response.code == 200) {
  2128. // this.mapTownList = response.rows;
  2129. // //村边界获取
  2130. // listVillage(this.queryParams).then(response => {
  2131. // this.mapVillageList = response.rows;
  2132. // listZjdzd().then((response) => {
  2133. // if (response.code == 200) {
  2134. // this.mapTheGeomZjdId= response.rows;
  2135. // listZrz().then((response) => {
  2136. // if (response.code == 200) {
  2137. // this.mapTheGeomZrzId = response.rows;
  2138. // listFsss().then((response) => {
  2139. // if (response.code == 200) {
  2140. // this.mapTheGeomFsssId = response.rows;
  2141. // }
  2142. // setTimeout(() => {
  2143. // this.GetMapsInit();
  2144. // }, 300);
  2145. // });
  2146. // }
  2147. // });
  2148. // }
  2149. // });
  2150. // });
  2151. // }
  2152. // });
  2153. //通过数据直接查询方式--------加载较慢 end
  2154. getGeoServerConfigKey().then(response => {
  2155. this.mapGeoServerUrl = response.msg;
  2156. setTimeout(() => {
  2157. this.GetMapsInit();
  2158. }, 300);
  2159. });
  2160. var that = this;
  2161. setTimeout(function () {
  2162. var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
  2163. that.bottomHeight = -height+'px'
  2164. },500)
  2165. },
  2166. //地图加载 -----start
  2167. GetMapsInit() {
  2168. //加载地图编辑
  2169. var that = this;
  2170. var map;
  2171. //点击事件添加样式
  2172. var hc_land_on;
  2173. document.getElementById("mapWrapAll").innerHTML = '';
  2174. var hc_land;
  2175. var projection = new ol.proj.Projection({
  2176. //地图投影类型
  2177. code: "EPSG:3857",
  2178. units: "degrees",
  2179. //extent:extent
  2180. });
  2181. var aerial = new ol.layer.Tile({
  2182. source: new ol.source.XYZ({
  2183. // url: "http://t0.tianditu.gov.cn/img_w/wmts?" +
  2184. // "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
  2185. // "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067",
  2186. url: "http://t{0-7}.tianditu.com/img_w/wmts?" +
  2187. "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
  2188. "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067",
  2189. }),
  2190. isGroup: true,
  2191. name: "卫星影像图",
  2192. });
  2193. var yingxzi = new ol.layer.Tile({
  2194. source: new ol.source.XYZ({
  2195. url: "http://t{0-7}.tianditu.com/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk= ",
  2196. }),
  2197. isGroup: true,
  2198. name: "天地图文字标注--卫星影像图",
  2199. });
  2200. //加载地图
  2201. map = new ol.Map({
  2202. controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]), //隐藏放大缩小按钮
  2203. layers: [aerial, yingxzi],
  2204. projection: projection,
  2205. target: "mapWrapAll",
  2206. view: new ol.View({
  2207. //center: ol.proj.fromLonLat([115.452752, 31.789033]),
  2208. //center: ol.proj.fromLonLat([115.452752, 31.789033]),
  2209. zoom: 10,
  2210. minZoom: 5, //地图缩小限制
  2211. maxZoom: 18.3, //地图放大限制
  2212. resolution: Math.random() * 0.00000001,
  2213. }),
  2214. interactions: ol.interaction.defaults({
  2215. pinchRotate: false // 移动端禁止地图旋转
  2216. }),
  2217. });
  2218. //使用geoserver服务查询开始 -------------------start
  2219. //镇边界查询开始 ------------------------------start
  2220. // var zhenTc= new ol.layer.Tile({
  2221. // source: new ol.source.TileWMS({
  2222. // url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  2223. // params: {
  2224. // LAYERS: 'zjd_dc:t_house_survey_border_town',
  2225. // TILED: true,
  2226. // //cql_filter: cql_filter,
  2227. // SRID: 3857,
  2228. // },
  2229. // }),
  2230. // });
  2231. // map.addLayer(zhenTc);
  2232. //镇边界查询开始 ------------------------------end
  2233. //村边界查询开始 ------------------------------start
  2234. var cql_filter = "dept_id='" + that.$cookies.get("item").deptId + "'";
  2235. var cunTc = new ol.layer.Image({
  2236. source: new ol.source.ImageWMS({
  2237. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  2238. params: {
  2239. LAYERS: 'zjd_dc:t_house_survey_border_village',
  2240. TILED: true,
  2241. cql_filter: cql_filter,
  2242. SRID: 3857,
  2243. TIMESTAMP: new Date().getTime(),
  2244. },
  2245. resolution: Math.random() * 0.00000001,
  2246. }),
  2247. });
  2248. // //定位查询位置
  2249. // let param_dw = {
  2250. // srsName: "EPSG:3857",
  2251. // service: "WFS",
  2252. // version: "1.0.0",
  2253. // request: "GetFeature",
  2254. // typename: "zjd_dc:t_house_survey_border_village",
  2255. // //featureNS: 'nsgk_hc',//命名空间 URI
  2256. // cql_filter: cql_filter,
  2257. // //featurePrefix: 'nationalwater',//工作区名称
  2258. // //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
  2259. // outputFormat: "application/json",
  2260. // //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
  2261. // };
  2262. // let url_dw = that.mapGeoServerUrl + "/geoserver/zjd_dc/wfs"; //wfsurl;
  2263. // url_dw = url_dw + "?";
  2264. // for (let key in param_dw) {
  2265. // url_dw = url_dw + key + "=" + param_dw[key] + "&";
  2266. // }
  2267. // url_dw = url_dw.substr(0, url_dw.length - 1);
  2268. // fetch(url_dw, {
  2269. // method: "POST", // *GET, POST, PUT, DELETE, etc.
  2270. // })
  2271. // .then((res) => {
  2272. // var geojsonmap = res.json();
  2273. // return geojsonmap;
  2274. // })
  2275. // .then((data) => {
  2276. // if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "{") {
  2277. // //自然幢图层查询开始 ------------------start
  2278. // var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + that.mapZjdData.zjddm + "'";
  2279. // zrzTc = new ol.layer.Image({
  2280. // source: new ol.source.ImageWMS({
  2281. // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  2282. // params: {
  2283. // LAYERS: 'zjd_dc:t_house_survey_zrz',
  2284. // TILED: true,
  2285. // cql_filter: cql_filter_map,
  2286. // SRID: 3857,
  2287. // TIMESTAMP: new Date().getTime(),
  2288. // },
  2289. // }),
  2290. // });
  2291. // map.addLayer(zrzTc);
  2292. // //自然幢图层查询开始 ------------------start
  2293. // //附属设施图层查询开始 ------------------start
  2294. // //var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
  2295. // fsssTc = new ol.layer.Image({
  2296. // source: new ol.source.ImageWMS({
  2297. // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  2298. // params: {
  2299. // LAYERS: 'zjd_dc:t_house_survey_fsss',
  2300. // TILED: true,
  2301. // cql_filter: cql_filter_map,
  2302. // SRID: 3857,
  2303. // TIMESTAMP: new Date().getTime(),
  2304. // },
  2305. // }),
  2306. // });
  2307. // map.addLayer(fsssTc);
  2308. // //附属设施图层查询开始 ------------------end
  2309. // hc_land_on = new ol.layer.Vector({
  2310. // title: "add Layer",
  2311. // source: new ol.source.Vector({
  2312. // projection: projection,
  2313. // features: new ol.format.GeoJSON().readFeatures(that.backTheGeom),
  2314. // }),
  2315. // style: new ol.style.Style({
  2316. // stroke: new ol.style.Stroke({
  2317. // //边界样式
  2318. // color: "#CCFF66",
  2319. // width: 6,
  2320. // }),
  2321. // }),
  2322. // });
  2323. // map.addLayer(hc_land_on);
  2324. // var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  2325. // var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  2326. // var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  2327. // var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  2328. // //定位查询位置
  2329. // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  2330. // that.clickBbox = center;
  2331. // console.log(that.mapZjdData);
  2332. // that.textMjAll = that.mapZjdData.zdmj;
  2333. // map.getView().animate({
  2334. // // 只设置需要的属性即可
  2335. // center: center, // 中心点
  2336. // zoom: 17.9, // 缩放级别
  2337. // rotation: undefined, // 缩放完成view视图旋转弧度
  2338. // duration: 1000, // 缩放持续时间,默认不需要设置
  2339. // resolution: Math.random() * 0.00000001,
  2340. // });
  2341. // //this.backMap =1;
  2342. // } else if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "[") {
  2343. // //that.newHt ="1";
  2344. // var zbNew = JSON.stringify({
  2345. // "type": "MultiPolygon",
  2346. // "coordinates": [that.backTheGeom.replaceAll("\"", "")]
  2347. // });
  2348. // var leftJoin = zbNew.replace("\"[", "[");
  2349. // var rightJoin = leftJoin.replace("\"]", "]");
  2350. // hc_land_on = new ol.layer.Vector({
  2351. // title: "add Layer",
  2352. // source: new ol.source.Vector({
  2353. // projection: projection,
  2354. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  2355. // " \"type\": \"Feature\",\n" +
  2356. // " \"geometry\":" + rightJoin + "}"),
  2357. // }),
  2358. // style: new ol.style.Style({
  2359. // fill: new ol.style.Fill({
  2360. // //矢量图层填充颜色,以及透明度
  2361. // color: "rgba(204, 255, 204,0.3)",
  2362. // }),
  2363. // stroke: new ol.style.Stroke({
  2364. // //边界样式
  2365. // color: "#CCFF66",
  2366. // width: 3,
  2367. // }),
  2368. // }),
  2369. // });
  2370. // map.addLayer(hc_land_on);
  2371. // var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  2372. // var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  2373. // var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  2374. // var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  2375. // //定位查询位置
  2376. // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  2377. // that.clickBbox = center;
  2378. // that.textMjAll = that.mapZjdData.zdmj;
  2379. // map.getView().animate({
  2380. // // 只设置需要的属性即可
  2381. // center: center, // 中心点
  2382. // zoom: 16.9, // 缩放级别
  2383. // rotation: undefined, // 缩放完成view视图旋转弧度
  2384. // duration: 1000, // 缩放持续时间,默认不需要设置
  2385. // resolution: Math.random() * 0.00000001,
  2386. // });
  2387. // //this.backMap =1;
  2388. // } else {
  2389. // //通过村界大小视图显示
  2390. // // let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize());
  2391. // // resolution:resolution + Math.random() * 0.00000001,
  2392. // // map.getView().fit(data.bbox);
  2393. // // map.getView().setResolution(resolution);
  2394. // // //初始视图大小控制
  2395. // // map.getView().setZoom(16.0);
  2396. // console.log(data);
  2397. // console.log(data.features[0].geometry.coordinates[0][0][0]);
  2398. // map.getView().animate({
  2399. // // 只设置需要的属性即可
  2400. // center: data.features[0].geometry.coordinates[0][0][0], // 中心点
  2401. // zoom: 16.9, // 缩放级别
  2402. // rotation: undefined, // 缩放完成view视图旋转弧度
  2403. // duration: 1000, // 缩放持续时间,默认不需要设置
  2404. // resolution: Math.random() * 0.00000001,
  2405. // });
  2406. // }
  2407. // })
  2408. // .catch((error) => {
  2409. // console.log("【异常】", error);
  2410. // });
  2411. map.addLayer(cunTc);
  2412. //村边界查询开始 ------------------------------end
  2413. //国有数据加载-----------------------------------start
  2414. deptGetId(that.$cookies.get("item").deptId).then((res) => {
  2415. var cql_filter_guoyou = "ZLDWDM='" + res.data.orgCode + "0000000'";
  2416. var guoyouTc = new ol.layer.Image({
  2417. source: new ol.source.ImageWMS({
  2418. url: that.mapGeoServerUrl + "/geoserver/zjd_gydl/wms",
  2419. params: {
  2420. LAYERS: 'zjd_gydl:DLTB',
  2421. TILED: true,
  2422. cql_filter: cql_filter_guoyou,
  2423. SRID: 3857,
  2424. TIMESTAMP: new Date().getTime(),
  2425. },
  2426. }),
  2427. });
  2428. map.addLayer(guoyouTc);
  2429. });
  2430. //国有数据加载----------------------------------end
  2431. //宅基地图层查询开始 ------------------start
  2432. //var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'";
  2433. var zjdTc = new ol.layer.Image({
  2434. source: new ol.source.ImageWMS({
  2435. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  2436. params: {
  2437. LAYERS: 'zjd_dc:t_house_survey_zjdzd',
  2438. TILED: true,
  2439. cql_filter: cql_filter,
  2440. SRID: 3857,
  2441. TIMESTAMP: new Date().getTime(),
  2442. },
  2443. }),
  2444. });
  2445. //定位查询位置
  2446. let param_zjdzd = {
  2447. srsName: "EPSG:3857",
  2448. service: "WFS",
  2449. version: "1.0.0",
  2450. request: "GetFeature",
  2451. typename: "zjd_dc:t_house_survey_zjdzd",
  2452. //featureNS: 'nsgk_hc',//命名空间 URI
  2453. cql_filter: cql_filter,
  2454. //featurePrefix: 'nationalwater',//工作区名称
  2455. //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
  2456. outputFormat: "application/json",
  2457. maxFeatures:1,
  2458. //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
  2459. };
  2460. let url_zjdzd = that.mapGeoServerUrl + "/geoserver/zjd_dc/wfs"; //wfsurl;
  2461. url_zjdzd = url_zjdzd + "?";
  2462. for (let key in param_zjdzd) {
  2463. url_zjdzd = url_zjdzd + key + "=" + param_zjdzd[key] + "&";
  2464. }
  2465. url_zjdzd = url_zjdzd.substr(0, url_zjdzd.length - 1);
  2466. fetch(url_zjdzd, {
  2467. method: "POST", // *GET, POST, PUT, DELETE, etc.
  2468. })
  2469. .then((res) => {
  2470. var geojsonmap = res.json();
  2471. return geojsonmap;
  2472. })
  2473. .then((data) => {
  2474. if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "{") {
  2475. //自然幢图层查询开始 ------------------start
  2476. var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + that.mapZjdData.zjddm + "'";
  2477. zrzTc = new ol.layer.Image({
  2478. source: new ol.source.ImageWMS({
  2479. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  2480. params: {
  2481. LAYERS: 'zjd_dc:t_house_survey_zrz',
  2482. TILED: true,
  2483. cql_filter: cql_filter_map,
  2484. SRID: 3857,
  2485. TIMESTAMP: new Date().getTime(),
  2486. },
  2487. }),
  2488. });
  2489. map.addLayer(zrzTc);
  2490. //自然幢图层查询开始 ------------------start
  2491. //附属设施图层查询开始 ------------------start
  2492. //var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
  2493. fsssTc = new ol.layer.Image({
  2494. source: new ol.source.ImageWMS({
  2495. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  2496. params: {
  2497. LAYERS: 'zjd_dc:t_house_survey_fsss',
  2498. TILED: true,
  2499. cql_filter: cql_filter_map,
  2500. SRID: 3857,
  2501. TIMESTAMP: new Date().getTime(),
  2502. },
  2503. }),
  2504. });
  2505. map.addLayer(fsssTc);
  2506. //附属设施图层查询开始 ------------------end
  2507. hc_land_on = new ol.layer.Vector({
  2508. title: "add Layer",
  2509. source: new ol.source.Vector({
  2510. projection: projection,
  2511. features: new ol.format.GeoJSON().readFeatures(that.backTheGeom),
  2512. }),
  2513. style: new ol.style.Style({
  2514. stroke: new ol.style.Stroke({
  2515. //边界样式
  2516. color: "#CCFF66",
  2517. width: 6,
  2518. }),
  2519. }),
  2520. });
  2521. map.addLayer(hc_land_on);
  2522. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  2523. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  2524. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  2525. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  2526. //定位查询位置
  2527. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  2528. that.clickBbox = center;
  2529. console.log(that.mapZjdData);
  2530. that.textMjAll = that.mapZjdData.zdmj;
  2531. map.getView().animate({
  2532. // 只设置需要的属性即可
  2533. center: center, // 中心点
  2534. zoom: 17.9, // 缩放级别
  2535. rotation: undefined, // 缩放完成view视图旋转弧度
  2536. duration: 1000, // 缩放持续时间,默认不需要设置
  2537. resolution: Math.random() * 0.00000001,
  2538. });
  2539. //this.backMap =1;
  2540. } else if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "[") {
  2541. //that.newHt ="1";
  2542. var zbNew = JSON.stringify({
  2543. "type": "MultiPolygon",
  2544. "coordinates": [that.backTheGeom.replaceAll("\"", "")]
  2545. });
  2546. var leftJoin = zbNew.replace("\"[", "[");
  2547. var rightJoin = leftJoin.replace("\"]", "]");
  2548. hc_land_on = new ol.layer.Vector({
  2549. title: "add Layer",
  2550. source: new ol.source.Vector({
  2551. projection: projection,
  2552. features: new ol.format.GeoJSON().readFeatures("{\n" +
  2553. " \"type\": \"Feature\",\n" +
  2554. " \"geometry\":" + rightJoin + "}"),
  2555. }),
  2556. style: new ol.style.Style({
  2557. fill: new ol.style.Fill({
  2558. //矢量图层填充颜色,以及透明度
  2559. color: "rgba(204, 255, 204,0.3)",
  2560. }),
  2561. stroke: new ol.style.Stroke({
  2562. //边界样式
  2563. color: "#CCFF66",
  2564. width: 3,
  2565. }),
  2566. }),
  2567. });
  2568. map.addLayer(hc_land_on);
  2569. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  2570. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  2571. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  2572. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  2573. //定位查询位置
  2574. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  2575. that.clickBbox = center;
  2576. that.textMjAll = that.mapZjdData.zdmj;
  2577. map.getView().animate({
  2578. // 只设置需要的属性即可
  2579. center: center, // 中心点
  2580. zoom: 16.9, // 缩放级别
  2581. rotation: undefined, // 缩放完成view视图旋转弧度
  2582. duration: 1000, // 缩放持续时间,默认不需要设置
  2583. resolution: Math.random() * 0.00000001,
  2584. });
  2585. //this.backMap =1;
  2586. } else {
  2587. //通过村界大小视图显示
  2588. // let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize());
  2589. // resolution:resolution + Math.random() * 0.00000001,
  2590. // map.getView().fit(data.bbox);
  2591. // map.getView().setResolution(resolution);
  2592. // //初始视图大小控制
  2593. // map.getView().setZoom(16.0);
  2594. map.getView().animate({
  2595. // 只设置需要的属性即可
  2596. center: data.features[0].geometry.coordinates[0][0][0], // 中心点
  2597. zoom: 15.9, // 缩放级别
  2598. rotation: undefined, // 缩放完成view视图旋转弧度
  2599. duration: 1000, // 缩放持续时间,默认不需要设置
  2600. resolution: Math.random() * 0.00000001,
  2601. });
  2602. }
  2603. })
  2604. .catch((error) => {
  2605. console.log("【异常】", error);
  2606. });
  2607. map.addLayer(zjdTc);
  2608. //宅基地图层查询开始 ------------------start
  2609. var zrzTc;
  2610. // //自然幢图层查询开始 ------------------start
  2611. // var zrzTc = new ol.layer.Image({
  2612. // source: new ol.source.ImageWMS({
  2613. // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  2614. // params: {
  2615. // LAYERS: 'zjd_dc:t_house_survey_zrz',
  2616. // TILED: true,
  2617. // cql_filter: cql_filter,
  2618. // SRID: 3857,
  2619. // TIMESTAMP: new Date().getTime(),
  2620. // },
  2621. // }),
  2622. // });
  2623. // map.addLayer(zrzTc);
  2624. // //自然幢图层查询开始 ------------------start
  2625. //
  2626. var fsssTc;
  2627. // //附属设施图层查询开始 ------------------start
  2628. // var fsssTc = new ol.layer.Image({
  2629. // source: new ol.source.ImageWMS({
  2630. // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  2631. // params: {
  2632. // LAYERS: 'zjd_dc:t_house_survey_fsss',
  2633. // TILED: true,
  2634. // cql_filter: cql_filter,
  2635. // SRID: 3857,
  2636. // TIMESTAMP: new Date().getTime(),
  2637. // },
  2638. // }),
  2639. // });
  2640. // map.addLayer(fsssTc);
  2641. // //附属设施图层查询开始 ------------------start
  2642. //使用geoserver服务查询开始 -------------------end
  2643. // if(this.backMap ==1){
  2644. // var cql = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + this.mapZjdTeAll.mapZjdAData.zjddm + "'";
  2645. // var wmsSourceBack = new ol.source.ImageWMS({
  2646. // crossOrigin: 'anonymous',
  2647. // params: {
  2648. // LAYERS: 'zjd_dc:t_house_survey_all',
  2649. // 'VERSION': '1.1.0',
  2650. // 'FORMAT': "image/png",
  2651. // 'CQL_FILTER': cql
  2652. // },
  2653. // serverType: 'geoserver',
  2654. // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  2655. // });
  2656. // zjdTc.setSource(wmsSourceBack);
  2657. // ol.view.setResolution(ol.view.getResolution() + Math.random() * 0.00000001);//随机数缩放实现刷新
  2658. // }
  2659. //数据库直接加载数据渲染方式---------------------------------------------------start
  2660. //判断当前账套是否有数据
  2661. // var mapTalkAbout = true;
  2662. // //获取镇界线----start
  2663. // if(this.mapTownList.length >0){
  2664. // for (var i = 0; this.mapTownList.length > i; i++) {
  2665. // if (this.mapTownList[i] != null && this.mapTownList[i].theGeom != null && this.mapTownList[i].theGeom != "") {
  2666. // mapTalkAbout =false;
  2667. // this.mapTownList[i].createBy = 'mapTownList';
  2668. // var theGeomLine= this.mapTownList[i].theGeom.replaceAll("MultiPolygon","LineString");
  2669. // theGeomLine = theGeomLine.replaceAll("[[[[","[[");
  2670. // theGeomLine = theGeomLine.replaceAll("]]]]","]]");
  2671. // hc_land = new ol.layer.Vector({
  2672. // title: "add Layer",
  2673. // source: new ol.source.Vector({
  2674. // projection: projection,
  2675. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  2676. // " \"type\": \"Feature\",\n" +
  2677. // " \"geometry\":" + theGeomLine + ", \"properties\":" + JSON.stringify(this.mapTownList[i]) + "}"),
  2678. // }),
  2679. // style: new ol.style.Style({
  2680. // fill: new ol.style.Fill({
  2681. // //矢量图层填充颜色,以及透明度
  2682. // color: "#AE57A4",
  2683. // }),
  2684. // stroke: new ol.style.Stroke({
  2685. // //边界样式
  2686. // color: "#FF0000",
  2687. // width: 3,
  2688. // }),
  2689. // // text: new ol.style.Text({
  2690. // // text: this.mapTownList[i].xzqmc,
  2691. // // font: '30px sans-serif',
  2692. // // textAlign: "center",
  2693. // // textBaseline: "middle",
  2694. // // //font: 'verdana',
  2695. // // fill: new ol.style.Fill({
  2696. // // color: "#ff0000"
  2697. // // }),
  2698. // // // backgroundFill: new ol.style.Fill({
  2699. // // // color: "#ff0000"
  2700. // // // }),
  2701. // // font: "30px sans-serif",
  2702. // // stroke: new ol.style.Stroke({
  2703. // // color: "#ffffff"
  2704. // // // width: 3
  2705. // // }),
  2706. // // offsetX: parseInt(0, 10),
  2707. // // offsetY: parseInt(0, 10),
  2708. // // placement: "line", //point 则自动计算面的中心k点然后标注 line 则根据面要素的边进行标注
  2709. // // overflow: false //超出面的部分不显示
  2710. // //}),
  2711. // }),
  2712. // });
  2713. // map.addLayer(hc_land);
  2714. // //console.log(hc_land.values_.source.featuresRtree_.rbush_.data);
  2715. // var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX;
  2716. // var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY;
  2717. // var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX;
  2718. // var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY;
  2719. // // //定位查询位置
  2720. // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  2721. // // console.log(center);
  2722. // map.getView().animate({
  2723. // // 只设置需要的属性即可
  2724. // center: center, // 中心点
  2725. // zoom: 9.8, // 缩放级别
  2726. // rotation: undefined, // 缩放完成view视图旋转弧度
  2727. // duration: 1000, // 缩放持续时间,默认不需要设置
  2728. // });
  2729. // }
  2730. // }
  2731. // }
  2732. // //获取镇界线----end
  2733. // //获取村界线----start
  2734. // if(this.mapVillageList.length >0){
  2735. // for (var i = 0; this.mapVillageList.length > i; i++) {
  2736. // if (this.mapVillageList[i] != null && this.mapVillageList[i].theGeom != null && this.mapVillageList[i].theGeom != "") {
  2737. // mapTalkAbout =false;
  2738. // this.mapVillageList[i].createBy = 'mapVillageList';
  2739. // var theGeomLine= this.mapVillageList[i].theGeom.replaceAll("MultiPolygon","LineString");
  2740. // theGeomLine = theGeomLine.replaceAll("[[[[","[[");
  2741. // theGeomLine = theGeomLine.replaceAll("]]]]","]]");
  2742. // hc_land = new ol.layer.Vector({
  2743. // title: "add Layer",
  2744. // source: new ol.source.Vector({
  2745. // projection: projection,
  2746. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  2747. // " \"type\": \"Feature\",\n" +
  2748. // " \"geometry\":" + theGeomLine + ", \"properties\":" + JSON.stringify(this.mapVillageList[i]) + "}"),
  2749. // }),
  2750. // style: new ol.style.Style({
  2751. // fill: new ol.style.Fill({
  2752. // //矢量图层填充颜色,以及透明度
  2753. // color: "#AE57A4",
  2754. // }),
  2755. // stroke: new ol.style.Stroke({
  2756. // //边界样式
  2757. // color: "#ff00ff",
  2758. // width: 3,
  2759. // }),
  2760. // // text: new ol.style.Text({
  2761. // // text: this.mapVillageList[i].dcmj,
  2762. // // font: '30px sans-serif',
  2763. // // textAlign: "center",
  2764. // // textBaseline: "middle",
  2765. // // //font: 'verdana',
  2766. // // fill: new ol.style.Fill({
  2767. // // color: "#ff00ff"
  2768. // // }),
  2769. // // // backgroundFill: new ol.style.Fill({
  2770. // // // color: "#ff0000"
  2771. // // // }),
  2772. // // font: "30px sans-serif",
  2773. // // stroke: new ol.style.Stroke({
  2774. // // color: "#ffffff"
  2775. // // // width: 3
  2776. // // }),
  2777. // // offsetX: parseInt(0, 10),
  2778. // // offsetY: parseInt(0, 10),
  2779. // // placement: "line", //point 则自动计算面的中心k点然后标注 line 则根据面要素的边进行标注
  2780. // // overflow: false //超出面的部分不显示
  2781. // // }),
  2782. // }),
  2783. // });
  2784. // map.addLayer(hc_land);
  2785. // }
  2786. // }
  2787. // }
  2788. // // //获取村界线----end
  2789. // //宅基地定位开始 ---------start
  2790. // if(this.mapTheGeomZjdId.length >0) {
  2791. // for (var i = 0; this.mapTheGeomZjdId.length > i; i++) {
  2792. // if (this.mapTheGeomZjdId[i] !=null && this.mapTheGeomZjdId[i].theGeom != null && this.mapTheGeomZjdId[i].theGeom != "") {
  2793. // mapTalkAbout =false;
  2794. // this.mapTheGeomZjdId[i].createBy = 'mapTheGeomZjdId';
  2795. // var styleYqr = "";
  2796. // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
  2797. // styleYqr = new ol.style.Style({
  2798. // fill: new ol.style.Fill({
  2799. // //矢量图层填充颜色,以及透明度
  2800. // color: "#AE57A4",
  2801. // }),
  2802. // stroke: new ol.style.Stroke({
  2803. // //边界样式
  2804. // color: "#28FF28",
  2805. // width: 3,
  2806. // }),
  2807. // });
  2808. // } else {
  2809. // styleYqr = new ol.style.Style({
  2810. // fill: new ol.style.Fill({
  2811. // //矢量图层填充颜色,以及透明度
  2812. // color: "#AE57A4",
  2813. // }),
  2814. // stroke: new ol.style.Stroke({
  2815. // //边界样式
  2816. // color: "rgba(255, 45, 45,1)",
  2817. // width: 3,
  2818. // }),
  2819. // });
  2820. // }
  2821. // hc_land = new ol.layer.Vector({
  2822. // title: "add Layer",
  2823. // source: new ol.source.Vector({
  2824. // projection: projection,
  2825. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  2826. // " \"type\": \"Feature\",\n" +
  2827. // " \"geometry\":" + this.mapTheGeomZjdId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomZjdId[i]) + "}"),
  2828. // }),
  2829. // style: styleYqr
  2830. // });
  2831. // map.addLayer(hc_land);
  2832. // // var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX;
  2833. // // var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY;
  2834. // // var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX;
  2835. // // var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY;
  2836. // // //定位查询位置
  2837. // // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  2838. // // map.getView().animate({
  2839. // // // 只设置需要的属性即可
  2840. // // center: center, // 中心点
  2841. // // zoom: 15.8, // 缩放级别
  2842. // // rotation: undefined, // 缩放完成view视图旋转弧度
  2843. // // duration: 1000, // 缩放持续时间,默认不需要设置
  2844. // // });
  2845. // //自然幢定位开始 ---------start
  2846. // getZrzZjdDmList(this.mapTheGeomZjdId[i].zjddm).then((response) => {
  2847. // if (response.code == 200) {
  2848. // this.mapTheGeomZrzId = response.data;
  2849. // if(this.mapTheGeomZrzId.length >0) {
  2850. // for (var i = 0; this.mapTheGeomZrzId.length > i; i++) {
  2851. // if (this.mapTheGeomZrzId[i] !=null && this.mapTheGeomZrzId[i].theGeom != null && this.mapTheGeomZrzId[i].theGeom != "") {
  2852. // this.mapTheGeomZrzId[i].createBy = 'mapTheGeomZrzId';
  2853. // var styleZrz = "";
  2854. // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
  2855. // styleZrz = new ol.style.Style({
  2856. // fill: new ol.style.Fill({
  2857. // //矢量图层填充颜色,以及透明度
  2858. // color: "#FFD306",
  2859. // }),
  2860. // stroke: new ol.style.Stroke({
  2861. // //边界样式
  2862. // color: "#28FF28",
  2863. // width: 3,
  2864. // }),
  2865. // });
  2866. // } else {
  2867. // styleZrz = new ol.style.Style({
  2868. // fill: new ol.style.Fill({
  2869. // //矢量图层填充颜色,以及透明度
  2870. // color: "#FFD306",
  2871. // }),
  2872. // stroke: new ol.style.Stroke({
  2873. // //边界样式
  2874. // color: "rgba(255, 45, 45,1)",
  2875. // width: 3,
  2876. // }),
  2877. // });
  2878. // }
  2879. // hc_land = new ol.layer.Vector({
  2880. // title: "add Layer",
  2881. // source: new ol.source.Vector({
  2882. // projection: projection,
  2883. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  2884. // " \"type\": \"Feature\",\n" +
  2885. // " \"geometry\":" + this.mapTheGeomZrzId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomZrzId[i]) + "}"),
  2886. // }),
  2887. // style: styleZrz
  2888. // });
  2889. // map.addLayer(hc_land);
  2890. // }
  2891. // }
  2892. // }
  2893. // }
  2894. // });
  2895. // //自然幢定位结束 ---------end
  2896. //
  2897. // //附属设施定位开始 ---------start
  2898. // getFsssZjdDmList(this.mapTheGeomZjdId[i].zjddm).then((response) => {
  2899. // if (response.code == 200) {
  2900. // this.mapTheGeomFsssId = response.data;
  2901. // if(this.mapTheGeomFsssId.length >0) {
  2902. // for (var i = 0; this.mapTheGeomFsssId.length > i; i++) {
  2903. // if (this.mapTheGeomFsssId[i] !=null && this.mapTheGeomFsssId[i].theGeom != null && this.mapTheGeomFsssId[i].theGeom != "") {
  2904. // this.mapTheGeomFsssId[i].createBy = 'mapTheGeomFsssId';
  2905. // var styleFsss = "";
  2906. // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
  2907. // styleFsss = new ol.style.Style({
  2908. // fill: new ol.style.Fill({
  2909. // //矢量图层填充颜色,以及透明度
  2910. // color: "#00FFFF",
  2911. // }),
  2912. // stroke: new ol.style.Stroke({
  2913. // //边界样式
  2914. // color: "#28FF28",
  2915. // width: 3,
  2916. // }),
  2917. // });
  2918. // } else {
  2919. // styleFsss = new ol.style.Style({
  2920. // fill: new ol.style.Fill({
  2921. // //矢量图层填充颜色,以及透明度
  2922. // color: "#00FFFF",
  2923. // }),
  2924. // stroke: new ol.style.Stroke({
  2925. // //边界样式
  2926. // color: "rgba(255, 45, 45,1)",
  2927. // width: 3,
  2928. // }),
  2929. // });
  2930. // }
  2931. // hc_land = new ol.layer.Vector({
  2932. // title: "add Layer",
  2933. // source: new ol.source.Vector({
  2934. // projection: projection,
  2935. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  2936. // " \"type\": \"Feature\",\n" +
  2937. // " \"geometry\":" + this.mapTheGeomFsssId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomFsssId[i]) + "}"),
  2938. // }),
  2939. // style: styleFsss
  2940. // });
  2941. // map.addLayer(hc_land);
  2942. // }
  2943. // }
  2944. // }
  2945. // }
  2946. // });
  2947. // //附属设施定位结束 ---------end
  2948. // }
  2949. // }
  2950. // }
  2951. // //宅基地定位结束 ---------end
  2952. //数据库直接加载数据渲染方式---------------------------------------------------end
  2953. //地图操作定义------------start
  2954. //定位定义------------start
  2955. var Zb;
  2956. var latitude;
  2957. var longitude;
  2958. var vector_drawing;
  2959. //定位定义------------end
  2960. //绘图定义---------------start
  2961. var drawing;
  2962. var draw_map;
  2963. //绘图定义---------------end
  2964. //测面绘图定义------------start
  2965. var draw_cm;
  2966. //定义矢量图层
  2967. var vector;
  2968. //创建一个帮助提示信息对象
  2969. var helpTooltip;
  2970. //创建一个测量提示信息对象
  2971. var measureTooltip;
  2972. //创建一个帮助提示框对象
  2973. var helpTooltipElement;
  2974. //测出距离
  2975. var measureTooltipElement;
  2976. //测面绘图定义-----------end
  2977. //地图操作定义------------end
  2978. //定位当前位置 ------start
  2979. $("#dwMapAll").on("click", function () {
  2980. //删除测量记录操作--------start
  2981. //将矢量图层从图中删除
  2982. //map.removeLayer(helpTooltip);
  2983. map.removeLayer(vector);
  2984. map.removeInteraction(draw_cm);
  2985. //map.removeOverlay(helpTooltipElement);
  2986. //map.removeLayer(measureTooltip);
  2987. //删除测量记录操作--------end
  2988. //删除绘制图层画图操作-------start
  2989. map.removeInteraction(draw_map);
  2990. map.removeLayer(drawing);
  2991. //删除绘制图层画图操作-------end
  2992. //开始定位当前位置
  2993. navigator.geolocation.getCurrentPosition(function(position) {
  2994. latitude = position.coords.latitude;// 获取纬度
  2995. longitude = position.coords.longitude;// 获取经度
  2996. });
  2997. if(latitude !=null && longitude !=null && latitude !="" && longitude !="" && latitude !=undefined && longitude !=undefined ){
  2998. Zb = [longitude,latitude];
  2999. }else {
  3000. Zb =[115.452752, 31.789033];
  3001. }
  3002. //获取坐标点LocationManager
  3003. // geoGps().then(response => {
  3004. //
  3005. // });
  3006. //矢量标注样式设置函数,设置image为图标ol.style.Icon
  3007. function createLabelStyle() {
  3008. return new ol.style.Style({
  3009. image: new ol.style.Icon({
  3010. //设置图标偏移
  3011. anchor: [0.5, 1],
  3012. //标注样式的起点位置
  3013. anchorOrigin: "top-right",
  3014. //X方向单位:分数
  3015. anchorXUnits: "fraction",
  3016. //Y方向单位:像素
  3017. anchorYUnits: "pixels",
  3018. //偏移起点位置的方向
  3019. offsetOrigin: "top-right",
  3020. //透明度
  3021. opacity: 0.9,
  3022. //图片路径
  3023. src: require("../../assets/images/housesteadSurvey/mark.png"),
  3024. }),
  3025. text: new ol.style.Text({
  3026. textAlign: "center", //位置
  3027. textBaseline: "middle", //基准线
  3028. font: "normal 12px 微软雅黑", //文字样式
  3029. //text: "标注点", //文本内容
  3030. fill: new ol.style.Fill({
  3031. //文本填充样式(即文字颜色)
  3032. color: "#ff0000",
  3033. }),
  3034. }),
  3035. zIndex: 9999,
  3036. });
  3037. }
  3038. var newcenterFeature = new ol.Feature({
  3039. geometry: new ol.geom.Point(ol.proj.fromLonLat(Zb)), //几何信息
  3040. name: "标注点",
  3041. });
  3042. var sourceMapLook = new ol.source.Vector({wrapX: false});
  3043. vector_drawing = new ol.layer.Vector({
  3044. source: sourceMapLook,
  3045. });
  3046. map.addLayer(vector_drawing);
  3047. newcenterFeature.setStyle(createLabelStyle()); //设置要素样式
  3048. sourceMapLook.addFeature(newcenterFeature);
  3049. map.getView().animate({
  3050. // 只设置需要的属性即可
  3051. center: ol.proj.fromLonLat(Zb), // 中心点
  3052. zoom: 17.8, // 缩放级别
  3053. rotation: undefined, // 缩放完成view视图旋转弧度
  3054. duration: 1000, // 缩放持续时间,默认不需要设置
  3055. resolution:Math.random() * 0.00000001,
  3056. });
  3057. });
  3058. //定位当前位置 ------end
  3059. //开始绘制图层- -----start
  3060. $("#htMapAll").on("click", function () {
  3061. if(that.drawingClick) {
  3062. that.drawingClick=false;
  3063. //删除之前 测距操作添加map中的绘图 --------start
  3064. //map.removeLayer(helpTooltip);
  3065. map.removeLayer(vector);
  3066. map.removeInteraction(draw_cm);
  3067. //map.removeOverlay(helpTooltipElement);
  3068. map.removeLayer(measureTooltipElement);
  3069. //删除之前 测距操作添加map中的绘图 --------end
  3070. //删除之前画图图层,重新绘制图层
  3071. map.removeInteraction(draw_map);
  3072. map.removeLayer(drawing);
  3073. //var source = new ol.source.Vector({wrapX: false});
  3074. drawing = new ol.layer.Vector({
  3075. source: new ol.source.Vector(),
  3076. });
  3077. map.addLayer(drawing);
  3078. function addInteraction() {
  3079. draw_map = new ol.interaction.Draw({
  3080. source: drawing.getSource(),
  3081. type: "Polygon",
  3082. });
  3083. draw_map.on("drawend", function (evt) {
  3084. var feature = evt.feature;
  3085. var geometry = feature.getGeometry();
  3086. that.coordinate = geometry.getCoordinates();
  3087. //_this.coordinateList = coordinate.toString();
  3088. //提示当前坐标是否绘制完成
  3089. if (that.coordinate != "" && that.coordinate != null) {
  3090. that.showhzht = true;
  3091. that.htZjdZrzFsss = JSON.stringify(that.coordinate);
  3092. console.log(that.mapZjdData);
  3093. // htMapAllFu();
  3094. } else {
  3095. $("#htMapAll").trigger("click");
  3096. }
  3097. });
  3098. map.addInteraction(draw_map);
  3099. }
  3100. function htMapAllFu() {
  3101. //that.drawMapPolygonFun();
  3102. //绘制多边形地图
  3103. that.$dialog
  3104. .confirm({
  3105. title: "提示",
  3106. message: "是否重新绘制画图",
  3107. })
  3108. .then(() => {
  3109. //$("#drawRemove").trigger("click");
  3110. map.removeInteraction(draw_map);
  3111. that.coordinate = "";
  3112. })
  3113. .catch(() => {
  3114. //删除画图点
  3115. map.removeInteraction(draw_map);
  3116. });
  3117. }
  3118. addInteraction();
  3119. } else {
  3120. that.drawingClick=true;
  3121. //删除之前 测距操作添加map中的绘图 --------start
  3122. //map.removeLayer(helpTooltip);
  3123. map.removeLayer(vector);
  3124. map.removeInteraction(draw_cm);
  3125. //map.removeOverlay(helpTooltipElement);
  3126. map.removeLayer(measureTooltipElement);
  3127. //删除之前 测距操作添加map中的绘图 --------end
  3128. //删除之前画图图层,重新绘制图层
  3129. map.removeInteraction(draw_map);
  3130. map.removeLayer(drawing);
  3131. //var source = new ol.source.Vector({wrapX: false});
  3132. }
  3133. });
  3134. //删除之前绘制图层
  3135. $("#deleteHistory").on("click", function () {
  3136. map.removeLayer(drawing);
  3137. that.showhzht = false;
  3138. });
  3139. //开始绘制图层- -----end
  3140. //切换功能删除之前选中状态
  3141. $("#deleteHistoryMap").on("click", function () {
  3142. map.removeLayer(hc_land_on);
  3143. that.mapZjdData = "";
  3144. that.mapZrzData = "";
  3145. that.mapFsssData = "";
  3146. //that.mapZjdTeAll.active ="1";
  3147. that.mapZjdTeAll.mapZjdAData = {};
  3148. that.mapZjdTeAll.mapZrzAData = {};
  3149. that.mapZjdTeAll.mapFsssAData = {};
  3150. that.mapZjdDataTure = "";
  3151. });
  3152. //清除画图鼠标点击事件
  3153. // $("#drawRemove").click(function () {
  3154. // map.removeLayer(drawing);
  3155. // });
  3156. //
  3157. //地图定义
  3158. var delete_map = ["mapZjd", "mapZrz","mapFsss"];
  3159. var hc_land_queryList =[];
  3160. var texiao_layer_zjd;
  3161. var texiao_layer_zrz;
  3162. var texiao_layer_fsss;
  3163. //按照查询条件人名 定位地图-----------------start
  3164. $("#query").on("click", function () {
  3165. //数据库查询数据------------------------------------------------------start
  3166. $("#deleteHistoryMap").trigger("click");
  3167. var val = that.seachText;
  3168. //删除之前查询图层
  3169. for(var i=0;hc_land_queryList.length>i;i++){
  3170. map.removeLayer(hc_land_queryList[i]);
  3171. }
  3172. hc_land_queryList = [];
  3173. that.mapDataAll =[];
  3174. if (val == "") {
  3175. that.$toast('请填写查询条件再查询');
  3176. } else {
  3177. var styleZjd = new ol.style.Style({
  3178. stroke: new ol.style.Stroke({
  3179. //边界样式
  3180. color: "#CCFF66",
  3181. width: 6,
  3182. }),
  3183. });
  3184. let params;
  3185. if(that.mapAddJumpNum == 1){
  3186. params = {
  3187. "deptId" : that.mapAddJump,
  3188. "syqr" : val
  3189. }
  3190. } else {
  3191. params = {
  3192. "deptId" : that.$cookies.get("item").deptId,
  3193. "syqr" : val
  3194. }
  3195. }
  3196. listZjdzd(params).then((response) => {
  3197. if(response.rows.length != 0){
  3198. that.mapDataAll = response.rows;
  3199. for(var hg=0; hg < that.mapDataAll.length; hg++){
  3200. var mapNum = that.mapDataAll[hg].houseDataConfirmStatus;
  3201. if(mapNum == "UNCONFIRMED"){
  3202. that.mapDataAll[hg].paceType = "未核查";
  3203. } else if (mapNum == "CONFIRMED"){
  3204. that.mapDataAll[hg].paceType = "已核查";
  3205. }else{
  3206. }
  3207. that.mapDataAll[hg].typeTc="宅基地";
  3208. if (that.mapDataAll[hg] !=null && that.mapDataAll[hg].theGeom != null && that.mapDataAll[hg].theGeom != "") {
  3209. that.mapDataAll[hg].createBy = 'mapTheGeomZjdId';
  3210. hc_land_queryList[hg] =new ol.layer.Vector({
  3211. title: "add Layer",
  3212. source: new ol.source.Vector({
  3213. projection: projection,
  3214. features: new ol.format.GeoJSON().readFeatures("{\n" +
  3215. " \"type\": \"Feature\",\n" +
  3216. " \"geometry\":" + that.mapDataAll[hg].theGeom + ", \"properties\":" + JSON.stringify(that.mapDataAll[hg]) + "}"),
  3217. }),
  3218. style: styleZjd
  3219. });
  3220. map.addLayer(hc_land_queryList[hg]);
  3221. var maxXMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.maxX;
  3222. var maxYMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.maxY;
  3223. var minXMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.minX;
  3224. var minYMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.minY;
  3225. //定位查询位置
  3226. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  3227. map.getView().animate({
  3228. // 只设置需要的属性即可
  3229. center: center, // 中心点
  3230. zoom: 15.8, // 缩放级别
  3231. rotation: undefined, // 缩放完成view视图旋转弧度
  3232. duration: 1000, // 缩放持续时间,默认不需要设置
  3233. resolution:Math.random() * 0.00000001,
  3234. });
  3235. }
  3236. // listFsss(paramsZrz).then((response) => {
  3237. // that.mapDataAll.push(response.rows);
  3238. // });
  3239. }
  3240. // for(var queryFor=0; hc_land_queryList > queryFor; queryFor++ ){
  3241. // map.addLayer(hc_land_queryList[queryFor]);
  3242. // }
  3243. // var mapZrzFor = that.mapDataAll[0].length+1;
  3244. // console.log(mapZrzFor);
  3245. // for(var mapFor=0;mapZrzFor>mapFor;mapFor++){
  3246. // //查询自然幢
  3247. // let paramsZrz = {
  3248. // "deptId" : that.$cookies.get("item").deptId,
  3249. // "zjddm" : that.mapDataAll[0][mapFor].zjddm,
  3250. // "pageSize":20,
  3251. // }
  3252. // listZrz(paramsZrz).then((response) => {
  3253. // console.log(response);
  3254. // that.mapDataAll[0].
  3255. // that.mapDataAll[0].push(response.rows);
  3256. // });
  3257. // }
  3258. setTimeout(function () {
  3259. that.showSearch = true ;
  3260. $('.searchBox').css('display','block')
  3261. var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
  3262. document.styleSheets[0].insertRule(
  3263. "@keyframes test" +
  3264. "{" +
  3265. "0%{bottom: -" + height + "px;}" +
  3266. "100%{bottom: 0px;}" +
  3267. "}"
  3268. )
  3269. $('.searchBar_wrap').css({'animation':'test 0.5s ease-in-out 0s 1 alternate forwards','-webkit-animation':'test 0.5s ease-in-out 0s 1 alternate forwards'});
  3270. //}
  3271. },500);
  3272. } else {
  3273. that.$toast("暂无数据")
  3274. }
  3275. });
  3276. }
  3277. //数据库查询数据------------------------------------------------------end
  3278. //地图查询------------------------------------------------------------start
  3279. /**
  3280. * @api wfs服务空间查询
  3281. * @param {*} wfsurl
  3282. * @param {*} srsName
  3283. * @param {*} typeName
  3284. * @param {*} drawType
  3285. * @param {option 可选} geometryField
  3286. */
  3287. // var val = that.seachText;
  3288. // if (val == "") {
  3289. // that.$toast('请填写查询条件再查询');
  3290. // } else {
  3291. // //清除之前查询数据
  3292. // that.mapDataAll =[];
  3293. // //分类查询查询农地、农房
  3294. // var difang;
  3295. // //查询条件
  3296. // var cql_filter_cun;
  3297. // var cun = that.$cookies.get("item").deptId;
  3298. // difang = ["zjd_dc:t_house_survey_zjdzd", "zjd_dc:t_house_survey_zrz","zjd_dc:t_house_survey_fsss"];
  3299. // var tach = 0;
  3300. // var once = 0;
  3301. // for (var i = 0; i < difang.length; i++) {
  3302. // map.removeLayer(delete_map[i]);
  3303. // // 数字验证!
  3304. // var reg = /\d/;
  3305. // //验证汉子
  3306. // //var han = /^[\u4e00-\u9fa5]+$/;
  3307. // if (reg.test(val)) {
  3308. // //循环判断查询条件
  3309. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  3310. // } else {
  3311. // //循环判断查询条件
  3312. // if (difang[i] == "zjd_dc:t_house_survey_zjdzd") {
  3313. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  3314. // } else if(difang[i] == "zjd_dc:t_house_survey_zrz") {
  3315. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  3316. // } else if(difang[i] == "zjd_dc:t_house_survey_fsss") {
  3317. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  3318. // }
  3319. // }
  3320. // //for(var i=0; i< difang.length; i++){
  3321. // //cql_filter = "CM='"+cun +"'"+ "and XZQK='待流转待盘活'";
  3322. //
  3323. // //图层加载
  3324. //
  3325. // //业务图层 wms服务
  3326. // delete_map[i] = new ol.layer.Tile({
  3327. // source: new ol.source.TileWMS({
  3328. // url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  3329. // params: {
  3330. // LAYERS: difang[i],
  3331. // //'LAYERS': 'new_shp:new_shp_all',
  3332. // TILED: true,
  3333. // cql_filter: cql_filter_cun,
  3334. // SRID: 3857,
  3335. // },
  3336. // }),
  3337. // });
  3338. //
  3339. // //}
  3340. // //定位查询位置
  3341. // let param_dw = {
  3342. // srsName: "EPSG:3857",
  3343. // service: "WFS",
  3344. // version: "1.0.0",
  3345. // request: "GetFeature",
  3346. // typename: difang[i],
  3347. // //featureNS: 'nsgk_hc',//命名空间 URI
  3348. // cql_filter: cql_filter_cun,
  3349. // //featurePrefix: 'nationalwater',//工作区名称
  3350. // //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
  3351. // outputFormat: "application/json",
  3352. // //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
  3353. // };
  3354. // let url_dw = that.mapGeoServerUrl+"/geoserver/zjd_dc/wfs"; //wfsurl;
  3355. // url_dw = url_dw + "?";
  3356. // for (let key in param_dw) {
  3357. // url_dw = url_dw + key + "=" + param_dw[key] + "&";
  3358. // }
  3359. // url_dw = url_dw.substr(0, url_dw.length - 1);
  3360. // fetch(url_dw, {
  3361. // method: "POST", // *GET, POST, PUT, DELETE, etc.
  3362. // })
  3363. // .then((res) => {
  3364. // var geojsonmap = res.json();
  3365. // return geojsonmap;
  3366. // })
  3367. // .then((data) => {
  3368. // tach = tach + 1;
  3369. // if (data.features != null && data.features != "") {
  3370. // for(var i=0; data.features.length >i; i++) {
  3371. // //特效动画实现 -----------------------------start
  3372. // console.log(tach,"++++++++++++++++++",once)
  3373. // var datamap = data.features[0].bbox;
  3374. // if (tach == 1 && once == 0) {
  3375. // console.log("zrz")
  3376. // texiao_layer_zjd = new ol.layer.Vector({
  3377. // source: new ol.source.Vector(),
  3378. // });
  3379. // map.addLayer(texiao_layer_zjd);
  3380. // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
  3381. // var circle = new ol.Feature({
  3382. // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
  3383. // });
  3384. //
  3385. // circle.setStyle(
  3386. // new ol.style.Style({
  3387. // image: new ol.style.Circle({
  3388. // radius: 0,
  3389. // stroke: new ol.style.Stroke({
  3390. // color: "yellow",
  3391. // size: 1,
  3392. // }),
  3393. // }),
  3394. // })
  3395. // );
  3396. // texiao_layer_zjd.getSource().addFeature(circle);
  3397. //
  3398. // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
  3399. // var radius = 0;
  3400. // map.on("postcompose", function () {
  3401. // // 增大半径,最大20
  3402. // radius++;
  3403. // radius = radius % 10;
  3404. // // 设置样式
  3405. // circle.setStyle(
  3406. // new ol.style.Style({
  3407. // image: new ol.style.Circle({
  3408. // radius: radius,
  3409. // stroke: new ol.style.Stroke({
  3410. // color: "yellow",
  3411. // size: 1,
  3412. // }),
  3413. // }),
  3414. // })
  3415. // );
  3416. // });
  3417. // } else if(tach == 2) {
  3418. // console.log("zrz")
  3419. // texiao_layer_zrz = new ol.layer.Vector({
  3420. // source: new ol.source.Vector(),
  3421. // });
  3422. // map.addLayer(texiao_layer_zrz);
  3423. // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
  3424. // var circle = new ol.Feature({
  3425. // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
  3426. // });
  3427. //
  3428. // circle.setStyle(
  3429. // new ol.style.Style({
  3430. // image: new ol.style.Circle({
  3431. // radius: 0,
  3432. // stroke: new ol.style.Stroke({
  3433. // color: "yellow",
  3434. // size: 1,
  3435. // }),
  3436. // }),
  3437. // })
  3438. // );
  3439. // texiao_layer_zrz.getSource().addFeature(circle);
  3440. //
  3441. // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
  3442. // var radius = 0;
  3443. // map.on("postcompose", function () {
  3444. // // 增大半径,最大20
  3445. // radius++;
  3446. // radius = radius % 10;
  3447. // // 设置样式
  3448. // circle.setStyle(
  3449. // new ol.style.Style({
  3450. // image: new ol.style.Circle({
  3451. // radius: radius,
  3452. // stroke: new ol.style.Stroke({
  3453. // color: "yellow",
  3454. // size: 1,
  3455. // }),
  3456. // }),
  3457. // })
  3458. // );
  3459. // });
  3460. // } else {
  3461. // console.log("fsss")
  3462. // texiao_layer_fsss = new ol.layer.Vector({
  3463. // source: new ol.source.Vector(),
  3464. // });
  3465. // map.addLayer(texiao_layer_fsss);
  3466. // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
  3467. // var circle = new ol.Feature({
  3468. // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
  3469. // });
  3470. //
  3471. // circle.setStyle(
  3472. // new ol.style.Style({
  3473. // image: new ol.style.Circle({
  3474. // radius: 0,
  3475. // stroke: new ol.style.Stroke({
  3476. // color: "yellow",
  3477. // size: 1,
  3478. // }),
  3479. // }),
  3480. // })
  3481. // );
  3482. // texiao_layer_fsss.getSource().addFeature(circle);
  3483. //
  3484. // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
  3485. // var radius = 0;
  3486. // map.on("postcompose", function () {
  3487. // // 增大半径,最大20
  3488. // radius++;
  3489. // radius = radius % 10;
  3490. // // 设置样式
  3491. // circle.setStyle(
  3492. // new ol.style.Style({
  3493. // image: new ol.style.Circle({
  3494. // radius: radius,
  3495. // stroke: new ol.style.Stroke({
  3496. // color: "yellow",
  3497. // size: 1,
  3498. // }),
  3499. // }),
  3500. // })
  3501. // );
  3502. // });
  3503. // }
  3504. // //特效动画实现 -----------------------------end
  3505. // that.mapDataAll.push(JSON.parse(JSON.stringify(data.features[i].properties)));
  3506. // }
  3507. // //定位实现
  3508. // let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize());
  3509. // map.getView().fit(data.bbox);
  3510. // map.getView().setResolution(resolution);
  3511. // console.log(that.mapDataAll);
  3512. // } else if (tach == 1) {
  3513. // once = once + 1;
  3514. // } else {
  3515. // if (once == 1 && tach == 3) {
  3516. // that.$toast("没有找到相关人员信息");
  3517. // //that.showSearch = false ;
  3518. // }else {
  3519. //
  3520. // }
  3521. // }
  3522. // })
  3523. // .catch((error) => {
  3524. // console.log("【异常】", error);
  3525. // });
  3526. // map.addLayer(delete_map[i]);
  3527. // }
  3528. //地图查询------------------------------------------------------------end
  3529. });
  3530. //按照查询 定位地图-----------------end
  3531. //筛选附属设施-----------------------------------start
  3532. $("#fsssSx").click(function () {
  3533. if(!that.fsssSx){
  3534. map.addLayer(fsssTc);
  3535. }else {
  3536. map.removeLayer(fsssTc);
  3537. }
  3538. });
  3539. $("#zrzSx").click(function () {
  3540. if(!that.zrzSx){
  3541. map.addLayer(zrzTc);
  3542. }else {
  3543. map.removeLayer(zrzTc);
  3544. }
  3545. });
  3546. $("#zjdSx").click(function () {
  3547. if(!that.zjdSx){
  3548. map.addLayer(zjdTc);
  3549. }else {
  3550. map.removeLayer(zjdTc);
  3551. }
  3552. });
  3553. $("#checkAll").click(function () {
  3554. if(!that.fsssSx && !that.zjdSx && !that.zrzSx){
  3555. map.addLayer(zjdTc);
  3556. map.addLayer(zrzTc);
  3557. map.addLayer(fsssTc);
  3558. }else {
  3559. map.removeLayer(zrzTc);
  3560. map.removeLayer(zjdTc);
  3561. map.removeLayer(fsssTc);
  3562. }
  3563. });
  3564. //筛选附属设施-----------------------------------end
  3565. // //获取类型开始 侧面-----------------------------------------------------------------start
  3566. //样式加载定义
  3567. var vector_drawing_delete;
  3568. $("#area").click(function () {
  3569. console.log(that.textMjAll);
  3570. console.log(that.clickBbox);
  3571. if(that.textMjAll ==null || that.textMjAll ==""){
  3572. that.textMjAll =0;
  3573. }
  3574. if((that.textMjAll != "" && that.clickBbox !="") || (that.textMjAll == 0 && that.clickBbox !="")){
  3575. map.removeLayer(vector_drawing_delete);
  3576. function createLabelStyle() {
  3577. return new ol.style.Style({
  3578. text: new ol.style.Text({
  3579. text: that.textMjAll+"㎡",
  3580. textAlign: "center", //位置
  3581. textBaseline: "middle", //基准线
  3582. font: "normal 12px 微软雅黑", //文字样式
  3583. //text: "标注点", //文本内容
  3584. fill: new ol.style.Fill({
  3585. //文本填充样式(即文字颜色)
  3586. color: "#FFFFFF",
  3587. width: 10,
  3588. }),
  3589. overflow: false //超出面的部分不显示
  3590. }),
  3591. zIndex: 9999,
  3592. });
  3593. }
  3594. var newcenterFeature = new ol.Feature({
  3595. geometry: new ol.geom.Point(that.clickBbox), //几何信息
  3596. //name: "标注点",
  3597. });
  3598. var sourceMapLook = new ol.source.Vector({wrapX: false});
  3599. vector_drawing_delete = new ol.layer.Vector({
  3600. source: sourceMapLook,
  3601. });
  3602. map.addLayer(vector_drawing_delete);
  3603. newcenterFeature.setStyle(createLabelStyle()); //设置要素样式
  3604. sourceMapLook.addFeature(newcenterFeature);
  3605. //map.addLayer(styleFsss);
  3606. } else if(that.textMjAllNum == "1"){
  3607. that.$toast("该图层面积暂无信息");
  3608. } else {
  3609. that.$toast("选择图层进行面积显示");
  3610. }
  3611. });
  3612. // $("#area").click(function () {
  3613. // console.log("进入测面")
  3614. // //删除绘制图层画图操作-------start
  3615. // map.removeInteraction(draw_map);
  3616. // map.removeLayer(drawing);
  3617. // //删除绘制图层画图操作-------end
  3618. // //开始绘制 测面--------------------------------------------------------------start
  3619. // //定义矢量数据源
  3620. // var source = new ol.source.Vector();
  3621. //
  3622. // vector = new ol.layer.Vector({
  3623. // source: source,
  3624. // style: new ol.style.Style({
  3625. // fill: new ol.style.Fill({
  3626. // color: "rgba(255,255,255,0.2)",
  3627. // }),
  3628. // stroke: new ol.style.Stroke({
  3629. // color: "#e21e0a",
  3630. // width: 2,
  3631. // }),
  3632. // //image: new ol.style.Circle({
  3633. // // radius: 7,
  3634. // // fill: new ol.style.Fill({
  3635. // // color:'#ffcc33'
  3636. // // })
  3637. // //})
  3638. // }),
  3639. // });
  3640. //
  3641. // //将矢量图层添加到地图中 线的颜色加入map中
  3642. // map.addLayer(vector);
  3643. //
  3644. // var sketch;
  3645. //
  3646. // var continuePolygonMsg = "单击以继续绘制多边形";
  3647. //
  3648. // /**
  3649. // * Message to show when the user is drawing a line.
  3650. // * @type {string}
  3651. // */
  3652. // //var continueLineMsg = '单击继续绘制直线';
  3653. //
  3654. // //鼠标移动触发的函数
  3655. // var pointerMoveHandler = function (evt) {
  3656. // //Indicates if the map is currently being dragged.
  3657. // //Only set for POINTERDRAG and POINTERMOVE events. Default is false.
  3658. // //如果是平移地图则直接结束
  3659. // if (evt.dragging) {
  3660. // return;
  3661. // }
  3662. // //帮助提示信息
  3663. // var helpMsg = "单击开始绘图";
  3664. //
  3665. // if (sketch) {
  3666. // //Get the feature's default geometry.
  3667. // //A feature may have any number of named geometries.
  3668. // //获取绘图对象的几何要素
  3669. // var geom = sketch.getGeometry();
  3670. // //如果当前绘制的几何要素是多边形,则将绘制提示信息设置为多边形绘制提示信息
  3671. // //如果当前绘制的几何要素是多线段,则将绘制提示信息设置为多线段绘制提示信息
  3672. // helpMsg = continuePolygonMsg;
  3673. // }
  3674. // //设置帮助提示要素的内标签为帮助提示信息
  3675. // helpTooltipElement.innerHTML = helpMsg;
  3676. // //设置帮助提示信息的位置
  3677. // //The coordinate in view projection corresponding to the original browser event.
  3678. // helpTooltip.setPosition(evt.coordinate);
  3679. // //移除帮助提示要素的隐藏样式
  3680. // $(helpTooltipElement).removeClass("hidden");
  3681. // };
  3682. //
  3683. // map.on("pointermove", pointerMoveHandler);
  3684. //
  3685. // map.getViewport().addEventListener("mouseout", function () {
  3686. // helpTooltipElement.classList.add("hidden");
  3687. // });
  3688. //
  3689. // //添加交互式绘图对象的函数
  3690. // function addInteraction() {
  3691. // // 获取当前选择的绘制类型
  3692. // //var type = typeSelect.value == 'length' ? 'Polygon' : 'LineString';
  3693. // //创建一个交互式绘图对象
  3694. // var type = "Polygon";
  3695. // draw_cm = new ol.interaction.Draw({
  3696. // //绘制的数据源
  3697. // source: source,
  3698. // //绘制类型
  3699. // type: type,
  3700. // //样式
  3701. // style: new ol.style.Style({
  3702. // fill: new ol.style.Fill({
  3703. // color: "rgba(255,255,255,0.2)",
  3704. // }),
  3705. // stroke: new ol.style.Stroke({
  3706. // color: "rgba(0,0,0,0.5)",
  3707. // lineDash: [10, 10],
  3708. // width: 2,
  3709. // }),
  3710. // // image: new ol.style.Circle({
  3711. // // radius: 5,
  3712. // // stroke: new ol.style.Stroke({
  3713. // // color:'rgba(0,0,0,0.7)'
  3714. // // }),
  3715. // // fill: new ol.style.Fill({
  3716. // //color: 'rgba(255,255,255,0.2)'
  3717. // // })
  3718. // //})
  3719. // }),
  3720. // });
  3721. // //将交互绘图对象添加到地图中
  3722. // map.addInteraction(draw_cm);
  3723. //
  3724. // //创建测量提示框
  3725. // createMeasureTooltip();
  3726. // //创建帮助提示框
  3727. // createHelpTooltip();
  3728. //
  3729. // //定义一个事件监听
  3730. // var listener;
  3731. // //定义一个控制鼠标点击次数的变量
  3732. // var count = 0;
  3733. // //绘制开始事件
  3734. // draw_cm.on(
  3735. // "drawstart",
  3736. // function (evt) {
  3737. // //The feature being drawn.
  3738. // sketch = evt.feature;
  3739. // //提示框的坐标
  3740. // var tooltipCoord = evt.coordinate;
  3741. // //监听几何要素的change事件
  3742. // //Increases the revision counter and dispatches a 'change' event.
  3743. //
  3744. // listener = sketch.getGeometry().on("change", function (evt) {
  3745. // //The event target.
  3746. // //获取绘制的几何对象
  3747. // var geom = evt.target;
  3748. // //定义一个输出对象,用于记录面积和长度
  3749. // var output;
  3750. // map.removeEventListener("singleclick");
  3751. // map.removeEventListener("dblclick");
  3752. // //输出多边形的面积
  3753. // output = formatArea(geom);
  3754. // //Return an interior point of the polygon.
  3755. // //获取多变形内部点的坐标
  3756. // tooltipCoord = geom.getInteriorPoint().getCoordinates();
  3757. //
  3758. // //设置测量提示框的内标签为最终输出结果
  3759. // measureTooltipElement.innerHTML = output;
  3760. // //设置测量提示信息的位置坐标
  3761. // measureTooltip.setPosition(tooltipCoord);
  3762. // });
  3763. //
  3764. // //地图单击事件
  3765. // map.on("singleclick", function (evt) {
  3766. // //设置测量提示信息的位置坐标,用来确定鼠标点击后测量提示框的位置
  3767. // measureTooltip.setPosition(evt.coordinate);
  3768. // //如果是第一次点击,则设置测量提示框的文本内容为起点
  3769. // if (count == 0) {
  3770. // measureTooltipElement.innerHTML = "起点";
  3771. // }
  3772. // //根据鼠标点击位置生成一个点
  3773. // var point = new ol.geom.Point(evt.coordinate);
  3774. // //将该点要素添加到矢量数据源中
  3775. // source.addFeature(new ol.Feature(point));
  3776. // //更改测量提示框的样式,使测量提示框可见
  3777. // measureTooltipElement.className = "tooltip tooltip-static";
  3778. // //创建测量提示框
  3779. // createMeasureTooltip();
  3780. // //点击次数增加
  3781. // count++;
  3782. // });
  3783. //
  3784. // //地图双击事件
  3785. // map.on("dblclick", function (evt) {
  3786. // //根据
  3787. // var point = new ol.geom.Point(evt.coordinate);
  3788. // source.addFeature(new ol.Feature(point));
  3789. // });
  3790. // },
  3791. // this
  3792. // );
  3793. // //绘制结束事件
  3794. // draw_cm.on(
  3795. // "drawend",
  3796. // function (evt) {
  3797. // count = 0;
  3798. // //设置测量提示框的样式
  3799. // measureTooltipElement.className = "tooltip tooltip-static";
  3800. // //Set the offset for this overlay.
  3801. // //设置偏移量
  3802. // measureTooltip.setOffset([0, -7]);
  3803. // //清空绘制要素
  3804. // sketch = null;
  3805. // //清空测量提示要素
  3806. // measureTooltipElement = null;
  3807. // //创建测量提示框
  3808. // createMeasureTooltip();
  3809. // //Removes an event listener using the key returned by on() or once().
  3810. // //移除事件监听
  3811. // ol.Observable.unByKey(listener);
  3812. // //移除地图单击事件
  3813. // map.removeEventListener("singleclick");
  3814. // },
  3815. // this
  3816. // );
  3817. // }
  3818. // /**
  3819. // * Creates a new help tooltip
  3820. // */
  3821. // function createHelpTooltip() {
  3822. // if (helpTooltipElement) {
  3823. // helpTooltipElement.parentNode.removeChild(helpTooltipElement);
  3824. // }
  3825. // helpTooltipElement = document.createElement("div");
  3826. // helpTooltipElement.className = "ol-tooltip hidden";
  3827. // helpTooltip = new ol.Overlay({
  3828. // element: helpTooltipElement,
  3829. // offset: [15, 0],
  3830. // positioning: "center-left",
  3831. // });
  3832. // map.addOverlay(helpTooltip);
  3833. // }
  3834. //
  3835. // /**
  3836. // * Creates a new measure tooltip
  3837. // */
  3838. // function createMeasureTooltip() {
  3839. // if (measureTooltipElement) {
  3840. // measureTooltipElement.parentNode.removeChild(measureTooltipElement);
  3841. // }
  3842. // measureTooltipElement = document.createElement("div");
  3843. // measureTooltipElement.className = "ol-tooltip ol-tooltip-measure";
  3844. // measureTooltip = new ol.Overlay({
  3845. // element: measureTooltipElement,
  3846. // offset: [0, -15],
  3847. // positioning: "bottom-center",
  3848. // });
  3849. // map.addOverlay(measureTooltip);
  3850. // }
  3851. //
  3852. // //格式化测量面积
  3853. // var formatArea = function (polygon) {
  3854. // //定义面积变量
  3855. // var area;
  3856. // //获取平面面积
  3857. // area = polygon.getArea();
  3858. // //定义输出变量
  3859. // var output;
  3860. // //当面积大于10000时,转换为平方千米,否则为平方米
  3861. // if (area > 10000) {
  3862. // output =
  3863. // Math.round((area / 1000000) * 100) / 100 + " " + "km<sup>2</sup>";
  3864. // } else {
  3865. // output = Math.round(area * 100) / 100 + " " + "m<sup>2</sup>";
  3866. // }
  3867. // return output;
  3868. // };
  3869. //
  3870. // addInteraction();
  3871. // });
  3872. // //侧面结束-----------------------------------------------------------------end
  3873. //全图展示-----------------start
  3874. $("#mapAllQt").click(function (){
  3875. //定位查询位置
  3876. let param_dw = {
  3877. srsName: "EPSG:3857",
  3878. service: "WFS",
  3879. version: "1.0.0",
  3880. request: "GetFeature",
  3881. typename: "zjd_dc:t_house_survey_border_village",
  3882. //featureNS: 'nsgk_hc',//命名空间 URI
  3883. cql_filter: cql_filter,
  3884. //featurePrefix: 'nationalwater',//工作区名称
  3885. //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
  3886. outputFormat: "application/json",
  3887. //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
  3888. };
  3889. let url_dw = that.mapGeoServerUrl+"/geoserver/zjd_dc/wfs"; //wfsurl;
  3890. url_dw = url_dw + "?";
  3891. for (let key in param_dw) {
  3892. url_dw = url_dw + key + "=" + param_dw[key] + "&";
  3893. }
  3894. url_dw = url_dw.substr(0, url_dw.length - 1);
  3895. fetch(url_dw, {
  3896. method: "POST", // *GET, POST, PUT, DELETE, etc.
  3897. })
  3898. .then((res) => {
  3899. var geojsonmap = res.json();
  3900. return geojsonmap;
  3901. })
  3902. .then((data) => {
  3903. let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize());
  3904. resolution:resolution + Math.random() * 0.00000001,
  3905. map.getView().fit(data.bbox);
  3906. map.getView().setResolution(resolution);
  3907. // var datamap = data.bbox;
  3908. // var center = ol.extent.getCenter(datamap);
  3909. // map.getView().animate({
  3910. // // 只设置需要的属性即可
  3911. // center: center, // 中心点
  3912. // rotation: undefined, // 缩放完成view视图旋转弧度
  3913. // });
  3914. })
  3915. .catch((error) => {
  3916. console.log("【异常】", error);
  3917. });
  3918. });
  3919. //业务图层 wfs服务 属性查询开始 ------------------start
  3920. /**
  3921. * @api wfs服务空间查询
  3922. * @param {*} wfsurl
  3923. * @param {*} srsName
  3924. * @param {*} typeName
  3925. * @param {*} drawType
  3926. * @param {option 可选} geometryField
  3927. */
  3928. //查询全部图层 -------查询叠加图层出现覆盖问题
  3929. var wmsSource = new ol.source.TileWMS({
  3930. url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  3931. params: {
  3932. LAYERS: "zjd_dc:t_house_survey_all",
  3933. TILED: true,
  3934. SRID: 3857,
  3935. serverType: "geoserver",
  3936. crossOrigin: "anonymous",
  3937. },
  3938. resolution:Math.random() * 0.00000001,
  3939. });
  3940. //查询宅基地图层
  3941. var ZjdwmsSource = new ol.source.TileWMS({
  3942. url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  3943. params: {
  3944. LAYERS: "zjd_dc:t_house_survey_zjdzd",
  3945. TILED: true,
  3946. SRID: 3857,
  3947. serverType: "geoserver",
  3948. crossOrigin: "anonymous",
  3949. },
  3950. resolution:Math.random() * 0.00000001,
  3951. });
  3952. //查询自然幢图层
  3953. var ZrzwmsSource = new ol.source.TileWMS({
  3954. url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  3955. params: {
  3956. LAYERS: "zjd_dc:t_house_survey_zrz",
  3957. TILED: true,
  3958. SRID: 3857,
  3959. serverType: "geoserver",
  3960. crossOrigin: "anonymous",
  3961. },
  3962. resolution:Math.random() * 0.00000001,
  3963. });
  3964. //查询附属设施图层
  3965. var FssswmsSource = new ol.source.TileWMS({
  3966. url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  3967. params: {
  3968. LAYERS: "zjd_dc:t_house_survey_fsss",
  3969. TILED: true,
  3970. SRID: 3857,
  3971. serverType: "geoserver",
  3972. crossOrigin: "anonymous",
  3973. },
  3974. resolution:Math.random() * 0.00000001,
  3975. });
  3976. map.on("pointermove", function (evt) {
  3977. if (evt.dragging) {
  3978. return;
  3979. }
  3980. var pixel = map.getEventPixel(evt.originalEvent);
  3981. var hit = map.forEachLayerAtPixel(pixel, function () {
  3982. return true;
  3983. });
  3984. map.getTargetElement().style.cursor = hit ? "pointer" : "";
  3985. });
  3986. //属性查询结束 ------------------end
  3987. //点击查询详细信息
  3988. map.on("singleclick", function (evt) {
  3989. console.log(evt);
  3990. let feature = map.forEachFeatureAtPixel(
  3991. evt.pixel,
  3992. (feature) => feature
  3993. );
  3994. var viewResolution = map.getView().getResolution(); ///** @type {number} */ (view.getResolution());
  3995. var zb = evt.coordinate;
  3996. var url;
  3997. var url_bbox;
  3998. that.clickBbox ="";
  3999. that.textMjAll = "";
  4000. if(that.drawingClick) {
  4001. //点击空白删除之前图层
  4002. map.removeLayer(hc_land_on);
  4003. //map.removeLayer(hc_land_query);
  4004. //for(var i=0;hc_land_query>i;i++){
  4005. //map.removeLayer(hc_land_query);
  4006. for(var i=0;hc_land_queryList.length>i;i++){
  4007. map.removeLayer(hc_land_queryList[i]);
  4008. }
  4009. //}c
  4010. if (that.fsssSx && that.zjdSx && that.zrzSx) {
  4011. url = wmsSource.getFeatureInfoUrl(
  4012. evt.coordinate,
  4013. viewResolution,
  4014. "EPSG:3857",
  4015. {INFO_FORMAT: "text/html"}
  4016. );
  4017. url_bbox = wmsSource.getFeatureInfoUrl(
  4018. evt.coordinate,
  4019. viewResolution,
  4020. "EPSG:3857",
  4021. {INFO_FORMAT: "application/json"}
  4022. );
  4023. } else {
  4024. if (that.zjdSx) {
  4025. url = ZjdwmsSource.getFeatureInfoUrl(
  4026. evt.coordinate,
  4027. viewResolution,
  4028. "EPSG:3857",
  4029. {INFO_FORMAT: "text/html"}
  4030. );
  4031. url_bbox = ZjdwmsSource.getFeatureInfoUrl(
  4032. evt.coordinate,
  4033. viewResolution,
  4034. "EPSG:3857",
  4035. {INFO_FORMAT: "application/json"}
  4036. );
  4037. } else if (that.fsssSx) {
  4038. url = FssswmsSource.getFeatureInfoUrl(
  4039. evt.coordinate,
  4040. viewResolution,
  4041. "EPSG:3857",
  4042. {INFO_FORMAT: "text/html"}
  4043. );
  4044. url_bbox = FssswmsSource.getFeatureInfoUrl(
  4045. evt.coordinate,
  4046. viewResolution,
  4047. "EPSG:3857",
  4048. {INFO_FORMAT: "application/json"}
  4049. );
  4050. } else if (that.zrzSx) {
  4051. url = ZrzwmsSource.getFeatureInfoUrl(
  4052. evt.coordinate,
  4053. viewResolution,
  4054. "EPSG:3857",
  4055. {INFO_FORMAT: "text/html"}
  4056. );
  4057. url_bbox = ZrzwmsSource.getFeatureInfoUrl(
  4058. evt.coordinate,
  4059. viewResolution,
  4060. "EPSG:3857",
  4061. {INFO_FORMAT: "application/json"}
  4062. );
  4063. } else {
  4064. url = wmsSource.getFeatureInfoUrl(
  4065. evt.coordinate,
  4066. viewResolution,
  4067. "EPSG:3857",
  4068. {INFO_FORMAT: "text/html"}
  4069. );
  4070. url_bbox = wmsSource.getFeatureInfoUrl(
  4071. evt.coordinate,
  4072. viewResolution,
  4073. "EPSG:3857",
  4074. {INFO_FORMAT: "application/json"}
  4075. );
  4076. }
  4077. }
  4078. if (url_bbox) {
  4079. fetch(url_bbox).then((res) => {
  4080. var geojsonmap = res.json();
  4081. return geojsonmap;
  4082. })
  4083. .then((data) => {
  4084. var center = ol.extent.getCenter(data.bbox); //获取边界区域的中心位置
  4085. center = [center[0], center[1] - 16];
  4086. that.clickBbox = center;
  4087. })
  4088. .catch((error) => {
  4089. that.mapZjdData = "";
  4090. that.mapZrzData = "";
  4091. that.mapFsssData = "";
  4092. //that.mapZjdTeAll.active ="1";
  4093. that.mapZjdTeAll.mapZjdAData = {};
  4094. that.mapZjdTeAll.mapZrzAData = {};
  4095. that.mapZjdTeAll.mapFsssAData = {};
  4096. that.mapZjdDataTure = "";
  4097. that.mapXs =false;
  4098. that.mapClick ="";
  4099. console.log("【异常】", error);
  4100. });
  4101. }
  4102. if (url) {
  4103. fetch(url)
  4104. .then(function (response) {
  4105. return response.text();
  4106. })
  4107. .then(function (html) {
  4108. document.getElementById("info").innerHTML = html;
  4109. if (html.indexOf("<table") != -1) {
  4110. that.mapZjdData = "";
  4111. that.mapZrzData = "";
  4112. that.mapFsssData = "";
  4113. //that.mapZjdTeAll.active ="1";
  4114. that.mapZjdTeAll.mapZjdAData = {};
  4115. that.mapZjdTeAll.mapZrzAData = {};
  4116. that.mapZjdTeAll.mapFsssAData = {};
  4117. that.mapZjdDataTure = "";
  4118. setTimeout(() => {
  4119. if ($("#info .featureInfo .featureInfo").text() == "t_house_survey_zjdzd") {
  4120. map.removeLayer(hc_land_on);
  4121. that.mapHasDateStatus = 2;
  4122. that.mapXs = true;
  4123. let obj = {};
  4124. let trs = $("#info .featureInfo").find("tr:eq(1)");
  4125. let zjdXq = trs.find("td").eq(0).text();
  4126. let zjdIdNum = zjdXq.replace("t_house_survey_zjdzd.", "");
  4127. obj.id = zjdIdNum; // 主键id
  4128. obj.deptName = trs.find("td").eq(3).text();//行政区划名称
  4129. obj.zjddm = trs.find("td").eq(6).text();//宅基地代码
  4130. obj.zdmj = trs.find("td").eq(11).text();//宗地面积
  4131. obj.active = 1;
  4132. var vector_drawing_map;
  4133. let params = {
  4134. "deptId": that.$cookies.get("item").deptId,
  4135. "zjddm": obj.zjddm,
  4136. }
  4137. that.mapClick = obj.zjddm;
  4138. //点击查看自然幢
  4139. //自然幢图层查询开始 ------------------start
  4140. var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
  4141. zrzTc = new ol.layer.Image({
  4142. source: new ol.source.ImageWMS({
  4143. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  4144. params: {
  4145. LAYERS: 'zjd_dc:t_house_survey_zrz',
  4146. TILED: true,
  4147. cql_filter: cql_filter_map,
  4148. SRID: 3857,
  4149. TIMESTAMP: new Date().getTime(),
  4150. },
  4151. }),
  4152. });
  4153. map.addLayer(zrzTc);
  4154. //自然幢图层查询开始 ------------------start
  4155. //附属设施图层查询开始 ------------------start
  4156. //var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
  4157. fsssTc = new ol.layer.Image({
  4158. source: new ol.source.ImageWMS({
  4159. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  4160. params: {
  4161. LAYERS: 'zjd_dc:t_house_survey_fsss',
  4162. TILED: true,
  4163. cql_filter: cql_filter_map,
  4164. SRID: 3857,
  4165. TIMESTAMP: new Date().getTime(),
  4166. },
  4167. }),
  4168. });
  4169. map.addLayer(fsssTc);
  4170. //附属设施图层查询开始 ------------------end
  4171. that.$cookies.set("search", "")
  4172. //that.$cookies.set("map", "")
  4173. console.log(document.cookie.split(';').length)
  4174. console.log(params);
  4175. listZjdzd(params).then((response) => {
  4176. if (response.rows[0].zdmj != "") {
  4177. that.textMjAll = response.rows[0].zdmj;
  4178. } else {
  4179. that.textMjAllNum = "1";
  4180. }
  4181. that.mapZjdData = response.rows[0];
  4182. that.mapZjdData.active = 1;
  4183. that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
  4184. that.mapZjdDataTure = 1;
  4185. that.zjdHcDy = obj.zjddm;
  4186. var styleZjd = new ol.style.Style({
  4187. stroke: new ol.style.Stroke({
  4188. //边界样式
  4189. color: "#CCFF66",
  4190. width: 6,
  4191. }),
  4192. });
  4193. hc_land_on = new ol.layer.Vector({
  4194. title: "add Layer",
  4195. source: new ol.source.Vector({
  4196. projection: projection,
  4197. features: new ol.format.GeoJSON().readFeatures("{\n" +
  4198. " \"type\": \"Feature\",\n" +
  4199. " \"geometry\":" + that.mapZjdData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZjdData) + "}"),
  4200. }),
  4201. style: styleZjd
  4202. });
  4203. map.addLayer(hc_land_on);
  4204. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  4205. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  4206. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  4207. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  4208. //定位查询位置
  4209. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  4210. map.getView().animate({
  4211. // 只设置需要的属性即可
  4212. center: center, // 中心点
  4213. zoom: 17.8, // 缩放级别
  4214. rotation: undefined, // 缩放完成view视图旋转弧度
  4215. duration: 1000, // 缩放持续时间,默认不需要设置
  4216. resolution:Math.random() * 0.00000001,
  4217. });
  4218. function createLabelStyleMap() {
  4219. return new ol.style.Style({
  4220. text: new ol.style.Text({
  4221. text: that.mapZjdData.syqr,
  4222. textAlign: "center", //位置
  4223. textBaseline: "middle", //基准线
  4224. font: "normal 16px 微软雅黑", //文字样式
  4225. //text: "标注点", //文本内容
  4226. fill: new ol.style.Fill({
  4227. //文本填充样式(即文字颜色)
  4228. color: "#09DDCE",
  4229. width: 10,
  4230. }),
  4231. overflow: false //超出面的部分不显示
  4232. }),
  4233. zIndex: 9999,
  4234. });
  4235. }
  4236. var newcenterFeatureMap = new ol.Feature({
  4237. geometry: new ol.geom.Point(center), //几何信息
  4238. //name: "标注点",
  4239. });
  4240. var sourceMapLookMap = new ol.source.Vector({wrapX: false});
  4241. vector_drawing_map = new ol.layer.Vector({
  4242. source: sourceMapLookMap,
  4243. });
  4244. map.addLayer(vector_drawing_map);
  4245. newcenterFeatureMap.setStyle(createLabelStyleMap()); //设置要素样式
  4246. sourceMapLookMap.addFeature(newcenterFeatureMap);
  4247. });
  4248. //let cloneObj = JSON.parse(JSON.stringify(obj));
  4249. //that.mapZjdData = cloneObj;
  4250. } else if ($("#info .featureInfo .featureInfo").text() == "t_house_survey_zrz") {
  4251. //that.mapZjdTeAll.mapZjdAData ={};
  4252. that.mapZjdDataTure = "";
  4253. that.mapZjdTeAll.mapFsssAData = {};
  4254. map.removeLayer(hc_land_on);
  4255. let obj = {};
  4256. that.mapHasDateStatus = 1;
  4257. let trs = $("#info .featureInfo").find("tr:eq(1)");
  4258. let zrzXq = trs.find("td").eq(0).text();
  4259. let zrzIdNum = zrzXq.replace("t_house_survey_zrz.", "");
  4260. obj.id = zrzIdNum; // 主键id
  4261. obj.deptName = trs.find("td").eq(3).text();//行政区划名称
  4262. obj.zjddm = trs.find("td").eq(4).text();//宅基地代码
  4263. obj.scjzmj = trs.find("td").eq(12).text();//实测建筑面积
  4264. let params = {
  4265. "deptId": that.$cookies.get("item").deptId,
  4266. "zjddm": obj.zjddm,
  4267. }
  4268. that.$cookies.set("search", "")
  4269. //that.$cookies.set("map", "")
  4270. console.log(that.mapZjdData);
  4271. //if (that.mapZjdData !="" && that.mapZjdData !=null && that.mapZjdData !=undefined) {
  4272. console.log(that.mapClick);
  4273. console.log(obj.zjddm);
  4274. if(that.mapXs && that.mapClick == obj.zjddm){
  4275. listZjdzd(params).then((response) => {
  4276. that.mapZjdData = response.rows[0];
  4277. //that.mapZjdAData.active = 1;
  4278. that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
  4279. getZrz(obj.id).then((response) => {
  4280. if (response.data.scjzmj != "") {
  4281. that.textMjAll = response.data.scjzmj;
  4282. } else {
  4283. that.textMjAllNum = "1";
  4284. }
  4285. that.mapZrzData = response.data;
  4286. that.mapZrzData.active = 3;
  4287. that.mapZjdTeAll.mapZrzAData = that.mapZrzData;
  4288. that.zjdHcDy = obj.zjddm;
  4289. var styleZjd = new ol.style.Style({
  4290. stroke: new ol.style.Stroke({
  4291. //边界样式
  4292. color: "#CCFF66",
  4293. width: 6,
  4294. }),
  4295. });
  4296. hc_land_on = new ol.layer.Vector({
  4297. title: "add Layer",
  4298. source: new ol.source.Vector({
  4299. projection: projection,
  4300. features: new ol.format.GeoJSON().readFeatures("{\n" +
  4301. " \"type\": \"Feature\",\n" +
  4302. " \"geometry\":" + that.mapZrzData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZrzData) + "}"),
  4303. }),
  4304. style: styleZjd
  4305. });
  4306. map.addLayer(hc_land_on);
  4307. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  4308. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  4309. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  4310. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  4311. //定位查询位置
  4312. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  4313. map.getView().animate({
  4314. // 只设置需要的属性即可
  4315. center: center, // 中心点
  4316. zoom: 17.8, // 缩放级别
  4317. rotation: undefined, // 缩放完成view视图旋转弧度
  4318. duration: 1000, // 缩放持续时间,默认不需要设置
  4319. resolution: Math.random() * 0.00000001,
  4320. });
  4321. });
  4322. });
  4323. } else {
  4324. //自然幢图层查询开始 ------------------start
  4325. var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
  4326. zrzTc = new ol.layer.Image({
  4327. source: new ol.source.ImageWMS({
  4328. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  4329. params: {
  4330. LAYERS: 'zjd_dc:t_house_survey_zrz',
  4331. TILED: true,
  4332. cql_filter: cql_filter_map,
  4333. SRID: 3857,
  4334. TIMESTAMP: new Date().getTime(),
  4335. },
  4336. }),
  4337. });
  4338. map.addLayer(zrzTc);
  4339. //自然幢图层查询开始 ------------------start
  4340. //附属设施图层查询开始 ------------------start
  4341. //var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
  4342. fsssTc = new ol.layer.Image({
  4343. source: new ol.source.ImageWMS({
  4344. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  4345. params: {
  4346. LAYERS: 'zjd_dc:t_house_survey_fsss',
  4347. TILED: true,
  4348. cql_filter: cql_filter_map,
  4349. SRID: 3857,
  4350. TIMESTAMP: new Date().getTime(),
  4351. },
  4352. }),
  4353. });
  4354. map.addLayer(fsssTc);
  4355. //附属设施图层查询开始 ------------------end
  4356. listZjdzd(params).then((response) => {
  4357. if (response.rows[0].zdmj != "") {
  4358. that.textMjAll = response.rows[0].zdmj;
  4359. } else {
  4360. that.textMjAllNum = "1";
  4361. }
  4362. that.mapZjdData = response.rows[0];
  4363. that.mapZjdData.active = 1;
  4364. that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
  4365. that.mapZjdDataTure = 1;
  4366. that.zjdHcDy = obj.zjddm;
  4367. that.mapClick = obj.zjddm;
  4368. that.mapXs = true;
  4369. var styleZjd = new ol.style.Style({
  4370. stroke: new ol.style.Stroke({
  4371. //边界样式
  4372. color: "#CCFF66",
  4373. width: 6,
  4374. }),
  4375. });
  4376. hc_land_on = new ol.layer.Vector({
  4377. title: "add Layer",
  4378. source: new ol.source.Vector({
  4379. projection: projection,
  4380. features: new ol.format.GeoJSON().readFeatures("{\n" +
  4381. " \"type\": \"Feature\",\n" +
  4382. " \"geometry\":" + that.mapZjdData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZjdData) + "}"),
  4383. }),
  4384. style: styleZjd
  4385. });
  4386. map.addLayer(hc_land_on);
  4387. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  4388. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  4389. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  4390. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  4391. //定位查询位置
  4392. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  4393. map.getView().animate({
  4394. // 只设置需要的属性即可
  4395. center: center, // 中心点
  4396. zoom: 17.8, // 缩放级别
  4397. rotation: undefined, // 缩放完成view视图旋转弧度
  4398. duration: 1000, // 缩放持续时间,默认不需要设置
  4399. resolution:Math.random() * 0.00000001,
  4400. });
  4401. function createLabelStyleMap() {
  4402. return new ol.style.Style({
  4403. text: new ol.style.Text({
  4404. text: that.mapZjdData.syqr,
  4405. textAlign: "center", //位置
  4406. textBaseline: "middle", //基准线
  4407. font: "normal 16px 微软雅黑", //文字样式
  4408. //text: "标注点", //文本内容
  4409. fill: new ol.style.Fill({
  4410. //文本填充样式(即文字颜色)
  4411. color: "#09DDCE",
  4412. width: 10,
  4413. }),
  4414. overflow: false //超出面的部分不显示
  4415. }),
  4416. zIndex: 9999,
  4417. });
  4418. }
  4419. var newcenterFeatureMap = new ol.Feature({
  4420. geometry: new ol.geom.Point(center), //几何信息
  4421. //name: "标注点",
  4422. });
  4423. var sourceMapLookMap = new ol.source.Vector({wrapX: false});
  4424. vector_drawing_map = new ol.layer.Vector({
  4425. source: sourceMapLookMap,
  4426. });
  4427. map.addLayer(vector_drawing_map);
  4428. newcenterFeatureMap.setStyle(createLabelStyleMap()); //设置要素样式
  4429. sourceMapLookMap.addFeature(newcenterFeatureMap);
  4430. });
  4431. }
  4432. } else if ($("#info .featureInfo .featureInfo").text() == "t_house_survey_fsss") {
  4433. that.mapZjdTeAll.mapZrzAData = {};
  4434. that.mapZjdDataTure = "";
  4435. //that.mapZjdTeAll.mapZjdAData ={};
  4436. map.removeLayer(hc_land_on);
  4437. let obj = {};
  4438. that.mapHasDateStatus = 0;
  4439. let trs = $("#info .featureInfo").find("tr:eq(1)");
  4440. let fsssXq = trs.find("td").eq(0).text();
  4441. let fsssIdNum = fsssXq.replace("t_house_survey_fsss.", "");
  4442. obj.id = fsssIdNum; // 主键id
  4443. obj.deptName = trs.find("td").eq(4).text();//行政区划名称
  4444. obj.zjddm = trs.find("td").eq(1).text();//宅基地代码
  4445. // obj.houseDataConfirmStatus = trs.find("td").eq(6).text(); //状态
  4446. // obj.fssslx = trs.find("td").eq(7).text(); //附属设施类型
  4447. obj.jzmj = trs.find("td").eq(8).text(); //建筑面积
  4448. let params = {
  4449. "deptId": that.$cookies.get("item").deptId,
  4450. "zjddm": obj.zjddm,
  4451. "pageSize": 20,
  4452. }
  4453. that.$cookies.remove("search")
  4454. //if (that.mapZjdData !="" && that.mapZjdData !=null && that.mapZjdData !=undefined) {
  4455. if(that.mapXs && that.mapClick == obj.zjddm){
  4456. listZjdzd(params).then((response) => {
  4457. that.mapZjdData = response.rows[0];
  4458. that.mapZjdData.active = 1;
  4459. that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
  4460. getFsss(obj.id).then((response) => {
  4461. if (response.data.jzmj != "") {
  4462. that.textMjAll = response.data.jzmj;
  4463. } else {
  4464. that.textMjAllNum = "1";
  4465. }
  4466. //that.mapfsssData.active = 4;
  4467. that.mapfsssData = response.data;
  4468. console.log(that.mapfsssData);
  4469. that.mapZjdTeAll.mapFsssAData = that.mapfsssData;
  4470. that.zjdHcDy = obj.zjddm;
  4471. var styleZjd = new ol.style.Style({
  4472. stroke: new ol.style.Stroke({
  4473. //边界样式
  4474. color: "#CCFF66",
  4475. width: 6,
  4476. }),
  4477. });
  4478. hc_land_on = new ol.layer.Vector({
  4479. title: "add Layer",
  4480. source: new ol.source.Vector({
  4481. projection: projection,
  4482. features: new ol.format.GeoJSON().readFeatures("{\n" +
  4483. " \"type\": \"Feature\",\n" +
  4484. " \"geometry\":" + that.mapfsssData.theGeom + ", \"properties\":" + JSON.stringify(that.mapfsssData) + "}"),
  4485. }),
  4486. style: styleZjd
  4487. });
  4488. map.addLayer(hc_land_on);
  4489. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  4490. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  4491. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  4492. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  4493. //定位查询位置
  4494. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  4495. map.getView().animate({
  4496. // 只设置需要的属性即可
  4497. center: center, // 中心点
  4498. zoom: 17.8, // 缩放级别
  4499. rotation: undefined, // 缩放完成view视图旋转弧度
  4500. duration: 1000, // 缩放持续时间,默认不需要设置
  4501. resolution: Math.random() * 0.00000001,
  4502. });
  4503. });
  4504. });
  4505. } else {
  4506. //自然幢图层查询开始 ------------------start
  4507. var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
  4508. zrzTc = new ol.layer.Image({
  4509. source: new ol.source.ImageWMS({
  4510. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  4511. params: {
  4512. LAYERS: 'zjd_dc:t_house_survey_zrz',
  4513. TILED: true,
  4514. cql_filter: cql_filter_map,
  4515. SRID: 3857,
  4516. TIMESTAMP: new Date().getTime(),
  4517. },
  4518. }),
  4519. });
  4520. map.addLayer(zrzTc);
  4521. //自然幢图层查询开始 ------------------start
  4522. //附属设施图层查询开始 ------------------start
  4523. //var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
  4524. fsssTc = new ol.layer.Image({
  4525. source: new ol.source.ImageWMS({
  4526. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  4527. params: {
  4528. LAYERS: 'zjd_dc:t_house_survey_fsss',
  4529. TILED: true,
  4530. cql_filter: cql_filter_map,
  4531. SRID: 3857,
  4532. TIMESTAMP: new Date().getTime(),
  4533. },
  4534. }),
  4535. });
  4536. map.addLayer(fsssTc);
  4537. //附属设施图层查询开始 ------------------end
  4538. listZjdzd(params).then((response) => {
  4539. if (response.rows[0].zdmj != "") {
  4540. that.textMjAll = response.rows[0].zdmj;
  4541. } else {
  4542. that.textMjAllNum = "1";
  4543. }
  4544. that.mapZjdData = response.rows[0];
  4545. that.mapZjdData.active = 1;
  4546. that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
  4547. that.mapZjdDataTure = 1;
  4548. that.zjdHcDy = obj.zjddm;
  4549. that.mapClick = obj.zjddm;
  4550. that.mapXs = true;
  4551. var styleZjd = new ol.style.Style({
  4552. stroke: new ol.style.Stroke({
  4553. //边界样式
  4554. color: "#CCFF66",
  4555. width: 6,
  4556. }),
  4557. });
  4558. hc_land_on = new ol.layer.Vector({
  4559. title: "add Layer",
  4560. source: new ol.source.Vector({
  4561. projection: projection,
  4562. features: new ol.format.GeoJSON().readFeatures("{\n" +
  4563. " \"type\": \"Feature\",\n" +
  4564. " \"geometry\":" + that.mapZjdData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZjdData) + "}"),
  4565. }),
  4566. style: styleZjd
  4567. });
  4568. map.addLayer(hc_land_on);
  4569. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  4570. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  4571. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  4572. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  4573. //定位查询位置
  4574. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  4575. map.getView().animate({
  4576. // 只设置需要的属性即可
  4577. center: center, // 中心点
  4578. zoom: 17.8, // 缩放级别
  4579. rotation: undefined, // 缩放完成view视图旋转弧度
  4580. duration: 1000, // 缩放持续时间,默认不需要设置
  4581. resolution:Math.random() * 0.00000001,
  4582. });
  4583. function createLabelStyleMap() {
  4584. return new ol.style.Style({
  4585. text: new ol.style.Text({
  4586. text: that.mapZjdData.syqr,
  4587. textAlign: "center", //位置
  4588. textBaseline: "middle", //基准线
  4589. font: "normal 16px 微软雅黑", //文字样式
  4590. //text: "标注点", //文本内容
  4591. fill: new ol.style.Fill({
  4592. //文本填充样式(即文字颜色)
  4593. color: "#09DDCE",
  4594. width: 10,
  4595. }),
  4596. overflow: false //超出面的部分不显示
  4597. }),
  4598. zIndex: 9999,
  4599. });
  4600. }
  4601. var newcenterFeatureMap = new ol.Feature({
  4602. geometry: new ol.geom.Point(center), //几何信息
  4603. //name: "标注点",
  4604. });
  4605. var sourceMapLookMap = new ol.source.Vector({wrapX: false});
  4606. vector_drawing_map = new ol.layer.Vector({
  4607. source: sourceMapLookMap,
  4608. });
  4609. map.addLayer(vector_drawing_map);
  4610. newcenterFeatureMap.setStyle(createLabelStyleMap()); //设置要素样式
  4611. sourceMapLookMap.addFeature(newcenterFeatureMap);
  4612. });
  4613. }
  4614. // if(obj.jzmj != ""){
  4615. // that.textMjAll = obj.jzmj;
  4616. // } else {
  4617. // that.textMjAllNum = "1";
  4618. // }
  4619. } else {
  4620. }
  4621. }, 300);
  4622. } else {
  4623. }
  4624. });
  4625. }
  4626. }
  4627. //数据库查询详情时使用----------------------------------------start
  4628. // if(feature) {
  4629. // //document.getElementById("info").innerHTML = "";
  4630. // that.mapHaDataValue = true;
  4631. // var ifConsole = feature.values_.createBy;
  4632. // if (ifConsole =="mapTheGeomFsssId") {
  4633. // let obj = {};
  4634. // that.mapHasDateStatus = 0;
  4635. // obj.deptName = feature.values_.deptName;//行政区划名称
  4636. // obj.zjddm = feature.values_.zjddm;//宅基地代码
  4637. // obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus; //状态
  4638. // obj.fssslx = feature.values_.fssslx; //附属设施类型
  4639. // obj.jzmj = feature.values_.jzmj; //建筑面积
  4640. // obj.qsly = feature.values_.qsly;//权属来源
  4641. // obj.fwzt = feature.values_.fwzt; //房屋状态
  4642. // obj.sfsp = feature.values_.sfsp; //是否审批
  4643. // obj.sffz = feature.values_.sffz; //是否发证
  4644. // obj.jglx = feature.values_.jglx; //结构类型
  4645. // obj.sfzzsy = feature.values_.sfzzsy; //是否正在使用
  4646. // obj.jzwqk = feature.values_.jzwqk; //建筑物情况
  4647. // obj.tdzk = feature.values_.tdzk; //审批或建设前土地状况
  4648. // obj.sfsgcf = feature.values_.sfsgcf; //是否受过处罚
  4649. // obj.sysNormalDisable = feature.values_.sysNormalDisable; //是否停用
  4650. // //附属设施类型字典项
  4651. // that.getDicts("fsss_type").then((response) => {
  4652. // var assetTypeOptions = response.data;
  4653. // if(obj.fssslx !=null && obj.fssslx !=""){
  4654. // for(var i=0;assetTypeOptions.length >i; i++){
  4655. // if(obj.fssslx == assetTypeOptions[i].dictValue) {
  4656. // obj.fssslx = assetTypeOptions[i].dictLabel;
  4657. // break;
  4658. // }
  4659. // }
  4660. // }
  4661. // });
  4662. // //权属类型字典项
  4663. // that.getDicts("acquisition_method").then((response) => {
  4664. // var assetTypeOptions = response.data;
  4665. // if(obj.qsly !=null && obj.qsly !=""){
  4666. // for(var i=0;assetTypeOptions.length >i; i++){
  4667. // if(obj.qsly == assetTypeOptions[i].dictValue) {
  4668. // obj.qsly = assetTypeOptions[i].dictLabel;
  4669. // break;
  4670. // }
  4671. // }
  4672. // }
  4673. // });
  4674. // //房屋状态字典项
  4675. // that.getDicts("fwzt").then((response) => {
  4676. // var assetTypeOptions = response.data;
  4677. // if(obj.fwzt !=null && obj.fwzt !=""){
  4678. // for(var i=0;assetTypeOptions.length >i; i++){
  4679. // if(obj.fwzt == assetTypeOptions[i].dictValue) {
  4680. // obj.fwzt = assetTypeOptions[i].dictLabel;
  4681. // break;
  4682. // }
  4683. // }
  4684. // }
  4685. // });
  4686. // //是否审批字典项
  4687. // that.getDicts("sys_yes_no").then((response) => {
  4688. // var assetTypeOptions = response.data;
  4689. // if(obj.sfsp !=null && obj.sfsp !=""){
  4690. // for(var i=0;assetTypeOptions.length >i; i++){
  4691. // if(obj.sfsp == assetTypeOptions[i].dictValue) {
  4692. // obj.sfsp = assetTypeOptions[i].dictLabel;
  4693. // break;
  4694. // }
  4695. // }
  4696. // }
  4697. // });
  4698. // //是否发证字典项
  4699. // that.getDicts("sys_yes_no").then((response) => {
  4700. // var assetTypeOptions = response.data;
  4701. // if(obj.sffz !=null && obj.sffz !=""){
  4702. // for(var i=0;assetTypeOptions.length >i; i++){
  4703. // if(obj.sffz == assetTypeOptions[i].dictValue) {
  4704. // obj.sffz = assetTypeOptions[i].dictLabel;
  4705. // break;
  4706. // }
  4707. // }
  4708. // }
  4709. // });
  4710. // //结构类型字典项
  4711. // that.getDicts("house_jglx").then((response) => {
  4712. // var assetTypeOptions = response.data;
  4713. // if(obj.jglx !=null && obj.jglx !=""){
  4714. // for(var i=0;assetTypeOptions.length >i; i++){
  4715. // if(obj.jglx == assetTypeOptions[i].dictValue) {
  4716. // obj.jglx = assetTypeOptions[i].dictLabel;
  4717. // break;
  4718. // }
  4719. // }
  4720. // }
  4721. // });
  4722. // //是否正在使用字典项
  4723. // that.getDicts("sys_yes_no").then((response) => {
  4724. // var assetTypeOptions = response.data;
  4725. // if(obj.sfzzsy !=null && obj.sfzzsy !=""){
  4726. // for(var i=0;assetTypeOptions.length >i; i++){
  4727. // if(obj.sfzzsy == assetTypeOptions[i].dictValue) {
  4728. // obj.sfzzsy = assetTypeOptions[i].dictLabel;
  4729. // break;
  4730. // }
  4731. // }
  4732. // }
  4733. // });
  4734. // //房屋状态字典项
  4735. // that.getDicts("fwzt").then((response) => {
  4736. // var assetTypeOptions = response.data;
  4737. // if(obj.fwzt !=null && obj.fwzt !=""){
  4738. // for(var i=0;assetTypeOptions.length >i; i++){
  4739. // if(obj.fwzt == assetTypeOptions[i].dictValue) {
  4740. // obj.fwzt = assetTypeOptions[i].dictLabel;
  4741. // break;
  4742. // }
  4743. // }
  4744. // }
  4745. // });
  4746. // //土地状况字典项
  4747. // that.getDicts("land_state").then((response) => {
  4748. // var assetTypeOptions = response.data;
  4749. // if(obj.tdzk !=null && obj.tdzk !=""){
  4750. // for(var i=0;assetTypeOptions.length >i; i++){
  4751. // if(obj.tdzk == assetTypeOptions[i].dictValue) {
  4752. // obj.tdzk = assetTypeOptions[i].dictLabel;
  4753. // break;
  4754. // }
  4755. // }
  4756. // }
  4757. // });
  4758. // //是否受过处罚字典项
  4759. // that.getDicts("land_state").then((response) => {
  4760. // var assetTypeOptions = response.data;
  4761. // if(obj.sfsgcf !=null && obj.sfsgcf !=""){
  4762. // for(var i=0;assetTypeOptions.length >i; i++){
  4763. // if(obj.sfsgcf == assetTypeOptions[i].dictValue) {
  4764. // obj.sfsgcf = assetTypeOptions[i].dictLabel;
  4765. // break;
  4766. // }
  4767. // }
  4768. // }
  4769. // });
  4770. // that.mapFsssData = obj;
  4771. // } else if(ifConsole =="mapTheGeomZrzId"){
  4772. // let obj = {};
  4773. // that.mapHasDateStatus = 1;
  4774. // obj.deptName = feature.values_.deptName;//部门名称
  4775. // obj.zjddm = feature.values_.zjddm;//宅基地代码
  4776. // obj.nmfwzh = feature.values_.nmfwzh;//农民房屋幢号
  4777. // obj.zrzh = feature.values_.zrzh;//自然幢号
  4778. // obj.jgrq = feature.values_.jgrq;//竣工日期
  4779. // obj.jzwgd = feature.values_.jzwgd;//建筑物高度
  4780. // obj.zzdmj = feature.values_.zzdmj;//幢占地面积
  4781. // obj.zydmj = feature.values_.zydmj;//幢用地面积
  4782. // obj.scjzmj = feature.values_.scjzmj;//实测建筑面积
  4783. // obj.zcs = feature.values_.zcs;//总层数
  4784. // obj.dscs = feature.values_.dscs;//地上层数
  4785. // obj.dxcs = feature.values_.dxcs;//地下层数
  4786. // obj.fwjg = feature.values_.fwjg;//房屋结构
  4787. // obj.sjly = feature.values_.sjly;//数据来源
  4788. // obj.status = feature.values_.status;//状态
  4789. // obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus;//数据调查确认状态
  4790. // //字典项转化
  4791. // //房屋结构字典项
  4792. // that.getDicts("housing_structure").then((response) => {
  4793. // var assetTypeOptions = response.data;
  4794. // if(obj.fwjg !=null && obj.fwjg !=""){
  4795. // for(var i=0;assetTypeOptions.length >i; i++){
  4796. // if(obj.fwjg == assetTypeOptions[i].dictValue) {
  4797. // obj.fwjg = assetTypeOptions[i].dictLabel;
  4798. // break;
  4799. // }
  4800. // }
  4801. // }
  4802. // });
  4803. // //房屋结构字典项
  4804. // that.getDicts("sjly").then((response) => {
  4805. // var assetTypeOptions = response.data;
  4806. // if(obj.sjly !=null && obj.sjly !=""){
  4807. // for(var i=0;assetTypeOptions.length >i; i++){
  4808. // if(obj.sjly == assetTypeOptions[i].dictValue) {
  4809. // obj.sjly = assetTypeOptions[i].dictLabel;
  4810. // break;
  4811. // }
  4812. // }
  4813. // }
  4814. // });
  4815. // that.mapZrzData = obj;
  4816. // } else if(ifConsole =="mapTheGeomZjdId"){
  4817. // let obj = {};
  4818. // that.mapHasDateStatus = 2;
  4819. // obj.deptName = feature.values_.deptName;//行政区划名称
  4820. // obj.suyqrdm = feature.values_.suyqrdm;//所有权人代码
  4821. // obj.nhdm = feature.values_.nhdm;//农户代码
  4822. // obj.zjddm = feature.values_.zjddm;//宅基地代码
  4823. // obj.zdbh = feature.values_.zdbh;//宗地编号
  4824. // obj.zddm = feature.values_.zddm;//宗地代码
  4825. // obj.zl = feature.values_.zl;//坐落
  4826. // obj.zldwdm = feature.values_.zldwdm;//坐落单位代码
  4827. // obj.zdmj = feature.values_.zdmj;//宗地面积
  4828. // obj.yt = feature.values_.yt;//用途
  4829. // obj.ytmc = feature.values_.ytmc;//用途名称
  4830. // obj.dj = feature.values_.dj;//宗地编号
  4831. // obj.jg = feature.values_.jg;//价格万元
  4832. // obj.qllx = feature.values_.qllx;//权利类型
  4833. // obj.qlxz = feature.values_.qlxz;//权利性质
  4834. // obj.qlsdfs = feature.values_.qlsdfs;//权利设定方式
  4835. // obj.rjl = feature.values_.rjl;//容积率
  4836. // obj.jzmd = feature.values_.jzmd;//建筑密度
  4837. // obj.jzxg = feature.values_.jzxg;//建筑限高
  4838. // obj.zdszd = feature.values_.zdszd;//宗地四至-东
  4839. // obj.zdszn = feature.values_.zdszn;//宗地四至-南
  4840. // obj.zdszx = feature.values_.zdszx;//宗地四至-西
  4841. // obj.zdszb = feature.values_.zdszb;//宗地四至-北
  4842. // obj.zdt = feature.values_.zdt;//宗地图
  4843. // obj.tfh = feature.values_.tfh;//图幅号
  4844. // obj.djh = feature.values_.djh;//地籍号
  4845. // obj.sjly = feature.values_.sjly;//数据来源
  4846. // obj.lyzk = feature.values_.lyzk;//当前利用状况
  4847. // obj.xzkssj = feature.values_.xzkssj;//闲置开始时间
  4848. // obj.sffz = feature.values_.sffz;//是否发证
  4849. // obj.zjdzsh = feature.values_.zjdzsh;//宅基地证书号
  4850. // obj.zjdxctp = feature.values_.zjdxctp;//宅基地现场图片
  4851. // obj.zjdqdfs = feature.values_.zjdqdfs;//宅基地取得方式
  4852. // obj.bccjl = feature.values_.bccjl;//被惩处经历
  4853. // obj.bccbz = feature.values_.bccbz;//被惩处备注
  4854. // obj.yctcyx = feature.values_.yctcyx;//有偿退出意向
  4855. // obj.zjdpzmj = feature.values_.zjdpzmj;//宅基地批准面积
  4856. // obj.zjdxzyy = feature.values_.zjdxzyy;//宅基地闲置原因
  4857. // obj.lzyx = feature.values_.lzyx;//流转意向
  4858. // obj.sysNormalDisable = feature.values_.sysNormalDisable;//是否停用
  4859. // obj.active = 1;
  4860. // //字典项转化
  4861. // //是否发证字典项
  4862. // that.getDicts("sys_yes_no").then((response) => {
  4863. // var assetTypeOptions = response.data;
  4864. // if(obj.sffz !=null && obj.sffz !=""){
  4865. // for(var i=0;assetTypeOptions.length >i; i++){
  4866. // if(obj.sffz == assetTypeOptions[i].dictValue) {
  4867. // obj.sffz = assetTypeOptions[i].dictLabel;
  4868. // break;
  4869. // }
  4870. // }
  4871. // }
  4872. // });
  4873. // //利用状态字典项
  4874. // that.getDicts("zjdlyzk").then((response) => {
  4875. // var assetTypeOptions = response.data;
  4876. // if(obj.lyzk !=null && obj.lyzk !=""){
  4877. // for(var i=0;assetTypeOptions.length >i; i++){
  4878. // if(obj.lyzk == assetTypeOptions[i].dictValue) {
  4879. // obj.lyzk = assetTypeOptions[i].dictLabel;
  4880. // break;
  4881. // }
  4882. // }
  4883. // }
  4884. // });
  4885. // //流转意向字典项
  4886. // that.getDicts("is_have").then((response) => {
  4887. // var assetTypeOptions = response.data;
  4888. // if(obj.lzyx !=null && obj.lzyx !=""){
  4889. // for(var i=0;assetTypeOptions.length >i; i++){
  4890. // if(obj.lzyx == assetTypeOptions[i].dictValue) {
  4891. // obj.lzyx = assetTypeOptions[i].dictLabel;
  4892. // break;
  4893. // }
  4894. // }
  4895. // }
  4896. // });
  4897. // //有偿退出意向字典项
  4898. // that.getDicts("is_have").then((response) => {
  4899. // var assetTypeOptions = response.data;
  4900. // if(obj.yctcyx !=null && obj.yctcyx !=""){
  4901. // for(var i=0;assetTypeOptions.length >i; i++){
  4902. // if(obj.yctcyx == assetTypeOptions[i].dictValue) {
  4903. // obj.yctcyx = assetTypeOptions[i].dictLabel;
  4904. // break;
  4905. // }
  4906. // }
  4907. // }
  4908. // });
  4909. // //被惩处经历字典项
  4910. // that.getDicts("is_have").then((response) => {
  4911. // var assetTypeOptions = response.data;
  4912. // if(obj.bccjl !=null && obj.bccjl !=""){
  4913. // for(var i=0;assetTypeOptions.length >i; i++){
  4914. // if(obj.bccjl == assetTypeOptions[i].dictValue) {
  4915. // obj.bccjl = assetTypeOptions[i].dictLabel;
  4916. // break;
  4917. // }
  4918. // }
  4919. // }
  4920. // });
  4921. // //宅基地取得方式字典项
  4922. // that.getDicts("acquisition_method").then((response) => {
  4923. // var assetTypeOptions = response.data;
  4924. // if(obj.zjdqdfs !=null && obj.zjdqdfs !=""){
  4925. // for(var i=0;assetTypeOptions.length >i; i++){
  4926. // if(obj.zjdqdfs == assetTypeOptions[i].dictValue) {
  4927. // obj.zjdqdfs = assetTypeOptions[i].dictLabel;
  4928. // break;
  4929. // }
  4930. // }
  4931. // }
  4932. // });
  4933. // //权利设定方式字典项
  4934. // that.getDicts("right_setting_mode").then((response) => {
  4935. // var assetTypeOptions = response.data;
  4936. // if(obj.qlsdfs !=null && obj.qlsdfs !=""){
  4937. // for(var i=0;assetTypeOptions.length >i; i++){
  4938. // if(obj.qlsdfs == assetTypeOptions[i].dictValue) {
  4939. // obj.qlsdfs = assetTypeOptions[i].dictLabel;
  4940. // break;
  4941. // }
  4942. // }
  4943. // }
  4944. // });
  4945. // //数据来源字典项
  4946. // that.getDicts("sjly").then((response) => {
  4947. // var assetTypeOptions = response.data;
  4948. // if(obj.sjly !=null && obj.sjly !=""){
  4949. // for(var i=0;assetTypeOptions.length >i; i++){
  4950. // if(obj.sjly == assetTypeOptions[i].dictValue) {
  4951. // obj.sjly = assetTypeOptions[i].dictLabel;
  4952. // break;
  4953. // }
  4954. // }
  4955. // }
  4956. // });
  4957. // that.mapZjdData = obj;
  4958. // console.log(obj.zjddm);
  4959. // that.zjdHcDy = obj.zjddm;
  4960. // } else {
  4961. // that.mapHaDataValue = false;
  4962. // }
  4963. // }else {
  4964. // that.mapHaDataValue = false;
  4965. // }
  4966. //数据库查询详情时使用----------------------------------------end
  4967. });
  4968. //数据库循环加载时使用 --------------------加载较慢 ------start
  4969. //当前账套没有任何空间数据
  4970. // if(mapTalkAbout){
  4971. // let deptName = this.$store.state.user.loginDeptId + "";
  4972. // getQueryLand(deptName).then((response) => {
  4973. // if (response.code == 200) {
  4974. // let InsertCode = response.data;
  4975. // if (InsertCode != null) {
  4976. // var lat = InsertCode.lat;
  4977. // var lng = InsertCode.lng;
  4978. // var center;
  4979. // if(lat !=null && lng !=null && lat !="" && lng !=""){
  4980. // center = [lng,lat];
  4981. // }else {
  4982. // center =[115.452752, 31.789033];
  4983. // }
  4984. // map.getView().animate({
  4985. // // 只设置需要的属性即可
  4986. // center: ol.proj.fromLonLat(center), // 中心点
  4987. // zoom: 17.9, // 缩放级别
  4988. // rotation: undefined, // 缩放完成view视图旋转弧度
  4989. // duration: 1000, // 缩放持续时间,默认不需要设置
  4990. // });
  4991. // }
  4992. // }
  4993. // });
  4994. // }
  4995. //数据库循环加载时使用 --------------------加载较慢 ------start
  4996. },
  4997. qkClick(){
  4998. this.uploadImgList1 = this.uploadImgList;
  4999. for(let i = 0; i < this.uploadImgList1.length; i++){
  5000. if(this.uploadImgList[i].id !== undefined ){
  5001. systemAttachment(this.uploadImgList[i].id);
  5002. }
  5003. }
  5004. this.uploadImgList = [];
  5005. },
  5006. /*右侧列表 --展开收缩*/
  5007. selectionPushMap() {
  5008. this.selectionIconShow = true;
  5009. this.homesteadListStatus = true;
  5010. $(".homesteadList_wrap").animate(
  5011. {
  5012. right: "0",
  5013. },
  5014. 300
  5015. );
  5016. },
  5017. homesteadListShrink() {
  5018. this.selectionIconShow = false;
  5019. // this.checked =["zjdSx","zrzSx","fsssSx"];
  5020. $(".homesteadList_wrap").animate(
  5021. {
  5022. right: "-300px",
  5023. },
  5024. 300
  5025. );
  5026. setTimeout(() => {
  5027. this.homesteadListStatus = false;
  5028. }, 300);
  5029. },
  5030. checkClick(res){
  5031. // 1、全选与不全选模块
  5032. $(".checkall").change(function() {
  5033. $(".item-list-checkbox .checkitem").prop("checked", $(this).prop("checked"));
  5034. if($(this).prop("checked")){
  5035. }else {
  5036. }
  5037. });
  5038. // 2、小复选框模块
  5039. $(".checkitem").change(function() {
  5040. if ($(".checkitem:checked").length === $(".checkitem").length) {
  5041. $(".checkall").prop("checked", true);
  5042. } else {
  5043. $(".checkall").prop("checked", false);
  5044. }
  5045. })
  5046. },
  5047. //绘制多边形地图
  5048. drawMapPolygonFun() {
  5049. },
  5050. guidProduct(){
  5051. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  5052. var r = Math.random() * 16 | 0,
  5053. v = c == 'x' ? r : (r & 0x3 | 0x8);
  5054. return v.toString(16);
  5055. });
  5056. },
  5057. //宅基地点击地图核查
  5058. zjdHc(){
  5059. if(this.zjdHcDy != "" && this.zjdHcDy != "undefined"){
  5060. if(this.mapZjdData !=undefined && this.mapZjdData !="" && this.mapZjdDataTure !=""){
  5061. this.mapZjdTeAll.active =1;
  5062. //this.$cookies.set("search",this.mapZjdTeAll);
  5063. this.$cookies.set("search","")
  5064. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5065. //this.$router.push({path:'/homesteadSurvey/add'});
  5066. }else if(this.mapZrzData !=undefined && this.mapZrzData !=""){
  5067. if(this.mapZjdTeAll.mapZjdAData !=""){
  5068. this.mapZjdTeAll.active = 3;
  5069. //this.$cookies.set("search",this.mapZjdTeAll);
  5070. this.$cookies.set("search","")
  5071. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5072. } else {
  5073. this.$toast("必须有宅基地数据才能进入自然幢核查");
  5074. }
  5075. }else {
  5076. if(this.mapZjdTeAll.mapZjdAData !="") {
  5077. this.mapZjdTeAll.active = 4;
  5078. //this.$cookies.set("search", this.mapZjdTeAll);
  5079. this.$cookies.set("search","")
  5080. this.$router.push({path: '/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5081. } else {
  5082. this.$toast("必须有宅基地数据才能进入附属设施核查");
  5083. }
  5084. }
  5085. } else {
  5086. this.$dialog.alert({
  5087. title: '宅基地核查',
  5088. message: "请从地图中选择图层并点击核查",
  5089. theme: 'round-button',
  5090. }).then(() => {
  5091. // on close
  5092. });
  5093. }
  5094. },
  5095. //搜索详情跳转
  5096. zjdSs(item){
  5097. this.mapZjdTeAll.mapZjdAData ={};
  5098. this.mapZjdTeAll.mapZrzAData ={};
  5099. this.mapZjdTeAll.mapFsssAData ={};
  5100. //this.mapZjdTeAll.active =1;
  5101. if(item.typeTc =="宅基地"){
  5102. getZjdzd(item.id).then((response) => {
  5103. this.mapZjdData = response.data;
  5104. this.mapZjdTeAll.active = 1;
  5105. this.mapZjdTeAll.mapZjdAData = this.mapZjdData;
  5106. //this.$cookies.set("search",this.mapZjdTeAll);
  5107. this.$cookies.set("search","")
  5108. setTimeout(() => {
  5109. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5110. }, 500);
  5111. });
  5112. }else if(item.typeTc =="自然幢"){
  5113. //let =
  5114. getZjdzd(item.id).then((response) => {
  5115. this.mapZrzData = response.data;
  5116. this.mapZjdTeAll.active = 3;
  5117. this.mapZjdTeAll.mapZrzAData = this.mapZrzData;
  5118. //this.$cookies.set("search",this.mapZjdTeAll);
  5119. this.$cookies.set("search","")
  5120. setTimeout(() => {
  5121. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5122. }, 500);
  5123. });
  5124. }else if(item.typeTc =="附属设施"){
  5125. getFsss(item.id).then((response) => {
  5126. this.mapFsssData = response.data;
  5127. this.mapZjdTeAll.active = 4;
  5128. this.mapZjdTeAll.mapFsssAData = this.mapFsssData;
  5129. //this.$cookies.set("search",this.mapZjdTeAll);
  5130. this.$cookies.set("search","")
  5131. setTimeout(() => {
  5132. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5133. }, 500);
  5134. });
  5135. }else{
  5136. this.$toast("无数据请检查后进入核查页面");
  5137. }
  5138. },
  5139. //地图查询
  5140. toggleSearch() {
  5141. $("#query").trigger("click");
  5142. },
  5143. //
  5144. checkAllArray(value){
  5145. if(this.checked.length<3){
  5146. this.$refs.checkboxGroup.toggleAll(true);
  5147. }else{
  5148. this.$refs.checkboxGroup.toggleAll(false);
  5149. }
  5150. },
  5151. //筛选//全选
  5152. checkAll(val) {
  5153. this.$refs.checkboxGroup.value.toggleAll(true);
  5154. return;
  5155. let checkedCount = this.CheckedAllArr.length
  5156. if (val) {
  5157. //全选
  5158. this.CheckedAllArr = this.dataList.map(item => item.id)
  5159. } else{
  5160. //取消全选
  5161. if (checkedCount === this.dataList.length) {
  5162. //如果不增加这个条件判断点击某一项时会全部取消
  5163. this.CheckedAllArr = []
  5164. }
  5165. }
  5166. },
  5167. //单选
  5168. handleChecked(value) {
  5169. // this.checkAllFlag = this.CheckedAllArr.length == this.dataList.length;
  5170. if (value.length<3){
  5171. this.checkAllFlag = false;
  5172. }else{
  5173. this.checkAllFlag = true;
  5174. }
  5175. value.indexOf('zjdSx') == -1 ? this.zjdSx = false : this.zjdSx = true;
  5176. value.indexOf('zrzSx') == -1 ? this.zrzSx = false : this.zrzSx = true;
  5177. value.indexOf('fsssSx') == -1 ? this.fsssSx = false : this.fsssSx = true;
  5178. },
  5179. closeSearchBox(){
  5180. this.showSearch = false ;
  5181. var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
  5182. document.styleSheets[0].insertRule(
  5183. "@keyframes test2" +
  5184. "{" +
  5185. "0%{bottom: 0px}" +
  5186. "100%{bottom: -" + height + "px;}" +
  5187. "}"
  5188. )
  5189. $('.searchBar_wrap').css({'animation':'test2 0.5s ease-in-out 0s 1 alternate forwards','-webkit-animation':'test2 0.5s ease-in-out 0s 1 alternate forwards'});
  5190. },
  5191. zjdTz(){
  5192. if(this.mapZjdData =="" && this.mapZjdDataTure =="" && this.mapZjdData !=undefined){
  5193. this.mapZjdTeAll.active =1;
  5194. this.mapZjdTeAll.mapZjdAData.deptId =JSON.parse(localStorage.getItem("surveyItem")).deptId;
  5195. this.mapZjdTeAll.mapZjdAData.theGeom =this.htZjdZrzFsss;
  5196. //this.mapZjdTeAll.mapZjdAData.deptId = this.$cookies.get("item").deptId;
  5197. //this.$cookies.set("search",this.mapZjdTeAll);
  5198. this.$cookies.set("search","")
  5199. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5200. }else {
  5201. this.$toast("已选择宅基地,请选择自然幢或附属设施按钮");
  5202. }
  5203. },
  5204. zrzTz(){
  5205. if(this.mapZjdData !=undefined && this.mapZjdData !="" && this.mapZjdDataTure !=""){
  5206. this.mapZjdTeAll.active =3;
  5207. this.mapZjdTeAll.mapZrzAData.theGeom =this.htZjdZrzFsss;
  5208. this.mapZjdTeAll.mapZrzAData.deptId =JSON.parse(localStorage.getItem("surveyItem")).deptId;
  5209. //this.mapZjdTeAll.mapZrzAData.deptId = this.$cookies.get("item").deptId;
  5210. //this.$cookies.set("search",this.mapZjdTeAll);
  5211. this.$cookies.set("search","")
  5212. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5213. }else {
  5214. this.$toast("请先在地图上选择宅基地后,再选择自然幢按钮");
  5215. }
  5216. },
  5217. fsssTz(){
  5218. if(this.mapZjdData !=undefined && this.mapZjdData !="" && this.mapZjdDataTure !=""){
  5219. this.mapZjdTeAll.active =4;
  5220. this.mapZjdTeAll.mapFsssAData.theGeom =this.htZjdZrzFsss;
  5221. this.mapZjdTeAll.mapFsssAData.deptId =this.$cookies.get("item").deptId;
  5222. //this.mapZjdTeAll.mapFsssAData.deptId = this.$cookies.get("item").deptId;
  5223. //this.$cookies.set("search",this.mapZjdTeAll);
  5224. this.$cookies.set("search","")
  5225. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5226. }else {
  5227. this.$toast("请先在地图上选择宅基地后,再选择附属设施按钮");
  5228. }
  5229. },
  5230. //绘图重置清除之前图层
  5231. deleteHistory(){
  5232. $("#deleteHistory").trigger("click");
  5233. }
  5234. },
  5235. }
  5236. </script>
  5237. <style scoped lang="scss">
  5238. /deep/ .van-swipe-cell__wrapper{
  5239. margin-right:-3px;
  5240. }
  5241. .hzlxBtn{
  5242. font-size: 0.3rem;
  5243. display: inline-block;
  5244. padding: 2% 0;
  5245. border-radius: 30PX;
  5246. color: #FFF;
  5247. margin-right: 2%;
  5248. width: 30%;
  5249. &:last-child{
  5250. margin: 0;
  5251. }
  5252. }
  5253. .van-cell__title{
  5254. flex:2
  5255. }
  5256. .bannerBg{
  5257. width: 100%;
  5258. color:#fff;
  5259. /*padding:10px;*/
  5260. background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  5261. }
  5262. .van-hairline--bottom::after {
  5263. border-bottom-width: 0;
  5264. }
  5265. .activeBtn{
  5266. background:#fff;
  5267. border-radius:25PX;
  5268. color:#7AC943;
  5269. line-height:30PX;
  5270. text-align:center;
  5271. font-size:14PX;
  5272. width: 25%;
  5273. margin:0 10px;
  5274. box-shadow: 0px 5px 6px 0px rgba(0,0,0,0.16);
  5275. }
  5276. .disactiveBtn{
  5277. background:rgba(255,255,255,.4);
  5278. border-radius:25PX;
  5279. color:#fff;
  5280. line-height:30PX;
  5281. text-align:center;
  5282. font-size:14PX;
  5283. width: 25%;
  5284. margin:0 10px;
  5285. box-shadow: 0px 5px 6px 0px rgba(0,0,0,0.16);
  5286. }
  5287. /*.van-cell__label{*/
  5288. /* color: #969799;*/
  5289. /* font-size: 12px;*/
  5290. /* line-height: 20px;*/
  5291. /* margin:0*/
  5292. /*}*/
  5293. .map_area {
  5294. width: 50vw;
  5295. height: 50vh;
  5296. z-index:1;
  5297. background:#000;
  5298. position: fixed;
  5299. left: 0;
  5300. top: 0;
  5301. }
  5302. .van-field__label{
  5303. width:50%;
  5304. }
  5305. .rightZoom_wrap {
  5306. position: absolute;
  5307. right: 3%;
  5308. top: 35%;
  5309. margin-top: -200px;
  5310. background: #fff;
  5311. margin-bottom: 16px;
  5312. border-radius: 10px;
  5313. text-align: center;
  5314. padding: 15px 20px;
  5315. img{
  5316. margin: 0 auto;
  5317. }
  5318. .amplification {
  5319. line-height: 1;
  5320. font-size: 18px;
  5321. text-align: center;
  5322. margin-top: 5px;
  5323. }
  5324. }
  5325. .mapZoom_wrap {
  5326. position: absolute;
  5327. right: 3%;
  5328. top: 50%;
  5329. margin-top: -200px;
  5330. background: #fff;
  5331. margin-bottom: 16px;
  5332. border-radius: 10px;
  5333. padding: 0px 20px;
  5334. div{
  5335. padding: 15px 0;
  5336. border-bottom: 1px solid #C9C9C9;
  5337. &:last-child{
  5338. border: none;
  5339. }
  5340. p{
  5341. margin-top: 5px;
  5342. }
  5343. }
  5344. .qtMap {
  5345. font-size: 18px;
  5346. text-align: center;
  5347. line-height: 1;
  5348. }
  5349. .clMap {
  5350. font-size: 18px;
  5351. text-align: center;
  5352. line-height: 1;
  5353. }
  5354. .hcMap {
  5355. font-size: 18px;
  5356. text-align: center;
  5357. line-height: 1;
  5358. }
  5359. .htMap {
  5360. font-size: 18px;
  5361. text-align: center;
  5362. line-height: 1;
  5363. }
  5364. .dwMap {
  5365. font-size: 18px;
  5366. text-align: center;
  5367. line-height: 1;
  5368. }
  5369. }
  5370. .rightIcon_wrap {
  5371. position: absolute;
  5372. right: 16px;
  5373. bottom: 160px;
  5374. .selectionIcon_wrap {
  5375. width: 74px;
  5376. background: #fff;
  5377. border-radius: 10px;
  5378. padding: 14px 0;
  5379. .icon {
  5380. width: 38px;
  5381. height: 38px;
  5382. background: url("../../assets/images/homestead/selection_icon.png")
  5383. no-repeat;
  5384. background-size: 100% 100%;
  5385. margin: 0 auto 4px;
  5386. }
  5387. .text {
  5388. font-size: 24px;
  5389. text-align: center;
  5390. }
  5391. }
  5392. .positioning_wrap {
  5393. width: 74px;
  5394. background: #fff;
  5395. margin-bottom: 16px;
  5396. border-radius: 10px;
  5397. height: 74px;
  5398. display: flex;
  5399. justify-content: center; /* 相对父元素水平居中 */
  5400. align-items: center; /* 子元素相对父元素垂直居中*/
  5401. .icon {
  5402. width: 38px;
  5403. height: 38px;
  5404. background: url("../../assets/images/homestead/positioning_icon.png")
  5405. no-repeat;
  5406. background-size: 100% 100%;
  5407. margin: 0 auto;
  5408. }
  5409. }
  5410. }
  5411. .homesteadList_wrap {
  5412. // display: none;
  5413. display: flex;
  5414. position: absolute;
  5415. right: -200px;
  5416. top: 0px;
  5417. bottom: 0px;
  5418. width: 300px;
  5419. background: #fff;
  5420. z-index: 999;
  5421. border-top-left-radius: 15px;
  5422. border-bottom-left-radius: 15px;
  5423. flex-direction: column;
  5424. .noInfo_data {
  5425. font-size: 28px;
  5426. text-align: center;
  5427. height: 300px;
  5428. line-height: 300px;
  5429. color: #666;
  5430. }
  5431. .title_m {
  5432. color: #333;
  5433. line-height: 36px;
  5434. padding: 20px 40px 22px;
  5435. .name {
  5436. font-size: 36px;
  5437. line-height: 42px;
  5438. height: 42px;
  5439. }
  5440. .more_icon {
  5441. width: 38px;
  5442. height: 38px;
  5443. background: url("../../assets/images/homestead/selectionNext_icon.png")
  5444. no-repeat;
  5445. float: right;
  5446. margin-top: 2px;
  5447. }
  5448. }
  5449. .main_m {
  5450. overflow-y: auto;
  5451. padding: 10px 0;
  5452. // height: 300px;
  5453. flex: 1;
  5454. .flex_block {
  5455. height: 70px;
  5456. display: flex;
  5457. // justify-content: center; /* 相对父元素水平居中 */
  5458. align-items: center; /* 子元素相对父元素垂直居中 */
  5459. padding: 0 40px;
  5460. &.active {
  5461. box-shadow: 0px 0px 10px rgba(24, 45, 51, 0.5);
  5462. }
  5463. .name_text {
  5464. font-size: 28px;
  5465. flex: 0.5;
  5466. overflow: hidden; /*超出部分隐藏*/
  5467. white-space: nowrap; /*不换行*/
  5468. text-overflow: ellipsis; /*超出部分文字以...显示*/
  5469. }
  5470. .square_text {
  5471. font-size: 28px;
  5472. flex: 0.4;
  5473. }
  5474. .operation_mian {
  5475. flex: 0 0 150px;
  5476. .describe {
  5477. font-size: 20px;
  5478. padding: 6px 5px;
  5479. float: right;
  5480. color: #fff;
  5481. border-radius: 30px;
  5482. overflow: hidden;
  5483. text-overflow: ellipsis;
  5484. white-space: nowrap;
  5485. max-width: 150px;
  5486. &.yph {
  5487. background: #b026ff;
  5488. }
  5489. &.dlzdph {
  5490. background: #ff6f36;
  5491. }
  5492. &.ylz {
  5493. background: #7fff4c;
  5494. }
  5495. &.dlz {
  5496. background: rgb(255, 232, 76);
  5497. }
  5498. &.ylzdph {
  5499. background: #ff7dd0;
  5500. }
  5501. &.zy {
  5502. background: rgb(100, 30, 100);
  5503. }
  5504. &.xz {
  5505. background: rgb(60, 100, 180);
  5506. }
  5507. &.chdb {
  5508. background: #fe0303;
  5509. }
  5510. }
  5511. }
  5512. }
  5513. }
  5514. .footerBtn_wrap {
  5515. flex: 0 0 90px;
  5516. display: flex;
  5517. justify-content: center; /* 相对父元素水平居中 */
  5518. align-items: center; /* 子元素相对父元素垂直居中 */
  5519. .options {
  5520. flex: 1;
  5521. font-size: 38px;
  5522. display: flex;
  5523. justify-content: center; /* 相对父元素水平居中 */
  5524. align-items: center; /* 子元素相对父元素垂直居中 */
  5525. height: 90px;
  5526. &:first-child {
  5527. border-bottom-left-radius: 15px;
  5528. }
  5529. &.active {
  5530. background: #3cbf5b;
  5531. color: #fff;
  5532. }
  5533. }
  5534. }
  5535. }
  5536. .checkbox {
  5537. width: 200px;
  5538. margin: 30px auto;
  5539. }
  5540. .thead-checkbox {
  5541. background-color: lightgray;
  5542. }
  5543. .item-checkbox {
  5544. border: 1px solid darkgray;
  5545. }
  5546. .van-sticky{position: fixed;top: 0;right: 0; left: 0;z-index: 9999;}
  5547. .searchBar_wrap {
  5548. // display: none;
  5549. position: fixed;
  5550. left: 0;
  5551. bottom: 0;
  5552. width: 100%;
  5553. padding: 0px 16px 0px 13px;
  5554. background: #fff;
  5555. border-top-left-radius: 15px;
  5556. border-top-right-radius: 15px;
  5557. z-index: 9;
  5558. .searchBox{
  5559. height: 40vh;
  5560. overflow-y: scroll;
  5561. .van-cell{
  5562. /*&:first-child{*/
  5563. /* box-shadow: none;*/
  5564. /* margin:0;*/
  5565. /*}*/
  5566. box-shadow: 0px 0px 5px #cccccc;
  5567. border-radius: 15PX;
  5568. width: 98%;
  5569. margin: 0 auto;
  5570. margin-bottom: 0.35rem;
  5571. &:first-child{
  5572. margin-top: 5px;
  5573. }
  5574. }
  5575. .van-cell__title{
  5576. flex: 0.8;
  5577. p{
  5578. color: rgb(34, 183, 242);
  5579. .van-icon{
  5580. vertical-align: middle;
  5581. }
  5582. span{
  5583. vertical-align: middle;
  5584. &:nth-child(2){
  5585. overflow: hidden;
  5586. white-space: nowrap;
  5587. text-overflow: ellipsis;
  5588. display: inline-block;
  5589. width: 60%;
  5590. }
  5591. &:nth-child(3){
  5592. font-size: 0.25rem;
  5593. border-radius: 5PX;
  5594. padding: 5PX 15PX;
  5595. margin-left: 5%;
  5596. }
  5597. }
  5598. }
  5599. }
  5600. .van-cell__value{
  5601. flex: 0.2;
  5602. p{
  5603. font-size: 0.25rem;
  5604. display: inline-block;
  5605. border-radius: 1rem;
  5606. line-height: 1;
  5607. padding: 10%;
  5608. }
  5609. }
  5610. }
  5611. .actionBar_wrap {
  5612. display: flex;
  5613. position: absolute;
  5614. top: 0;
  5615. left: 0;
  5616. width: 100%;
  5617. height: 100%;
  5618. background: #fff;
  5619. border-top-left-radius: 15px;
  5620. border-top-right-radius: 15px;
  5621. .m_list {
  5622. flex: 1;
  5623. display: flex;
  5624. justify-content: center; /* 相对父元素水平居中 */
  5625. align-items: center; /* 子元素相对父元素垂直居中 */
  5626. .tensile,
  5627. .positioning,
  5628. .spacing,
  5629. .scale {
  5630. width: 76px;
  5631. height: 72px;
  5632. background: #ffffff;
  5633. border-radius: 8px;
  5634. box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.16);
  5635. .icon {
  5636. width: 76px;
  5637. height: 72px;
  5638. }
  5639. &.active {
  5640. background: #333;
  5641. &.tensile {
  5642. .icon {
  5643. background: url("../../assets/images/homestead/operation/tensile_active.png")
  5644. center center no-repeat;
  5645. background-size: 38px 50px;
  5646. }
  5647. }
  5648. &.positioning {
  5649. .icon {
  5650. background: url("../../assets/images/homestead/operation/positioning_active.png")
  5651. center center no-repeat;
  5652. background-size: 38px 48px;
  5653. }
  5654. }
  5655. &.spacing {
  5656. .icon {
  5657. background: url("../../assets/images/homestead/operation/spacing_active.png")
  5658. center center no-repeat;
  5659. background-size: 46px 46px;
  5660. }
  5661. }
  5662. &.scale {
  5663. .icon {
  5664. background: url("../../assets/images/homestead/operation/scale_active.png")
  5665. center center no-repeat;
  5666. background-size: 48px 48px;
  5667. }
  5668. }
  5669. }
  5670. }
  5671. .tensile {
  5672. .icon {
  5673. background: url("../../assets/images/homestead/operation/tensile.png")
  5674. center center no-repeat;
  5675. background-size: 38px 50px;
  5676. }
  5677. }
  5678. .positioning {
  5679. .icon {
  5680. background: url("../../assets/images/homestead/operation/positioning.png")
  5681. center center no-repeat;
  5682. background-size: 38px 48px;
  5683. }
  5684. }
  5685. .spacing {
  5686. .icon {
  5687. background: url("../../assets/images/homestead/operation/spacing.png")
  5688. center center no-repeat;
  5689. background-size: 46px 46px;
  5690. }
  5691. }
  5692. .scale {
  5693. .icon {
  5694. background: url("../../assets/images/homestead/operation/scale.png")
  5695. center center no-repeat;
  5696. background-size: 48px 48px;
  5697. }
  5698. }
  5699. .closes {
  5700. background: url("../../assets/images/homestead/searchBar_close.png")
  5701. no-repeat;
  5702. background-size: 100% 100%;
  5703. width: 72px;
  5704. height: 72px;
  5705. &.gray {
  5706. background: url("../../assets/images/homestead/searchBar_close_gray.png")
  5707. no-repeat;
  5708. background-size: 100% 100%;
  5709. }
  5710. }
  5711. .correct {
  5712. background: url("../../assets/images/homestead/searchBar_save.png")
  5713. no-repeat;
  5714. background-size: 100% 100%;
  5715. width: 72px;
  5716. height: 72px;
  5717. }
  5718. }
  5719. }
  5720. .searchBar_area {
  5721. flex: 1;
  5722. height: 80px;
  5723. background: #f1f1f1;
  5724. border: 1px solid #dfdfdf;
  5725. border-radius: 10px;
  5726. padding: 0 28px;
  5727. display: flex;
  5728. .bar_icon {
  5729. width: 50px;
  5730. height: 50px;
  5731. background: url("../../assets/images/homestead/searchBar_bar.png")
  5732. center center no-repeat;
  5733. background-size: 100% 100%;
  5734. margin-top: 14px;
  5735. margin-right: 15px;
  5736. }
  5737. .bar_ipt {
  5738. flex: 1;
  5739. input {
  5740. width: 100%;
  5741. height: 100%;
  5742. background: none;
  5743. border: 0 none;
  5744. font-size: 32px;
  5745. }
  5746. }
  5747. .bar_text {
  5748. flex: 0 0 80px;
  5749. font-size: 32px;
  5750. color: #333333;
  5751. font-family: PingFang SC, PingFang SC-Regular;
  5752. font-weight: 400;
  5753. display: flex;
  5754. justify-content: center; /* 相对父元素水平居中 */
  5755. align-items: center; /* 子元素相对父元素垂直居中 */
  5756. }
  5757. }
  5758. .searchBar_more {
  5759. flex: 0 0 80px;
  5760. background: url("../../assets/images/homestead/searchBar_add.png") center
  5761. center no-repeat;
  5762. background-size: 80% 80%;
  5763. margin-left: 15px;
  5764. }
  5765. }
  5766. </style>