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

hncyList2.vue 237 KiB

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