|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843 |
- <template>
- <div class="app-container">
- <van-sticky>
- <div class="bannerBg" style="">
- <van-nav-bar
- style="background:transparent;border-bottom-width:0;"
- @click-left="onClickLeft"
- @click-right="showUploadList"
- >
- <template #left>
- <van-icon name="arrow-left" size=".5rem" color="#fff" />
- </template>
- <template #right>
- <van-icon v-if="$cookies.get('upload')!=null&&$cookies.get('upload')==1" name="photo-o" size=".5rem" color="#fff"/>
- </template>
- <template #title>
- <p style="color:#fff">{{item.deptName}}</p>
- </template>
- </van-nav-bar>
- <van-popup v-model:show="showImageList" position="bottom" style="height:40vh;padding:50px 10px 0" closeable
- close-icon="close">
- <p style="color:#000;position:absolute;top:0.426667rem;left:0.426667rem">图片上传</p>
- <div style="width:100%;height:calc( 40vh - 100px);overflow-y: scroll;">
-
- <van-uploader v-model="uploadImgList" :after-read="beforeReadImageList" @delete="deleteFileImageList" multiple :max-count="50" />
- </div>
- <van-row justify="space-around" style=" position:fixed;bottom:0;left:0;width:100%;height:50px;text-align: center;">
- <van-col span="12"><van-button type="primary" style="width:100px;" round @click="uploadImgList = [],uploadImgList1 = []">清空</van-button></van-col>
- <van-col span="12"><van-button type="primary" style="width:100px;" round @click="submitUploadList">上传</van-button></van-col>
- </van-row>
- </van-popup>
- <div style="display:flex;width:95%;margin:0 auto;justify-content:space-between;padding: 0px 0 15px">
- <div :class="{activeBtn : activeBtn==1,disactiveBtn :activeBtn!=1 }" @click="$router.push({path:'/homesteadSurvey/list'})">入户核查</div>
- <div :class="{activeBtn : activeBtn==2,disactiveBtn :activeBtn!=2 }" @click="$router.push({path:'/homesteadSurvey/list2'})">农户信息</div>
- <div :class="{activeBtn : activeBtn==3,disactiveBtn :activeBtn!=3 }" @click="$router.push({path:'/homesteadSurvey/list3'})">所有权人</div>
- <div :class="{activeBtn : activeBtn==4,disactiveBtn :activeBtn!=4 }" @click="$router.push({path:'/homesteadSurvey/list4'})">切换地图</div>
- </div>
- </div>
- <div style="background:#fff;padding:10px 2.5%;display: flex;justify-content: space-between;">
- <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;">
- <img src="../../assets/images/housesteadSurvey/list01.png" alt="">
- <p style="margin-left: 10px;">
- <span style="color:#60B722;line-height:.8rem;">总户数:</span>
- <span style="color:#60B722;line-height:.8rem;"><span style="font-size:16px;color: #448815;">{{totalH}}</span> 户</span>
- </p>
- </div>
- <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;">
- <img src="../../assets/images/housesteadSurvey/list02.png" alt="">
- <p style="margin-left: 10px;">
- <span style="color:#60B722;line-height:.8rem">总人数:</span>
- <span style="color:#60B722;line-height:.8rem"><span style="font-size:16px;color: #448815;">{{totalR}}</span> 人</span>
- </p>
- </div>
- </div>
- </van-sticky>
- <!--<van-pull-refresh v-model="isLoadingnh" @refresh="onRefreshnh">-->
- <div style="margin:10px auto 0;width: 95%;">
- <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-bottom: 5px;">成员信息</p>
- </div>
- <van-form ref="form">
- <div style="margin:10px auto;background: #ffffff;width: 95%;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16);border-radius:15px;padding-top: 20px;">
- <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">农户成员信息</p>
- <!--<van-field
- v-model="form.deptId"
- name="行政区划名称"
- label="行政区划名称"
- placeholder="行政区划名称"
- :rules="[{ required: true, message: '' }]"
- />-->
- <field-select
- v-model="form.yhzgx"
- label="与户主关系"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="选择与户主关系"
- :columns = "yhzgxOptions"
- @confirm="onyhzgxChanged"
- :on-remote-response="'data'"
- :rules="[{ required: true }]"
- required
- />
- <field-select
- v-if="!showHzxx"
- v-model="form.nhdm"
- label="农户代码"
- value-key="xm"
- placeholder="选择农户代码"
- :columns = "nhdmOptions"
- @confirm="onnhdmChanged"
- :on-remote-response="'data'"
- :rules="[{ required: true }]"
- required
- />
- <van-field
- input-align="right"
- v-model="form.xm"
- name="姓名"
- label="姓名"
- placeholder="请输入姓名"
- maxlength="50"
- autocomplete="off"
- :rules="[{ required: true }]"
- required
- />
- <field-select
- v-model="form.zjlx"
- label="证件类型"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="请输入使用权人证件类型"
- remote-url="/open/zdzh/list/zjlx"
- :on-remote-response="'data'"
- :rules="[{ required: true }]"
- required
- />
- <van-field
- input-align="right"
- v-model="form.zjhm"
- name="证件号码"
- label="证件号码"
- placeholder="请输入使用权人证件号码"
- maxlength="50"
- autocomplete="off"
- :rules="[{ required: true }]"
- required
- />
-
- <field-select
- v-model="form.xb"
- label="性别"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="选择性别"
- remote-url="/open/zdzh/list/sys_user_sex"
- :on-remote-response="'data'"
- :rules="[{ required: true }]"
- required
- />
- <field-select
- v-model="form.hklx"
- label="户口类型"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="选择户口类型"
- remote-url="/open/zdzh/list/account_type"
- :on-remote-response="'data'"
- :rules="[{ required: true }]"
- required
- />
- <van-field
- input-align="right"
- v-model="form.lxdh"
- name="联系电话"
- label="联系电话"
- placeholder="请输入联系电话"
- maxlength="50"
- autocomplete="off"
- />
- <field-select
- v-model="form.hyzk"
- label="婚姻状况"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="选择性别"
- remote-url="/open/zdzh/list/hyzk"
- :on-remote-response="'data'"
- />
- <van-field
- input-align="right"
- v-model="form.hkszd"
- name="户口所在地"
- label="户口所在地"
- placeholder="请输入户口所在地"
- maxlength="50"
- autocomplete="off"
- />
-
- <field-select
- v-model="form.cybz"
- label="成员备注"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="选择成员备注"
- remote-url="/open/zdzh/list/cybz"
- :on-remote-response="'data'"
- />
- <van-field
- input-align="right"
- v-model="form.cybzsm"
- name="备注说明"
- label="备注说明"
- placeholder="请输入备注说明"
- maxlength="50"
- autocomplete="off"
- />
- <FieldRadio
- v-model="form.sfbjtjjzzcy"
- label="是否本集体经济组织成员"
- value-key="dictLabel"
- data-key="dictValue"
- remote-url="/open/zdzh/list/house_yes_no"
- :on-remote-response="'data'"
- />
- <FieldRadio
- v-model="form.sfjbzgq"
- label="具备资格权"
- value-key="dictLabel"
- data-key="dictValue"
- remote-url="/open/zdzh/list/house_yes_no"
- :on-remote-response="'data'"
- />
- <field-select
- v-model="form.sjly"
- label="数据来源"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="选择数据来源"
- remote-url="/open/zdzh/list/sjly"
- :on-remote-response="'data'"
- />
-
-
- <div v-if="showHzxx">
- <p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">户主专用信息</p>
-
- <FieldRadio
- v-model="form.sfwbh"
- label="是否五保户"
- value-key="dictLabel"
- data-key="dictValue"
- remote-url="/open/zdzh/list/house_yes_no"
- :on-remote-response="'data'"
- />
- <FieldRadio
- v-model="form.sfpkh"
- label="是否贫困户"
- value-key="dictLabel"
- data-key="dictValue"
- remote-url="/open/zdzh/list/house_yes_no"
- :on-remote-response="'data'"
- />
- <FieldRadio
- v-model="form.zqtczsfyzf"
- label="在其他村庄有住房"
- value-key="dictLabel"
- data-key="dictValue"
- remote-url="/open/zdzh/list/house_yes_no"
- :on-remote-response="'data'"
- />
- <FieldRadio
- v-model="form.jzhcssfyzf"
- label="在集镇或城市有住房"
- value-key="dictLabel"
- data-key="dictValue"
- remote-url="/open/zdzh/list/house_yes_no"
- :on-remote-response="'data'"
- />
- <FieldRadio
- v-model="form.sfbccm"
- label="本村村民"
- value-key="dictLabel"
- data-key="dictValue"
- remote-url="/open/zdzh/list/house_yes_no"
- :on-remote-response="'data'"
- />
- <field-select
- v-model="form.occupation"
- label="职业"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="选择职业"
- remote-url="/open/zdzh/list/occupation"
- :on-remote-response="'data'"
- />
- <field-select
- v-model="form.jzqk"
- label="居住情况"
- value-key="dictLabel"
- data-key="dictValue"
- placeholder="选择居住情况"
- remote-url="/open/zdzh/list/living_condition"
- :on-remote-response="'data'"
- />
- <van-field
- input-align="right"
- v-model="form.txdz"
- name="通讯地址"
- label="通讯地址"
- placeholder="请输入通讯地址"
- maxlength="50"
- autocomplete="off"
- :rules="[{ required: true }]"
- required
- />
- </div>
- </div>
- <div style="margin: 16px;display: flex;justify-content: space-around;">
- <van-button round color="#22B7F2" style="width:45%" @click="submitzjd">保存</van-button>
- <van-button plain color="#22B7F2" style="width:45%" round type="info" @click="cancel">取消</van-button>
- </div>
- <div style="height: 50px;"></div>
- </van-form>
- <!-- </van-pull-refresh>-->
- </div>
- </template>
-
- <script>
- import {getQueryLand,getZjdzd,delZjdzdInfo,uploadFile,submitUploadImageList} from "@/api/homesteadSurvey/zjdzd";
- import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh";
- import {addNhhncy, delNhhncy, exportNhhncy, getNhhncy, listNhhncy, updateNhhncy} from "@/api/homesteadSurvey/nhhncy";
- import {listShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr";
- import {listSuyqr,updateSuyqr,addSuyqr} from "@/api/homesteadSurvey/suyqr";
- import {listZrz,getZrzZjdDmList,getZrz} from "@/api/homesteadSurvey/zrz";
- import {listFsss,getFsssZjdDmList,getFsss} from "@/api/homesteadSurvey/fsss";
- import {getGeoServerConfigKey} from "@/api/system/config";
- import FieldSelect from "@/components/form/FieldSelect";
- import FieldRadio from "@/components/form/FieldRadio";
- import {deptGetId,} from "@/api/homestead/index";
- import $ from "jquery";
- import {Dialog} from "vant";
- import {ref} from "vue";
- import axios from "axios";
- export default {
- name: "hncyDetails",
- components: {FieldSelect, FieldRadio},
- data() {
- return {
- loading1:false,
- finished1:false,
- loading2:false,
- finished2:false,
- loading3:false,
- finished3:false,
- //全部
- qbNums:0,
- //已调查数量
- yhcNums:0,
- //未核查数量
- whcNums:0,
- // 总户数
- totalH:0,
- // 总人数
- totalR:0,
- zjdSx:true,
- zrzSx :true,
- fsssSx:true,
- showhncysjly:false,
- showhzsjly:false,
- showhncycybz:false,
- showhncyzjlx:false,
- showhncyyhzgx:false,
- showhzjzhcssfyzf:false,
- showhncyoccupation:false,
- showhncyjzqk:false,
- showhzoccupation:false,
- showhzjzqk:false,
- nhdmOptions:null,
- showHzxx:false,
- // 下拉刷新
- isLoadingnh:false,
- countnh:0,
- isLoadingzjd:false,
- countqb:1,
- countyhc:1,
- countwhc:1,
- // 使用权人表单弹出
- shownh:false,
- showhzht:false,
- showhzlx:false,
- showhncylist:false,
- showhncy:false,
- activeBtn:2,
- value:'',
- // 宅基地搜索框
- zjdvalue:"",
- // 使用权人搜索框
- nhvalue:"",
- active:2,
- // 全部列表
- list:[],
- // 已核查列表
- list1:[],
- // 未核查列表
- list2:[],
- // 户主列表
- nhlist:[],
- // 户内成员表单
- form: {},
- // 户内成员列表
- hncylist:[],
- currentRate:20,
- // 使用权人
- nhform:[],
- // 户主列表
- hzform:{},
- // 权利人列表
- qlrform:[],
- // 权利人性质弹出框
- showsuyqxz:false,
- // 代理人证件类型弹出框
- showdlrzjlx:false,
- // 代表人证件类型弹出框
- showdbrzjlx:false,
- // 数据来源弹出框
- showsjly:false,
- // 证件类型字典
- zjlxOptions: [],
- // 所有权性质字典
- suyqxzOption: [],
- // 婚姻状况字典
- hyzkOptions:[],
- // 数据来源字典
- sjlyOptions:[],
- // 居住情况字典
- jzqkOptions:[],
- // 与户主关系字典
- yhzgxOptions:[],
- // 职业字典
- occupationOptions:[],
- // 集镇或城市是否有住房字典
- jzhcssfyzfOptions:[],
- // 成员备注字典
- cybzOptions:[],
- columns:[],
- show1:false,
- showhzzjlx: false,
- // 路由传过来的任务基本信息。
- item: {},
- //地图使用 --start
- openMap: false,
- mapTheGeomZrzId: null,
- mapTheGeomZjdId: null,
- mapTheGeomFsssId: null,
- drawInsert:null,
- mapZjdData:"",
- mapZrzData:"",
- mapFsssData:"",
- mapZjdDataTure:"",
- mapZjdTeAll:{
- active:"",
- mapZjdAData:{},
- mapZrzAData:{},
- mapFsssAData:{},
- },
- mapHaDataValue:false,
- mapHasDateStatus: 0, //0附属设施 1自然幢 2宅基地
- selectionIconShow:false,
- homesteadListStatus:false,
- //地图绘制状态
- draw: {
- drawMapPolygon: false, //绘制地图
- },
- mapTownList: null,
- mapVillageList: null,
- coordinate:"",
- checked:['zjdSx', 'zrzSx', 'fsssSx'],
- checkAllMap: false,
- sx:"",
- drawingClick:true,
- //搜索---start
- seachText: "",
- //搜索栏目-操作栏显隐
- searchBarOperVisbile: false,
- mapDataAll: [],
- showSearch:false,
- bottomHeight:'0px',
- //搜索---end
- //测面
- textMjAll:"",
- clickBbox:"",
- textMjAllNum:"",
- //核查
- zjdHcDy:"",
- //绘图
- htZjdZrzFsss:"",
- //筛选
- checkAllFlag: true,
- CheckedAllArr: [],//全选数组
- dataForm: {
- imageUrl: []
- },
- dataList: [["fsssSx"],["zjdSx"],["zrzSx"]], //地图使用 --end
- checkBoxAll:[],
- //地图跳转存之
- mapAddJump:"",
- mapAddJumpNum:"",
- nhdm:"",
- backTheGeom:"",
- //地图服务地址
- mapGeoServerUrl:"",
- backMap:"",
- // 任务完成标记
- //宅基地点击事件
- mapXs: false,
- mapClick:"",
- isFinished:false,
- //
- showImageList:false,
- uploadImgList:[],
- uploadImgList1:[],
- // 字典列表json
- dictTypeList:null,
- };
- },
- mounted(){
- },
- created(){
- axios.get('../static/dictyType.json').then(res => {
- this.dictTypeList = res.data
- this.zjlxOptions = this.dictTypeList.zjlx;
- this.suyqxzOptions = this.dictTypeList.qsxz;
- this.sjlyOptions = this.dictTypeList.sjly;
- this.hyzkOptions = this.dictTypeList.hyzk;
- this.occupationOptions = this.dictTypeList.occupation;
- this.jzqkOptions = this.dictTypeList.living_condition;
- this.jzhcssfyzfOptions = this.dictTypeList.jzhcssfyzf;
- this.cybzOptions = this.dictTypeList.member_remark;
- })
- this.getList();
- this.item = JSON.parse(localStorage.getItem("surveyItem"));
- let data = this.$route.query;
- this.form = data.item;
- if(this.form.id == null){
- this.$set(this.form, 'zjlx', "01");
- this.$set(this.form, 'xb', "1");
- this.$set(this.form, 'yhzgx', "22");
- this.$set(this.form, 'hklx', "01");
- this.$set(this.form, 'hyzk', "01");
- this.$set(this.form, 'cybz', "9");
- this.$set(this.form, 'sjly', "01");
- this.$set(this.form, 'sfbjtjjzzcy', "1");
- this.$set(this.form, 'sfjbzgq', "1");
- this.$set(this.form, 'sfwbh', "0");
- this.$set(this.form, 'sfpkh', "0");
- this.$set(this.form, 'zqtczsfyzf', "0");
- this.$set(this.form, 'jzhcssfyzf', "0");
- this.$set(this.form, 'sfbccm', "1");
- this.$set(this.form, 'occupation', "1");
- this.$set(this.form, 'jzqk', "1");
- }
- if(this.form.yhzgx !== "02"){
- this.showHzxx = false;
- }else{
- this.showHzxx = true;
- }
- this.getDicts("family_status").then(response => {
- var arr = [];
- response.data.forEach(function (item) {
- arr.push(item)
- });
- this.yhzgxOptions = arr;
- });
- if(this.$cookies.get("search") != null && this.$cookies.get("search") !="" && this.$cookies.get("search")!=undefined){
- if(this.$cookies.get("search").activeBtn !=null){
- if(this.$cookies.get("search").activeBtn == 4){
- // if(location.href.indexOf("#reloaded")==-1){
- // location.href=location.href+"#reloaded";
- // location.reload();
- // }
- this.activeBtn = this.$cookies.get("search").activeBtn;
- this.mapAddJump = this.$cookies.get("search").backMapZjdAData.deptId;
- this.backTheGeom = this.$cookies.get("search").backMapZjdAData.theGeom;
- this.mapZjdData = this.$cookies.get("search").backMapZjdAData;
- this.mapZjdTeAll.mapZjdAData = this.$cookies.get("search").backMapZjdAData;
- this.mapClick = this.mapZjdTeAll.mapZjdAData.zjddm;
- this.mapXs =true;
- this.zjdHcDy = 1;
- this.mapZjdDataTure = 1;
- this.mapAddJumpNum =1;
- this.mapShow();
- this.getZjdList();
- this.getTotalHR();
- if(this.item.taskStatus=="FINISHED"){
- this.isFinished = true
- }else{
- this.isFinished = false
- }
- }
- }else {
- this.getZjdList();
- this.getTotalHR();
- if(this.item.taskStatus=="FINISHED"){
- this.isFinished = true
- }else{
- this.isFinished = false
- }
- }
- }else {
- this.getZjdList();
- this.getTotalHR();
- if(this.item.taskStatus=="FINISHED"){
- this.isFinished = true
- }else{
- this.isFinished = false
- }
- }
- },
- methods: {
- getList(){
- listNhhncy({yhzgx:"02"}).then(response => {
- this.nhdmOptions = response.rows;
- this.nhdmOptions = this.nhdmOptions.map(function(item){
- item.xm = item.xm +"-"+ item.nhdm;
- return {xm:item.xm,nhdm:item.nhdm}
- });
- });
- },
- showUploadList(){
- this.showImageList = true;
- },
- submitUploadList(){
- submitUploadImageList(this.uploadImgList1).then(res => {
- let _this = this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '上传成功',
- duration:"1000",
- onClose:function(){
- _this.showImageList = false
- }
- })
- })
- },
- // 图片上传前
- beforeReadImageList(file){
- let _this = this
- if(file.length!=undefined){
- file.map(res => {
- let zjddm = res.file.name
- //zjddm=zjddm.substring(0,zjddm.lastIndexOf("\("));
- // 创建Canvas对象(画布)
- let canvas = document.createElement('canvas')
- // 获取对应的CanvasRenderingContext2D对象(画笔)
- let context = canvas.getContext('2d')
- // 创建新的图片对象
- let img = new Image()
- // 指定图片的DataURL(图片的base64编码数据)
- img.src = res.content
- // 监听浏览器加载图片完成,然后进行进行绘制
- img.onload = () => {
- /*const h = img.height
- const w = img.width*/
- let ch = img.height/5
- let cw = img.width/5
- let canvas = document.createElement('canvas')
- let ctx = canvas.getContext('2d')
- canvas.height = ch
- canvas.width = cw
- ctx.clearRect(0,0,cw,ch)
- ctx.drawImage(img,0,0,cw,ch)
- let base_img = canvas.toDataURL('image/jpeg')
- let blobBin = atob(base_img.split(',')[1])
- let d = []
- for (let i=0;i<blobBin.length;i++){
- d.push(blobBin.charCodeAt(i))
- }
- let data2 = new FormData();
- data2.append("file", new Blob([new Uint8Array(d)],{type:'image/jpeg'}));
- uploadFile(data2).then(response => {
- let p={
- "zjddm":zjddm,
- "url":response.fileName
- }
- _this.uploadImgList1.push(p)
- })
- }
- })
- }else{
- let zjddm = file.file.name
- //zjddm=zjddm.substring(0,zjddm.lastIndexOf("\("));
- // 创建Canvas对象(画布)
- let canvas = document.createElement('canvas')
- // 获取对应的CanvasRenderingContext2D对象(画笔)
- let context = canvas.getContext('2d')
- // 创建新的图片对象
- let img = new Image()
- // 指定图片的DataURL(图片的base64编码数据)
- img.src = file.content
- // 监听浏览器加载图片完成,然后进行进行绘制
- img.onload = () => {
- /*const h = img.height
- const w = img.width*/
- let ch = img.height/5
- let cw = img.width/5
- let canvas = document.createElement('canvas')
- let ctx = canvas.getContext('2d')
- canvas.height = ch
- canvas.width = cw
- ctx.clearRect(0,0,cw,ch)
- ctx.drawImage(img,0,0,cw,ch)
- let base_img = canvas.toDataURL('image/jpeg')
- let blobBin = atob(base_img.split(',')[1])
- let d = []
- for (let i=0;i<blobBin.length;i++){
- d.push(blobBin.charCodeAt(i))
- }
- let data2 = new FormData();
- data2.append("file", new Blob([new Uint8Array(d)],{type:'image/jpeg'}));
- uploadFile(data2).then(response => {
- let p={
- "zjddm":zjddm,
- "url":response.fileName
- }
- _this.uploadImgList1.push(p)
- })
- }
- }
-
- },
- deleteFileImageList(file){
- let url = file.file.name
- this.uploadImgList1.map((res,index) => {
- if(res.zjddm==url){
- this.uploadImgList1.remove(index);
- }
- })
- },
- validatorIdcardqlr(val){
- if(this.qlrform.dbrzjlx=='01'){
- if(this.vcheckID(val)){
- return true
- }else {
- return false
- }
- }else{
- return true
- }
- },
- validatorIdcardnh(val){
- if(this.nhform.hzzjlx=='01'){
- if(this.vcheckID(val)){
- return true
- }else {
- return false
- }
- }else{
- return true
- }
- },
- validatorIdcardhncy(val){
- if(this.form5.zjlx=='01'){
- if(this.vcheckID(val)){
- return true
- }else {
- return false
- }
- }else{
- return true
- }
- },
- checkCode(val) {
- 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]$/;
- var factor = [ 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 ];
- var parity = [ 1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2 ];
- var code = val.substring(17);
- if(p.test(val)) {
- var sum = 0;
- for(var i=0;i<17;i++) {
- sum += val[i]*factor[i];
- }
- if(parity[sum % 11] == code.toUpperCase()) {
- return true;
- }
- }
- return false;
- },
- checkDate (val) {
- var pattern = /^(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)$/;
- if(pattern.test(val)) {
- var year = val.substring(0, 4);
- var month = val.substring(4, 6);
- var date = val.substring(6, 8);
- var date2 = new Date(year+"-"+month+"-"+date);
- if(date2 && date2.getMonth() == (parseInt(month) - 1)) {
- return true;
- }
- }
- return false;
- },
- checkProv(val) {
- var pattern = /^[1-9][0-9]/;
- 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:"澳门"};
- if(pattern.test(val)) {
- if(provs[val]) {
- return true;
- }
- }
- return false;
- },
- vcheckID(val){
- if(this.checkCode(val)) {
- var date = val.substring(6,14);
- if(this.checkDate(date)) {
- if(this.checkProv(val.substring(0,2))) {
- return true;
- }
- }
- }
- return false;
- },
- deleteZjd(item,index){
- Dialog.confirm({
- title: '警告',
- message: '将删除与此宅基地关联的使用权人,自然幢,房屋,附属设施等所有信息,同时删除后无法恢复,确认删除么?',
- })
- .then(() => {
- // on confirm
- delZjdzdInfo(item).then(res => {
- if(res.code=="200"){
- if(this.active==1){
- this.list1.splice(index,1);
- }else if(this.active==2){
- this.list2.splice(index,1);
- }else{
- this.list.splice(index,1);
- }
- }
- })
- })
- .catch(() => {
- // on cancel
- });
- },
- onnhdmChanged(val){
- this.$set(this.form, 'nhdm', val.nhdm);
- },
- onyhzgxChanged(val){
- if(val === "02" ){
- this.showHzxx = true;
- }else{
- this.showHzxx = false;
- }
- },
- //删除户主
- deletenh(item,index){
- let yes = true
- let params={
- nhdm : item.nhdm,
- deptId: item.deptId
- }
- listNhhncy(params).then((res) => {
- console.log(res.rows.length)
- if(res.rows.length>0){
- yes = false
- this.$toast({
- icon: 'error', // 找到自己需要的图标
- message: '无法删除,此户主存在户内成员!',
- duration:"1000",
- onClose:function(){
- }
- })
- }else{
- listShyqr(params).then((res) => {
- if(res.rows.length>0){
- yes = false
- this.$toast({
- icon: 'error', // 找到自己需要的图标
- message: '无法删除,此户主已经成为使用权人!',
- duration:"1000",
- onClose:function(){
- }
- })
- }else{
- if(yes){
- Dialog.confirm({
- title: '警告',
- message: '确认删除此使用权人么?',
- })
- .then(() => {
- // on confirm
- delNh(item.id).then(res => {
- if(res.code=="200"){
- this.nhlist.splice(index,1);
- this.totalH--
- this.totalR--
- }
- })
- })
- .catch(() => {
- // on cancel
- });
- }
- }
- });
- }
- });
-
- },
- // 设为户主
- setNh(item,index){
- Dialog.confirm({
- title: '警告',
- message: '此操作将删除原户主,并将此成员设为新户主,是否确认操作?',
- })
- .then(() => {
- // on confirm
- delNhhncy(item.id).then(res => {
- if(res.code=="200"){
- this.hncylist.splice(index,1);
- this.totalR--
- }
- })
- // 更新户主信息
- let pnh = {
- deptId : item.deptId,
- nhdm : item.nhdm,
- hzxm:item.xm,
- hzzjlx :item.zjlx,
- hzzjhm :item.zjhm
- }
- setNhInfo(pnh).then(res => {
- })
- // 更新使用权人
- let psyqr = {
- deptId : item.deptId,
- nhdm : item.nhdm,
- shyqrdbxm : item.xm,
- shyqrdbzjlx : item.zjlx,
- shyqrdbzjhm : item.zjhm,
- xb : item.xb
- }
- setSyqrInfo(psyqr).then(res => {
- })
- })
- .catch(() => {
- // on cancel
- });
- },
- //删除户内成员
- deletehncy(id,index){
- Dialog.confirm({
- title: '警告',
- message: '删除后无法恢复,确认删除此成员么?',
- })
- .then(() => {
- // on confirm
- delNhhncy(id).then(res => {
- if(res.code=="200"){
- this.hncylist.splice(index,1);
- this.totalR--
- }
- })
- })
- .catch(() => {
- // on cancel
- });
- },
- // 字数限制
- limitWords(val){
- if(val==null||val==""){
- return "无"
- }else{
- if(val.length>11){
- val = val.slice(0,10) +"..."
- }
- return val
- }
- },
- // 与户主关系翻译
- yhzgxfy(value){
- let label
- this.yhzgxOptions.map(res => {
- if(res.dictValue == value){
- label = res.dictLabel
- }
- })
- return label
- },
-
- onRefreshzjd(){
- this.isLoadingzjd = false;
- let _this = this
- if(this.active==1&&this.loading2){
- let params = {
- "deptId" : this.item.deptId,
- "houseDataConfirmStatus" : "CONFIRMED",
- "pageNum": this.countyhc+1,
- "pageSize":10,
- }
- listZjdzd(params).then((response) => {
- if(response.rows.length>0&&this.list1.length<response.total){
- response.rows.map(res => {
- this.list1.push(res)
- })
- this.countyhc++
- this.loading2 = false
- }else{
- this.loading2 = false
- this.finished2 = true
- }
- });
- }else if(this.active==2&&this.loading3){
- let params = {
- "deptId" : this.item.deptId,
- "houseDataConfirmStatus" : "UNCONFIRMED",
- "pageNum": this.countwhc+1,
- "pageSize":10,
- }
- listZjdzd(params).then((response) => {
- if(response.rows.length>0&&this.list2.length<response.total){
- response.rows.map(res => {
- this.list2.push(res)
- })
- this.countwhc++
- this.loading3 = false
- }else{
- this.finished3 = true
- }
- });
- }else if(this.active==0&&this.loading1){
- let params = {
- "deptId" : this.item.deptId,
- "pageNum": this.countqb+1,
- "pageSize":10,
- }
- listZjdzd(params).then((response) => {
- if(response.rows.length>0&&this.list.length<response.total){
- response.rows.map(res => {
- _this.list.push(res)
- })
- this.countqb++
- this.loading1 = false
- }else{
- this.finished1 = true
- }
- });
- }
- },
- getTotalHR(){
- let params = {
- "pageNum": 1,
- "pageSize":10,
- }
- listNh(params).then((response) => {
- if(response.rows.length>=0){
- this.totalH = response.total
- }
- listNhhncy(params).then((res) => {
- if(res.rows.length>=0){
- this.totalR = res.total + this.totalH
- }
- });
- });
-
- },
- onRefreshnh(){
- this.isLoadingnh = false
- let params = {
- "deptId" : this.item.deptId,
- "pageNum": this.countnh+1,
- "pageSize":10,
- }
- listNh(params).then((response) => {
- if(response.rows.length>0&&this.nhlist.length<response.total){
- response.rows.map(res => {
- this.nhlist.unshift(res)
- })
- this.countnh++
- }
- });
- },
- setCookies(item){
- //this.$cookies.set("search",JSON.stringify(item));
- this.$cookies.set("search","");
- // let _this = this
- // setTimeout(function(){
- // _this.$router.push({name:'homesteadAdd'});
- // },1000)
-
- this.$router.push({path:'/homesteadSurvey/add',query: {res: item}});
- },
- // 入户核查搜索框新增。
- onClickzjd(){
- this.$cookies.remove("search");
- this.$router.push({name:'homesteadAdd'});
- },
- // 农户信息搜索框新增。
- onClicknh(){
- this.shownh = true;
- let params = {
- "deptId" : this.item.deptId
- }
- this.qlrform={}
- this.nhform={
- "suyqrdm":null,
- "deptId":this.item.deptId,
- "hzzjlx":'01',
- "hzzjlxName":"身份证",
- "hyzk":'02',
- "occupation":'1',
- "occupationName":'务农',
- "jzqk":'3',
- "jzqkName":'常年居住',
- "jzhcssfyzf":'1',
- "jzhcssfyzfName":'无住房',
- "zqtczsfyzf":'Y',
- "sfbccm":'Y',
- "sfpkh":'N',
- "sfwbh":'N',
- "sjly":'07',
- "sjlyName":'农村集体产权制度改革',
- }
- listSuyqr(params).then((response) => {
- if(response.rows.length>0){
- this.qlrform = response.rows[0]
- this.nhform.suyqrdm = this.qlrform.suyqrdm
- this.nhform.txdz = response.rows[0].suyqrmc
- }
- });
- },
- // 返回
- onClickLeft(){
- this.$cookies.set("search","")
- this.$router.push({name: this.$router.back(-1)});
- },
- onConfirmhncysjly(value){
- this.form5.sjlyName = value.dictLabel
- this.form5.sjly = value.dictValue
- this.showhncysjly= false
- },
- onConfirmhzsjly(value){
- this.nhform.sjlyName = value.dictLabel
- this.nhform.sjly = value.dictValue
- this.showhzsjly= false
- },
- onConfirmhncycybz(value){
- this.form5.cybzName = value.dictLabel
- this.form5.cybz = value.dictValue
- this.showhncycybz= false
- },
- onConfirmhzjzhcssfyzf(value){
- this.nhform.jzhcssfyzfName = value.dictLabel
- this.nhform.jzhcssfyzf = value.dictValue
- this.showhzjzhcssfyzf= false
- },
- onConfirmhncyyhzgx(value){
- this.form5.yhzgxName = value.dictLabel
- this.form5.yhzgx = value.dictValue
- this.showhncyyhzgx = false
- },
- onConfirmhncyzjlx(value){
- this.form5.zjlxName = value.dictLabel
- this.form5.zjlx = value.dictValue
- this.showhncyzjlx = false
- },
- onConfirmhncyjzqk(value){
- this.form5.jzqkName = value.dictLabel
- this.form5.jzqk = value.dictValue
- this.showhncyjzqk = false
- },
- onConfirmhzjzqk(value){
- this.nhform.jzqkName = value.dictLabel
- this.nhform.jzqk = value.dictValue
- this.showhzjzqk = false
- },
- onConfirmhncyoccupation(value){
- this.form5.occupationName = value.dictLabel
- this.form5.occupation = value.dictValue
- this.showhncyoccupation = false
- },
- onConfirmhzoccupation(value){
- this.nhform.occupationName = value.dictLabel
- this.nhform.occupation = value.dictValue
- this.showhzoccupation = false
- },
- onConfirmhzzjlx(value){
- this.nhform.hzzjlxName = value.dictLabel
- this.nhform.hzzjlx = value.dictValue
- this.showhzzjlx = false
- },
- onConfirmdbrzjlx(value){
- this.qlrform.dbrzjlxName = value.dictLabel
- this.qlrform.dbrzjlx = value.dictValue
- this.showdbrzjlx = false
- },
- onConfirmsuyqxz(value){
- this.qlrform.suyqxzName = value.dictLabel
- this.qlrform.suyqxz = value.dictValue
- this.showsuyqxz = false
- },
- onConfirmdlrzjlx(value){
- this.qlrform.dlrzjlxName = value.dictLabel
- this.qlrform.dlrzjlx = value.dictValue
- this.showdlrzjlx = false
- },
- onConfirmsjly(value){
- this.qlrform.sjlyName = value.dictLabel
- this.qlrform.sjly = value.dictValue
- this.showsjly = false
- },
- // 户主保存
- onSubmitnh(){
- if(this.nhform.id!=null){
- updateNh(this.nhform).then(
- response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.getNh()
- let psyqr = {
- deptId : _this.nhform.deptId,
- nhdm : _this.nhform.nhdm,
- shyqrdbxm : _this.nhform.hzxm,
- shyqrdbzjlx : _this.nhform.hzzjlx,
- shyqrdbzjhm : _this.nhform.hzzjhm,
- dh : _this.nhform.phone,
- dz : _this.nhform.txdz
- }
- setSyqrInfo(psyqr).then(res => {
- _this.shownh = false
- })
- }
- })
- }
- );
- }else{
- this.nhform.deptId = this.item.deptId
- addNh(this.nhform).then(
- response => {
- this.totalR+=1
- this.totalH+=1
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.shownh = false
- _this.getNh()
- }
- })
- }
- );
- }
- },
- // 所有权人保存
- onSubmitsyqr(){
- if(this.qlrform.id!=null){
- updateSuyqr(this.qlrform).then(
- response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000"
- })
- }
- );
- }else{
- this.qlrform.deptId = this.item.deptId
- addSuyqr(this.qlrform).then(
- response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000"
- })
- }
- );
- }
- },
- // 查询所有权人
- getSyqr(){
- //删除地图选中状态
- $("#deleteHistoryMap").trigger("click");
- let params = {
- "deptId" : this.item.deptId
- }
- this.qlrform ={
- "deptId":this.item.deptId,
- "suyqxz":'40',
- "suyqxzName":'集体土地所有权',
- "dbrzjlx":'01',
- "dbrzjlxName":'身份证',
- "sfclncjtjjzz":'Y',
- "sjly":'04',
- "sjlyName":"农村宅基地使用权确权登记发证"
- }
- listSuyqr(params).then((response) => {
- if(response.rows.length>0){
- this.qlrform = response.rows[0]
- if(this.qlrform.suyqxz==null||this.qlrform.suyqxz==""){
- this.qlrform.suyqxz = "40"
- this.qlrform.suyqxzName = "集体土地所有权"
- }
- if(this.qlrform.dbrzjlx==null||this.qlrform.dbrzjlx==""){
- this.qlrform.dbrzjlx = "01"
- this.qlrform.dbrzjlxName = "身份证"
- }
- if(this.qlrform.sfclncjtjjzz==null||this.qlrform.sfclncjtjjzz==""){
- this.qlrform.sfclncjtjjzz = "Y"
- }
- if(this.qlrform.sjly==null||this.qlrform.sjly==""){
- this.qlrform.sjly = "04"
- this.qlrform.sjlyName = "农村宅基地使用权确权登记发证"
- }
- this.zjlxOptions.map(res => {
- if(res.dictValue == this.qlrform.dbrzjlx){
- this.qlrform.dbrzjlxName = res.dictLabel
- }
- if(res.dictValue == this.qlrform.dlrzjlx){
- this.qlrform.dlrzjlxName = res.dictLabel
- }
- })
- this.suyqxzOptions.map(res => {
- if(res.dictValue == this.qlrform.suyqxz){
- this.qlrform.suyqxzName = res.dictLabel
- }
- })
- this.sjlyOptions.map(res => {
- if(res.dictValue == this.qlrform.sjly){
- this.qlrform.sjlyName = res.dictLabel
- }
- })
- }
- });
- this.mapZjdData = "";
- this.mapZrzData = "";
- this.mapFsssData = "";
- //that.mapZjdTeAll.active ="1";
- this.mapZjdTeAll.mapZjdAData = {};
- this.mapZjdTeAll.mapZrzAData = {};
- this.mapZjdTeAll.mapFsssAData = {};
- this.mapZjdDataTure = "";
- this.mapXs =false;
- this.mapClick ="";
- this.mapAddJump = "";
- this.backTheGeom = "";
- this.zjdHcDy = "";
- this.mapZjdDataTure = "";
- this.mapAddJumpNum ="";
- },
- // 查询农户列表
- getNh(val){
- //删除地图选中状态
- $("#deleteHistoryMap").trigger("click");
- console.info(this.item.deptId);
- let params = {
- dept:this.item.deptId,
- nhdm : val
- }
- listNhhncy(params).then((response) => {
- this.hncylist = response.rows
- this.hncylist.map(function(item){
- item.y
- });
- this.totalN = response.total
- });
- this.mapZjdData = "";
- this.mapZrzData = "";
- this.mapFsssData = "";
- //that.mapZjdTeAll.active ="1";
- this.mapZjdTeAll.mapZjdAData = {};
- this.mapZjdTeAll.mapZrzAData = {};
- this.mapZjdTeAll.mapFsssAData = {};
- this.mapZjdDataTure = "";
- this.mapXs =false;
- this.mapClick ="";
- this.mapAddJump = "";
- this.backTheGeom = "";
- this.zjdHcDy = "";
- this.mapZjdDataTure = "";
- this.mapAddJumpNum ="";
- },
- //调查
- getDc(){
- //删除地图选中状态
- $("#deleteHistoryMap").trigger("click");
- this.mapZjdData = "";
- this.mapZrzData = "";
- this.mapFsssData = "";
- //that.mapZjdTeAll.active ="1";
- this.mapZjdTeAll.mapZjdAData = {};
- this.mapZjdTeAll.mapZrzAData = {};
- this.mapZjdTeAll.mapFsssAData = {};
- this.mapZjdDataTure = "";
- this.mapXs =false;
- this.mapClick ="";
- this.mapAddJump = "";
- this.backTheGeom = "";
- this.zjdHcDy = "";
- this.mapZjdDataTure = "";
- this.mapAddJumpNum ="";
- },
- // 宅基地搜索框
- onSearchzjd(){
- if(this.active==1){
- let params = {
- "deptId" : this.item.deptId,
- "houseDataConfirmStatus" : "CONFIRMED",
- "syqr" : this.zjdvalue
- }
- listZjdzd(params).then((response) => {
- if (response.code == 200) {
- this.list1 = response.rows
- }
- });
- }else if(this.active==2){
- let params = {
- "deptId" : this.item.deptId,
- "houseDataConfirmStatus" : "UNCONFIRMED",
- "syqr" : this.zjdvalue
- }
- listZjdzd(params).then((response) => {
- if (response.code == 200) {
- this.list2 = response.rows
- }
- });
- }else{
- let params = {
- "deptId" : this.item.deptId,
- "syqr" : this.zjdvalue
- }
- listZjdzd(params).then((response) => {
- if (response.code == 200) {
- this.list = response.rows
- }
- });
- }
- },
- // 户内成员弹窗
- showPopuphncy(item){
- this.showhncy = true
- if(item.id==null||item.id==""){
- this.form5 = {
- "nhdm":this.nhdm,
- "deptId":this.item.deptId,
- "zjlx":'01',
- "zjlxName":"身份证",
- "yhzgx":"14",
- "yhzgxName":"妻",
- "hyzk":'02',
- "hklx":'1',
- "occupation":'1',
- "occupationName":'务农',
- "jzqk":'3',
- "jzqkName":'常年居住',
- "sfbjtjjzzcy":'Y',
- "xb":'0',
- "sfbccm":'Y',
- "sfpkh":'N',
- "sfwbh":'N',
- "sjly":'07',
- "sjlyName":'农村集体产权制度改革',
- "cybz":'9',
- "cybzName":'其他备注'
- }
- }else{
- let _this = this
- this.form5 = item
- if(this.form5.nhdm==null||this.form5.nhdm==""){
- this.form5.nhdm = this.nhform.nhdm
- }
- if(this.form5.deptId==null||this.form5.deptId==""){
- this.form5.deptId = this.nhform.deptId
- }
- if(this.form5.zjlx==null||this.form5.zjlx==""){
- this.form5.zjlx = "01"
- this.form5.zjlxName = "身份证"
- }
- if(this.form5.yhzgx==null||this.form5.yhzgx==""){
- this.form5.yhzgx = "14"
- this.form5.yhzgxName = "妻"
- }
- if(this.form5.hyzk==null||this.form5.hyzk==""){
- this.form5.hyzk = "02"
- }
- if(this.form5.hklx==null||this.form5.hklx==""){
- this.form5.hklx = "1"
- }
- if(this.form5.occupation==null||this.form5.occupation==""){
- this.form5.occupation = "1"
- this.form5.occupationName = "务农"
- }
- if(this.form5.jzqk==null||this.form5.jzqk==""){
- this.form5.jzqk = "3"
- this.form5.jzqkName = "常年居住"
- }
- if(this.form5.sfbjtjjzzcy==null||this.form5.sfbjtjjzzcy==""){
- this.form5.sfbjtjjzzcy = "Y"
- }
- if(this.form5.xb==null||this.form5.xb==""){
- this.form5.xb = "0"
- }
- if(this.form5.sfbccm==null||this.form5.sfbccm==""){
- this.form5.sfbccm = "Y"
- }
- if(this.form5.sfpkh==null||this.form5.sfpkh==""){
- this.form5.sfpkh = "N"
- }
- if(this.form5.sfwbh==null||this.form5.sfwbh==""){
- this.form5.sfwbh = "N"
- }
- if(this.form5.sjly==null||this.form5.sjly==""){
- this.form5.sjly = "07"
- this.form5.sjlyName = "农村集体产权制度改革"
- }
- if(this.form5.cybz==null||this.form5.cybz==""){
- this.form5.cybz = "9"
- this.form5.cybzName = "其他备注"
- }
- this.jzhcssfyzfOptions.map(res => {
- if(res.dictValue == item.jzhcssfyzf){
- this.form5.jzhcssfyzfName = res.dictLabel
- }
- })
- this.zjlxOptions.map(res => {
- if(res.dictValue == item.zjlx){
- this.form5.zjlxName = res.dictLabel
- }
- })
- this.occupationOptions.map(res => {
- if(res.dictValue == item.occupation){
- this.form5.occupationName = res.dictLabel
- }
- })
- this.jzqkOptions.map(res => {
- if(res.dictValue == item.jzqk){
- this.form5.jzqkName = res.dictLabel
- }
- })
- this.yhzgxOptions.map(res => {
- if(res.dictValue == item.yhzgx){
- this.form5.yhzgxName = res.dictLabel
- }
- })
- this.cybzOptions.map(res => {
- if(res.dictValue == item.cybz){
- this.form5.cybzName = res.dictLabel
- }
- })
- this.sjlyOptions.map(res => {
- if(res.dictValue == item.sjly){
- this.form5.sjlyName = res.dictLabel
- }
- })
- }
- },
- submitzjd(){
- this.$refs.form.validate().then(() => {
- if(this.form.id == null){
- addNhhncy(this.form).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.$router.push({path:'/homesteadSurvey/hncyList2',query: {nhdm: response.data}});
- }
- })
- });
- }else{
- updateNhhncy(this.form).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.$router.push({path:'/homesteadSurvey/hncyList2',query: {nhdm: _this.form.nhdm}});
- }
- })
- });
- }
- }).catch((e) => {
- Dialog({ type: 'danger', message: '请填写完整的表单项' });
- });
-
-
- },
- cancel(){
- this.$router.push({path:'/homesteadSurvey/hncyList2',query: {nhdm: this.form.nhdm}});
- },
- // 户内成员列表
- showPopuphncylist(item){
- if(item.nhdm==null||item.nhdm==""){
- this.$toast({
- icon: 'error', // 找到自己需要的图标
- message: '请先保存户主信息',
- duration:"1000"
- })
- }else{
- this.nhdm = item.nhdm
- this.showhncylist = true
- let params = {
- "nhdm":item.nhdm,
- "deptId":this.item.deptId
- }
- this.$router.push({name:'nhcyList',query:{nhdm:item.nhdm}});
- }
-
- },
- showPopupnh(item){
- this.shownh = true
- this.nhform = item
- this.jzhcssfyzfOptions.map(res => {
- if(res.dictValue == item.jzhcssfyzf){
- this.nhform.jzhcssfyzfName = res.dictLabel
- }
- })
- this.zjlxOptions.map(res => {
- if(res.dictValue == item.hzzjlx){
- this.nhform.hzzjlxName = res.dictLabel
- }
- })
- this.occupationOptions.map(res => {
- if(res.dictValue == item.occupation){
- this.nhform.occupationName = res.dictLabel
- }
- })
- this.jzqkOptions.map(res => {
- if(res.dictValue == item.jzqk){
- this.nhform.jzqkName = res.dictLabel
- }
- })
- this.sjlyOptions.map(res => {
- if(res.dictValue == item.sjly){
- this.nhform.sjlyName = res.dictLabel
- }
- })
- },
- getZjdList(){
- // let params1 = {
- // "deptId" : this.item.deptId,
- // "houseDataConfirmStatus" : "CONFIRMED",
- // "pageNum": 1,
- // "pageSize":10,
- // }
- // listZjdzd(params1).then((response) => {
- // if (response.code == 200) {
- // this.yhcNums = response.total
- // this.list1 = response.rows
- // }
- // });
- // let params2 = {
- // "deptId" : this.item.deptId,
- // "houseDataConfirmStatus" : "UNCONFIRMED",
- // "pageNum": 1,
- // "pageSize":10,
- // }
- // listZjdzd(params2).then((response) => {
- // if (response.code == 200) {
- // this.whcNums = response.total
- // this.list2 = response.rows
- // }
- // });
- },
- // 与户主关系翻译
- yhzgxfy(value){
- let label
- this.yhzgxOptions.map(res => {
- if(res.dictValue == value){
- label = res.dictLabel
- }
- })
- return label
- },
- onConfirm(){},
- /*onSubmithncy(){
- if (this.form5.id != null) {
- if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
- if(this.form5.xb!='1'){
- Dialog.confirm({
- title: '警告',
- message: '成员性别与身份证号中性别信息不符,是否继续保存?',
- })
- .then(() => {
- // on confirm
- updateNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- })
- .catch(() => {
- // on cancel
- });
- }else{
- updateNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- }
-
- } else {
- if(this.form5.xb=='1'){
- Dialog.confirm({
- title: '警告',
- message: '成员性别与身份证号中性别信息不符,是否继续保存?',
- })
- .then(() => {
- // on confirm
- updateNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- })
- .catch(() => {
- // on cancel
- });
- }else{
- updateNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- }
- }
- } else {
- if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
- if(this.form5.xb!='1'){
- Dialog.confirm({
- title: '警告',
- message: '成员性别与身份证号中性别信息不符,是否继续保存?',
- })
- .then(() => {
- // on confirm
- addNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- _this.totalR+=1
- _this.totalH+=1
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- })
- .catch(() => {
- // on cancel
- });
- }else{
- addNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- _this.totalR+=1
- _this.totalH+=1
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- }
-
- } else {
- if(this.form5.xb=='1'){
- Dialog.confirm({
- title: '警告',
- message: '成员性别与身份证号中性别信息不符,是否继续保存?',
- })
- .then(() => {
- // on confirm
- addNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- _this.totalR+=1
- _this.totalH+=1
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- })
- .catch(() => {
- // on cancel
- });
- }else{
- addNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- _this.totalR+=1
- _this.totalH+=1
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- }
- }
-
- }
- },*/
- onSubmithncy(){
- if (this.form5.id != null) {
- if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
- if(this.form5.xb!='1'){
- Dialog.confirm({
- title: '警告',
- message: '成员性别与身份证号中性别信息不符,是否继续保存?',
- })
- .then(() => {
- // on confirm
- updateNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- })
- .catch(() => {
- // on cancel
- });
- }else{
- updateNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- }
- } else if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 0){
- if(this.form5.xb!='0'){
- Dialog.confirm({
- title: '警告',
- message: '成员性别与身份证号中性别信息不符,是否继续保存?',
- })
- .then(() => {
- // on confirm
- updateNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- })
- .catch(() => {
- // on cancel
- });
- }else{
- updateNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- }
- }else{
- updateNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- }
- } else {
- if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
- if(this.form5.xb!='1'){
- Dialog.confirm({
- title: '警告',
- message: '成员性别与身份证号中性别信息不符,是否继续保存?',
- })
- .then(() => {
- // on confirm
- addNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.totalR+=1
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- })
- .catch(() => {
- // on cancel
- });
- }else{
- addNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.totalR+=1
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- }
- } else if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 0){
- if(this.form5.xb!='0'){
- Dialog.confirm({
- title: '警告',
- message: '成员性别与身份证号中性别信息不符,是否继续保存?',
- })
- .then(() => {
- // on confirm
- addNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.totalR+=1
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- })
- .catch(() => {
- // on cancel
- });
- }else{
- addNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.totalR+=1
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- }
- }else{
- addNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.totalR+=1
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
- })
- }
- })
- });
- }
-
- }
- },
- mapShow() {
- //删除地图选中状态
- $("#deleteHistoryMap").trigger("click");
- //通过数据直接查询方式--------加载较慢 start
- //镇边界获取
- // listTown().then(response => {
- // if (response.code == 200) {
- // this.mapTownList = response.rows;
- // //村边界获取
- // listVillage(this.queryParams).then(response => {
- // this.mapVillageList = response.rows;
- // listZjdzd().then((response) => {
- // if (response.code == 200) {
- // this.mapTheGeomZjdId= response.rows;
- // listZrz().then((response) => {
- // if (response.code == 200) {
- // this.mapTheGeomZrzId = response.rows;
- // listFsss().then((response) => {
- // if (response.code == 200) {
- // this.mapTheGeomFsssId = response.rows;
- // }
- // setTimeout(() => {
- // this.GetMapsInit();
- // }, 300);
- // });
- // }
- // });
- // }
- // });
- // });
- // }
- // });
- //通过数据直接查询方式--------加载较慢 end
- getGeoServerConfigKey().then(response => {
- this.mapGeoServerUrl = response.msg;
- setTimeout(() => {
- this.GetMapsInit();
- }, 300);
- });
- var that = this;
- setTimeout(function () {
- var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
- that.bottomHeight = -height+'px'
- },500)
- },
- //地图加载 -----start
- GetMapsInit() {
-
- //加载地图编辑
- var that = this;
- var map;
- //点击事件添加样式
- var hc_land_on;
- document.getElementById("mapWrapAll").innerHTML = '';
- var hc_land;
- var projection = new ol.proj.Projection({
- //地图投影类型
- code: "EPSG:3857",
- units: "degrees",
- //extent:extent
- });
-
- var aerial = new ol.layer.Tile({
- source: new ol.source.XYZ({
- // url: "http://t0.tianditu.gov.cn/img_w/wmts?" +
- // "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
- // "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067",
- url: "http://t{0-7}.tianditu.com/img_w/wmts?" +
- "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
- "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067",
- }),
- isGroup: true,
- name: "卫星影像图",
- });
-
- var yingxzi = new ol.layer.Tile({
- source: new ol.source.XYZ({
- url: "http://t{0-7}.tianditu.com/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk= ",
- }),
- isGroup: true,
- name: "天地图文字标注--卫星影像图",
- });
-
- //加载地图
- map = new ol.Map({
- controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]), //隐藏放大缩小按钮
- layers: [aerial, yingxzi],
- projection: projection,
- target: "mapWrapAll",
- view: new ol.View({
- //center: ol.proj.fromLonLat([115.452752, 31.789033]),
- //center: ol.proj.fromLonLat([115.452752, 31.789033]),
- zoom: 10,
- minZoom: 5, //地图缩小限制
- maxZoom: 18.3, //地图放大限制
- resolution: Math.random() * 0.00000001,
- }),
- interactions: ol.interaction.defaults({
- pinchRotate: false // 移动端禁止地图旋转
- }),
- });
- //使用geoserver服务查询开始 -------------------start
- //镇边界查询开始 ------------------------------start
- // var zhenTc= new ol.layer.Tile({
- // source: new ol.source.TileWMS({
- // url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
- // params: {
- // LAYERS: 'zjd_dc:t_house_survey_border_town',
- // TILED: true,
- // //cql_filter: cql_filter,
- // SRID: 3857,
- // },
- // }),
- // });
- // map.addLayer(zhenTc);
- //镇边界查询开始 ------------------------------end
- //村边界查询开始 ------------------------------start
- var cql_filter = "dept_id='" + that.$cookies.get("item").deptId + "'";
- var cunTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- params: {
- LAYERS: 'zjd_dc:t_house_survey_border_village',
- TILED: true,
- cql_filter: cql_filter,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- resolution: Math.random() * 0.00000001,
- }),
- });
- // //定位查询位置
- // let param_dw = {
- // srsName: "EPSG:3857",
- // service: "WFS",
- // version: "1.0.0",
- // request: "GetFeature",
- // typename: "zjd_dc:t_house_survey_border_village",
- // //featureNS: 'nsgk_hc',//命名空间 URI
- // cql_filter: cql_filter,
- // //featurePrefix: 'nationalwater',//工作区名称
- // //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
- // outputFormat: "application/json",
- // //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
- // };
- // let url_dw = that.mapGeoServerUrl + "/geoserver/zjd_dc/wfs"; //wfsurl;
- // url_dw = url_dw + "?";
- // for (let key in param_dw) {
- // url_dw = url_dw + key + "=" + param_dw[key] + "&";
- // }
- // url_dw = url_dw.substr(0, url_dw.length - 1);
- // fetch(url_dw, {
- // method: "POST", // *GET, POST, PUT, DELETE, etc.
- // })
- // .then((res) => {
- // var geojsonmap = res.json();
- // return geojsonmap;
- // })
- // .then((data) => {
- // if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "{") {
- // //自然幢图层查询开始 ------------------start
- // var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + that.mapZjdData.zjddm + "'";
- // zrzTc = new ol.layer.Image({
- // source: new ol.source.ImageWMS({
- // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- // params: {
- // LAYERS: 'zjd_dc:t_house_survey_zrz',
- // TILED: true,
- // cql_filter: cql_filter_map,
- // SRID: 3857,
- // TIMESTAMP: new Date().getTime(),
- // },
- // }),
- // });
- // map.addLayer(zrzTc);
- // //自然幢图层查询开始 ------------------start
- // //附属设施图层查询开始 ------------------start
- // //var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
- // fsssTc = new ol.layer.Image({
- // source: new ol.source.ImageWMS({
- // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- // params: {
- // LAYERS: 'zjd_dc:t_house_survey_fsss',
- // TILED: true,
- // cql_filter: cql_filter_map,
- // SRID: 3857,
- // TIMESTAMP: new Date().getTime(),
- // },
- // }),
- // });
- // map.addLayer(fsssTc);
- // //附属设施图层查询开始 ------------------end
- // hc_land_on = new ol.layer.Vector({
- // title: "add Layer",
- // source: new ol.source.Vector({
- // projection: projection,
- // features: new ol.format.GeoJSON().readFeatures(that.backTheGeom),
- // }),
- // style: new ol.style.Style({
- // stroke: new ol.style.Stroke({
- // //边界样式
- // color: "#CCFF66",
- // width: 6,
- // }),
- // }),
- // });
- // map.addLayer(hc_land_on);
- // var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
- // var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
- // var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
- // var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
- // //定位查询位置
- // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- // that.clickBbox = center;
- // console.log(that.mapZjdData);
- // that.textMjAll = that.mapZjdData.zdmj;
- // map.getView().animate({
- // // 只设置需要的属性即可
- // center: center, // 中心点
- // zoom: 17.9, // 缩放级别
- // rotation: undefined, // 缩放完成view视图旋转弧度
- // duration: 1000, // 缩放持续时间,默认不需要设置
- // resolution: Math.random() * 0.00000001,
- // });
- // //this.backMap =1;
- // } else if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "[") {
- // //that.newHt ="1";
- // var zbNew = JSON.stringify({
- // "type": "MultiPolygon",
- // "coordinates": [that.backTheGeom.replaceAll("\"", "")]
- // });
- // var leftJoin = zbNew.replace("\"[", "[");
- // var rightJoin = leftJoin.replace("\"]", "]");
- // hc_land_on = new ol.layer.Vector({
- // title: "add Layer",
- // source: new ol.source.Vector({
- // projection: projection,
- // features: new ol.format.GeoJSON().readFeatures("{\n" +
- // " \"type\": \"Feature\",\n" +
- // " \"geometry\":" + rightJoin + "}"),
- // }),
- // style: new ol.style.Style({
- // fill: new ol.style.Fill({
- // //矢量图层填充颜色,以及透明度
- // color: "rgba(204, 255, 204,0.3)",
- // }),
- // stroke: new ol.style.Stroke({
- // //边界样式
- // color: "#CCFF66",
- // width: 3,
- // }),
- // }),
- // });
- // map.addLayer(hc_land_on);
- // var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
- // var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
- // var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
- // var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
- // //定位查询位置
- // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- // that.clickBbox = center;
- // that.textMjAll = that.mapZjdData.zdmj;
- // map.getView().animate({
- // // 只设置需要的属性即可
- // center: center, // 中心点
- // zoom: 16.9, // 缩放级别
- // rotation: undefined, // 缩放完成view视图旋转弧度
- // duration: 1000, // 缩放持续时间,默认不需要设置
- // resolution: Math.random() * 0.00000001,
- // });
- // //this.backMap =1;
- // } else {
- // //通过村界大小视图显示
- // // let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize());
- // // resolution:resolution + Math.random() * 0.00000001,
- // // map.getView().fit(data.bbox);
- // // map.getView().setResolution(resolution);
- // // //初始视图大小控制
- // // map.getView().setZoom(16.0);
- // console.log(data);
- // console.log(data.features[0].geometry.coordinates[0][0][0]);
- // map.getView().animate({
- // // 只设置需要的属性即可
- // center: data.features[0].geometry.coordinates[0][0][0], // 中心点
- // zoom: 16.9, // 缩放级别
- // rotation: undefined, // 缩放完成view视图旋转弧度
- // duration: 1000, // 缩放持续时间,默认不需要设置
- // resolution: Math.random() * 0.00000001,
- // });
- // }
- // })
- // .catch((error) => {
- // console.log("【异常】", error);
- // });
- map.addLayer(cunTc);
- //村边界查询开始 ------------------------------end
- //国有数据加载-----------------------------------start
- deptGetId(that.$cookies.get("item").deptId).then((res) => {
- var cql_filter_guoyou = "ZLDWDM='" + res.data.orgCode + "0000000'";
- var guoyouTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_gydl/wms",
- params: {
- LAYERS: 'zjd_gydl:DLTB',
- TILED: true,
- cql_filter: cql_filter_guoyou,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- }),
- });
- map.addLayer(guoyouTc);
- });
- //国有数据加载----------------------------------end
- //宅基地图层查询开始 ------------------start
- //var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'";
- var zjdTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- params: {
- LAYERS: 'zjd_dc:t_house_survey_zjdzd',
- TILED: true,
- cql_filter: cql_filter,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- }),
- });
- //定位查询位置
- let param_zjdzd = {
- srsName: "EPSG:3857",
- service: "WFS",
- version: "1.0.0",
- request: "GetFeature",
- typename: "zjd_dc:t_house_survey_zjdzd",
- //featureNS: 'nsgk_hc',//命名空间 URI
- cql_filter: cql_filter,
- //featurePrefix: 'nationalwater',//工作区名称
- //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
- outputFormat: "application/json",
- maxFeatures:1,
- //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
- };
- let url_zjdzd = that.mapGeoServerUrl + "/geoserver/zjd_dc/wfs"; //wfsurl;
- url_zjdzd = url_zjdzd + "?";
- for (let key in param_zjdzd) {
- url_zjdzd = url_zjdzd + key + "=" + param_zjdzd[key] + "&";
- }
- url_zjdzd = url_zjdzd.substr(0, url_zjdzd.length - 1);
- fetch(url_zjdzd, {
- method: "POST", // *GET, POST, PUT, DELETE, etc.
- })
- .then((res) => {
- var geojsonmap = res.json();
- return geojsonmap;
- })
- .then((data) => {
- if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "{") {
- //自然幢图层查询开始 ------------------start
- var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + that.mapZjdData.zjddm + "'";
- zrzTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- params: {
- LAYERS: 'zjd_dc:t_house_survey_zrz',
- TILED: true,
- cql_filter: cql_filter_map,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- }),
- });
- map.addLayer(zrzTc);
- //自然幢图层查询开始 ------------------start
- //附属设施图层查询开始 ------------------start
- //var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
- fsssTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- params: {
- LAYERS: 'zjd_dc:t_house_survey_fsss',
- TILED: true,
- cql_filter: cql_filter_map,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- }),
- });
- map.addLayer(fsssTc);
- //附属设施图层查询开始 ------------------end
- hc_land_on = new ol.layer.Vector({
- title: "add Layer",
- source: new ol.source.Vector({
- projection: projection,
- features: new ol.format.GeoJSON().readFeatures(that.backTheGeom),
- }),
- style: new ol.style.Style({
- stroke: new ol.style.Stroke({
- //边界样式
- color: "#CCFF66",
- width: 6,
- }),
- }),
- });
- map.addLayer(hc_land_on);
- var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
- var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
- var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
- var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
- //定位查询位置
- var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- that.clickBbox = center;
- console.log(that.mapZjdData);
- that.textMjAll = that.mapZjdData.zdmj;
- map.getView().animate({
- // 只设置需要的属性即可
- center: center, // 中心点
- zoom: 17.9, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- resolution: Math.random() * 0.00000001,
- });
- //this.backMap =1;
- } else if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "[") {
- //that.newHt ="1";
- var zbNew = JSON.stringify({
- "type": "MultiPolygon",
- "coordinates": [that.backTheGeom.replaceAll("\"", "")]
- });
- var leftJoin = zbNew.replace("\"[", "[");
- var rightJoin = leftJoin.replace("\"]", "]");
- hc_land_on = new ol.layer.Vector({
- title: "add Layer",
- source: new ol.source.Vector({
- projection: projection,
- features: new ol.format.GeoJSON().readFeatures("{\n" +
- " \"type\": \"Feature\",\n" +
- " \"geometry\":" + rightJoin + "}"),
- }),
- style: new ol.style.Style({
- fill: new ol.style.Fill({
- //矢量图层填充颜色,以及透明度
- color: "rgba(204, 255, 204,0.3)",
- }),
- stroke: new ol.style.Stroke({
- //边界样式
- color: "#CCFF66",
- width: 3,
- }),
- }),
- });
- map.addLayer(hc_land_on);
- var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
- var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
- var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
- var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
- //定位查询位置
- var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- that.clickBbox = center;
- that.textMjAll = that.mapZjdData.zdmj;
- map.getView().animate({
- // 只设置需要的属性即可
- center: center, // 中心点
- zoom: 16.9, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- resolution: Math.random() * 0.00000001,
- });
- //this.backMap =1;
- } else {
- //通过村界大小视图显示
- // let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize());
- // resolution:resolution + Math.random() * 0.00000001,
- // map.getView().fit(data.bbox);
- // map.getView().setResolution(resolution);
- // //初始视图大小控制
- // map.getView().setZoom(16.0);
- map.getView().animate({
- // 只设置需要的属性即可
- center: data.features[0].geometry.coordinates[0][0][0], // 中心点
- zoom: 15.9, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- resolution: Math.random() * 0.00000001,
- });
- }
- })
- .catch((error) => {
- console.log("【异常】", error);
- });
- map.addLayer(zjdTc);
- //宅基地图层查询开始 ------------------start
- var zrzTc;
- // //自然幢图层查询开始 ------------------start
- // var zrzTc = new ol.layer.Image({
- // source: new ol.source.ImageWMS({
- // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- // params: {
- // LAYERS: 'zjd_dc:t_house_survey_zrz',
- // TILED: true,
- // cql_filter: cql_filter,
- // SRID: 3857,
- // TIMESTAMP: new Date().getTime(),
- // },
- // }),
- // });
- // map.addLayer(zrzTc);
- // //自然幢图层查询开始 ------------------start
- //
- var fsssTc;
- // //附属设施图层查询开始 ------------------start
- // var fsssTc = new ol.layer.Image({
- // source: new ol.source.ImageWMS({
- // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- // params: {
- // LAYERS: 'zjd_dc:t_house_survey_fsss',
- // TILED: true,
- // cql_filter: cql_filter,
- // SRID: 3857,
- // TIMESTAMP: new Date().getTime(),
- // },
- // }),
- // });
- // map.addLayer(fsssTc);
- // //附属设施图层查询开始 ------------------start
- //使用geoserver服务查询开始 -------------------end
- // if(this.backMap ==1){
- // var cql = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + this.mapZjdTeAll.mapZjdAData.zjddm + "'";
- // var wmsSourceBack = new ol.source.ImageWMS({
- // crossOrigin: 'anonymous',
- // params: {
- // LAYERS: 'zjd_dc:t_house_survey_all',
- // 'VERSION': '1.1.0',
- // 'FORMAT': "image/png",
- // 'CQL_FILTER': cql
- // },
- // serverType: 'geoserver',
- // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- // });
- // zjdTc.setSource(wmsSourceBack);
- // ol.view.setResolution(ol.view.getResolution() + Math.random() * 0.00000001);//随机数缩放实现刷新
- // }
- //数据库直接加载数据渲染方式---------------------------------------------------start
- //判断当前账套是否有数据
- // var mapTalkAbout = true;
- // //获取镇界线----start
- // if(this.mapTownList.length >0){
- // for (var i = 0; this.mapTownList.length > i; i++) {
- // if (this.mapTownList[i] != null && this.mapTownList[i].theGeom != null && this.mapTownList[i].theGeom != "") {
- // mapTalkAbout =false;
- // this.mapTownList[i].createBy = 'mapTownList';
- // var theGeomLine= this.mapTownList[i].theGeom.replaceAll("MultiPolygon","LineString");
- // theGeomLine = theGeomLine.replaceAll("[[[[","[[");
- // theGeomLine = theGeomLine.replaceAll("]]]]","]]");
- // hc_land = new ol.layer.Vector({
- // title: "add Layer",
- // source: new ol.source.Vector({
- // projection: projection,
- // features: new ol.format.GeoJSON().readFeatures("{\n" +
- // " \"type\": \"Feature\",\n" +
- // " \"geometry\":" + theGeomLine + ", \"properties\":" + JSON.stringify(this.mapTownList[i]) + "}"),
- // }),
- // style: new ol.style.Style({
- // fill: new ol.style.Fill({
- // //矢量图层填充颜色,以及透明度
- // color: "#AE57A4",
- // }),
- // stroke: new ol.style.Stroke({
- // //边界样式
- // color: "#FF0000",
- // width: 3,
- // }),
- // // text: new ol.style.Text({
- // // text: this.mapTownList[i].xzqmc,
- // // font: '30px sans-serif',
- // // textAlign: "center",
- // // textBaseline: "middle",
- // // //font: 'verdana',
- // // fill: new ol.style.Fill({
- // // color: "#ff0000"
- // // }),
- // // // backgroundFill: new ol.style.Fill({
- // // // color: "#ff0000"
- // // // }),
- // // font: "30px sans-serif",
- // // stroke: new ol.style.Stroke({
- // // color: "#ffffff"
- // // // width: 3
- // // }),
- // // offsetX: parseInt(0, 10),
- // // offsetY: parseInt(0, 10),
- // // placement: "line", //point 则自动计算面的中心k点然后标注 line 则根据面要素的边进行标注
- // // overflow: false //超出面的部分不显示
- // //}),
- // }),
- // });
- // map.addLayer(hc_land);
- // //console.log(hc_land.values_.source.featuresRtree_.rbush_.data);
- // var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX;
- // var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY;
- // var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX;
- // var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY;
- // // //定位查询位置
- // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- // // console.log(center);
- // map.getView().animate({
- // // 只设置需要的属性即可
- // center: center, // 中心点
- // zoom: 9.8, // 缩放级别
- // rotation: undefined, // 缩放完成view视图旋转弧度
- // duration: 1000, // 缩放持续时间,默认不需要设置
- // });
- // }
- // }
- // }
- // //获取镇界线----end
- // //获取村界线----start
- // if(this.mapVillageList.length >0){
- // for (var i = 0; this.mapVillageList.length > i; i++) {
- // if (this.mapVillageList[i] != null && this.mapVillageList[i].theGeom != null && this.mapVillageList[i].theGeom != "") {
- // mapTalkAbout =false;
- // this.mapVillageList[i].createBy = 'mapVillageList';
- // var theGeomLine= this.mapVillageList[i].theGeom.replaceAll("MultiPolygon","LineString");
- // theGeomLine = theGeomLine.replaceAll("[[[[","[[");
- // theGeomLine = theGeomLine.replaceAll("]]]]","]]");
- // hc_land = new ol.layer.Vector({
- // title: "add Layer",
- // source: new ol.source.Vector({
- // projection: projection,
- // features: new ol.format.GeoJSON().readFeatures("{\n" +
- // " \"type\": \"Feature\",\n" +
- // " \"geometry\":" + theGeomLine + ", \"properties\":" + JSON.stringify(this.mapVillageList[i]) + "}"),
- // }),
- // style: new ol.style.Style({
- // fill: new ol.style.Fill({
- // //矢量图层填充颜色,以及透明度
- // color: "#AE57A4",
- // }),
- // stroke: new ol.style.Stroke({
- // //边界样式
- // color: "#ff00ff",
- // width: 3,
- // }),
- // // text: new ol.style.Text({
- // // text: this.mapVillageList[i].dcmj,
- // // font: '30px sans-serif',
- // // textAlign: "center",
- // // textBaseline: "middle",
- // // //font: 'verdana',
- // // fill: new ol.style.Fill({
- // // color: "#ff00ff"
- // // }),
- // // // backgroundFill: new ol.style.Fill({
- // // // color: "#ff0000"
- // // // }),
- // // font: "30px sans-serif",
- // // stroke: new ol.style.Stroke({
- // // color: "#ffffff"
- // // // width: 3
- // // }),
- // // offsetX: parseInt(0, 10),
- // // offsetY: parseInt(0, 10),
- // // placement: "line", //point 则自动计算面的中心k点然后标注 line 则根据面要素的边进行标注
- // // overflow: false //超出面的部分不显示
- // // }),
- // }),
- // });
- // map.addLayer(hc_land);
- // }
- // }
- // }
- // // //获取村界线----end
- // //宅基地定位开始 ---------start
- // if(this.mapTheGeomZjdId.length >0) {
- // for (var i = 0; this.mapTheGeomZjdId.length > i; i++) {
- // if (this.mapTheGeomZjdId[i] !=null && this.mapTheGeomZjdId[i].theGeom != null && this.mapTheGeomZjdId[i].theGeom != "") {
- // mapTalkAbout =false;
- // this.mapTheGeomZjdId[i].createBy = 'mapTheGeomZjdId';
- // var styleYqr = "";
- // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
- // styleYqr = new ol.style.Style({
- // fill: new ol.style.Fill({
- // //矢量图层填充颜色,以及透明度
- // color: "#AE57A4",
- // }),
- // stroke: new ol.style.Stroke({
- // //边界样式
- // color: "#28FF28",
- // width: 3,
- // }),
- // });
- // } else {
- // styleYqr = new ol.style.Style({
- // fill: new ol.style.Fill({
- // //矢量图层填充颜色,以及透明度
- // color: "#AE57A4",
- // }),
- // stroke: new ol.style.Stroke({
- // //边界样式
- // color: "rgba(255, 45, 45,1)",
- // width: 3,
- // }),
- // });
- // }
- // hc_land = new ol.layer.Vector({
- // title: "add Layer",
- // source: new ol.source.Vector({
- // projection: projection,
- // features: new ol.format.GeoJSON().readFeatures("{\n" +
- // " \"type\": \"Feature\",\n" +
- // " \"geometry\":" + this.mapTheGeomZjdId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomZjdId[i]) + "}"),
- // }),
- // style: styleYqr
- // });
- // map.addLayer(hc_land);
- // // var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX;
- // // var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY;
- // // var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX;
- // // var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY;
- // // //定位查询位置
- // // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- // // map.getView().animate({
- // // // 只设置需要的属性即可
- // // center: center, // 中心点
- // // zoom: 15.8, // 缩放级别
- // // rotation: undefined, // 缩放完成view视图旋转弧度
- // // duration: 1000, // 缩放持续时间,默认不需要设置
- // // });
- // //自然幢定位开始 ---------start
- // getZrzZjdDmList(this.mapTheGeomZjdId[i].zjddm).then((response) => {
- // if (response.code == 200) {
- // this.mapTheGeomZrzId = response.data;
- // if(this.mapTheGeomZrzId.length >0) {
- // for (var i = 0; this.mapTheGeomZrzId.length > i; i++) {
- // if (this.mapTheGeomZrzId[i] !=null && this.mapTheGeomZrzId[i].theGeom != null && this.mapTheGeomZrzId[i].theGeom != "") {
- // this.mapTheGeomZrzId[i].createBy = 'mapTheGeomZrzId';
- // var styleZrz = "";
- // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
- // styleZrz = new ol.style.Style({
- // fill: new ol.style.Fill({
- // //矢量图层填充颜色,以及透明度
- // color: "#FFD306",
- // }),
- // stroke: new ol.style.Stroke({
- // //边界样式
- // color: "#28FF28",
- // width: 3,
- // }),
- // });
- // } else {
- // styleZrz = new ol.style.Style({
- // fill: new ol.style.Fill({
- // //矢量图层填充颜色,以及透明度
- // color: "#FFD306",
- // }),
- // stroke: new ol.style.Stroke({
- // //边界样式
- // color: "rgba(255, 45, 45,1)",
- // width: 3,
- // }),
- // });
- // }
- // hc_land = new ol.layer.Vector({
- // title: "add Layer",
- // source: new ol.source.Vector({
- // projection: projection,
- // features: new ol.format.GeoJSON().readFeatures("{\n" +
- // " \"type\": \"Feature\",\n" +
- // " \"geometry\":" + this.mapTheGeomZrzId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomZrzId[i]) + "}"),
- // }),
- // style: styleZrz
- // });
- // map.addLayer(hc_land);
- // }
- // }
- // }
- // }
- // });
- // //自然幢定位结束 ---------end
- //
- // //附属设施定位开始 ---------start
- // getFsssZjdDmList(this.mapTheGeomZjdId[i].zjddm).then((response) => {
- // if (response.code == 200) {
- // this.mapTheGeomFsssId = response.data;
- // if(this.mapTheGeomFsssId.length >0) {
- // for (var i = 0; this.mapTheGeomFsssId.length > i; i++) {
- // if (this.mapTheGeomFsssId[i] !=null && this.mapTheGeomFsssId[i].theGeom != null && this.mapTheGeomFsssId[i].theGeom != "") {
- // this.mapTheGeomFsssId[i].createBy = 'mapTheGeomFsssId';
- // var styleFsss = "";
- // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
- // styleFsss = new ol.style.Style({
- // fill: new ol.style.Fill({
- // //矢量图层填充颜色,以及透明度
- // color: "#00FFFF",
- // }),
- // stroke: new ol.style.Stroke({
- // //边界样式
- // color: "#28FF28",
- // width: 3,
- // }),
- // });
- // } else {
- // styleFsss = new ol.style.Style({
- // fill: new ol.style.Fill({
- // //矢量图层填充颜色,以及透明度
- // color: "#00FFFF",
- // }),
- // stroke: new ol.style.Stroke({
- // //边界样式
- // color: "rgba(255, 45, 45,1)",
- // width: 3,
- // }),
- // });
- // }
- // hc_land = new ol.layer.Vector({
- // title: "add Layer",
- // source: new ol.source.Vector({
- // projection: projection,
- // features: new ol.format.GeoJSON().readFeatures("{\n" +
- // " \"type\": \"Feature\",\n" +
- // " \"geometry\":" + this.mapTheGeomFsssId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomFsssId[i]) + "}"),
- // }),
- // style: styleFsss
- // });
- // map.addLayer(hc_land);
- // }
- // }
- // }
- // }
- // });
- // //附属设施定位结束 ---------end
- // }
- // }
- // }
- // //宅基地定位结束 ---------end
- //数据库直接加载数据渲染方式---------------------------------------------------end
-
- //地图操作定义------------start
- //定位定义------------start
- var Zb;
- var latitude;
- var longitude;
- var vector_drawing;
- //定位定义------------end
-
- //绘图定义---------------start
- var drawing;
- var draw_map;
- //绘图定义---------------end
-
- //测面绘图定义------------start
- var draw_cm;
- //定义矢量图层
- var vector;
- //创建一个帮助提示信息对象
- var helpTooltip;
- //创建一个测量提示信息对象
- var measureTooltip;
- //创建一个帮助提示框对象
- var helpTooltipElement;
- //测出距离
- var measureTooltipElement;
- //测面绘图定义-----------end
-
- //地图操作定义------------end
- //定位当前位置 ------start
- $("#dwMapAll").on("click", function () {
- //删除测量记录操作--------start
- //将矢量图层从图中删除
- //map.removeLayer(helpTooltip);
- map.removeLayer(vector);
- map.removeInteraction(draw_cm);
- //map.removeOverlay(helpTooltipElement);
- //map.removeLayer(measureTooltip);
- //删除测量记录操作--------end
- //删除绘制图层画图操作-------start
- map.removeInteraction(draw_map);
- map.removeLayer(drawing);
- //删除绘制图层画图操作-------end
-
- //开始定位当前位置
- navigator.geolocation.getCurrentPosition(function(position) {
- latitude = position.coords.latitude;// 获取纬度
- longitude = position.coords.longitude;// 获取经度
- });
- if(latitude !=null && longitude !=null && latitude !="" && longitude !="" && latitude !=undefined && longitude !=undefined ){
- Zb = [longitude,latitude];
- }else {
- Zb =[115.452752, 31.789033];
- }
- //获取坐标点LocationManager
- // geoGps().then(response => {
- //
- // });
- //矢量标注样式设置函数,设置image为图标ol.style.Icon
- function createLabelStyle() {
- return new ol.style.Style({
- image: new ol.style.Icon({
- //设置图标偏移
- anchor: [0.5, 1],
- //标注样式的起点位置
- anchorOrigin: "top-right",
- //X方向单位:分数
- anchorXUnits: "fraction",
- //Y方向单位:像素
- anchorYUnits: "pixels",
- //偏移起点位置的方向
- offsetOrigin: "top-right",
- //透明度
- opacity: 0.9,
- //图片路径
- src: require("../../assets/images/housesteadSurvey/mark.png"),
- }),
- text: new ol.style.Text({
- textAlign: "center", //位置
- textBaseline: "middle", //基准线
- font: "normal 12px 微软雅黑", //文字样式
- //text: "标注点", //文本内容
- fill: new ol.style.Fill({
- //文本填充样式(即文字颜色)
- color: "#ff0000",
- }),
- }),
- zIndex: 9999,
- });
- }
- var newcenterFeature = new ol.Feature({
- geometry: new ol.geom.Point(ol.proj.fromLonLat(Zb)), //几何信息
- name: "标注点",
- });
- var sourceMapLook = new ol.source.Vector({wrapX: false});
- vector_drawing = new ol.layer.Vector({
- source: sourceMapLook,
- });
- map.addLayer(vector_drawing);
- newcenterFeature.setStyle(createLabelStyle()); //设置要素样式
- sourceMapLook.addFeature(newcenterFeature);
- map.getView().animate({
- // 只设置需要的属性即可
- center: ol.proj.fromLonLat(Zb), // 中心点
- zoom: 17.8, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- resolution:Math.random() * 0.00000001,
- });
- });
- //定位当前位置 ------end
-
- //开始绘制图层- -----start
- $("#htMapAll").on("click", function () {
- if(that.drawingClick) {
- that.drawingClick=false;
- //删除之前 测距操作添加map中的绘图 --------start
- //map.removeLayer(helpTooltip);
- map.removeLayer(vector);
- map.removeInteraction(draw_cm);
- //map.removeOverlay(helpTooltipElement);
- map.removeLayer(measureTooltipElement);
- //删除之前 测距操作添加map中的绘图 --------end
-
- //删除之前画图图层,重新绘制图层
- map.removeInteraction(draw_map);
- map.removeLayer(drawing);
- //var source = new ol.source.Vector({wrapX: false});
- drawing = new ol.layer.Vector({
- source: new ol.source.Vector(),
- });
- map.addLayer(drawing);
-
- function addInteraction() {
- draw_map = new ol.interaction.Draw({
- source: drawing.getSource(),
- type: "Polygon",
- });
- draw_map.on("drawend", function (evt) {
- var feature = evt.feature;
- var geometry = feature.getGeometry();
- that.coordinate = geometry.getCoordinates();
- //_this.coordinateList = coordinate.toString();
- //提示当前坐标是否绘制完成
- if (that.coordinate != "" && that.coordinate != null) {
- that.showhzht = true;
- that.htZjdZrzFsss = JSON.stringify(that.coordinate);
- console.log(that.mapZjdData);
- // htMapAllFu();
- } else {
- $("#htMapAll").trigger("click");
- }
- });
- map.addInteraction(draw_map);
- }
-
- function htMapAllFu() {
- //that.drawMapPolygonFun();
- //绘制多边形地图
- that.$dialog
- .confirm({
- title: "提示",
- message: "是否重新绘制画图",
- })
- .then(() => {
- //$("#drawRemove").trigger("click");
- map.removeInteraction(draw_map);
- that.coordinate = "";
- })
- .catch(() => {
- //删除画图点
- map.removeInteraction(draw_map);
- });
- }
-
- addInteraction();
- } else {
- that.drawingClick=true;
- //删除之前 测距操作添加map中的绘图 --------start
- //map.removeLayer(helpTooltip);
- map.removeLayer(vector);
- map.removeInteraction(draw_cm);
- //map.removeOverlay(helpTooltipElement);
- map.removeLayer(measureTooltipElement);
- //删除之前 测距操作添加map中的绘图 --------end
-
- //删除之前画图图层,重新绘制图层
- map.removeInteraction(draw_map);
- map.removeLayer(drawing);
- //var source = new ol.source.Vector({wrapX: false});
- }
- });
- //删除之前绘制图层
- $("#deleteHistory").on("click", function () {
- map.removeLayer(drawing);
- that.showhzht = false;
- });
- //开始绘制图层- -----end
-
- //切换功能删除之前选中状态
- $("#deleteHistoryMap").on("click", function () {
- map.removeLayer(hc_land_on);
- that.mapZjdData = "";
- that.mapZrzData = "";
- that.mapFsssData = "";
- //that.mapZjdTeAll.active ="1";
- that.mapZjdTeAll.mapZjdAData = {};
- that.mapZjdTeAll.mapZrzAData = {};
- that.mapZjdTeAll.mapFsssAData = {};
- that.mapZjdDataTure = "";
- });
- //清除画图鼠标点击事件
- // $("#drawRemove").click(function () {
- // map.removeLayer(drawing);
- // });
- //
-
- //地图定义
- var delete_map = ["mapZjd", "mapZrz","mapFsss"];
- var hc_land_queryList =[];
- var texiao_layer_zjd;
- var texiao_layer_zrz;
- var texiao_layer_fsss;
- //按照查询条件人名 定位地图-----------------start
- $("#query").on("click", function () {
- //数据库查询数据------------------------------------------------------start
- $("#deleteHistoryMap").trigger("click");
- var val = that.seachText;
- //删除之前查询图层
- for(var i=0;hc_land_queryList.length>i;i++){
- map.removeLayer(hc_land_queryList[i]);
- }
- hc_land_queryList = [];
- that.mapDataAll =[];
- if (val == "") {
- that.$toast('请填写查询条件再查询');
- } else {
- var styleZjd = new ol.style.Style({
- stroke: new ol.style.Stroke({
- //边界样式
- color: "#CCFF66",
- width: 6,
- }),
- });
- let params;
- if(that.mapAddJumpNum == 1){
- params = {
- "deptId" : that.mapAddJump,
- "syqr" : val
- }
- } else {
- params = {
- "deptId" : that.$cookies.get("item").deptId,
- "syqr" : val
- }
- }
- listZjdzd(params).then((response) => {
- if(response.rows.length != 0){
- that.mapDataAll = response.rows;
- for(var hg=0; hg < that.mapDataAll.length; hg++){
- var mapNum = that.mapDataAll[hg].houseDataConfirmStatus;
- if(mapNum == "UNCONFIRMED"){
- that.mapDataAll[hg].paceType = "未核查";
- } else if (mapNum == "CONFIRMED"){
- that.mapDataAll[hg].paceType = "已核查";
- }else{
-
- }
- that.mapDataAll[hg].typeTc="宅基地";
- if (that.mapDataAll[hg] !=null && that.mapDataAll[hg].theGeom != null && that.mapDataAll[hg].theGeom != "") {
- that.mapDataAll[hg].createBy = 'mapTheGeomZjdId';
- hc_land_queryList[hg] =new ol.layer.Vector({
- title: "add Layer",
- source: new ol.source.Vector({
- projection: projection,
- features: new ol.format.GeoJSON().readFeatures("{\n" +
- " \"type\": \"Feature\",\n" +
- " \"geometry\":" + that.mapDataAll[hg].theGeom + ", \"properties\":" + JSON.stringify(that.mapDataAll[hg]) + "}"),
- }),
- style: styleZjd
- });
- map.addLayer(hc_land_queryList[hg]);
- var maxXMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.maxX;
- var maxYMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.maxY;
- var minXMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.minX;
- var minYMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.minY;
- //定位查询位置
- var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- map.getView().animate({
- // 只设置需要的属性即可
- center: center, // 中心点
- zoom: 15.8, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- resolution:Math.random() * 0.00000001,
- });
- }
- // listFsss(paramsZrz).then((response) => {
- // that.mapDataAll.push(response.rows);
- // });
- }
- // for(var queryFor=0; hc_land_queryList > queryFor; queryFor++ ){
- // map.addLayer(hc_land_queryList[queryFor]);
- // }
- // var mapZrzFor = that.mapDataAll[0].length+1;
- // console.log(mapZrzFor);
- // for(var mapFor=0;mapZrzFor>mapFor;mapFor++){
- // //查询自然幢
- // let paramsZrz = {
- // "deptId" : that.$cookies.get("item").deptId,
- // "zjddm" : that.mapDataAll[0][mapFor].zjddm,
- // "pageSize":20,
- // }
- // listZrz(paramsZrz).then((response) => {
- // console.log(response);
- // that.mapDataAll[0].
- // that.mapDataAll[0].push(response.rows);
- // });
- // }
- setTimeout(function () {
- that.showSearch = true ;
- $('.searchBox').css('display','block')
- var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
- document.styleSheets[0].insertRule(
- "@keyframes test" +
- "{" +
- "0%{bottom: -" + height + "px;}" +
- "100%{bottom: 0px;}" +
- "}"
- )
- $('.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'});
- //}
- },500);
- } else {
- that.$toast("暂无数据")
- }
- });
-
- }
- //数据库查询数据------------------------------------------------------end
- //地图查询------------------------------------------------------------start
- /**
- * @api wfs服务空间查询
- * @param {*} wfsurl
- * @param {*} srsName
- * @param {*} typeName
- * @param {*} drawType
- * @param {option 可选} geometryField
- */
- // var val = that.seachText;
- // if (val == "") {
- // that.$toast('请填写查询条件再查询');
- // } else {
- // //清除之前查询数据
- // that.mapDataAll =[];
- // //分类查询查询农地、农房
- // var difang;
- // //查询条件
- // var cql_filter_cun;
- // var cun = that.$cookies.get("item").deptId;
- // difang = ["zjd_dc:t_house_survey_zjdzd", "zjd_dc:t_house_survey_zrz","zjd_dc:t_house_survey_fsss"];
- // var tach = 0;
- // var once = 0;
- // for (var i = 0; i < difang.length; i++) {
- // map.removeLayer(delete_map[i]);
- // // 数字验证!
- // var reg = /\d/;
- // //验证汉子
- // //var han = /^[\u4e00-\u9fa5]+$/;
- // if (reg.test(val)) {
- // //循环判断查询条件
- // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
- // } else {
- // //循环判断查询条件
- // if (difang[i] == "zjd_dc:t_house_survey_zjdzd") {
- // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
- // } else if(difang[i] == "zjd_dc:t_house_survey_zrz") {
- // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
- // } else if(difang[i] == "zjd_dc:t_house_survey_fsss") {
- // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
- // }
- // }
- // //for(var i=0; i< difang.length; i++){
- // //cql_filter = "CM='"+cun +"'"+ "and XZQK='待流转待盘活'";
- //
- // //图层加载
- //
- // //业务图层 wms服务
- // delete_map[i] = new ol.layer.Tile({
- // source: new ol.source.TileWMS({
- // url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
- // params: {
- // LAYERS: difang[i],
- // //'LAYERS': 'new_shp:new_shp_all',
- // TILED: true,
- // cql_filter: cql_filter_cun,
- // SRID: 3857,
- // },
- // }),
- // });
- //
- // //}
- // //定位查询位置
- // let param_dw = {
- // srsName: "EPSG:3857",
- // service: "WFS",
- // version: "1.0.0",
- // request: "GetFeature",
- // typename: difang[i],
- // //featureNS: 'nsgk_hc',//命名空间 URI
- // cql_filter: cql_filter_cun,
- // //featurePrefix: 'nationalwater',//工作区名称
- // //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
- // outputFormat: "application/json",
- // //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
- // };
- // let url_dw = that.mapGeoServerUrl+"/geoserver/zjd_dc/wfs"; //wfsurl;
- // url_dw = url_dw + "?";
- // for (let key in param_dw) {
- // url_dw = url_dw + key + "=" + param_dw[key] + "&";
- // }
- // url_dw = url_dw.substr(0, url_dw.length - 1);
- // fetch(url_dw, {
- // method: "POST", // *GET, POST, PUT, DELETE, etc.
- // })
- // .then((res) => {
- // var geojsonmap = res.json();
- // return geojsonmap;
- // })
- // .then((data) => {
- // tach = tach + 1;
- // if (data.features != null && data.features != "") {
- // for(var i=0; data.features.length >i; i++) {
- // //特效动画实现 -----------------------------start
- // console.log(tach,"++++++++++++++++++",once)
- // var datamap = data.features[0].bbox;
- // if (tach == 1 && once == 0) {
- // console.log("zrz")
- // texiao_layer_zjd = new ol.layer.Vector({
- // source: new ol.source.Vector(),
- // });
- // map.addLayer(texiao_layer_zjd);
- // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
- // var circle = new ol.Feature({
- // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
- // });
- //
- // circle.setStyle(
- // new ol.style.Style({
- // image: new ol.style.Circle({
- // radius: 0,
- // stroke: new ol.style.Stroke({
- // color: "yellow",
- // size: 1,
- // }),
- // }),
- // })
- // );
- // texiao_layer_zjd.getSource().addFeature(circle);
- //
- // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
- // var radius = 0;
- // map.on("postcompose", function () {
- // // 增大半径,最大20
- // radius++;
- // radius = radius % 10;
- // // 设置样式
- // circle.setStyle(
- // new ol.style.Style({
- // image: new ol.style.Circle({
- // radius: radius,
- // stroke: new ol.style.Stroke({
- // color: "yellow",
- // size: 1,
- // }),
- // }),
- // })
- // );
- // });
- // } else if(tach == 2) {
- // console.log("zrz")
- // texiao_layer_zrz = new ol.layer.Vector({
- // source: new ol.source.Vector(),
- // });
- // map.addLayer(texiao_layer_zrz);
- // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
- // var circle = new ol.Feature({
- // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
- // });
- //
- // circle.setStyle(
- // new ol.style.Style({
- // image: new ol.style.Circle({
- // radius: 0,
- // stroke: new ol.style.Stroke({
- // color: "yellow",
- // size: 1,
- // }),
- // }),
- // })
- // );
- // texiao_layer_zrz.getSource().addFeature(circle);
- //
- // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
- // var radius = 0;
- // map.on("postcompose", function () {
- // // 增大半径,最大20
- // radius++;
- // radius = radius % 10;
- // // 设置样式
- // circle.setStyle(
- // new ol.style.Style({
- // image: new ol.style.Circle({
- // radius: radius,
- // stroke: new ol.style.Stroke({
- // color: "yellow",
- // size: 1,
- // }),
- // }),
- // })
- // );
- // });
- // } else {
- // console.log("fsss")
- // texiao_layer_fsss = new ol.layer.Vector({
- // source: new ol.source.Vector(),
- // });
- // map.addLayer(texiao_layer_fsss);
- // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
- // var circle = new ol.Feature({
- // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
- // });
- //
- // circle.setStyle(
- // new ol.style.Style({
- // image: new ol.style.Circle({
- // radius: 0,
- // stroke: new ol.style.Stroke({
- // color: "yellow",
- // size: 1,
- // }),
- // }),
- // })
- // );
- // texiao_layer_fsss.getSource().addFeature(circle);
- //
- // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
- // var radius = 0;
- // map.on("postcompose", function () {
- // // 增大半径,最大20
- // radius++;
- // radius = radius % 10;
- // // 设置样式
- // circle.setStyle(
- // new ol.style.Style({
- // image: new ol.style.Circle({
- // radius: radius,
- // stroke: new ol.style.Stroke({
- // color: "yellow",
- // size: 1,
- // }),
- // }),
- // })
- // );
- // });
- // }
- // //特效动画实现 -----------------------------end
- // that.mapDataAll.push(JSON.parse(JSON.stringify(data.features[i].properties)));
- // }
- // //定位实现
- // let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize());
- // map.getView().fit(data.bbox);
- // map.getView().setResolution(resolution);
- // console.log(that.mapDataAll);
- // } else if (tach == 1) {
- // once = once + 1;
- // } else {
- // if (once == 1 && tach == 3) {
- // that.$toast("没有找到相关人员信息");
- // //that.showSearch = false ;
- // }else {
- //
- // }
- // }
- // })
- // .catch((error) => {
- // console.log("【异常】", error);
- // });
- // map.addLayer(delete_map[i]);
- // }
- //地图查询------------------------------------------------------------end
- });
- //按照查询 定位地图-----------------end
-
- //筛选附属设施-----------------------------------start
- $("#fsssSx").click(function () {
- if(!that.fsssSx){
- map.addLayer(fsssTc);
- }else {
- map.removeLayer(fsssTc);
- }
- });
- $("#zrzSx").click(function () {
- if(!that.zrzSx){
- map.addLayer(zrzTc);
- }else {
- map.removeLayer(zrzTc);
- }
- });
- $("#zjdSx").click(function () {
- if(!that.zjdSx){
- map.addLayer(zjdTc);
- }else {
- map.removeLayer(zjdTc);
- }
- });
- $("#checkAll").click(function () {
- if(!that.fsssSx && !that.zjdSx && !that.zrzSx){
- map.addLayer(zjdTc);
- map.addLayer(zrzTc);
- map.addLayer(fsssTc);
- }else {
- map.removeLayer(zrzTc);
- map.removeLayer(zjdTc);
- map.removeLayer(fsssTc);
- }
- });
- //筛选附属设施-----------------------------------end
- // //获取类型开始 侧面-----------------------------------------------------------------start
- //样式加载定义
- var vector_drawing_delete;
- $("#area").click(function () {
- console.log(that.textMjAll);
- console.log(that.clickBbox);
- if(that.textMjAll ==null || that.textMjAll ==""){
- that.textMjAll =0;
- }
- if((that.textMjAll != "" && that.clickBbox !="") || (that.textMjAll == 0 && that.clickBbox !="")){
- map.removeLayer(vector_drawing_delete);
- function createLabelStyle() {
- return new ol.style.Style({
- text: new ol.style.Text({
- text: that.textMjAll+"㎡",
- textAlign: "center", //位置
- textBaseline: "middle", //基准线
- font: "normal 12px 微软雅黑", //文字样式
- //text: "标注点", //文本内容
- fill: new ol.style.Fill({
- //文本填充样式(即文字颜色)
- color: "#FFFFFF",
- width: 10,
- }),
- overflow: false //超出面的部分不显示
- }),
- zIndex: 9999,
- });
- }
- var newcenterFeature = new ol.Feature({
- geometry: new ol.geom.Point(that.clickBbox), //几何信息
- //name: "标注点",
- });
- var sourceMapLook = new ol.source.Vector({wrapX: false});
- vector_drawing_delete = new ol.layer.Vector({
- source: sourceMapLook,
- });
- map.addLayer(vector_drawing_delete);
- newcenterFeature.setStyle(createLabelStyle()); //设置要素样式
- sourceMapLook.addFeature(newcenterFeature);
- //map.addLayer(styleFsss);
- } else if(that.textMjAllNum == "1"){
- that.$toast("该图层面积暂无信息");
- } else {
- that.$toast("选择图层进行面积显示");
- }
- });
- // $("#area").click(function () {
- // console.log("进入测面")
- // //删除绘制图层画图操作-------start
- // map.removeInteraction(draw_map);
- // map.removeLayer(drawing);
- // //删除绘制图层画图操作-------end
- // //开始绘制 测面--------------------------------------------------------------start
- // //定义矢量数据源
- // var source = new ol.source.Vector();
- //
- // vector = new ol.layer.Vector({
- // source: source,
- // style: new ol.style.Style({
- // fill: new ol.style.Fill({
- // color: "rgba(255,255,255,0.2)",
- // }),
- // stroke: new ol.style.Stroke({
- // color: "#e21e0a",
- // width: 2,
- // }),
- // //image: new ol.style.Circle({
- // // radius: 7,
- // // fill: new ol.style.Fill({
- // // color:'#ffcc33'
- // // })
- // //})
- // }),
- // });
- //
- // //将矢量图层添加到地图中 线的颜色加入map中
- // map.addLayer(vector);
- //
- // var sketch;
- //
- // var continuePolygonMsg = "单击以继续绘制多边形";
- //
- // /**
- // * Message to show when the user is drawing a line.
- // * @type {string}
- // */
- // //var continueLineMsg = '单击继续绘制直线';
- //
- // //鼠标移动触发的函数
- // var pointerMoveHandler = function (evt) {
- // //Indicates if the map is currently being dragged.
- // //Only set for POINTERDRAG and POINTERMOVE events. Default is false.
- // //如果是平移地图则直接结束
- // if (evt.dragging) {
- // return;
- // }
- // //帮助提示信息
- // var helpMsg = "单击开始绘图";
- //
- // if (sketch) {
- // //Get the feature's default geometry.
- // //A feature may have any number of named geometries.
- // //获取绘图对象的几何要素
- // var geom = sketch.getGeometry();
- // //如果当前绘制的几何要素是多边形,则将绘制提示信息设置为多边形绘制提示信息
- // //如果当前绘制的几何要素是多线段,则将绘制提示信息设置为多线段绘制提示信息
- // helpMsg = continuePolygonMsg;
- // }
- // //设置帮助提示要素的内标签为帮助提示信息
- // helpTooltipElement.innerHTML = helpMsg;
- // //设置帮助提示信息的位置
- // //The coordinate in view projection corresponding to the original browser event.
- // helpTooltip.setPosition(evt.coordinate);
- // //移除帮助提示要素的隐藏样式
- // $(helpTooltipElement).removeClass("hidden");
- // };
- //
- // map.on("pointermove", pointerMoveHandler);
- //
- // map.getViewport().addEventListener("mouseout", function () {
- // helpTooltipElement.classList.add("hidden");
- // });
- //
- // //添加交互式绘图对象的函数
- // function addInteraction() {
- // // 获取当前选择的绘制类型
- // //var type = typeSelect.value == 'length' ? 'Polygon' : 'LineString';
- // //创建一个交互式绘图对象
- // var type = "Polygon";
- // draw_cm = new ol.interaction.Draw({
- // //绘制的数据源
- // source: source,
- // //绘制类型
- // type: type,
- // //样式
- // style: new ol.style.Style({
- // fill: new ol.style.Fill({
- // color: "rgba(255,255,255,0.2)",
- // }),
- // stroke: new ol.style.Stroke({
- // color: "rgba(0,0,0,0.5)",
- // lineDash: [10, 10],
- // width: 2,
- // }),
- // // image: new ol.style.Circle({
- // // radius: 5,
- // // stroke: new ol.style.Stroke({
- // // color:'rgba(0,0,0,0.7)'
- // // }),
- // // fill: new ol.style.Fill({
- // //color: 'rgba(255,255,255,0.2)'
- // // })
- // //})
- // }),
- // });
- // //将交互绘图对象添加到地图中
- // map.addInteraction(draw_cm);
- //
- // //创建测量提示框
- // createMeasureTooltip();
- // //创建帮助提示框
- // createHelpTooltip();
- //
- // //定义一个事件监听
- // var listener;
- // //定义一个控制鼠标点击次数的变量
- // var count = 0;
- // //绘制开始事件
- // draw_cm.on(
- // "drawstart",
- // function (evt) {
- // //The feature being drawn.
- // sketch = evt.feature;
- // //提示框的坐标
- // var tooltipCoord = evt.coordinate;
- // //监听几何要素的change事件
- // //Increases the revision counter and dispatches a 'change' event.
- //
- // listener = sketch.getGeometry().on("change", function (evt) {
- // //The event target.
- // //获取绘制的几何对象
- // var geom = evt.target;
- // //定义一个输出对象,用于记录面积和长度
- // var output;
- // map.removeEventListener("singleclick");
- // map.removeEventListener("dblclick");
- // //输出多边形的面积
- // output = formatArea(geom);
- // //Return an interior point of the polygon.
- // //获取多变形内部点的坐标
- // tooltipCoord = geom.getInteriorPoint().getCoordinates();
- //
- // //设置测量提示框的内标签为最终输出结果
- // measureTooltipElement.innerHTML = output;
- // //设置测量提示信息的位置坐标
- // measureTooltip.setPosition(tooltipCoord);
- // });
- //
- // //地图单击事件
- // map.on("singleclick", function (evt) {
- // //设置测量提示信息的位置坐标,用来确定鼠标点击后测量提示框的位置
- // measureTooltip.setPosition(evt.coordinate);
- // //如果是第一次点击,则设置测量提示框的文本内容为起点
- // if (count == 0) {
- // measureTooltipElement.innerHTML = "起点";
- // }
- // //根据鼠标点击位置生成一个点
- // var point = new ol.geom.Point(evt.coordinate);
- // //将该点要素添加到矢量数据源中
- // source.addFeature(new ol.Feature(point));
- // //更改测量提示框的样式,使测量提示框可见
- // measureTooltipElement.className = "tooltip tooltip-static";
- // //创建测量提示框
- // createMeasureTooltip();
- // //点击次数增加
- // count++;
- // });
- //
- // //地图双击事件
- // map.on("dblclick", function (evt) {
- // //根据
- // var point = new ol.geom.Point(evt.coordinate);
- // source.addFeature(new ol.Feature(point));
- // });
- // },
- // this
- // );
- // //绘制结束事件
- // draw_cm.on(
- // "drawend",
- // function (evt) {
- // count = 0;
- // //设置测量提示框的样式
- // measureTooltipElement.className = "tooltip tooltip-static";
- // //Set the offset for this overlay.
- // //设置偏移量
- // measureTooltip.setOffset([0, -7]);
- // //清空绘制要素
- // sketch = null;
- // //清空测量提示要素
- // measureTooltipElement = null;
- // //创建测量提示框
- // createMeasureTooltip();
- // //Removes an event listener using the key returned by on() or once().
- // //移除事件监听
- // ol.Observable.unByKey(listener);
- // //移除地图单击事件
- // map.removeEventListener("singleclick");
- // },
- // this
- // );
- // }
- // /**
- // * Creates a new help tooltip
- // */
- // function createHelpTooltip() {
- // if (helpTooltipElement) {
- // helpTooltipElement.parentNode.removeChild(helpTooltipElement);
- // }
- // helpTooltipElement = document.createElement("div");
- // helpTooltipElement.className = "ol-tooltip hidden";
- // helpTooltip = new ol.Overlay({
- // element: helpTooltipElement,
- // offset: [15, 0],
- // positioning: "center-left",
- // });
- // map.addOverlay(helpTooltip);
- // }
- //
- // /**
- // * Creates a new measure tooltip
- // */
- // function createMeasureTooltip() {
- // if (measureTooltipElement) {
- // measureTooltipElement.parentNode.removeChild(measureTooltipElement);
- // }
- // measureTooltipElement = document.createElement("div");
- // measureTooltipElement.className = "ol-tooltip ol-tooltip-measure";
- // measureTooltip = new ol.Overlay({
- // element: measureTooltipElement,
- // offset: [0, -15],
- // positioning: "bottom-center",
- // });
- // map.addOverlay(measureTooltip);
- // }
- //
- // //格式化测量面积
- // var formatArea = function (polygon) {
- // //定义面积变量
- // var area;
- // //获取平面面积
- // area = polygon.getArea();
- // //定义输出变量
- // var output;
- // //当面积大于10000时,转换为平方千米,否则为平方米
- // if (area > 10000) {
- // output =
- // Math.round((area / 1000000) * 100) / 100 + " " + "km<sup>2</sup>";
- // } else {
- // output = Math.round(area * 100) / 100 + " " + "m<sup>2</sup>";
- // }
- // return output;
- // };
- //
- // addInteraction();
- // });
- // //侧面结束-----------------------------------------------------------------end
-
- //全图展示-----------------start
- $("#mapAllQt").click(function (){
- //定位查询位置
- let param_dw = {
- srsName: "EPSG:3857",
- service: "WFS",
- version: "1.0.0",
- request: "GetFeature",
- typename: "zjd_dc:t_house_survey_border_village",
- //featureNS: 'nsgk_hc',//命名空间 URI
- cql_filter: cql_filter,
- //featurePrefix: 'nationalwater',//工作区名称
- //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
- outputFormat: "application/json",
- //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
- };
- let url_dw = that.mapGeoServerUrl+"/geoserver/zjd_dc/wfs"; //wfsurl;
- url_dw = url_dw + "?";
- for (let key in param_dw) {
- url_dw = url_dw + key + "=" + param_dw[key] + "&";
- }
- url_dw = url_dw.substr(0, url_dw.length - 1);
- fetch(url_dw, {
- method: "POST", // *GET, POST, PUT, DELETE, etc.
- })
- .then((res) => {
- var geojsonmap = res.json();
- return geojsonmap;
- })
- .then((data) => {
- let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize());
- resolution:resolution + Math.random() * 0.00000001,
- map.getView().fit(data.bbox);
- map.getView().setResolution(resolution);
- // var datamap = data.bbox;
- // var center = ol.extent.getCenter(datamap);
- // map.getView().animate({
- // // 只设置需要的属性即可
- // center: center, // 中心点
- // rotation: undefined, // 缩放完成view视图旋转弧度
- // });
- })
- .catch((error) => {
- console.log("【异常】", error);
- });
- });
-
- //业务图层 wfs服务 属性查询开始 ------------------start
- /**
- * @api wfs服务空间查询
- * @param {*} wfsurl
- * @param {*} srsName
- * @param {*} typeName
- * @param {*} drawType
- * @param {option 可选} geometryField
- */
-
- //查询全部图层 -------查询叠加图层出现覆盖问题
- var wmsSource = new ol.source.TileWMS({
- url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
- params: {
- LAYERS: "zjd_dc:t_house_survey_all",
- TILED: true,
- SRID: 3857,
- serverType: "geoserver",
- crossOrigin: "anonymous",
- },
- resolution:Math.random() * 0.00000001,
- });
-
- //查询宅基地图层
- var ZjdwmsSource = new ol.source.TileWMS({
- url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
- params: {
- LAYERS: "zjd_dc:t_house_survey_zjdzd",
- TILED: true,
- SRID: 3857,
- serverType: "geoserver",
- crossOrigin: "anonymous",
- },
- resolution:Math.random() * 0.00000001,
- });
-
- //查询自然幢图层
- var ZrzwmsSource = new ol.source.TileWMS({
- url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
- params: {
- LAYERS: "zjd_dc:t_house_survey_zrz",
- TILED: true,
- SRID: 3857,
- serverType: "geoserver",
- crossOrigin: "anonymous",
- },
- resolution:Math.random() * 0.00000001,
- });
-
- //查询附属设施图层
- var FssswmsSource = new ol.source.TileWMS({
- url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
- params: {
- LAYERS: "zjd_dc:t_house_survey_fsss",
- TILED: true,
- SRID: 3857,
- serverType: "geoserver",
- crossOrigin: "anonymous",
- },
- resolution:Math.random() * 0.00000001,
- });
-
-
- map.on("pointermove", function (evt) {
- if (evt.dragging) {
- return;
- }
- var pixel = map.getEventPixel(evt.originalEvent);
- var hit = map.forEachLayerAtPixel(pixel, function () {
- return true;
- });
- map.getTargetElement().style.cursor = hit ? "pointer" : "";
- });
- //属性查询结束 ------------------end
- //点击查询详细信息
- map.on("singleclick", function (evt) {
- console.log(evt);
- let feature = map.forEachFeatureAtPixel(
- evt.pixel,
- (feature) => feature
- );
- var viewResolution = map.getView().getResolution(); ///** @type {number} */ (view.getResolution());
- var zb = evt.coordinate;
- var url;
- var url_bbox;
- that.clickBbox ="";
- that.textMjAll = "";
- if(that.drawingClick) {
- //点击空白删除之前图层
- map.removeLayer(hc_land_on);
- //map.removeLayer(hc_land_query);
- //for(var i=0;hc_land_query>i;i++){
- //map.removeLayer(hc_land_query);
- for(var i=0;hc_land_queryList.length>i;i++){
- map.removeLayer(hc_land_queryList[i]);
- }
- //}c
- if (that.fsssSx && that.zjdSx && that.zrzSx) {
- url = wmsSource.getFeatureInfoUrl(
- evt.coordinate,
- viewResolution,
- "EPSG:3857",
- {INFO_FORMAT: "text/html"}
- );
- url_bbox = wmsSource.getFeatureInfoUrl(
- evt.coordinate,
- viewResolution,
- "EPSG:3857",
- {INFO_FORMAT: "application/json"}
- );
- } else {
- if (that.zjdSx) {
- url = ZjdwmsSource.getFeatureInfoUrl(
- evt.coordinate,
- viewResolution,
- "EPSG:3857",
- {INFO_FORMAT: "text/html"}
- );
- url_bbox = ZjdwmsSource.getFeatureInfoUrl(
- evt.coordinate,
- viewResolution,
- "EPSG:3857",
- {INFO_FORMAT: "application/json"}
- );
- } else if (that.fsssSx) {
- url = FssswmsSource.getFeatureInfoUrl(
- evt.coordinate,
- viewResolution,
- "EPSG:3857",
- {INFO_FORMAT: "text/html"}
- );
- url_bbox = FssswmsSource.getFeatureInfoUrl(
- evt.coordinate,
- viewResolution,
- "EPSG:3857",
- {INFO_FORMAT: "application/json"}
- );
- } else if (that.zrzSx) {
- url = ZrzwmsSource.getFeatureInfoUrl(
- evt.coordinate,
- viewResolution,
- "EPSG:3857",
- {INFO_FORMAT: "text/html"}
- );
- url_bbox = ZrzwmsSource.getFeatureInfoUrl(
- evt.coordinate,
- viewResolution,
- "EPSG:3857",
- {INFO_FORMAT: "application/json"}
- );
- } else {
- url = wmsSource.getFeatureInfoUrl(
- evt.coordinate,
- viewResolution,
- "EPSG:3857",
- {INFO_FORMAT: "text/html"}
- );
- url_bbox = wmsSource.getFeatureInfoUrl(
- evt.coordinate,
- viewResolution,
- "EPSG:3857",
- {INFO_FORMAT: "application/json"}
- );
- }
- }
- if (url_bbox) {
- fetch(url_bbox).then((res) => {
- var geojsonmap = res.json();
- return geojsonmap;
- })
- .then((data) => {
- var center = ol.extent.getCenter(data.bbox); //获取边界区域的中心位置
- center = [center[0], center[1] - 16];
- that.clickBbox = center;
- })
- .catch((error) => {
- that.mapZjdData = "";
- that.mapZrzData = "";
- that.mapFsssData = "";
- //that.mapZjdTeAll.active ="1";
- that.mapZjdTeAll.mapZjdAData = {};
- that.mapZjdTeAll.mapZrzAData = {};
- that.mapZjdTeAll.mapFsssAData = {};
- that.mapZjdDataTure = "";
- that.mapXs =false;
- that.mapClick ="";
- console.log("【异常】", error);
- });
- }
- if (url) {
- fetch(url)
- .then(function (response) {
- return response.text();
- })
- .then(function (html) {
- document.getElementById("info").innerHTML = html;
- if (html.indexOf("<table") != -1) {
- that.mapZjdData = "";
- that.mapZrzData = "";
- that.mapFsssData = "";
- //that.mapZjdTeAll.active ="1";
- that.mapZjdTeAll.mapZjdAData = {};
- that.mapZjdTeAll.mapZrzAData = {};
- that.mapZjdTeAll.mapFsssAData = {};
- that.mapZjdDataTure = "";
- setTimeout(() => {
- if ($("#info .featureInfo .featureInfo").text() == "t_house_survey_zjdzd") {
- map.removeLayer(hc_land_on);
- that.mapHasDateStatus = 2;
- that.mapXs = true;
- let obj = {};
- let trs = $("#info .featureInfo").find("tr:eq(1)");
- let zjdXq = trs.find("td").eq(0).text();
- let zjdIdNum = zjdXq.replace("t_house_survey_zjdzd.", "");
- obj.id = zjdIdNum; // 主键id
- obj.deptName = trs.find("td").eq(3).text();//行政区划名称
-
- obj.zjddm = trs.find("td").eq(6).text();//宅基地代码
-
- obj.zdmj = trs.find("td").eq(11).text();//宗地面积
-
- obj.active = 1;
-
- var vector_drawing_map;
- let params = {
- "deptId": that.$cookies.get("item").deptId,
- "zjddm": obj.zjddm,
- }
- that.mapClick = obj.zjddm;
- //点击查看自然幢
- //自然幢图层查询开始 ------------------start
- var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
- zrzTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- params: {
- LAYERS: 'zjd_dc:t_house_survey_zrz',
- TILED: true,
- cql_filter: cql_filter_map,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- }),
- });
- map.addLayer(zrzTc);
- //自然幢图层查询开始 ------------------start
- //附属设施图层查询开始 ------------------start
- //var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
- fsssTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- params: {
- LAYERS: 'zjd_dc:t_house_survey_fsss',
- TILED: true,
- cql_filter: cql_filter_map,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- }),
- });
- map.addLayer(fsssTc);
- //附属设施图层查询开始 ------------------end
- that.$cookies.set("search", "")
- //that.$cookies.set("map", "")
- console.log(document.cookie.split(';').length)
- console.log(params);
- listZjdzd(params).then((response) => {
- if (response.rows[0].zdmj != "") {
- that.textMjAll = response.rows[0].zdmj;
- } else {
- that.textMjAllNum = "1";
- }
- that.mapZjdData = response.rows[0];
- that.mapZjdData.active = 1;
- that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
- that.mapZjdDataTure = 1;
- that.zjdHcDy = obj.zjddm;
- var styleZjd = new ol.style.Style({
- stroke: new ol.style.Stroke({
- //边界样式
- color: "#CCFF66",
- width: 6,
- }),
- });
- hc_land_on = new ol.layer.Vector({
- title: "add Layer",
- source: new ol.source.Vector({
- projection: projection,
- features: new ol.format.GeoJSON().readFeatures("{\n" +
- " \"type\": \"Feature\",\n" +
- " \"geometry\":" + that.mapZjdData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZjdData) + "}"),
- }),
- style: styleZjd
- });
- map.addLayer(hc_land_on);
- var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
- var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
- var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
- var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
- //定位查询位置
- var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- map.getView().animate({
- // 只设置需要的属性即可
- center: center, // 中心点
- zoom: 17.8, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- resolution:Math.random() * 0.00000001,
- });
-
- function createLabelStyleMap() {
- return new ol.style.Style({
- text: new ol.style.Text({
- text: that.mapZjdData.syqr,
- textAlign: "center", //位置
- textBaseline: "middle", //基准线
- font: "normal 16px 微软雅黑", //文字样式
- //text: "标注点", //文本内容
- fill: new ol.style.Fill({
- //文本填充样式(即文字颜色)
- color: "#09DDCE",
- width: 10,
- }),
- overflow: false //超出面的部分不显示
- }),
- zIndex: 9999,
- });
- }
-
- var newcenterFeatureMap = new ol.Feature({
- geometry: new ol.geom.Point(center), //几何信息
- //name: "标注点",
- });
- var sourceMapLookMap = new ol.source.Vector({wrapX: false});
- vector_drawing_map = new ol.layer.Vector({
- source: sourceMapLookMap,
- });
- map.addLayer(vector_drawing_map);
- newcenterFeatureMap.setStyle(createLabelStyleMap()); //设置要素样式
- sourceMapLookMap.addFeature(newcenterFeatureMap);
- });
- //let cloneObj = JSON.parse(JSON.stringify(obj));
- //that.mapZjdData = cloneObj;
- } else if ($("#info .featureInfo .featureInfo").text() == "t_house_survey_zrz") {
- //that.mapZjdTeAll.mapZjdAData ={};
- that.mapZjdDataTure = "";
- that.mapZjdTeAll.mapFsssAData = {};
- map.removeLayer(hc_land_on);
- let obj = {};
- that.mapHasDateStatus = 1;
- let trs = $("#info .featureInfo").find("tr:eq(1)");
- let zrzXq = trs.find("td").eq(0).text();
- let zrzIdNum = zrzXq.replace("t_house_survey_zrz.", "");
- obj.id = zrzIdNum; // 主键id
- obj.deptName = trs.find("td").eq(3).text();//行政区划名称
- obj.zjddm = trs.find("td").eq(4).text();//宅基地代码
- obj.scjzmj = trs.find("td").eq(12).text();//实测建筑面积
- let params = {
- "deptId": that.$cookies.get("item").deptId,
- "zjddm": obj.zjddm,
- }
- that.$cookies.set("search", "")
- //that.$cookies.set("map", "")
- console.log(that.mapZjdData);
- //if (that.mapZjdData !="" && that.mapZjdData !=null && that.mapZjdData !=undefined) {
- console.log(that.mapClick);
- console.log(obj.zjddm);
- if(that.mapXs && that.mapClick == obj.zjddm){
- listZjdzd(params).then((response) => {
- that.mapZjdData = response.rows[0];
- //that.mapZjdAData.active = 1;
- that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
- getZrz(obj.id).then((response) => {
- if (response.data.scjzmj != "") {
- that.textMjAll = response.data.scjzmj;
- } else {
- that.textMjAllNum = "1";
- }
- that.mapZrzData = response.data;
- that.mapZrzData.active = 3;
- that.mapZjdTeAll.mapZrzAData = that.mapZrzData;
- that.zjdHcDy = obj.zjddm;
- var styleZjd = new ol.style.Style({
- stroke: new ol.style.Stroke({
- //边界样式
- color: "#CCFF66",
- width: 6,
- }),
- });
- hc_land_on = new ol.layer.Vector({
- title: "add Layer",
- source: new ol.source.Vector({
- projection: projection,
- features: new ol.format.GeoJSON().readFeatures("{\n" +
- " \"type\": \"Feature\",\n" +
- " \"geometry\":" + that.mapZrzData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZrzData) + "}"),
- }),
- style: styleZjd
- });
- map.addLayer(hc_land_on);
- var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
- var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
- var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
- var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
- //定位查询位置
- var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- map.getView().animate({
- // 只设置需要的属性即可
- center: center, // 中心点
- zoom: 17.8, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- resolution: Math.random() * 0.00000001,
- });
- });
- });
- } else {
- //自然幢图层查询开始 ------------------start
- var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
- zrzTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- params: {
- LAYERS: 'zjd_dc:t_house_survey_zrz',
- TILED: true,
- cql_filter: cql_filter_map,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- }),
- });
- map.addLayer(zrzTc);
- //自然幢图层查询开始 ------------------start
- //附属设施图层查询开始 ------------------start
- //var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
- fsssTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- params: {
- LAYERS: 'zjd_dc:t_house_survey_fsss',
- TILED: true,
- cql_filter: cql_filter_map,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- }),
- });
- map.addLayer(fsssTc);
- //附属设施图层查询开始 ------------------end
- listZjdzd(params).then((response) => {
- if (response.rows[0].zdmj != "") {
- that.textMjAll = response.rows[0].zdmj;
- } else {
- that.textMjAllNum = "1";
- }
- that.mapZjdData = response.rows[0];
- that.mapZjdData.active = 1;
- that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
- that.mapZjdDataTure = 1;
- that.zjdHcDy = obj.zjddm;
- that.mapClick = obj.zjddm;
- that.mapXs = true;
- var styleZjd = new ol.style.Style({
- stroke: new ol.style.Stroke({
- //边界样式
- color: "#CCFF66",
- width: 6,
- }),
- });
- hc_land_on = new ol.layer.Vector({
- title: "add Layer",
- source: new ol.source.Vector({
- projection: projection,
- features: new ol.format.GeoJSON().readFeatures("{\n" +
- " \"type\": \"Feature\",\n" +
- " \"geometry\":" + that.mapZjdData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZjdData) + "}"),
- }),
- style: styleZjd
- });
- map.addLayer(hc_land_on);
- var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
- var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
- var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
- var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
- //定位查询位置
- var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- map.getView().animate({
- // 只设置需要的属性即可
- center: center, // 中心点
- zoom: 17.8, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- resolution:Math.random() * 0.00000001,
- });
-
- function createLabelStyleMap() {
- return new ol.style.Style({
- text: new ol.style.Text({
- text: that.mapZjdData.syqr,
- textAlign: "center", //位置
- textBaseline: "middle", //基准线
- font: "normal 16px 微软雅黑", //文字样式
- //text: "标注点", //文本内容
- fill: new ol.style.Fill({
- //文本填充样式(即文字颜色)
- color: "#09DDCE",
- width: 10,
- }),
- overflow: false //超出面的部分不显示
- }),
- zIndex: 9999,
- });
- }
-
- var newcenterFeatureMap = new ol.Feature({
- geometry: new ol.geom.Point(center), //几何信息
- //name: "标注点",
- });
- var sourceMapLookMap = new ol.source.Vector({wrapX: false});
- vector_drawing_map = new ol.layer.Vector({
- source: sourceMapLookMap,
- });
- map.addLayer(vector_drawing_map);
- newcenterFeatureMap.setStyle(createLabelStyleMap()); //设置要素样式
- sourceMapLookMap.addFeature(newcenterFeatureMap);
- });
- }
- } else if ($("#info .featureInfo .featureInfo").text() == "t_house_survey_fsss") {
- that.mapZjdTeAll.mapZrzAData = {};
- that.mapZjdDataTure = "";
- //that.mapZjdTeAll.mapZjdAData ={};
- map.removeLayer(hc_land_on);
- let obj = {};
- that.mapHasDateStatus = 0;
- let trs = $("#info .featureInfo").find("tr:eq(1)");
- let fsssXq = trs.find("td").eq(0).text();
- let fsssIdNum = fsssXq.replace("t_house_survey_fsss.", "");
- obj.id = fsssIdNum; // 主键id
- obj.deptName = trs.find("td").eq(4).text();//行政区划名称
- obj.zjddm = trs.find("td").eq(1).text();//宅基地代码
- // obj.houseDataConfirmStatus = trs.find("td").eq(6).text(); //状态
- // obj.fssslx = trs.find("td").eq(7).text(); //附属设施类型
- obj.jzmj = trs.find("td").eq(8).text(); //建筑面积
-
- let params = {
- "deptId": that.$cookies.get("item").deptId,
- "zjddm": obj.zjddm,
- "pageSize": 20,
- }
- that.$cookies.remove("search")
- //if (that.mapZjdData !="" && that.mapZjdData !=null && that.mapZjdData !=undefined) {
- if(that.mapXs && that.mapClick == obj.zjddm){
- listZjdzd(params).then((response) => {
- that.mapZjdData = response.rows[0];
- that.mapZjdData.active = 1;
- that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
- getFsss(obj.id).then((response) => {
- if (response.data.jzmj != "") {
- that.textMjAll = response.data.jzmj;
- } else {
- that.textMjAllNum = "1";
- }
- //that.mapfsssData.active = 4;
- that.mapfsssData = response.data;
- console.log(that.mapfsssData);
- that.mapZjdTeAll.mapFsssAData = that.mapfsssData;
- that.zjdHcDy = obj.zjddm;
- var styleZjd = new ol.style.Style({
- stroke: new ol.style.Stroke({
- //边界样式
- color: "#CCFF66",
- width: 6,
- }),
- });
- hc_land_on = new ol.layer.Vector({
- title: "add Layer",
- source: new ol.source.Vector({
- projection: projection,
- features: new ol.format.GeoJSON().readFeatures("{\n" +
- " \"type\": \"Feature\",\n" +
- " \"geometry\":" + that.mapfsssData.theGeom + ", \"properties\":" + JSON.stringify(that.mapfsssData) + "}"),
- }),
- style: styleZjd
- });
- map.addLayer(hc_land_on);
- var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
- var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
- var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
- var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
- //定位查询位置
- var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- map.getView().animate({
- // 只设置需要的属性即可
- center: center, // 中心点
- zoom: 17.8, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- resolution: Math.random() * 0.00000001,
- });
- });
- });
- } else {
- //自然幢图层查询开始 ------------------start
- var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
- zrzTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- params: {
- LAYERS: 'zjd_dc:t_house_survey_zrz',
- TILED: true,
- cql_filter: cql_filter_map,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- }),
- });
- map.addLayer(zrzTc);
- //自然幢图层查询开始 ------------------start
- //附属设施图层查询开始 ------------------start
- //var cql_filter_map = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + obj.zjddm + "'";
- fsssTc = new ol.layer.Image({
- source: new ol.source.ImageWMS({
- url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
- params: {
- LAYERS: 'zjd_dc:t_house_survey_fsss',
- TILED: true,
- cql_filter: cql_filter_map,
- SRID: 3857,
- TIMESTAMP: new Date().getTime(),
- },
- }),
- });
- map.addLayer(fsssTc);
- //附属设施图层查询开始 ------------------end
- listZjdzd(params).then((response) => {
- if (response.rows[0].zdmj != "") {
- that.textMjAll = response.rows[0].zdmj;
- } else {
- that.textMjAllNum = "1";
- }
- that.mapZjdData = response.rows[0];
- that.mapZjdData.active = 1;
- that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
- that.mapZjdDataTure = 1;
- that.zjdHcDy = obj.zjddm;
- that.mapClick = obj.zjddm;
- that.mapXs = true;
- var styleZjd = new ol.style.Style({
- stroke: new ol.style.Stroke({
- //边界样式
- color: "#CCFF66",
- width: 6,
- }),
- });
- hc_land_on = new ol.layer.Vector({
- title: "add Layer",
- source: new ol.source.Vector({
- projection: projection,
- features: new ol.format.GeoJSON().readFeatures("{\n" +
- " \"type\": \"Feature\",\n" +
- " \"geometry\":" + that.mapZjdData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZjdData) + "}"),
- }),
- style: styleZjd
- });
- map.addLayer(hc_land_on);
- var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
- var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
- var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
- var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
- //定位查询位置
- var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
- map.getView().animate({
- // 只设置需要的属性即可
- center: center, // 中心点
- zoom: 17.8, // 缩放级别
- rotation: undefined, // 缩放完成view视图旋转弧度
- duration: 1000, // 缩放持续时间,默认不需要设置
- resolution:Math.random() * 0.00000001,
- });
-
- function createLabelStyleMap() {
- return new ol.style.Style({
- text: new ol.style.Text({
- text: that.mapZjdData.syqr,
- textAlign: "center", //位置
- textBaseline: "middle", //基准线
- font: "normal 16px 微软雅黑", //文字样式
- //text: "标注点", //文本内容
- fill: new ol.style.Fill({
- //文本填充样式(即文字颜色)
- color: "#09DDCE",
- width: 10,
- }),
- overflow: false //超出面的部分不显示
- }),
- zIndex: 9999,
- });
- }
-
- var newcenterFeatureMap = new ol.Feature({
- geometry: new ol.geom.Point(center), //几何信息
- //name: "标注点",
- });
- var sourceMapLookMap = new ol.source.Vector({wrapX: false});
- vector_drawing_map = new ol.layer.Vector({
- source: sourceMapLookMap,
- });
- map.addLayer(vector_drawing_map);
- newcenterFeatureMap.setStyle(createLabelStyleMap()); //设置要素样式
- sourceMapLookMap.addFeature(newcenterFeatureMap);
- });
- }
- // if(obj.jzmj != ""){
- // that.textMjAll = obj.jzmj;
- // } else {
- // that.textMjAllNum = "1";
- // }
- } else {
-
- }
- }, 300);
- } else {
-
- }
- });
- }
- }
- //数据库查询详情时使用----------------------------------------start
- // if(feature) {
- // //document.getElementById("info").innerHTML = "";
- // that.mapHaDataValue = true;
- // var ifConsole = feature.values_.createBy;
- // if (ifConsole =="mapTheGeomFsssId") {
- // let obj = {};
- // that.mapHasDateStatus = 0;
- // obj.deptName = feature.values_.deptName;//行政区划名称
- // obj.zjddm = feature.values_.zjddm;//宅基地代码
- // obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus; //状态
- // obj.fssslx = feature.values_.fssslx; //附属设施类型
- // obj.jzmj = feature.values_.jzmj; //建筑面积
- // obj.qsly = feature.values_.qsly;//权属来源
- // obj.fwzt = feature.values_.fwzt; //房屋状态
- // obj.sfsp = feature.values_.sfsp; //是否审批
- // obj.sffz = feature.values_.sffz; //是否发证
- // obj.jglx = feature.values_.jglx; //结构类型
- // obj.sfzzsy = feature.values_.sfzzsy; //是否正在使用
- // obj.jzwqk = feature.values_.jzwqk; //建筑物情况
- // obj.tdzk = feature.values_.tdzk; //审批或建设前土地状况
- // obj.sfsgcf = feature.values_.sfsgcf; //是否受过处罚
- // obj.sysNormalDisable = feature.values_.sysNormalDisable; //是否停用
- // //附属设施类型字典项
- // that.getDicts("fsss_type").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.fssslx !=null && obj.fssslx !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.fssslx == assetTypeOptions[i].dictValue) {
- // obj.fssslx = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //权属类型字典项
- // that.getDicts("acquisition_method").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.qsly !=null && obj.qsly !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.qsly == assetTypeOptions[i].dictValue) {
- // obj.qsly = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //房屋状态字典项
- // that.getDicts("fwzt").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.fwzt !=null && obj.fwzt !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.fwzt == assetTypeOptions[i].dictValue) {
- // obj.fwzt = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //是否审批字典项
- // that.getDicts("sys_yes_no").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.sfsp !=null && obj.sfsp !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.sfsp == assetTypeOptions[i].dictValue) {
- // obj.sfsp = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //是否发证字典项
- // that.getDicts("sys_yes_no").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.sffz !=null && obj.sffz !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.sffz == assetTypeOptions[i].dictValue) {
- // obj.sffz = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //结构类型字典项
- // that.getDicts("house_jglx").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.jglx !=null && obj.jglx !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.jglx == assetTypeOptions[i].dictValue) {
- // obj.jglx = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //是否正在使用字典项
- // that.getDicts("sys_yes_no").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.sfzzsy !=null && obj.sfzzsy !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.sfzzsy == assetTypeOptions[i].dictValue) {
- // obj.sfzzsy = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //房屋状态字典项
- // that.getDicts("fwzt").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.fwzt !=null && obj.fwzt !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.fwzt == assetTypeOptions[i].dictValue) {
- // obj.fwzt = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //土地状况字典项
- // that.getDicts("land_state").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.tdzk !=null && obj.tdzk !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.tdzk == assetTypeOptions[i].dictValue) {
- // obj.tdzk = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //是否受过处罚字典项
- // that.getDicts("land_state").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.sfsgcf !=null && obj.sfsgcf !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.sfsgcf == assetTypeOptions[i].dictValue) {
- // obj.sfsgcf = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // that.mapFsssData = obj;
- // } else if(ifConsole =="mapTheGeomZrzId"){
- // let obj = {};
- // that.mapHasDateStatus = 1;
- // obj.deptName = feature.values_.deptName;//部门名称
- // obj.zjddm = feature.values_.zjddm;//宅基地代码
- // obj.nmfwzh = feature.values_.nmfwzh;//农民房屋幢号
- // obj.zrzh = feature.values_.zrzh;//自然幢号
- // obj.jgrq = feature.values_.jgrq;//竣工日期
- // obj.jzwgd = feature.values_.jzwgd;//建筑物高度
- // obj.zzdmj = feature.values_.zzdmj;//幢占地面积
- // obj.zydmj = feature.values_.zydmj;//幢用地面积
- // obj.scjzmj = feature.values_.scjzmj;//实测建筑面积
- // obj.zcs = feature.values_.zcs;//总层数
- // obj.dscs = feature.values_.dscs;//地上层数
- // obj.dxcs = feature.values_.dxcs;//地下层数
- // obj.fwjg = feature.values_.fwjg;//房屋结构
- // obj.sjly = feature.values_.sjly;//数据来源
- // obj.status = feature.values_.status;//状态
- // obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus;//数据调查确认状态
- // //字典项转化
- // //房屋结构字典项
- // that.getDicts("housing_structure").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.fwjg !=null && obj.fwjg !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.fwjg == assetTypeOptions[i].dictValue) {
- // obj.fwjg = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //房屋结构字典项
- // that.getDicts("sjly").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.sjly !=null && obj.sjly !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.sjly == assetTypeOptions[i].dictValue) {
- // obj.sjly = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // that.mapZrzData = obj;
- // } else if(ifConsole =="mapTheGeomZjdId"){
- // let obj = {};
- // that.mapHasDateStatus = 2;
- // obj.deptName = feature.values_.deptName;//行政区划名称
- // obj.suyqrdm = feature.values_.suyqrdm;//所有权人代码
- // obj.nhdm = feature.values_.nhdm;//农户代码
- // obj.zjddm = feature.values_.zjddm;//宅基地代码
- // obj.zdbh = feature.values_.zdbh;//宗地编号
- // obj.zddm = feature.values_.zddm;//宗地代码
- // obj.zl = feature.values_.zl;//坐落
- // obj.zldwdm = feature.values_.zldwdm;//坐落单位代码
- // obj.zdmj = feature.values_.zdmj;//宗地面积
- // obj.yt = feature.values_.yt;//用途
- // obj.ytmc = feature.values_.ytmc;//用途名称
- // obj.dj = feature.values_.dj;//宗地编号
- // obj.jg = feature.values_.jg;//价格万元
- // obj.qllx = feature.values_.qllx;//权利类型
- // obj.qlxz = feature.values_.qlxz;//权利性质
- // obj.qlsdfs = feature.values_.qlsdfs;//权利设定方式
- // obj.rjl = feature.values_.rjl;//容积率
- // obj.jzmd = feature.values_.jzmd;//建筑密度
- // obj.jzxg = feature.values_.jzxg;//建筑限高
- // obj.zdszd = feature.values_.zdszd;//宗地四至-东
- // obj.zdszn = feature.values_.zdszn;//宗地四至-南
- // obj.zdszx = feature.values_.zdszx;//宗地四至-西
- // obj.zdszb = feature.values_.zdszb;//宗地四至-北
- // obj.zdt = feature.values_.zdt;//宗地图
- // obj.tfh = feature.values_.tfh;//图幅号
- // obj.djh = feature.values_.djh;//地籍号
- // obj.sjly = feature.values_.sjly;//数据来源
- // obj.lyzk = feature.values_.lyzk;//当前利用状况
- // obj.xzkssj = feature.values_.xzkssj;//闲置开始时间
- // obj.sffz = feature.values_.sffz;//是否发证
- // obj.zjdzsh = feature.values_.zjdzsh;//宅基地证书号
- // obj.zjdxctp = feature.values_.zjdxctp;//宅基地现场图片
- // obj.zjdqdfs = feature.values_.zjdqdfs;//宅基地取得方式
- // obj.bccjl = feature.values_.bccjl;//被惩处经历
- // obj.bccbz = feature.values_.bccbz;//被惩处备注
- // obj.yctcyx = feature.values_.yctcyx;//有偿退出意向
- // obj.zjdpzmj = feature.values_.zjdpzmj;//宅基地批准面积
- // obj.zjdxzyy = feature.values_.zjdxzyy;//宅基地闲置原因
- // obj.lzyx = feature.values_.lzyx;//流转意向
- // obj.sysNormalDisable = feature.values_.sysNormalDisable;//是否停用
- // obj.active = 1;
- // //字典项转化
- // //是否发证字典项
- // that.getDicts("sys_yes_no").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.sffz !=null && obj.sffz !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.sffz == assetTypeOptions[i].dictValue) {
- // obj.sffz = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //利用状态字典项
- // that.getDicts("zjdlyzk").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.lyzk !=null && obj.lyzk !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.lyzk == assetTypeOptions[i].dictValue) {
- // obj.lyzk = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //流转意向字典项
- // that.getDicts("is_have").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.lzyx !=null && obj.lzyx !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.lzyx == assetTypeOptions[i].dictValue) {
- // obj.lzyx = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //有偿退出意向字典项
- // that.getDicts("is_have").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.yctcyx !=null && obj.yctcyx !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.yctcyx == assetTypeOptions[i].dictValue) {
- // obj.yctcyx = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //被惩处经历字典项
- // that.getDicts("is_have").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.bccjl !=null && obj.bccjl !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.bccjl == assetTypeOptions[i].dictValue) {
- // obj.bccjl = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //宅基地取得方式字典项
- // that.getDicts("acquisition_method").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.zjdqdfs !=null && obj.zjdqdfs !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.zjdqdfs == assetTypeOptions[i].dictValue) {
- // obj.zjdqdfs = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //权利设定方式字典项
- // that.getDicts("right_setting_mode").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.qlsdfs !=null && obj.qlsdfs !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.qlsdfs == assetTypeOptions[i].dictValue) {
- // obj.qlsdfs = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // //数据来源字典项
- // that.getDicts("sjly").then((response) => {
- // var assetTypeOptions = response.data;
- // if(obj.sjly !=null && obj.sjly !=""){
- // for(var i=0;assetTypeOptions.length >i; i++){
- // if(obj.sjly == assetTypeOptions[i].dictValue) {
- // obj.sjly = assetTypeOptions[i].dictLabel;
- // break;
- // }
- // }
- // }
- // });
- // that.mapZjdData = obj;
- // console.log(obj.zjddm);
- // that.zjdHcDy = obj.zjddm;
- // } else {
- // that.mapHaDataValue = false;
- // }
- // }else {
- // that.mapHaDataValue = false;
- // }
- //数据库查询详情时使用----------------------------------------end
- });
- //数据库循环加载时使用 --------------------加载较慢 ------start
- //当前账套没有任何空间数据
- // if(mapTalkAbout){
- // let deptName = this.$store.state.user.loginDeptId + "";
- // getQueryLand(deptName).then((response) => {
- // if (response.code == 200) {
- // let InsertCode = response.data;
- // if (InsertCode != null) {
- // var lat = InsertCode.lat;
- // var lng = InsertCode.lng;
- // var center;
- // if(lat !=null && lng !=null && lat !="" && lng !=""){
- // center = [lng,lat];
- // }else {
- // center =[115.452752, 31.789033];
- // }
- // map.getView().animate({
- // // 只设置需要的属性即可
- // center: ol.proj.fromLonLat(center), // 中心点
- // zoom: 17.9, // 缩放级别
- // rotation: undefined, // 缩放完成view视图旋转弧度
- // duration: 1000, // 缩放持续时间,默认不需要设置
- // });
- // }
- // }
- // });
- // }
- //数据库循环加载时使用 --------------------加载较慢 ------start
- },
-
- /*右侧列表 --展开收缩*/
- selectionPushMap() {
- this.selectionIconShow = true;
- this.homesteadListStatus = true;
- $(".homesteadList_wrap").animate(
- {
- right: "0",
- },
- 300
- );
- },
- homesteadListShrink() {
- this.selectionIconShow = false;
- // this.checked =["zjdSx","zrzSx","fsssSx"];
- $(".homesteadList_wrap").animate(
- {
- right: "-300px",
- },
- 300
- );
- setTimeout(() => {
- this.homesteadListStatus = false;
- }, 300);
- },
- checkClick(res){
- // 1、全选与不全选模块
- $(".checkall").change(function() {
- $(".item-list-checkbox .checkitem").prop("checked", $(this).prop("checked"));
- if($(this).prop("checked")){
-
- }else {
-
- }
- });
- // 2、小复选框模块
- $(".checkitem").change(function() {
- if ($(".checkitem:checked").length === $(".checkitem").length) {
- $(".checkall").prop("checked", true);
- } else {
- $(".checkall").prop("checked", false);
- }
- })
- },
- //绘制多边形地图
- drawMapPolygonFun() {
-
- },
- guidProduct(){
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
- var r = Math.random() * 16 | 0,
- v = c == 'x' ? r : (r & 0x3 | 0x8);
- return v.toString(16);
- });
- },
- //宅基地点击地图核查
- zjdHc(){
- if(this.zjdHcDy != "" && this.zjdHcDy != "undefined"){
- if(this.mapZjdData !=undefined && this.mapZjdData !="" && this.mapZjdDataTure !=""){
- this.mapZjdTeAll.active =1;
- //this.$cookies.set("search",this.mapZjdTeAll);
- this.$cookies.set("search","")
- this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
- //this.$router.push({path:'/homesteadSurvey/add'});
- }else if(this.mapZrzData !=undefined && this.mapZrzData !=""){
- if(this.mapZjdTeAll.mapZjdAData !=""){
- this.mapZjdTeAll.active = 3;
- //this.$cookies.set("search",this.mapZjdTeAll);
- this.$cookies.set("search","")
- this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
- } else {
- this.$toast("必须有宅基地数据才能进入自然幢核查");
- }
- }else {
- if(this.mapZjdTeAll.mapZjdAData !="") {
- this.mapZjdTeAll.active = 4;
- //this.$cookies.set("search", this.mapZjdTeAll);
- this.$cookies.set("search","")
- this.$router.push({path: '/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
- } else {
- this.$toast("必须有宅基地数据才能进入附属设施核查");
- }
- }
- } else {
- this.$dialog.alert({
- title: '宅基地核查',
- message: "请从地图中选择图层并点击核查",
- theme: 'round-button',
- }).then(() => {
- // on close
- });
- }
- },
- //搜索详情跳转
- zjdSs(item){
- this.mapZjdTeAll.mapZjdAData ={};
- this.mapZjdTeAll.mapZrzAData ={};
- this.mapZjdTeAll.mapFsssAData ={};
- //this.mapZjdTeAll.active =1;
- if(item.typeTc =="宅基地"){
- getZjdzd(item.id).then((response) => {
- this.mapZjdData = response.data;
- this.mapZjdTeAll.active = 1;
- this.mapZjdTeAll.mapZjdAData = this.mapZjdData;
- //this.$cookies.set("search",this.mapZjdTeAll);
- this.$cookies.set("search","")
- setTimeout(() => {
- this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
- }, 500);
- });
- }else if(item.typeTc =="自然幢"){
- //let =
- getZjdzd(item.id).then((response) => {
- this.mapZrzData = response.data;
- this.mapZjdTeAll.active = 3;
- this.mapZjdTeAll.mapZrzAData = this.mapZrzData;
- //this.$cookies.set("search",this.mapZjdTeAll);
- this.$cookies.set("search","")
- setTimeout(() => {
- this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
- }, 500);
- });
- }else if(item.typeTc =="附属设施"){
- getFsss(item.id).then((response) => {
- this.mapFsssData = response.data;
- this.mapZjdTeAll.active = 4;
- this.mapZjdTeAll.mapFsssAData = this.mapFsssData;
- //this.$cookies.set("search",this.mapZjdTeAll);
- this.$cookies.set("search","")
- setTimeout(() => {
- this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
- }, 500);
- });
- }else{
- this.$toast("无数据请检查后进入核查页面");
- }
- },
- //地图查询
- toggleSearch() {
- $("#query").trigger("click");
- },
- //
- checkAllArray(value){
- if(this.checked.length<3){
- this.$refs.checkboxGroup.toggleAll(true);
- }else{
- this.$refs.checkboxGroup.toggleAll(false);
- }
- },
- //筛选//全选
- checkAll(val) {
- this.$refs.checkboxGroup.value.toggleAll(true);
- return;
- let checkedCount = this.CheckedAllArr.length
- if (val) {
- //全选
- this.CheckedAllArr = this.dataList.map(item => item.id)
- } else{
- //取消全选
- if (checkedCount === this.dataList.length) {
- //如果不增加这个条件判断点击某一项时会全部取消
- this.CheckedAllArr = []
- }
- }
- },
- //单选
- handleChecked(value) {
- // this.checkAllFlag = this.CheckedAllArr.length == this.dataList.length;
- if (value.length<3){
- this.checkAllFlag = false;
- }else{
- this.checkAllFlag = true;
- }
- value.indexOf('zjdSx') == -1 ? this.zjdSx = false : this.zjdSx = true;
- value.indexOf('zrzSx') == -1 ? this.zrzSx = false : this.zrzSx = true;
- value.indexOf('fsssSx') == -1 ? this.fsssSx = false : this.fsssSx = true;
- },
- closeSearchBox(){
- this.showSearch = false ;
- var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
- document.styleSheets[0].insertRule(
- "@keyframes test2" +
- "{" +
- "0%{bottom: 0px}" +
- "100%{bottom: -" + height + "px;}" +
- "}"
- )
- $('.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'});
- },
- zjdTz(){
- if(this.mapZjdData =="" && this.mapZjdDataTure =="" && this.mapZjdData !=undefined){
- this.mapZjdTeAll.active =1;
- this.mapZjdTeAll.mapZjdAData.deptId =JSON.parse(localStorage.getItem("surveyItem")).deptId;
- this.mapZjdTeAll.mapZjdAData.theGeom =this.htZjdZrzFsss;
- //this.mapZjdTeAll.mapZjdAData.deptId = this.$cookies.get("item").deptId;
- //this.$cookies.set("search",this.mapZjdTeAll);
- this.$cookies.set("search","")
- this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
- }else {
- this.$toast("已选择宅基地,请选择自然幢或附属设施按钮");
- }
- },
- zrzTz(){
- if(this.mapZjdData !=undefined && this.mapZjdData !="" && this.mapZjdDataTure !=""){
- this.mapZjdTeAll.active =3;
- this.mapZjdTeAll.mapZrzAData.theGeom =this.htZjdZrzFsss;
- this.mapZjdTeAll.mapZrzAData.deptId =JSON.parse(localStorage.getItem("surveyItem")).deptId;
- //this.mapZjdTeAll.mapZrzAData.deptId = this.$cookies.get("item").deptId;
- //this.$cookies.set("search",this.mapZjdTeAll);
- this.$cookies.set("search","")
- this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
- }else {
- this.$toast("请先在地图上选择宅基地后,再选择自然幢按钮");
- }
- },
- fsssTz(){
- if(this.mapZjdData !=undefined && this.mapZjdData !="" && this.mapZjdDataTure !=""){
- this.mapZjdTeAll.active =4;
- this.mapZjdTeAll.mapFsssAData.theGeom =this.htZjdZrzFsss;
- this.mapZjdTeAll.mapFsssAData.deptId =JSON.parse(localStorage.getItem("surveyItem")).deptId;
- //this.mapZjdTeAll.mapFsssAData.deptId = this.$cookies.get("item").deptId;
- //this.$cookies.set("search",this.mapZjdTeAll);
- this.$cookies.set("search","")
- this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
- }else {
- this.$toast("请先在地图上选择宅基地后,再选择附属设施按钮");
- }
- },
- //绘图重置清除之前图层
- deleteHistory(){
- $("#deleteHistory").trigger("click");
- }
-
- },
- }
- </script>
-
- <style scoped lang="scss">
- /deep/ .van-swipe-cell__wrapper{
- margin-right:-3px;
- }
- .title:before
- {
- content:"";
- width: 6px;
- height: 20PX;
- background: #7ac943;
- border-radius: 3px;
- position:absolute;
- left:0;
- bottom:0;
- }
- .hzlxBtn{
- font-size: 0.3rem;
- display: inline-block;
- padding: 2% 0;
- border-radius: 30PX;
- color: #FFF;
- margin-right: 2%;
- width: 30%;
- &:last-child{
- margin: 0;
- }
- }
- .van-cell__title{
- flex:2
- }
- .bannerBg{
- width: 100%;
- color:#fff;
- /*padding:10px;*/
- background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
- }
- .van-hairline--bottom::after {
- border-bottom-width: 0;
- }
- .activeBtn{
- background:#fff;
- border-radius:25PX;
- color:#7AC943;
- line-height:30PX;
- text-align:center;
- font-size:14PX;
- width: 25%;
- margin:0 10px;
- box-shadow: 0px 5px 6px 0px rgba(0,0,0,0.16);
- }
- .disactiveBtn{
- background:rgba(255,255,255,.4);
- border-radius:25PX;
- color:#fff;
- line-height:30PX;
- text-align:center;
- font-size:14PX;
- width: 25%;
- margin:0 10px;
- box-shadow: 0px 5px 6px 0px rgba(0,0,0,0.16);
- }
- /*.van-cell__label{*/
- /* color: #969799;*/
- /* font-size: 12px;*/
- /* line-height: 20px;*/
- /* margin:0*/
- /*}*/
- .map_area {
- width: 50vw;
- height: 50vh;
- z-index:1;
- background:#000;
- position: fixed;
- left: 0;
- top: 0;
- }
- .van-field__label{
- width:50%;
- }
- .rightZoom_wrap {
- position: absolute;
- right: 3%;
- top: 35%;
- margin-top: -200px;
- background: #fff;
- margin-bottom: 16px;
- border-radius: 10px;
- text-align: center;
- padding: 15px 20px;
- img{
- margin: 0 auto;
- }
- .amplification {
- line-height: 1;
- font-size: 18px;
- text-align: center;
- margin-top: 5px;
- }
- }
- .mapZoom_wrap {
- position: absolute;
- right: 3%;
- top: 50%;
- margin-top: -200px;
- background: #fff;
- margin-bottom: 16px;
- border-radius: 10px;
- padding: 0px 20px;
- div{
- padding: 15px 0;
- border-bottom: 1px solid #C9C9C9;
- &:last-child{
- border: none;
- }
- p{
- margin-top: 5px;
- }
- }
- .qtMap {
- font-size: 18px;
- text-align: center;
- line-height: 1;
- }
-
- .clMap {
- font-size: 18px;
- text-align: center;
- line-height: 1;
- }
-
- .hcMap {
- font-size: 18px;
- text-align: center;
- line-height: 1;
- }
-
- .htMap {
- font-size: 18px;
- text-align: center;
- line-height: 1;
- }
-
- .dwMap {
- font-size: 18px;
- text-align: center;
- line-height: 1;
- }
- }
- .rightIcon_wrap {
- position: absolute;
- right: 16px;
- bottom: 160px;
- .selectionIcon_wrap {
- width: 74px;
- background: #fff;
- border-radius: 10px;
- padding: 14px 0;
-
- .icon {
- width: 38px;
- height: 38px;
- background: url("../../assets/images/homestead/selection_icon.png")
- no-repeat;
- background-size: 100% 100%;
- margin: 0 auto 4px;
- }
- .text {
- font-size: 24px;
- text-align: center;
- }
- }
- .positioning_wrap {
- width: 74px;
- background: #fff;
- margin-bottom: 16px;
- border-radius: 10px;
- height: 74px;
- display: flex;
- justify-content: center; /* 相对父元素水平居中 */
- align-items: center; /* 子元素相对父元素垂直居中*/
- .icon {
- width: 38px;
- height: 38px;
- background: url("../../assets/images/homestead/positioning_icon.png")
- no-repeat;
- background-size: 100% 100%;
- margin: 0 auto;
- }
- }
- }
- .homesteadList_wrap {
- // display: none;
- display: flex;
- position: absolute;
- right: -200px;
- top: 0px;
- bottom: 0px;
- width: 300px;
- background: #fff;
- z-index: 999;
- border-top-left-radius: 15px;
- border-bottom-left-radius: 15px;
-
- flex-direction: column;
- .noInfo_data {
- font-size: 28px;
- text-align: center;
- height: 300px;
- line-height: 300px;
- color: #666;
- }
- .title_m {
- color: #333;
- line-height: 36px;
- padding: 20px 40px 22px;
- .name {
- font-size: 36px;
- line-height: 42px;
- height: 42px;
- }
- .more_icon {
- width: 38px;
- height: 38px;
- background: url("../../assets/images/homestead/selectionNext_icon.png")
- no-repeat;
- float: right;
- margin-top: 2px;
- }
- }
-
- .main_m {
- overflow-y: auto;
- padding: 10px 0;
- // height: 300px;
- flex: 1;
- .flex_block {
- height: 70px;
- display: flex;
- // justify-content: center; /* 相对父元素水平居中 */
- align-items: center; /* 子元素相对父元素垂直居中 */
- padding: 0 40px;
- &.active {
- box-shadow: 0px 0px 10px rgba(24, 45, 51, 0.5);
- }
- .name_text {
- font-size: 28px;
- flex: 0.5;
- overflow: hidden; /*超出部分隐藏*/
- white-space: nowrap; /*不换行*/
- text-overflow: ellipsis; /*超出部分文字以...显示*/
- }
- .square_text {
- font-size: 28px;
- flex: 0.4;
- }
- .operation_mian {
- flex: 0 0 150px;
-
- .describe {
- font-size: 20px;
- padding: 6px 5px;
- float: right;
- color: #fff;
- border-radius: 30px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- max-width: 150px;
- &.yph {
- background: #b026ff;
- }
- &.dlzdph {
- background: #ff6f36;
- }
- &.ylz {
- background: #7fff4c;
- }
- &.dlz {
- background: rgb(255, 232, 76);
- }
- &.ylzdph {
- background: #ff7dd0;
- }
- &.zy {
- background: rgb(100, 30, 100);
- }
- &.xz {
- background: rgb(60, 100, 180);
- }
- &.chdb {
- background: #fe0303;
- }
- }
- }
- }
- }
- .footerBtn_wrap {
- flex: 0 0 90px;
- display: flex;
- justify-content: center; /* 相对父元素水平居中 */
- align-items: center; /* 子元素相对父元素垂直居中 */
-
- .options {
- flex: 1;
- font-size: 38px;
- display: flex;
- justify-content: center; /* 相对父元素水平居中 */
- align-items: center; /* 子元素相对父元素垂直居中 */
- height: 90px;
- &:first-child {
- border-bottom-left-radius: 15px;
- }
- &.active {
- background: #3cbf5b;
- color: #fff;
- }
- }
- }
- }
-
- .checkbox {
- width: 200px;
- margin: 30px auto;
- }
-
- .thead-checkbox {
- background-color: lightgray;
- }
-
- .item-checkbox {
- border: 1px solid darkgray;
- }
- .van-sticky{position: fixed;top: 0;right: 0; left: 0;z-index: 9999;}
-
- .searchBar_wrap {
- // display: none;
- position: fixed;
- left: 0;
- bottom: 0;
- width: 100%;
- padding: 0px 16px 0px 13px;
- background: #fff;
- border-top-left-radius: 15px;
- border-top-right-radius: 15px;
- z-index: 9;
-
- .searchBox{
- height: 40vh;
- overflow-y: scroll;
- .van-cell{
- /*&:first-child{*/
- /* box-shadow: none;*/
- /* margin:0;*/
- /*}*/
- box-shadow: 0px 0px 5px #cccccc;
- border-radius: 15PX;
- width: 98%;
- margin: 0 auto;
- margin-bottom: 0.35rem;
- &:first-child{
- margin-top: 5px;
- }
- }
- .van-cell__title{
- flex: 0.8;
- p{
- color: rgb(34, 183, 242);
- .van-icon{
- vertical-align: middle;
- }
- span{
- vertical-align: middle;
- &:nth-child(2){
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- display: inline-block;
- width: 60%;
- }
- &:nth-child(3){
- font-size: 0.25rem;
- border-radius: 5PX;
- padding: 5PX 15PX;
- margin-left: 5%;
- }
- }
- }
- }
- .van-cell__value{
- flex: 0.2;
- p{
- font-size: 0.25rem;
- display: inline-block;
- border-radius: 1rem;
- line-height: 1;
- padding: 10%;
- }
- }
- }
- .actionBar_wrap {
- display: flex;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
-
- background: #fff;
- border-top-left-radius: 15px;
- border-top-right-radius: 15px;
- .m_list {
- flex: 1;
- display: flex;
- justify-content: center; /* 相对父元素水平居中 */
- align-items: center; /* 子元素相对父元素垂直居中 */
-
- .tensile,
- .positioning,
- .spacing,
- .scale {
- width: 76px;
- height: 72px;
- background: #ffffff;
- border-radius: 8px;
- box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.16);
- .icon {
- width: 76px;
- height: 72px;
- }
- &.active {
- background: #333;
- &.tensile {
- .icon {
- background: url("../../assets/images/homestead/operation/tensile_active.png")
- center center no-repeat;
- background-size: 38px 50px;
- }
- }
- &.positioning {
- .icon {
- background: url("../../assets/images/homestead/operation/positioning_active.png")
- center center no-repeat;
- background-size: 38px 48px;
- }
- }
- &.spacing {
- .icon {
- background: url("../../assets/images/homestead/operation/spacing_active.png")
- center center no-repeat;
- background-size: 46px 46px;
- }
- }
- &.scale {
- .icon {
- background: url("../../assets/images/homestead/operation/scale_active.png")
- center center no-repeat;
- background-size: 48px 48px;
- }
- }
- }
- }
- .tensile {
- .icon {
- background: url("../../assets/images/homestead/operation/tensile.png")
- center center no-repeat;
- background-size: 38px 50px;
- }
- }
- .positioning {
- .icon {
- background: url("../../assets/images/homestead/operation/positioning.png")
- center center no-repeat;
- background-size: 38px 48px;
- }
- }
- .spacing {
- .icon {
- background: url("../../assets/images/homestead/operation/spacing.png")
- center center no-repeat;
- background-size: 46px 46px;
- }
- }
- .scale {
- .icon {
- background: url("../../assets/images/homestead/operation/scale.png")
- center center no-repeat;
- background-size: 48px 48px;
- }
- }
- .closes {
- background: url("../../assets/images/homestead/searchBar_close.png")
- no-repeat;
- background-size: 100% 100%;
- width: 72px;
- height: 72px;
- &.gray {
- background: url("../../assets/images/homestead/searchBar_close_gray.png")
- no-repeat;
- background-size: 100% 100%;
- }
- }
- .correct {
- background: url("../../assets/images/homestead/searchBar_save.png")
- no-repeat;
- background-size: 100% 100%;
- width: 72px;
- height: 72px;
- }
- }
- }
- .searchBar_area {
- flex: 1;
- height: 80px;
- background: #f1f1f1;
- border: 1px solid #dfdfdf;
- border-radius: 10px;
- padding: 0 28px;
- display: flex;
- .bar_icon {
- width: 50px;
- height: 50px;
- background: url("../../assets/images/homestead/searchBar_bar.png")
- center center no-repeat;
- background-size: 100% 100%;
- margin-top: 14px;
- margin-right: 15px;
- }
- .bar_ipt {
- flex: 1;
- input {
- width: 100%;
- height: 100%;
- background: none;
- border: 0 none;
- font-size: 32px;
- }
- }
- .bar_text {
- flex: 0 0 80px;
- font-size: 32px;
- color: #333333;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- display: flex;
- justify-content: center; /* 相对父元素水平居中 */
- align-items: center; /* 子元素相对父元素垂直居中 */
- }
- }
- .searchBar_more {
- flex: 0 0 80px;
- background: url("../../assets/images/homestead/searchBar_add.png") center
- center no-repeat;
- background-size: 80% 80%;
- margin-left: 15px;
- }
- }
- </style>
|