移动端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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