12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560 |
- <template>
- <div
- class="ZTGlobal"
- style="width: 100%; padding: 1rem 1rem 0rem 1rem; color: white"
- >
- <el-row :gutter="10">
- <el-col :span="12">
- <el-input
- size="mini"
- placeholder="请输入项目名称"
- v-model="input3"
- class="input-with-select"
- clearable
- >
- <el-button
- slot="append"
- icon="el-icon-search"
- @click="getProjectInfos"
- ></el-button>
- </el-input>
- </el-col>
- <el-col :span="5" :offset="6">
- <el-button
- size="mini"
- type="primary"
- plain
- @click="openaddProjectInfo()"
- >新增项目</el-button
- >
- <!-- <el-button size="mini" type="primary" plain>导入项目</el-button> -->
- </el-col>
- </el-row>
- <el-row
- :gutter="10"
- v-loading="loading"
- element-loading-text="数据加载中"
- element-loading-spinner="el-icon-loading"
- element-loading-background="rgba(0, 0, 0, 0.8)"
- >
- <el-col :span="24">
- <el-tabs v-model="activeName" style="height: 100%">
- <el-tab-pane label="未上会项目" name="未上会项目">
- <el-collapse accordion @change="handleChangeXM">
- <el-collapse-item
- v-for="item in wsh"
- :key="item.id"
- :name="item.id"
- >
- <template slot="title">
- {{ item.projectname }}({{
- getConstructionModel(item).length
- }}个)
- <el-tooltip
- class="item"
- effect="dark"
- content="项目详情"
- placement="top-start"
- >
- <i
- style="padding-left: 10px"
- class="el-icon-info"
- @click.stop="openProjectInfo(item)"
- ></i>
- </el-tooltip>
- <el-tooltip
- class="item"
- effect="dark"
- content="项目修改"
- placement="top-start"
- >
- <i
- style="padding-left: 10px"
- class="el-icon-edit"
- @click.stop="openaddProjectInfo(item)"
- ></i>
- </el-tooltip>
- <el-tooltip
- class="item"
- effect="dark"
- content="删除项目"
- placement="top-start"
- >
- <i
- style="padding-left: 10px"
- class="el-icon-delete"
- @click.stop="deleteProject(item.id)"
- ></i>
- </el-tooltip>
- </template>
- <el-row :gutter="10">
- <el-col :span="24">
- <el-button
- style="margin-left: 10px"
- size="mini"
- type="default"
- plain
- @click="openAddConstructionModelInfo(item)"
- >导入模型</el-button
- >
- <el-button
- size="mini"
- type="default"
- plain
- @click="ModelComparison(item)"
- >模型对比</el-button
- >
- <el-button
- size="mini"
- type="default"
- plain
- @click="setStrategy(item)"
- >选定方案</el-button
- >
- </el-col>
- </el-row>
- <el-row
- :gutter="10"
- v-for="itemModel in getConstructionModel(item)"
- :key="itemModel.id"
- >
- <el-col :span="24">
- <div
- class="checkedState"
- :ref="'Model' + itemModel.id"
- @click="SelectConstructionModelHendle(itemModel)"
- >
- <div class="status ce" style="display: none">
- <div class="icon"></div>
- <div class="txts ce">待选定</div>
- </div>
- <el-card
- shadow="hover"
- class="card_body_style hover_style"
- >
- <el-row>
- <el-col :span="24">
- <el-checkbox
- @click.stop.native=""
- v-model="itemModel.checked"
- :key="'itemModelChecked' + itemModel.id"
- >{{ itemModel.modelname }}</el-checkbox
- >
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- {{
- itemModel.creationtime
- ? itemModel.creationtime.substring(0, 10)
- : ""
- }}
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <div
- class="con-col hover_style"
- style="cursor: pointer"
- @click.stop="openConstructionModel(itemModel)"
- >
- <i
- style="font-size: 2rem"
- class="el-icon-s-operation"
- @click.stop="openConstructionModel(itemModel)"
- ></i>
- <a @click.stop="openConstructionModel(itemModel)"
- >详情</a
- >
- </div>
- </el-col>
- <el-col :span="6">
- <div
- class="con-col hover_style"
- style="cursor: pointer"
- @click.stop="positionModel(itemModel)"
- >
- <i
- style="font-size: 2rem"
- class="el-icon-location-outline"
- @click.stop="positionModel(itemModel)"
- ></i>
- <a @click.stop="positionModel(itemModel)">定位</a>
- </div>
- </el-col>
- <el-col :span="6">
- <div
- class="con-col hover_style"
- style="cursor: pointer"
- @click.stop="openAnalyzeList(itemModel)"
- >
- <i
- style="font-size: 2rem"
- class="el-icon-share"
- @click.stop="openAnalyzeList(itemModel)"
- ></i>
- <a @click.stop="openAnalyzeList(itemModel)"
- >分析</a
- >
- </div>
- </el-col>
- <el-col :span="6">
- <div
- class="con-col hover_style"
- style="cursor: pointer"
- @click.stop="removeConstructionmodel(itemModel)"
- >
- <i
- style="font-size: 2rem"
- class="el-icon-delete"
- @click.stop="removeConstructionmodel(itemModel)"
- ></i>
- <a>删除</a>
- </div>
- </el-col>
- </el-row>
- <el-row
- :ref="itemModel.id + 'AnalyzeList'"
- class="none"
- >
- <el-row :gutter="24">
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="normAnalysis(item, itemModel)"
- >指标分析
- </el-button>
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="openskylineAnalysis(itemModel)"
- >天际线分析</el-button
- >
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="openSunlightAnalysis(itemModel)"
- >日照分析</el-button
- >
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="KGAnalysis(itemModel)"
- >控规分析
- </el-button>
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="CheckPark(itemModel, true)"
- >车位审核
- </el-button>
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="RSAnalysis(itemModel)"
- >人视分析
- </el-button>
- </el-col>
- <!-- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="DistrictAnalysis(itemModel)"
- >区位分析
- </el-button>
- </el-col> -->
- <!-- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="limitHeightAnalysis(itemModel)"
- >限高分析
- </el-button>
- </el-col> -->
- <!-- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="trafficAnalysis(itemModel)"
- >交通分析
- </el-button>
- </el-col> -->
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="undergroundModeAnalysis()"
- >地下分析
- </el-button>
- </el-col>
- <!-- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="backLineAnalysis(itemModel)"
- >建筑退线
- </el-button>
- </el-col> -->
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="occupyAnalysis(itemModel)"
- >占压分析
- </el-button>
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="ArchitecturalAnalysis(itemModel)"
- >建筑风貌
- </el-button>
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="
- BuildingStretchingAnalysis(itemModel)
- "
- >楼体拉伸
- </el-button>
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="openNightscapeAnalysis(itemModel)"
- >夜景分析</el-button
- >
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <!-- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="PlanningAnalysis(itemModel)"
- >规划情况
- </el-button>
- </el-col> -->
- </el-row>
- </el-row>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </el-collapse-item>
- </el-collapse>
- <el-pagination
- :hide-on-single-page="true"
- style="color: white"
- @size-change="wshhandleSizeChange"
- @current-change="wshhandleCurrentChange"
- :page-size="wshqueryParams.pageSize"
- layout="prev, pager, next"
- :total="wshqueryParams.total"
- >
- </el-pagination>
- </el-tab-pane>
- <el-tab-pane label="已上会项目" name="已上会项目">
- <el-collapse accordion>
- <el-collapse-item
- v-for="item in ysh"
- :key="item.id"
- :name="item.id"
- >
- <template slot="title">
- {{ item.projectname }}({{
- getConstructionModel(item).length
- }}个)<i
- style="padding-left: 10px"
- class="header-icon el-icon-info"
- @click.stop="openProjectInfo(item)"
- ></i>
- </template>
- <div>
- <el-row :gutter="10">
- <el-col :span="24">
- <el-button
- size="mini"
- type="primary"
- plain
- @click="ModelComparison(item)"
- >模型对比</el-button
- >
- <!-- <el-button
- style="margin-left: 10px"
- size="mini"
- type="primary"
- plain
- >模型注册</el-button
- > -->
- </el-col>
- </el-row>
- <el-row
- :gutter="10"
- v-for="itemModel in getConstructionModel(item)"
- :key="itemModel.id"
- >
- <el-col :span="24">
- <div class="checkedState" :ref="'Model' + itemModel.id">
- <div
- class="status ce"
- :style="{
- display: itemModel.selectionStatus
- ? 'block'
- : 'none',
- }"
- >
- <div class="icon"></div>
- <div class="txts ce">已选定</div>
- </div>
- <el-card
- shadow="hover"
- class="card_body_style hover_style"
- >
- <el-row>
- <el-col :span="24">
- <el-checkbox
- @click.stop.native=""
- v-model="itemModel.checked"
- :key="'itemModelChecked' + itemModel.id"
- >{{ itemModel.modelname }}</el-checkbox
- >
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- {{
- itemModel.creationtime
- ? itemModel.creationtime.substring(0, 10)
- : ""
- }}
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <div
- class="con-col hover_style"
- style="cursor: pointer"
- @click.stop="openConstructionModel(itemModel)"
- >
- <i
- style="font-size: 2rem"
- class="el-icon-s-operation"
- @click.stop="openConstructionModel(itemModel)"
- ></i>
- <a
- @click.stop="openConstructionModel(itemModel)"
- >详情</a
- >
- </div>
- </el-col>
- <el-col :span="6">
- <div
- class="con-col hover_style"
- style="cursor: pointer"
- @click.stop="positionModel(itemModel)"
- >
- <i
- style="font-size: 2rem"
- class="el-icon-location-outline"
- @click.stop="positionModel(itemModel)"
- ></i>
- <a @click.stop="positionModel(itemModel)"
- >定位</a
- >
- </div>
- </el-col>
- <el-col :span="6">
- <div
- class="con-col hover_style"
- style="cursor: pointer"
- @click.stop="openAnalyzeList(itemModel)"
- >
- <i
- style="font-size: 2rem"
- class="el-icon-share"
- @click.stop="openAnalyzeList(itemModel)"
- ></i>
- <a @click.stop="openAnalyzeList(itemModel)"
- >分析</a
- >
- </div>
- </el-col>
- <el-col :span="6">
- <div
- class="con-col hover_style"
- style="cursor: pointer"
- @click.stop="removeConstructionmodel(itemModel)"
- >
- <i
- style="font-size: 2rem"
- class="el-icon-delete"
- @click.stop="
- removeConstructionmodel(itemModel)
- "
- ></i>
- <a>删除</a>
- </div>
- </el-col>
- </el-row>
- <el-row
- :ref="itemModel.id + 'AnalyzeList'"
- class="none"
- >
- <el-row :gutter="24">
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="normAnalysis(item, itemModel)"
- >指标分析
- </el-button>
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="openskylineAnalysis(itemModel)"
- >天际线分析</el-button
- >
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="openSunlightAnalysis(itemModel)"
- >日照分析</el-button
- >
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="KGAnalysis(itemModel)"
- >控规分析
- </el-button>
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="CheckPark(itemModel, true)"
- >车位审核
- </el-button>
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="RSAnalysis(itemModel)"
- >人视分析
- </el-button>
- </el-col>
- <!-- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="DistrictAnalysis(itemModel)"
- >区位分析
- </el-button>
- </el-col> -->
- <!-- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="limitHeightAnalysis(itemModel)"
- >限高分析
- </el-button>
- </el-col> -->
- <!-- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="trafficAnalysis(itemModel)"
- >交通分析
- </el-button>
- </el-col> -->
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="undergroundModeAnalysis()"
- >地下分析
- </el-button>
- </el-col>
- <!-- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="backLineAnalysis(itemModel)"
- >建筑退线
- </el-button>
- </el-col> -->
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="occupyAnalysis(itemModel)"
- >占压分析
- </el-button>
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="ArchitecturalAnalysis(itemModel)"
- >建筑风貌
- </el-button>
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="
- BuildingStretchingAnalysis(itemModel)
- "
- >楼体拉伸
- </el-button>
- </el-col>
- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="
- openNightscapeAnalysis(itemModel)
- "
- >夜景分析</el-button
- >
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <!-- <el-col :span="8">
- <el-button
- type="primary"
- size="mini"
- @click.stop="PlanningAnalysis(itemModel)"
- >规划情况
- </el-button>
- </el-col> -->
- </el-row>
- </el-row>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
- </el-collapse-item>
- </el-collapse>
- <el-pagination
- :hide-on-single-page="true"
- style="color: white"
- @size-change="yshhandleSizeChange"
- @current-change="yshhandleCurrentChange"
- :page-size="yshqueryParams.pageSize"
- layout="prev, pager, next"
- :total="yshqueryParams.total"
- >
- </el-pagination>
- </el-tab-pane>
- </el-tabs>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import {
- cartesian3ToWGS84,
- mapQuery,
- flatten,
- mercator2lonLat,
- undergroundMode,
- } from "@/utils/MapHelper/MapHelper.js";
- import { v4 as uuidv4 } from "uuid";
- import { isFunction, flatMap, values } from "lodash-es";
- import {
- booleanContains,
- area,
- intersect,
- polygon,
- point,
- midpoint,
- difference,
- } from "@turf/turf";
- import NightscapeAnalysis from "@/views/ConstructionApplication3D/NightscapeAnalysis/NightscapeAnalysis.vue";
- import addProjectInfo from "@/views/ConstructionApplication3D/projectInfo/addProjectInfo.vue";
- import projectInfo from "@/views/ConstructionApplication3D/projectInfo/projectInfo.vue";
- import skylineAnalysis from "@/views/ConstructionApplication3D/skylineAnalysis/skylineAnalysis.vue";
- import SunlightAnalysis from "@/views/ConstructionApplication3D/SunlightAnalysis/SunlightAnalysis.vue";
- // import SunlightAnalysis from "@/views/ConstructionApplication3D/SunlightAnalysis/SunlightTImesAnalysis.vue";
- import ConstructionModelInfo from "@/views/ConstructionApplication3D/ConstructionModelInfo/ConstructionModelInfo.vue";
- import addConstructionModelInfo from "@/views/ConstructionApplication3D/ConstructionModelInfo/addConstructionModelInfo.vue";
- import PlanningPlotInfo from "@/views/ConstructionApplication3D/PlanningPlot/PlanningPlotInfo.vue";
- import HighLimitAnalysis from "@/views/ConstructionApplication3D/HighLimitAnalysis/HighLimitAnalysis.vue";
- import backLineAnalysisinfo from "@/views/ConstructionApplication3D/backLineAnalysis/backLineAnalysisinfo.vue";
- import ZYAnalysisinfo from "@/views/ConstructionApplication3D/ZYAnalysisinfo/ZYAnalysisinfo.vue";
- import ZBFXAnalysisinfo from "@/views/ConstructionApplication3D/ZBFXAnalysisinfo/ZBFXAnalysisinfo.vue";
- import MXDBinfo from "@/views/ConstructionApplication3D/MXDBinfo/MXDBinfo.vue";
- import ArchitecturaAnalysis from "@/views/ConstructionApplication3D/ArchitecturaAnalysis/ArchitecturaAnalysis.vue";
- import RSAnalysis from "@/views/ConstructionApplication3D/RSAnalysis/RSAnalysis.vue";
- import BuildingStretchingAnalysis from "@/views/ConstructionApplication3D/BuildingStretchingAnalysis/BuildingStretchingAnalysis.vue";
- import parkResult from "@/views/ConstructionApplication3D/parkCheck/parkResult.vue";
- import clipboxByEditor from "@/views/ConstructionApplication3D/clipboxByEditor/clipboxByEditor.vue";
- import ghqk from "./ghqk.js";
- import CheckParkAnalyse from "./CheckParkAnalyse.js";
- import Popup from "../Popup.js";
- import {
- listProjectinformation,
- delConstructionmodel,
- updateConstructionmodel,
- updateProjectinformation,
- delProjectinformation,
- } from "@/api/zt/ztApi.js";
- var popupBoxs = [];
- export default {
- name: "constructionApplication3D",
- data() {
- return {
- input3: "",
- activeName: "未上会项目",
- ysh: [],
- wsh: [],
- WaitingSelectionModel: null,
- //点击查询用地红线事件
- handler: null,
- //点查entities事件
- getEntitiesHandler: null,
- tooltip: createTooltip(document.body),
- //模型数据数组
- layerDataList: [],
- //模型图层数组
- layerList: [],
- // 规划地块数组
- LandPlanningList: [],
- //道路数组
- DLlayerDatas: [],
- //地下模式状态
- underground: false,
- //建筑退线数组
- JZTXlayerDatas: [],
- //地类图斑数组
- DLTBlayerDatas: [],
- //多模型对比获取到的【id:uuidv4(),模型信息,模型图层数组,模型数据数组】
- modelsload: [],
- loading: false,
- constructionmodel: [],
- yshqueryParams: {
- total: 0,
- pageNum: 1,
- pageSize: 10,
- },
- wshqueryParams: {
- total: 0,
- pageNum: 1,
- pageSize: 10,
- },
- };
- },
- props: {
- info: {
- type: Object,
- default: () => {
- return {};
- },
- },
- layerid: {
- type: String,
- default: "",
- },
- lydata: {
- type: Object,
- default: () => {
- return {};
- },
- },
- lyoption: {
- type: Object,
- default: () => {
- return {};
- },
- },
- },
- computed: {},
- mounted() {
- // this.constructionmodel = window.constructionmodel;
- this.initEntitiesHandler();
- this.init();
- },
- methods: {
- async init() {
- await this.wshinit();
- await this.yshinit();
- },
- async wshinit() {
- this.wsh = await this.getshProjectinformations("0", this.wshqueryParams);
- },
- async yshinit() {
- this.ysh = await this.getshProjectinformations("1", this.yshqueryParams);
- },
- //页大小触发
- wshhandleSizeChange(val) {
- this.wshqueryParams.pageSize = val;
- this.wshqueryParams.pageNum = 1;
- this.wshinit();
- },
- //跳转页触发
- wshhandleCurrentChange(val) {
- this.wshqueryParams.pageNum = val;
- this.wshinit();
- },
- //页大小触发
- yshhandleSizeChange(val) {
- this.yshqueryParams.pageSize = val;
- this.yshqueryParams.pageNum = 1;
- this.yshinit();
- },
- //跳转页触发
- yshhandleCurrentChange(val) {
- this.yshqueryParams.pageNum = val;
- this.yshinit();
- },
- /**
- * 查询过滤
- */
- getProjectInfos() {
- //先清空当前视图
- scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
- this.qxyp();
- this.removeModel();
- this.removeAll();
- undergroundMode(false);
- //过滤
- this.init();
- },
- /**
- * //获取项目进度
- * @param meetingprogress
- */
- async getshProjectinformations(meetingprogress, queryParams) {
- let Projectinformations = await listProjectinformation({
- meetingprogress: meetingprogress,
- projectname: this.input3,
- ...queryParams,
- });
- queryParams.total = Projectinformations.total;
- return Projectinformations.rows;
- // let Projectinformations = window.projectinformation.filter(
- // (c) => c.meetingprogress == meetingprogress
- // );
- // return Projectinformations;
- },
- //获取项目模型信息
- getConstructionModel(Projectinfo) {
- return Projectinfo.ztConstructionmodelList;
- },
- /**
- * //选定方案
- * @param projectin 方案信息
- */
- setStrategy(projectin) {
- if (this.WaitingSelectionModel) {
- this.$layer.confirm("确认该项目已上会?", async (layerid) => {
- projectin.meetingprogress = "1";
- this.WaitingSelectionModel.selectionStatus = true;
- let Projectinfoistrue = await updateProjectinformation({
- id: projectin.id,
- meetingprogress: "1",
- });
- if (Projectinfoistrue.code == 200) {
- let ismodeltrue = await updateConstructionmodel({
- id: this.WaitingSelectionModel.id,
- selectionStatus: this.WaitingSelectionModel.selectionStatus,
- });
- if (ismodeltrue.code == 200) {
- this.$message({
- message: ismodeltrue.msg,
- type: "success",
- });
- this.getProjectInfos();
- this.$layer.close(layerid);
- }
- }
- });
- } else {
- this.$message({
- message: "请先选中待上会模型方案",
- type: "warning",
- });
- }
- },
- //分析列表显隐
- async openAnalyzeList(itemModel) {
- this.SelectConstructionModelHendle(itemModel);
- debugger;
- for (let key in this.$refs) {
- if (key.includes("AnalyzeList")) {
- if (key == itemModel.id + "AnalyzeList") {
- var classList = this.$refs[key][0].$el.classList;
- classList.toggle("none");
- } else {
- var classList = this.$refs[key][0].$el.classList;
- classList.add("none");
- }
- }
- }
- // const classList =
- // this.$refs[itemModel.id + "AnalyzeList"][0].$el.classList;
- // classList.toggle("none");
- },
- //切换项目
- handleChangeXM(val) {
- // closAndChangeXM(val);
- // 清除待选模型
- this.WaitingSelectionModel = null;
- // 清除其他选定样式
- for (let key in this.$refs) {
- if (key.indexOf("Model") !== -1) {
- let item = this.$refs[key][0];
- if (item) {
- item.childNodes.forEach((Citem) => {
- if (
- Citem.className &&
- Citem.className.indexOf("status ce") !== -1
- ) {
- Citem.style.display = "none";
- }
- });
- }
- }
- if (key.indexOf("AnalyzeList") !== -1) {
- let itemfx = this.$refs[key][0];
- if (itemfx) {
- itemfx.$el.classList.add("none");
- }
- }
- }
- },
- /**
- * //打开切换项目时关闭并初始化新项目必要图层
- * @param xmid
- */
- closAndChangeXM(xmid) {
- //清空之前打开的项目信息等
- //打开新项目图层
- },
- //选中报建模型
- SelectConstructionModelHendle(Minfo) {
- debugger;
- if (this.WaitingSelectionModel != Minfo) {
- this.removeModel();
- this.WaitingSelectionModel = null;
- this.removeAll();
- debugger;
- var wshData = this.wsh.find((c) => c.id == Minfo.projectinformationid);
- if (wshData && wshData.meetingprogress != "1") {
- // 清除其他选定样式
- for (let key in this.$refs) {
- if (key.indexOf("Model") !== -1) {
- let item = this.$refs[key][0];
- item.childNodes.forEach((Citem) => {
- if (
- Citem.className &&
- Citem.className.indexOf("status ce") !== -1
- ) {
- Citem.style.display = "none";
- }
- });
- }
- }
- // 添加当前选定样式及待选模型
- this.$refs["Model" + Minfo.id][0].childNodes.forEach((item) => {
- if (item.className && item.className.indexOf("status ce") !== -1) {
- item.style.display = "block";
- }
- });
- }
- this.WaitingSelectionModel = Minfo;
- //添加模型
- this.addModel(Minfo);
- }
- },
- //添加项目模型
- openAddConstructionModelInfo(info) {
- if (this.AddConstructionModelInfolayerid) {
- this.$layer.close(this.AddConstructionModelInfolayerid);
- }
- this.AddConstructionModelInfolayerid = this.$layer.iframe({
- content: {
- content: addConstructionModelInfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: { info }, //props
- },
- area: ["30rem", "40rem"], //宽 高
- title: "添加项目模型详情",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: async () => {
- //关闭事件
- debugger;
- // this.wsh = await this.getshProjectinformations("0");
- this.wshinit();
- },
- });
- },
- // 添加项目信息
- openaddProjectInfo(item) {
- if (this.addProjectInfolayerid) {
- this.$layer.close(this.addProjectInfolayerid);
- }
- this.addProjectInfolayerid = this.$layer.iframe({
- content: {
- content: addProjectInfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: { info: item }, //props
- },
- area: ["30rem", "38rem"], //宽 高
- title: item != null ? "修改项目详情" : "添加项目详情",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: async () => {
- //关闭事件
- debugger;
- // this.wsh = await this.getshProjectinformations("0");
- this.wshinit();
- },
- });
- },
- //删除报建模型
- async removeConstructionmodel(Minfo) {
- this.$layer.confirm("确认删除该报建模型?", async (layerid) => {
- let istrue = await delConstructionmodel(Minfo.id);
- if (istrue.code == 200) {
- this.$message({
- message: istrue.msg,
- type: "success",
- });
- this.getProjectInfos();
- this.$layer.close(layerid);
- }
- });
- },
- //删除项目
- async deleteProject(id) {
- this.$layer.confirm("确认删除该项目?", async (layerid) => {
- let istrue = await delProjectinformation(id);
- if (istrue.code == 200) {
- this.$message({
- message: istrue.msg,
- type: "success",
- });
- this.getProjectInfos();
- this.$layer.close(layerid);
- }
- });
- },
- //打开项目信息弹窗
- openProjectInfo(info) {
- if (this.ProjectInfolayerid) {
- this.$layer.close(this.ProjectInfolayerid);
- }
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = 430 / 2 + 556;
- let top = 430 / 2 + 60;
- this.ProjectInfolayerid = this.$layer.iframe({
- content: {
- content: projectInfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: { info }, //props
- },
- offset: [left, top], //left top
- area: ["430px", "430px"], //宽 高
- title: "项目详情",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- // 打开模型信息弹窗
- openConstructionModel(info) {
- if (this.ConstructionModellayerid) {
- this.$layer.close(this.ConstructionModellayerid);
- }
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = 430 / 2 + 556;
- let top = 430 / 2 + 60;
- let layerid = this.$layer.iframe({
- content: {
- content: ConstructionModelInfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: { info }, //props
- },
- offset: [left, top], //left top
- area: ["430px", "430px"], //宽 高
- title: "模型详情",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- //打开夜景分析弹窗
- openNightscapeAnalysis(info) {
- let w = document.body.offsetWidth;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = w - 430 + 430 / 2;
- let top = 550 / 2 + 60;
- this.$layer.iframe({
- id: "BJTC",
- content: {
- content: NightscapeAnalysis, //传递的组件对象
- parent: this, //当前的vue对象
- data: { info }, //props
- },
- offset: [left, top], //left top
- area: ["430px", "550px"],
- title: "夜景分析",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- //打开天际线分析弹窗
- openskylineAnalysis(info) {
- let w = document.body.offsetWidth;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = w - 430 + 430 / 2;
- let top = 550 / 2 + 60;
- this.$layer.iframe({
- id: "BJTC",
- content: {
- content: skylineAnalysis, //传递的组件对象
- parent: this, //当前的vue对象
- data: { info }, //props
- },
- offset: [left, top], //left top
- area: ["300px", "450px"],
- title: "天际线分析",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- //打开日照分析弹窗
- openSunlightAnalysis(info) {
- let w = document.body.offsetWidth;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = w - 430 + 430 / 2;
- let top = 550 / 2 + 60;
- this.$layer.iframe({
- id: "BJTC",
- content: {
- content: SunlightAnalysis, //传递的组件对象
- parent: this, //当前的vue对象
- data: { info }, //props
- },
- offset: [left, top], //left top
- area: ["430px", "600px"],
- title: "日照分析",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- //添加模型
- async addModel(Minfo) {
- await this.yp([Minfo]);
- var modelLayer = scene.open(Minfo.url);
- let that = this;
- that.layerDataList = [];
- Cesium.when(modelLayer, async function (layers) {
- layers.forEach((layer) => {
- viewer.flyTo(layer);
- layer.shadowType = 2;
- that.layerList.push(layer.name);
- });
- //获取模型信息
- let queryBySQLParameters = {
- getFeatureMode: "SQL",
- datasetNames: [Minfo.datasourcename + ":" + Minfo.datasetname],
- queryParameter: {
- attributeFilter: "1=1",
- },
- hasGeometry: true,
- };
- let e = await mapQuery(
- Minfo.dataurl + "/featureResults.json?returnContent=true",
- queryBySQLParameters
- );
- if (e) {
- e.features.forEach((feature) => {
- let layerData = { data: [], geometry: feature.geometry };
- feature.fieldNames.forEach((fieldName, i) => {
- let Field = e.datasetInfos
- ? e.datasetInfos[0].fieldInfos.find(
- (c) =>
- c.name && c.name.toUpperCase() == fieldName.toUpperCase()
- )
- : null;
- if (Field) {
- layerData.data.push({
- label: fieldName,
- labelCN: Field ? Field.caption : fieldName,
- value: feature.fieldValues[i],
- });
- }
- });
- that.layerDataList.push(layerData);
- });
- }
- that.layerDataList.forEach((layerData) => {
- // 添加模型楼号
- let SMID = layerData.data.find((c) => c.label == "SMID").value;
- let HEIGHT = layerData.data.find((c) => c.label == "HEIGHT").value;
- let x = layerData.geometry.center.x;
- let y = layerData.geometry.center.y;
- let z = Number(HEIGHT) + 29.7;
- let BUILDNO = "";
- if (layerData.data.find((c) => c.label == "BUILDNO")) {
- BUILDNO = layerData.data.find((c) => c.label == "BUILDNO").value;
- }
- var BoxIndex = popupBoxs.findIndex(
- (c) => c.element.id == "MXLH-" + SMID
- );
- if (BoxIndex > -1) {
- popupBoxs[BoxIndex].destroy();
- popupBoxs.splice(BoxIndex, 1);
- }
- let dom = document.createElement("div");
- dom.id = "MXLH-" + SMID;
- dom.style.position = "absolute";
- dom.style.width = "0";
- dom.style.height = "0";
- // dom.style.color = "rgba(2, 23, 44, 0.8)";
- // dom.style.backgroundColor = "rgba(2, 23, 44, 0.8)";
- dom.style.fontSize = "1.4rem";
- let domContent = document.createElement("div");
- domContent.style.position = "absolute";
- domContent.style.borderRadius = "5px";
- // domContent.style.border = "1px solid rgba(7, 131, 250, 0.3)";
- // domContent.style.backgroundColor = "rgba(2, 23, 44, 0.7)";
- domContent.style.bottom = "0px";
- domContent.style.left = "0px";
- domContent.style.whiteSpace = "nowrap";
- domContent.style.color = "rgba(83, 249, 255,1)";
- // domContent.style.padding = "8px 12px";
- domContent.style.transform = "translate(-50%, 0%)";
- domContent.innerHTML = BUILDNO;
- dom.appendChild(domContent);
- var popupBox = new Popup({
- viewer: viewer,
- element: dom,
- pixelOffset: new Cesium.Cartesian2(0, 0),
- translucencyByDistance: new Cesium.NearFarScalar(0, 1, 50000, 1),
- distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
- 0,
- 51000
- ),
- position: Cesium.Cartesian3.fromDegrees(x, y, z),
- });
- popupBox.show();
- popupBoxs.push(popupBox);
- // if (viewer.entities.getById("MXLH-" + SMID)) {
- // viewer.entities.removeById("MXLH-" + SMID);
- // }
- // let label = viewer.entities.add({
- // id: "MXLH-" + SMID,
- // // name: "MXLH-" + SMID,
- // //点
- // position: Cesium.Cartesian3.fromDegrees(x, y, z),
- // label: {
- // text: BUILDNO, //描述内容
- // font: "20px Sans-Serif", //字体大小 类型
- // fillColor: new Cesium.Color(83 / 255, 249 / 255, 255 / 255, 1), //颜色
- // outlineColor: Cesium.Color.GOLD,
- // style: Cesium.LabelStyle.CENTER_LABEL,
- // // 垂直位置
- // verticalOrigin: Cesium.VerticalOrigin.BUTTON,
- // // 中心位置
- // pixelOffset: new Cesium.Cartesian2(0, -10),
- // //设置背景颜色透明
- // backgroundColor: new Cesium.Color(
- // 35 / 255,
- // 55 / 255,
- // 75 / 255,
- // 0
- // ),
- // //打开背景 打开背景 (不会被线段覆盖)
- // showBackground: true,
- // heightReference: Cesium.HeightReference.NONE,
- // },
- // });
- });
- });
- },
- //添加多个模型
- async addModels(Minfos, completed) {
- await this.yp(Minfos);
- debugger;
- let models = [];
- Minfos.forEach((element) => {
- var modelLayer = scene.open(element.url);
- models.push(modelLayer);
- });
- // 为每个 Promise 添加 .catch() 处理程序
- const modifiedPromises = models.map((promise) => {
- return promise.otherwise((error) => {
- // 在这里处理错误,例如记录日志或执行其他操作
- // 返回一个默认值或空值,以便 Cesium.when.all 可以继续处理其他 Promise
- return null; // 或者其他默认值
- });
- });
- let that = this;
- Cesium.when
- .all(modifiedPromises, async function (modelLayers) {
- debugger;
- for (let index = 0; index < modelLayers.length; index++) {
- let modelData = {
- id: uuidv4(),
- Minfo: null,
- layers: [],
- layerDataList: [],
- };
- const Minfo = Minfos[index];
- modelData.Minfo = Minfo;
- const layer = modelLayers[index];
- if (layer) {
- layer.forEach((element) => {
- // element.shadowType = 2;
- //不同视口显隐
- for (let n = 0; n < modelLayers.length; n++) {
- if (index == n) {
- element.setVisibleInViewport(n, true);
- } else {
- element.setVisibleInViewport(n, false);
- }
- }
- modelData.layers.push(element.name);
- });
- //获取模型信息
- let queryBySQLParameters = {
- getFeatureMode: "SQL",
- datasetNames: [Minfo.datasourcename + ":" + Minfo.datasetname],
- queryParameter: {
- attributeFilter: "1=1",
- },
- hasGeometry: true,
- };
- let e = await mapQuery(
- Minfo.dataurl + "/featureResults.json?returnContent=true",
- queryBySQLParameters
- );
- e.features.forEach((feature) => {
- let layerData = { data: [], geometry: feature.geometry };
- feature.fieldNames.forEach((fieldName, i) => {
- let Field = e.datasetInfos
- ? e.datasetInfos[0].fieldInfos.find(
- (c) =>
- c.name &&
- c.name.toUpperCase() == fieldName.toUpperCase()
- )
- : null;
- if (Field) {
- layerData.data.push({
- label: fieldName,
- labelCN: Field ? Field.caption : fieldName,
- value: feature.fieldValues[i],
- });
- }
- });
- modelData.layerDataList.push(layerData);
- });
- // modelData.layerDataList.forEach((layerData) => {
- // // 添加模型楼号
- // let SMID = layerData.data.find((c) => c.label == "SMID").value;
- // let x = layerData.geometry.position.x;
- // let y = layerData.geometry.position.y;
- // let z =
- // layerData.geometry.boundingBox.upper.z -
- // layerData.geometry.boundingBox.lower.z;
- // let BUILDNO = layerData.data.find(
- // (c) => c.label == "BUILDNO"
- // ).value;
- // if (
- // viewer.entities.getById("MXLH-" + modelData.id + "-" + SMID)
- // ) {
- // viewer.entities.removeById(
- // "MXLH-" + modelData.id + "-" + SMID
- // );
- // }
- // let labeltext = viewer.entities.add({
- // id: "MXLH-" + modelData.id + "-" + SMID,
- // //点
- // position: Cesium.Cartesian3.fromDegrees(x, y, z),
- // label: {
- // text: BUILDNO, //描述内容
- // font: "20px Sans-Serif", //字体大小 类型
- // fillColor: new Cesium.Color(
- // 83 / 255,
- // 249 / 255,
- // 255 / 255,
- // 1
- // ), //颜色
- // outlineColor: Cesium.Color.GOLD,
- // style: Cesium.LabelStyle.CENTER_LABEL,
- // // 垂直位置
- // verticalOrigin: Cesium.VerticalOrigin.BUTTON,
- // // 中心位置
- // pixelOffset: new Cesium.Cartesian2(0, -10),
- // //设置背景颜色透明
- // backgroundColor: new Cesium.Color(
- // 35 / 255,
- // 55 / 255,
- // 75 / 255,
- // 0
- // ),
- // //打开背景 打开背景 (不会被线段覆盖)
- // showBackground: true,
- // heightReference: Cesium.HeightReference.NONE ,
- // },
- // });
- // });
- that.modelsload.push(modelData);
- } else {
- that.loading = false;
- scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
- that.removeModel();
- that.$message({
- message: "模型:" + Minfo.modelname + "加载失败,请检查服务",
- type: "warning",
- });
- for (let index = 0; index < modelLayers.length; index++) {
- const layer = modelLayers[index];
- if (layer) {
- layer.forEach((element) => {
- scene.layers.remove(element.name);
- });
- }
- }
- return;
- }
- }
- if (completed && isFunction(completed)) {
- completed();
- }
- })
- .otherwise(function (error) {
- debugger;
- that.loading = false;
- that.$message({
- message: "加载失败,请联系管理员",
- type: "warning",
- });
- scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
- that.removeModel();
- scene.layers.removeAll();
- });
- },
- //删除模型图层
- removeModel() {
- // this.qxyp();
- this.layerList.forEach((element) => {
- scene.layers.remove(element);
- });
- this.layerList = [];
- for (let index = popupBoxs.length - 1; index >= 0; index--) {
- const popupBox = popupBoxs[index];
- if (popupBox.element.id.includes("MXLH-")) {
- popupBox.destroy();
- popupBoxs.splice(index, 1);
- }
- }
- // this.layerDataList.forEach((element) => {
- // let SMID = element.data.find((c) => c.label == "SMID").value;
- // viewer.entities.removeById("MXLH-" + SMID);
- // });
- this.layerDataList = [];
- //清除多模型图层,数据
- this.modelsload.forEach((model) => {
- model.layers.forEach((element) => {
- scene.layers.remove(element);
- });
- // model.layerDataList.forEach((layerData) => {
- // let SMID = layerData.data.find((c) => c.label == "SMID").value;
- // viewer.entities.removeById("MXLH-" + model.id + "-" + SMID);
- // });
- });
- this.modelsload = [];
- },
- //定位模型
- async positionModel(Minfo) {
- if (this.WaitingSelectionModel == Minfo && this.layerList.length > 0) {
- this.layerList.forEach((element, i) => {
- let layer = scene.layers.find(element);
- viewer.flyTo(layer);
- });
- } else {
- this.SelectConstructionModelHendle(Minfo);
- }
- },
- //模型对比按钮
- ModelComparison(info) {
- let that = this;
- if (this.modelsload.length > 0) {
- scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
- this.removeModel();
- return;
- }
- this.loading = true;
- let modeinfos = this.getConstructionModel(info);
- let checkedModeinfos = [];
- modeinfos.forEach((modeinfo) => {
- if (modeinfo.checked) {
- checkedModeinfos.push(modeinfo);
- }
- });
- if (checkedModeinfos.length > 0 && checkedModeinfos.length < 5) {
- switch (checkedModeinfos.length) {
- case 1:
- scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
- break;
- case 2:
- scene.multiViewportMode = Cesium.MultiViewportMode.HORIZONTAL;
- break;
- case 3:
- scene.multiViewportMode =
- Cesium.MultiViewportMode.VerticalTrisection;
- break;
- case 4:
- scene.multiViewportMode = Cesium.MultiViewportMode.SEVEN_DIVISIONS;
- break;
- default:
- scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
- break;
- }
- this.removeModel();
- //加载模型
- this.addModels(checkedModeinfos, function () {
- that.openMXDBInfo();
- that.loading = false;
- });
- } else if (checkedModeinfos.length >= 5) {
- this.loading = false;
- this.$message({
- message: "不能多于4个模型。",
- type: "warning",
- });
- } else {
- this.loading = false;
- this.$message({
- message: "请点击复选框,选中至少一个模型进行对比。",
- type: "warning",
- });
- }
- },
- // 获取规划地块
- getGuiHuaDiKuai(completed) {
- if (this.LandPlanningList.length > 0 || this.handler != null) {
- this.removeAll();
- }
- let that = this;
- this.handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
- this.handler.setInputAction((evt) => {
- that.tooltip.showAt(
- evt.endPosition,
- `<p>点击地图,选择要分析的点位坐标,右键取消</p>`
- );
- }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
- this.handler.setInputAction((evt) => {
- that.removeEventHandler();
- }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
- this.handler.setInputAction(async function (movement) {
- that.tooltip.setVisible(false);
- //拾取图层
- let pick = scene.pickPosition(movement.position);
- let xy = cartesian3ToWGS84(pick);
- //查询用地红线
- let layer = flatten(window.layerTree).find(
- (item) => item.core == "003006"
- );
- let queryByIDParameters = {
- getFeatureMode: "BUFFER",
- datasetNames: [
- layer.date_server.datasourcename +
- ":" +
- layer.date_server.datasetname,
- ],
- geometry: {
- parts: [1],
- points: [{ y: xy.lat, x: xy.lng }],
- type: "POINT",
- },
- bufferDistance: 0.000005,
- hasGeometry: true,
- };
- let e = await mapQuery(
- layer.date_server.url + "/featureResults.json?returnContent=true",
- queryByIDParameters
- );
- if (e && e.totalCount > 0) {
- let GHYDlayerData = {
- id: uuidv4(),
- layerInfo: layer,
- data: [],
- geometry: e.features[0].geometry,
- };
- e.features[0].fieldNames.forEach((fieldName, i) => {
- let Field = e.datasetInfos
- ? e.datasetInfos[0].fieldInfos.find(
- (c) =>
- c.name &&
- c.name.toUpperCase() == fieldName.toUpperCase() &&
- c.name.toUpperCase().indexOf("SM") == -1
- )
- : null;
- if (Field) {
- GHYDlayerData.data.push({
- label: fieldName,
- labelCN: Field ? Field.caption : fieldName,
- value: e.features[0].fieldValues[i],
- });
- }
- });
- let ps = [];
- for (
- let index = 0;
- index < GHYDlayerData.geometry.points.length;
- index++
- ) {
- const element = GHYDlayerData.geometry.points[index];
- ps.push(element.x);
- ps.push(element.y);
- }
- //获取地块编码
- // let SMID = GHYDlayerData.data.find((c) => c.label == "SMID").value;
- let DKBM = GHYDlayerData.data.find((c) => c.label == "DKBM").value;
- let YDMJ = GHYDlayerData.data.find((c) => c.label == "YDMJ").value;
- const line = viewer.entities.add({
- id: "ydhxl-" + GHYDlayerData.id,
- polyline: {
- positions: Cesium.Cartesian3.fromDegreesArray(ps),
- width: 5,
- material: Cesium.Color.RED,
- clampToGround: true,
- },
- });
- //生成点
- const point = viewer.entities.add({
- id: "ydhxp-" + GHYDlayerData.id,
- //点
- position: Cesium.Cartesian3.fromDegrees(ps[0], ps[1]),
- label: {
- text: DKBM + " " + YDMJ + "㎡", //描述内容
- font: "30px Sans-Serif", //字体大小 类型
- fillColor: Cesium.Color.RED, //颜色
- outlineColor: Cesium.Color.GOLD,
- style: Cesium.LabelStyle.CENTER_LABEL,
- // 垂直位置
- verticalOrigin: Cesium.VerticalOrigin.BUTTON,
- // 中心位置
- pixelOffset: new Cesium.Cartesian2(0, -10),
- //设置背景颜色透明
- backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.0),
- //打开背景 打开背景 (不会被线段覆盖)
- showBackground: true,
- heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
- clampToS3M: true,
- },
- });
- that.LandPlanningList.push(GHYDlayerData);
- }
- that.removeEventHandler();
- if (completed && isFunction(completed)) {
- completed();
- }
- }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
- },
- //控规分析
- KGAnalysis(Minfo) {
- let that = this;
- this.getGuiHuaDiKuai(function () {
- that.getBufferTraffic();
- that.getbackLine(Minfo);
- });
- },
- //区位分析
- DistrictAnalysis() {
- this.getGuiHuaDiKuai();
- },
- /**
- * 限高分析
- * @param Minfo 报建模型信息
- */
- limitHeightAnalysis(Minfo) {
- let that = this;
- this.getGuiHuaDiKuai(function () {
- that.HighLimit(Minfo);
- });
- },
- // 生成限高
- async HighLimit(Minfo) {
- let that = this;
- let JZXGD = 0;
- let DKBM = [];
- if (that.LandPlanningList.length > 0) {
- let ps = [];
- for (
- let LandPlanningListindex = 0;
- LandPlanningListindex < that.LandPlanningList.length;
- LandPlanningListindex++
- ) {
- const GHYDlayerData = that.LandPlanningList[LandPlanningListindex];
- let bm = GHYDlayerData.data.find((c) => c.label == "DKBM");
- if (bm && bm.value) {
- DKBM.push(bm.value);
- }
- //基础高度(地形高度)加入地形后可删除
- let jcgd = 0;
- //获取模型信息
- let queryBySQLParameters = {
- getFeatureMode: "SQL",
- datasetNames: [Minfo.datasourcename + ":项目范围"],
- queryParameter: {
- attributeFilter: " DKBM = '" + bm.value + "'",
- },
- hasGeometry: true,
- };
- let e = await mapQuery(
- Minfo.dataurl + "/featureResults.json?returnContent=true",
- queryBySQLParameters
- );
- if (e && e.totalCount > 0) {
- e.features.forEach((feature) => {
- feature.fieldNames.forEach((fieldName, i) => {
- if (
- fieldName == "BASEH" &&
- Number(feature.fieldValues[i]) > jcgd
- ) {
- jcgd = Number(feature.fieldValues[i]);
- }
- });
- });
- }
- ps = [];
- for (
- let index = 0;
- index < GHYDlayerData.geometry.points.length;
- index++
- ) {
- const element = GHYDlayerData.geometry.points[index];
- ps.push(element.x);
- ps.push(element.y);
- }
- JZXGD = Number(
- GHYDlayerData.data.find((c) => c.label == "JZXGD").value
- );
- let entity = viewer.entities.add({
- id: "polygonA",
- polygon: {
- hierarchy: Cesium.Cartesian3.fromDegreesArray(ps),
- height: JZXGD + jcgd || 0,
- material: new Cesium.Color(1, 1, 0.2, 0.5),
- outline: true,
- outlineColor: Cesium.Color.RED,
- clampToGround: true,
- },
- });
- debugger;
- let dom = document.createElement("div");
- dom.id = "JZXGD-A";
- dom.style.position = "absolute";
- dom.style.width = "0";
- dom.style.height = "0";
- // dom.style.color = "rgba(2, 23, 44, 0.8)";
- // dom.style.backgroundColor = "rgba(2, 23, 44, 0.8)";
- dom.style.fontSize = "1rem";
- let domContent = document.createElement("div");
- domContent.style.position = "absolute";
- domContent.style.borderRadius = "5px";
- domContent.style.border = "1px solid rgba(7, 131, 250, 0.3)";
- domContent.style.backgroundColor = "rgba(2, 23, 44, 0.7)";
- domContent.style.bottom = "0px";
- domContent.style.left = "0px";
- domContent.style.whiteSpace = "nowrap";
- domContent.style.color = "red";
- // domContent.style.padding = "8px 12px";
- domContent.style.transform = "translate(-50%, 0%)";
- domContent.innerHTML = "限高上限:" + JZXGD + "米";
- dom.appendChild(domContent);
- var popupBox = new Popup({
- viewer: viewer,
- element: dom,
- pixelOffset: new Cesium.Cartesian2(0, 0),
- translucencyByDistance: new Cesium.NearFarScalar(0, 1, 50000, 1),
- distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
- 0,
- 51000
- ),
- position: Cesium.Cartesian3.fromDegrees(ps[0], ps[1], JZXGD + jcgd),
- });
- popupBox.show();
- popupBoxs.push(popupBox);
- // let label = viewer.entities.add({
- // id: "JZXGD-A",
- // //点
- // position: Cesium.Cartesian3.fromDegrees(ps[0], ps[1], JZXGD + jcgd),
- // label: {
- // text: "限高上限:" + JZXGD + "米", //描述内容
- // // font: "20px Sans-Serif", //字体大小 类型
- // fillColor: Cesium.Color.RED, //颜色
- // // outlineColor: Cesium.Color.GOLD,
- // // style: Cesium.LabelStyle.CENTER_LABEL,
- // // // 垂直位置
- // // verticalOrigin: Cesium.VerticalOrigin.BUTTON,
- // // // 中心位置
- // // pixelOffset: new Cesium.Cartesian2(0, -10),
- // // //设置背景颜色透明
- // // backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.0),
- // // //打开背景 打开背景 (不会被线段覆盖)
- // // showBackground: true,
- // heightReference: Cesium.HeightReference.NONE,
- // },
- // });
- // that.layerList.forEach((layer) => {
- // debugger;
- // var hyp = new Cesium.HypsometricSetting();
- // //创建分层设色对象 设置最大/最小可见高度 颜色表 显示模式 透明度及线宽
- // var colorTable = new Cesium.ColorTable();
- // colorTable.insert(999, new Cesium.Color(1, 0, 0));
- // colorTable.insert(JZXGD, new Cesium.Color(1, 0, 0));
- // hyp.MaxVisibleValue = 999;
- // hyp.MinVisibleValue = JZXGD;
- // hyp.ColorTable = colorTable;
- // hyp.DisplayMode = Cesium.HypsometricSettingEnum.DisplayMode.FACE;
- // hyp.Opacity = 0.5;
- // hyp.LineInterval = 10.0;
- // //设置图层分层设色属性
- // layer.hypsometricSetting = {
- // hypsometricSetting: hyp,
- // CoverageArea: ps,
- // analysisMode:
- // Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION,
- // };
- // });
- that.layerDataList.forEach((layerData) => {
- let LANDNO = layerData.data.find((c) => c.label == "LANDNO").value;
- if (bm.value == LANDNO) {
- let SMID = layerData.data.find((c) => c.label == "SMID").value;
- let Height = layerData.data.find(
- (c) => c.label == "HEIGHT"
- ).value;
- // let x = layerData.geometry.boundingBox.upper.x;
- // let y = layerData.geometry.boundingBox.upper.y;
- // let z =
- // layerData.geometry.boundingBox.upper.z -
- // layerData.geometry.boundingBox.lower.z;
- let x = layerData.geometry.center.x;
- let y = layerData.geometry.center.y;
- let z = Number(Height);
- // if (viewer.entities.getById("JZXG-" + SMID)) {
- // viewer.entities.removeById("JZXG-" + SMID);
- // }
- debugger;
- var BoxIndex = popupBoxs.findIndex(
- (c) => c.element.id == "JZXG-" + SMID
- );
- if (BoxIndex > -1) {
- popupBoxs[BoxIndex].destroy();
- popupBoxs.splice(BoxIndex, 1);
- }
- let cg = this.calculateHighLimit(Height, JZXGD);
- if (cg > 0) {
- debugger;
- let dom = document.createElement("div");
- dom.id = "JZXG-" + SMID;
- dom.style.position = "absolute";
- dom.style.width = "0";
- dom.style.height = "0";
- // dom.style.color = "rgba(2, 23, 44, 0.8)";
- // dom.style.backgroundColor = "rgba(2, 23, 44, 0.8)";
- dom.style.fontSize = "1rem";
- let domContent = document.createElement("div");
- domContent.style.position = "absolute";
- domContent.style.borderRadius = "5px";
- domContent.style.border = "1px solid rgba(7, 131, 250, 0.3)";
- domContent.style.backgroundColor = "rgba(2, 23, 44, 0.7)";
- domContent.style.bottom = "0px";
- domContent.style.left = "0px";
- domContent.style.whiteSpace = "nowrap";
- domContent.style.color = "white";
- // domContent.style.padding = "8px 12px";
- domContent.style.transform = "translate(-50%, 0%)";
- domContent.innerHTML = "超高:" + cg + "米";
- dom.appendChild(domContent);
- var popupBox = new Popup({
- viewer: viewer,
- element: dom,
- pixelOffset: new Cesium.Cartesian2(0, 0),
- translucencyByDistance: new Cesium.NearFarScalar(
- 0,
- 1,
- 50000,
- 1
- ),
- distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
- 0,
- 51000
- ),
- position: Cesium.Cartesian3.fromDegrees(x, y, z + jcgd + 3),
- });
- popupBox.show();
- popupBoxs.push(popupBox);
- // let label = viewer.entities.add({
- // id: "JZXG-" + SMID,
- // //点
- // position: Cesium.Cartesian3.fromDegrees(x, y, z + jcgd + 6),
- // label: {
- // text: "超高:" + cg + "米", //描述内容
- // font: "14px", //字体大小 类型
- // fillColor: new Cesium.Color(
- // 255 / 255,
- // 255 / 255,
- // 255 / 255,
- // 1
- // ), //颜色
- // // outlineColor: Cesium.Color.GOLD,
- // // // style: Cesium.LabelStyle.CENTER_LABEL,
- // // // 垂直位置
- // // verticalOrigin: Cesium.VerticalOrigin.BUTTON,
- // // // 中心位置
- // // pixelOffset: new Cesium.Cartesian2(0, -10),
- // //设置背景颜色透明
- // backgroundColor: new Cesium.Color(
- // 0 / 255,
- // 0 / 255,
- // 0 / 255,
- // 0.6
- // ),
- // //打开背景 打开背景 (不会被线段覆盖)
- // // showBackground: true,
- // heightReference: Cesium.HeightReference.NONE,
- // },
- // });
- }
- }
- });
- }
- }
- // this.openXGFXInfo(that.layerDataList, JZXGD, DKBM);
- },
- /**
- * // 计算超高距离
- * @param Height 建筑高度
- * @param JZXGD 限高上限
- */
- calculateHighLimit(Height, JZXGD) {
- let sd = Height - JZXGD;
- return sd.toFixed(2);
- },
- /**
- * 交通分析
- */
- trafficAnalysis() {
- let that = this;
- this.getGuiHuaDiKuai(function () {
- that.getBufferTraffic();
- });
- },
- /**
- * 查询200米范围内的道路
- */
- async getBufferTraffic() {
- let that = this;
- let geo = this.LandPlanningList[0].geometry;
- // let geo = {
- // id: 0,
- // style: null,
- // parts: geometry.parts,
- // points: geometry.points,
- // type: "REGION",
- // prjCoordSys: {
- // epsgCode: null,
- // },
- // };
- // 加载道路红线
- //道路红线
- let layer = flatten(window.layerTree).find(
- (item) => item.core == "005006"
- );
- if (layer && layer.date_server.url) {
- let queryByGeometryParameters = {
- getFeatureMode: "BUFFER",
- datasetNames: [
- layer.date_server.datasourcename +
- ":" +
- layer.date_server.datasetname,
- ],
- geometry: geo,
- bufferDistance: 0.002,
- hasGeometry: "true",
- };
- let e = await mapQuery(
- layer.date_server.url + "/featureResults.json?returnContent=true",
- queryByGeometryParameters
- );
- if (e && e.totalCount > 0) {
- e.features.forEach((feature) => {
- let DLlayerData = {
- id: uuidv4(),
- layerInfo: layer,
- data: [],
- geometry: feature.geometry,
- entities: [],
- };
- feature.fieldNames.forEach((fieldName, i) => {
- let Field = e.datasetInfos
- ? e.datasetInfos[0].fieldInfos.find(
- (c) =>
- c.name &&
- c.name.toUpperCase() == fieldName.toUpperCase() &&
- c.name.toUpperCase().indexOf("SM") == -1
- )
- : null;
- if (Field) {
- DLlayerData.data.push({
- label: fieldName,
- labelCN: Field ? Field.caption : fieldName,
- value: feature.fieldValues[i],
- });
- }
- });
- let ps = [];
- for (
- let index = 0;
- index < feature.geometry.points.length;
- index++
- ) {
- const element = feature.geometry.points[index];
- ps.push(element.x);
- ps.push(element.y);
- }
- //判断是否规划道路
- const line = viewer.entities.add({
- id: "DLX-" + DLlayerData.id,
- polyline: {
- positions: Cesium.Cartesian3.fromDegreesArray(ps),
- width: 5,
- material: Cesium.Color.GREENYELLOW,
- clampToGround: true,
- },
- });
- DLlayerData.entities.push(line.id);
- that.DLlayerDatas.push(DLlayerData);
- });
- }
- }
- // 加载道路中线
- layer = flatten(window.layerTree).find((item) => item.core == "005004");
- if (layer && layer.date_server.url) {
- let queryByGeometryParameters = {
- getFeatureMode: "BUFFER",
- datasetNames: [
- layer.date_server.datasourcename +
- ":" +
- layer.date_server.datasetname,
- ],
- geometry: geo,
- bufferDistance: 0.002,
- hasGeometry: "true",
- };
- let e = await mapQuery(
- layer.date_server.url + "/featureResults.json?returnContent=true",
- queryByGeometryParameters
- );
- if (e && e.totalCount > 0) {
- e.features.forEach((feature) => {
- let DLlayerData = {
- id: uuidv4(),
- layerInfo: layer,
- data: [],
- geometry: feature.geometry,
- entities: [],
- };
- feature.fieldNames.forEach((fieldName, i) => {
- let Field = e.datasetInfos
- ? e.datasetInfos[0].fieldInfos.find(
- (c) =>
- c.name &&
- c.name.toUpperCase() == fieldName.toUpperCase() &&
- c.name.toUpperCase().indexOf("SM") == -1
- )
- : null;
- if (Field) {
- DLlayerData.data.push({
- label: fieldName,
- labelCN: Field ? Field.caption : fieldName,
- value: feature.fieldValues[i],
- });
- }
- });
- let ps = [];
- for (
- let index = 0;
- index < feature.geometry.points.length;
- index++
- ) {
- const element = feature.geometry.points[index];
- ps.push(element.x);
- ps.push(element.y);
- }
- //判断是否规划道路
- let SSQK = DLlayerData.data.find((c) => c.label == "SSQK");
- if (SSQK && SSQK.value == "规划") {
- var line = viewer.entities.add({
- id: "DLX-" + DLlayerData.id,
- polyline: {
- positions: Cesium.Cartesian3.fromDegreesArray(ps),
- width: 4,
- material: new Cesium.PolylineDashMaterialProperty({
- color: Cesium.Color.CYAN,
- clampToGround: true,
- }),
- clampToGround: true,
- },
- });
- DLlayerData.entities.push(line.id);
- } else {
- const line = viewer.entities.add({
- id: "DLX-" + DLlayerData.id,
- polyline: {
- positions: Cesium.Cartesian3.fromDegreesArray(ps),
- width: 5,
- material: Cesium.Color.CYAN,
- clampToGround: true,
- },
- });
- DLlayerData.entities.push(line.id);
- }
- that.DLlayerDatas.push(DLlayerData);
- });
- }
- }
- // 加载禁止开口线
- layer = flatten(window.layerTree).find((item) => item.core == "005005");
- if (layer && layer.date_server.url) {
- let queryByGeometryParameters = {
- getFeatureMode: "BUFFER",
- datasetNames: [
- layer.date_server.datasourcename +
- ":" +
- layer.date_server.datasetname,
- ],
- geometry: geo,
- bufferDistance: 0.002,
- hasGeometry: "true",
- };
- let e = await mapQuery(
- layer.date_server.url + "/featureResults.json?returnContent=true",
- queryByGeometryParameters
- );
- if (e && e.totalCount > 0) {
- e.features.forEach((feature) => {
- let DLlayerData = {
- id: uuidv4(),
- layerInfo: layer,
- data: [],
- geometry: feature.geometry,
- entities: [],
- };
- feature.fieldNames.forEach((fieldName, i) => {
- let Field = e.datasetInfos
- ? e.datasetInfos[0].fieldInfos.find(
- (c) =>
- c.name &&
- c.name.toUpperCase() == fieldName.toUpperCase() &&
- c.name.toUpperCase().indexOf("SM") == -1
- )
- : null;
- if (Field) {
- DLlayerData.data.push({
- label: fieldName,
- labelCN: Field ? Field.caption : fieldName,
- value: feature.fieldValues[i],
- });
- }
- });
- let ps = [];
- for (
- let index = 0;
- index < feature.geometry.points.length;
- index++
- ) {
- const element = feature.geometry.points[index];
- ps.push(element.x);
- ps.push(element.y);
- }
- const line = viewer.entities.add({
- id: "DLX-" + DLlayerData.id,
- polyline: {
- positions: Cesium.Cartesian3.fromDegreesArray(ps),
- width: 5,
- material: Cesium.Color.RED,
- clampToGround: true,
- },
- });
- DLlayerData.entities.push(line.id);
- that.DLlayerDatas.push(DLlayerData);
- });
- }
- }
- },
- //切换地下模式
- undergroundModeAnalysis() {
- let that = this;
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = w - 340 + 340 / 2;
- let top = 340 / 2 + 60;
- this.$layer.iframe({
- id: "BJTC",
- content: {
- content: clipboxByEditor, //传递的组件对象
- parent: this, //当前的vue对象
- data: {}, //props
- },
- offset: [left, top], //left top
- area: ["340px", "180px"], //宽 高
- title: "地下分析",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- },
- });
- },
- //建筑退线
- backLineAnalysis(Minfo) {
- let that = this;
- this.getGuiHuaDiKuai(function () {
- that.getbackLine(Minfo);
- });
- },
- // 绘制建筑退线面
- async getbackLine(Minfo) {
- let that = this;
- let DKBM = [];
- if (that.LandPlanningList.length > 0) {
- let layer = flatten(window.layerTree).find(
- (item) => item.core == "004004"
- );
- if (layer && layer.date_server && layer.date_server.url) {
- for (
- let GHYDindex = 0;
- GHYDindex < that.LandPlanningList.length;
- GHYDindex++
- ) {
- const GHYDlayerData = that.LandPlanningList[GHYDindex];
- let bm = GHYDlayerData.data.find((c) => c.label == "DKBM");
- if (bm && bm.value) {
- DKBM.push(bm.value);
- }
- //基础高度(地形高度)加入地形后可删除
- let jcgd = 0;
- //获取模型信息
- let queryBySQLParameters = {
- getFeatureMode: "SQL",
- datasetNames: [Minfo.datasourcename + ":项目范围"],
- queryParameter: {
- attributeFilter: " DKBM = '" + bm.value + "'",
- },
- hasGeometry: true,
- };
- let exmfw = await mapQuery(
- Minfo.dataurl + "/featureResults.json?returnContent=true",
- queryBySQLParameters
- );
- if (exmfw && exmfw.totalCount > 0) {
- exmfw.features.forEach((feature) => {
- feature.fieldNames.forEach((fieldName, i) => {
- if (
- fieldName == "BASEH" &&
- Number(feature.fieldValues[i]) > jcgd
- ) {
- jcgd = Number(feature.fieldValues[i]);
- }
- });
- });
- }
- let queryByGeometryParameters = {
- getFeatureMode: "SQL",
- datasetNames: [
- layer.date_server.datasourcename +
- ":" +
- layer.date_server.datasetname,
- ],
- queryParameter: {
- attributeFilter: "DKBM = '" + bm.value + "'",
- },
- hasGeometry: "true",
- };
- let e = await mapQuery(
- layer.date_server.url + "/featureResults.json?returnContent=true",
- queryByGeometryParameters
- );
- if (e && e.totalCount > 0) {
- e.features.forEach((feature) => {
- let JZTXlayerData = {
- id: uuidv4(),
- layerInfo: layer,
- data: [],
- geometry: feature.geometry,
- // entities: [],
- };
- feature.fieldNames.forEach((fieldName, i) => {
- let Field = e.datasetInfos
- ? e.datasetInfos[0].fieldInfos.find(
- (c) =>
- c.name &&
- c.name.toUpperCase() == fieldName.toUpperCase() &&
- c.name.toUpperCase().indexOf("SM") == -1
- )
- : null;
- if (Field) {
- JZTXlayerData.data.push({
- label: fieldName,
- labelCN: Field ? Field.caption : fieldName,
- value: feature.fieldValues[i],
- });
- }
- });
- let ps = [];
- for (
- let index = 0;
- index < feature.geometry.points.length;
- index++
- ) {
- const element = feature.geometry.points[index];
- ps.push(element.x);
- ps.push(element.y);
- ps.push(0);
- }
- debugger;
- //限高高度
- let xg = 87.4;
- let xgdata = GHYDlayerData.data.find((c) => c.label == "JZXGD");
- if (xgdata && xgdata.value) {
- xg = Number(xgdata.value);
- }
- //添加建筑退线线
- var orangePolygon1 = viewer.entities.add({
- id: "JZTXQ-" + JZTXlayerData.id,
- polygon: {
- hierarchy: Cesium.Cartesian3.fromDegreesArrayHeights(ps),
- extrudedHeight: xg + jcgd,
- perPositionHeight: true,
- material: Cesium.Color.CHARTREUSE.withAlpha(0.1),
- outline: true,
- outlineColor: Cesium.Color.MEDIUMSPRINGGREEN,
- outlineWidth: 1.0,
- },
- });
- // JZTXlayerData.entities.push(orangePolygon1);
- that.JZTXlayerDatas.push(JZTXlayerData);
- });
- }
- }
- }
- }
- this.openJZXGInfo(that.layerDataList, that.JZTXlayerDatas, Minfo, DKBM);
- },
- //占压分析
- occupyAnalysis(Minfo) {
- let that = this;
- this.getGuiHuaDiKuai(function () {
- that.getoccupy(Minfo);
- });
- },
- /**
- * 获取用地用海分类统一颜色
- */
- getLandColor(name) {
- var color = "rgb(172,255,207)";
- window.colorList.forEach((element) => {
- if (element.name.indexOf(name) > -1) color = element.color;
- });
- return color;
- },
- /**
- * 获取占压交集
- * @param Minfo
- */
- async getoccupy(Minfo) {
- let that = this;
- if (that.LandPlanningList.length > 0) {
- let layer = flatten(window.layerTree).find(
- (item) => item.core == "002002"
- );
- if (layer && layer.date_server && layer.date_server.url) {
- for (
- let GHYDindex = 0;
- GHYDindex < that.LandPlanningList.length;
- GHYDindex++
- ) {
- const GHYDlayerData = that.LandPlanningList[GHYDindex];
- let queryByGeometryParameters = {
- getFeatureMode: "SPATIAL",
- datasetNames: [
- layer.date_server.datasourcename +
- ":" +
- layer.date_server.datasetname,
- ],
- geometry: GHYDlayerData.geometry,
- spatialQueryMode: "INTERSECT",
- hasGeometry: "true",
- };
- let e = await mapQuery(
- layer.date_server.url + "/featureResults.json?returnContent=true",
- queryByGeometryParameters
- );
- if (e && e.totalCount > 0) {
- e.features.forEach((feature) => {
- let DLTBlayerData = {
- id: uuidv4(),
- layerInfo: layer,
- data: [],
- geometry: feature.geometry,
- };
- feature.fieldNames.forEach((fieldName, i) => {
- let Field = e.datasetInfos
- ? e.datasetInfos[0].fieldInfos.find(
- (c) =>
- c.name &&
- c.name.toUpperCase() == fieldName.toUpperCase() &&
- c.name.toUpperCase().indexOf("SM") == -1
- )
- : null;
- if (Field) {
- DLTBlayerData.data.push({
- label: fieldName,
- labelCN: Field ? Field.caption : fieldName,
- value: feature.fieldValues[i],
- });
- }
- });
- let ps = [];
- for (
- let index = 0;
- index < feature.geometry.points.length;
- index++
- ) {
- const element = feature.geometry.points[index];
- ps.push(element.x);
- ps.push(element.y);
- }
- let DLLX = DLTBlayerData.data.find(
- (c) => c.label == "DLMC"
- ).value;
- let col = Cesium.Color.fromCssColorString(
- that.getLandColor(DLLX)
- );
- //添加地类图斑
- var orangePolygon1 = viewer.entities.add({
- id: "DLTB-" + DLTBlayerData.id,
- polygon: {
- hierarchy: Cesium.Cartesian3.fromDegreesArray(ps),
- // perPositionHeight: true,
- material: col,
- outline: true,
- outlineColor: Cesium.Color.BLACK,
- outlineWidth: 2.0,
- },
- });
- const point = viewer.entities.add({
- id: "DLTBlable-" + DLTBlayerData.id,
- //点
- position: Cesium.Cartesian3.fromDegrees(
- DLTBlayerData.geometry.center.x,
- DLTBlayerData.geometry.center.y
- ),
- label: {
- text: DLLX, //描述内容
- fillColor: Cesium.Color.WHITE,
- font: "40px Calibri",
- scale: 0.5,
- fillStyle: Cesium.LabelStyle.FILL,
- // 垂直位置
- verticalOrigin: Cesium.VerticalOrigin.BUTTON,
- // 中心位置
- pixelOffset: new Cesium.Cartesian2(0, -10),
- //设置背景颜色透明
- backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.8),
- //打开背景 打开背景 (不会被线段覆盖)
- showBackground: true,
- heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
- clampToS3M: true,
- },
- });
- that.DLTBlayerDatas.push(DLTBlayerData);
- });
- }
- }
- }
- }
- this.openDLTBInfo(that.LandPlanningList, that.DLTBlayerDatas, Minfo);
- },
- /**
- * 指标分析
- * @param Minfo
- */
- normAnalysis(info, Minfo) {
- let that = this;
- if (!info.plotnumber) {
- that.$message({
- message: "请现在项目信息中补全项目地块编码",
- type: "warning",
- });
- return;
- }
- this.getGuiHuaDiKuai(function () {
- for (let index = 0; index < that.LandPlanningList.length; index++) {
- const LandPlanning = that.LandPlanningList[index];
- let DKBM = LandPlanning.data.find((c) => c.label == "DKBM")
- ? LandPlanning.data.find((c) => c.label == "DKBM").value
- : "";
- let plotnumbers = info.plotnumber.split(",");
- let isInclude = plotnumbers.some((element) => element.includes(DKBM));
- if (!isInclude || !DKBM) {
- that.$message({
- message: "请选择项目内的地块进行查询",
- type: "warning",
- });
- return;
- }
- }
- that.HighLimit(Minfo);
- that.getnorm(Minfo);
- });
- },
- /**
- * 获取指标
- * @param Minfo
- */
- async getnorm(Minfo) {
- debugger;
- //组装指标对象
- let tableDataList = [];
- for (let index = 0; index < this.LandPlanningList.length; index++) {
- const LandPlanning = this.LandPlanningList[index];
- let KG_Data = {},
- TJFA_Data = {},
- FA_Data = {};
- KG_Data.DKBM = LandPlanning.data.find((c) => c.label == "DKBM")
- ? LandPlanning.data.find((c) => c.label == "DKBM").value
- : "";
- KG_Data.YDMJ = LandPlanning.data.find((c) => c.label == "YDMJ")
- ? LandPlanning.data.find((c) => c.label == "YDMJ").value
- : "";
- KG_Data.JZMJ = LandPlanning.data.find((c) => c.label == "JZMJ")
- ? LandPlanning.data.find((c) => c.label == "JZMJ").value
- : "";
- // KG_Data.JZMJ = "";
- KG_Data.JDMJ = LandPlanning.data.find((c) => c.label == "JDMJ")
- ? LandPlanning.data.find((c) => c.label == "JDMJ").value
- : "";
- // KG_Data.JRJZMJ = LandPlanning.data.find((c) => c.label == "JRJZMJ")
- // ? LandPlanning.data.find((c) => c.label == "JRJZMJ").value
- // : "";
- KG_Data.RJLD = LandPlanning.data.find((c) => c.label == "RJLD")
- ? LandPlanning.data.find((c) => c.label == "RJLD").value
- : "";
- KG_Data.RJLX = LandPlanning.data.find((c) => c.label == "RJLX")
- ? LandPlanning.data.find((c) => c.label == "RJLX").value
- : "";
- KG_Data.JZMDD = LandPlanning.data.find((c) => c.label == "JZMDD")
- ? LandPlanning.data.find((c) => c.label == "JZMDD").value
- : "";
- KG_Data.JZMDX = LandPlanning.data.find((c) => c.label == "JZMDX")
- ? LandPlanning.data.find((c) => c.label == "JZMDX").value
- : "";
- KG_Data.JZXGD = LandPlanning.data.find((c) => c.label == "JZXGD")
- ? LandPlanning.data.find((c) => c.label == "JZXGD").value
- : "";
- KG_Data.JZXGX = LandPlanning.data.find((c) => c.label == "JZXGX")
- ? LandPlanning.data.find((c) => c.label == "JZXGX").value
- : "";
- KG_Data.JRJZMJD = "";
- KG_Data.JRJZMJX = "";
- if (Minfo.dataurl && Minfo.datasourcename) {
- //获取项目范围数据数据
- let queryByGeometryParameters = {
- getFeatureMode: "SQL",
- datasetNames: [Minfo.datasourcename + ":项目范围"],
- queryParameter: {
- attributeFilter: "DKBM = '" + KG_Data.DKBM + "'",
- },
- hasGeometry: "true",
- };
- let e = await mapQuery(
- Minfo.dataurl + "/featureResults.json?returnContent=true",
- queryByGeometryParameters
- );
- //项目用地总面积
- let xmzmj = 0;
- if (e && e.totalCount > 0) {
- e.features.forEach((feature) => {
- let DataPs = feature.geometry.points.map((item) => [
- item.x,
- item.y,
- ]);
- if (DataPs.length > 0) {
- if (DataPs[0] != DataPs[DataPs.length - 1]) {
- DataPs.push(DataPs[0]);
- }
- let polygonPs = polygon([DataPs]);
- let areaPs = area(polygonPs);
- xmzmj += areaPs;
- }
- });
- }
- FA_Data.YDMJ = xmzmj;
- //基底面积查建筑轮廓数据
- FA_Data.JDMJ = 0;
- let queryByGeometryParameters2 = {
- getFeatureMode: "SQL",
- datasetNames: [Minfo.datasourcename + ":" + Minfo.datasetname],
- queryParameter: {
- attributeFilter: "LANDNO = '" + KG_Data.DKBM + "'",
- },
- hasGeometry: "true",
- };
- let e2 = await mapQuery(
- Minfo.dataurl + "/featureResults.json?returnContent=true",
- queryByGeometryParameters2
- );
- //建筑基底总面积
- let jzjdzmj = 0;
- //建筑总面积
- let jzzmj = 0;
- //地上建筑总面积
- let dsjzzmj = 0;
- //地下建筑总面积
- let dxjzzmj = 0;
- //最大建筑高度
- let maxJZGD = 0;
- if (e2 && e2.totalCount > 0) {
- e2.features.forEach((feature) => {
- let BUILDAREAIndex = feature.fieldNames.findIndex(
- (c) => c == "BUILDAREA"
- );
- if (BUILDAREAIndex) {
- let jzmj = feature.fieldValues[BUILDAREAIndex] || 0;
- if (Number(jzmj)) {
- jzzmj += Number(jzmj);
- }
- }
- let TBUILDAREAIndex = feature.fieldNames.findIndex(
- (c) => c == "TBUILDAREA"
- );
- if (TBUILDAREAIndex) {
- let dsjzmj = feature.fieldValues[TBUILDAREAIndex] || 0;
- if (Number(dsjzmj)) {
- dsjzzmj += Number(dsjzmj);
- }
- }
- let DBUILDAREAIndex = feature.fieldNames.findIndex(
- (c) => c == "DBUILDAREA"
- );
- if (DBUILDAREAIndex) {
- let dxjzmj = feature.fieldValues[DBUILDAREAIndex] || 0;
- if (Number(dxjzmj)) {
- dxjzzmj += Number(dxjzmj);
- }
- }
- let HEIGHTIndex = feature.fieldNames.findIndex(
- (c) => c == "HEIGHT"
- );
- if (HEIGHTIndex) {
- let jzgd = feature.fieldValues[HEIGHTIndex] || 0;
- if (Number(jzgd) > maxJZGD) {
- maxJZGD = Number(jzgd);
- }
- }
- let DataPs = feature.geometry.points.map((item) => [
- item.x,
- item.y,
- ]);
- if (DataPs.length > 0) {
- if (DataPs[0] != DataPs[DataPs.length - 1]) {
- DataPs.push(DataPs[0]);
- }
- let polygonPs = polygon([DataPs]);
- let areaPs = area(polygonPs);
- jzjdzmj += areaPs;
- }
- });
- }
- FA_Data.JZMJ = Number(jzzmj);
- FA_Data.JZGD = Number(maxJZGD).toFixed(2);
- FA_Data.JDMJ = jzjdzmj;
- //计容建筑面积 为地上建筑总面积
- FA_Data.JRJZMJ = dsjzzmj;
- // 容积率 20240814改为使用建筑面积计算容积率
- // FA_Data.RJL = (FA_Data.JRJZMJ / FA_Data.YDMJ).toFixed(2);
- FA_Data.RJL = (FA_Data.JZMJ / FA_Data.YDMJ).toFixed(2);
- //建筑密度
- FA_Data.JZMD = (Number(FA_Data.JDMJ / FA_Data.YDMJ) * 100).toFixed(2);
- }
- tableDataList.push({ Minfo, KG_Data, FA_Data, TJFA_Data });
- }
- var result = await CheckParkAnalyse.buidAreaAndParksComputer(
- Minfo,
- false
- );
- if (result != null) {
- for (var i = 0; i < tableDataList.length; i++) {
- var item = tableDataList[i];
- var land = result.buildings.find(
- (t) => t.landNo == item.KG_Data.DKBM
- );
- if (land == null) continue;
- tableDataList[i].FA_Data.JZMJ = land.mj;
- tableDataList[i].FA_Data.JRJZMJ = land.jrmj;
- debugger;
- //20240814改为使用建筑面积计算容积率
- // tableDataList[i].FA_Data.RJL = (land.jrmj / item.FA_Data.YDMJ).toFixed(2);
- tableDataList[i].FA_Data.RJL = (
- (land.mj - land.dxjzmj) /
- item.FA_Data.YDMJ
- ).toFixed(2);
- //开发商提交的方案文档指标
- debugger;
- tableDataList[i].TJFA_Data.JZMJ = land.famj;
- tableDataList[i].TJFA_Data.JRJZMJ = land.fajrmj;
- tableDataList[i].infoData = land;
- }
- }
- this.openZBFXInfo([tableDataList]);
- },
- /**
- * 规划情况分析
- */
- async PlanningAnalysis(Minfo) {
- let that = this;
- this.getGuiHuaDiKuai(function () {
- if (that.LandPlanningList.length > 0) {
- ghqk.getPlanning(that.LandPlanningList, Minfo);
- } else {
- that.$message({
- message: "当前位置未找到规划地块,请选择其他位置。",
- type: "warning",
- });
- }
- });
- },
- /**
- * 建筑风貌分析
- */
- async ArchitecturalAnalysis(Minfo) {
- this.openArchitecturaInfo(
- this.layerDataList,
- this.LandPlanningList,
- Minfo
- );
- },
- /**
- * 人视分析
- */
- async RSAnalysis(Minfo) {
- this.openRSInfo();
- },
- /**
- * 车位审查
- */
- async CheckPark(Minfo, isJSPark) {
- var that = this;
- var result = await CheckParkAnalyse.buidAreaAndParksComputer(
- Minfo,
- isJSPark
- );
- // if (that.skylineAnalysislayerid) {
- // that.$layer.close(that.skylineAnalysislayerid);
- // }
- let w = document.body.offsetWidth;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- var fontSize = document.body.style.fontSize;
- if ((fontSize = "")) fontSize = 14;
- else fontSize = parseInt(fontSize.replace("px", ""));
- let left = w - 400;
- let top = 550 / 2 + 60;
- // that.skylineAnalysislayerid =
- that.$layer.iframe({
- id: "BJTC",
- content: {
- content: parkResult, //传递的组件对象
- parent: that, //当前的vue对象
- data: { info: result }, //props
- },
- offset: [left, top], //left top
- area: ["40rem", "25rem"],
- title: "车位审查结果",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- /**
- * 楼体拉伸
- */
- BuildingStretchingAnalysis(Minfo) {
- let that = this;
- if (this.handler != null) {
- this.removeAll();
- }
- this.handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
- this.handler.setInputAction((evt) => {
- that.tooltip.showAt(
- evt.endPosition,
- `<p>点击地图,选择要分析的楼体,右键取消</p>`
- );
- }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
- this.handler.setInputAction((evt) => {
- that.removeEventHandler();
- }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
- this.handler.setInputAction(async function (movement) {
- that.tooltip.setVisible(false);
- //拾取图层
- let pick = scene.pickPosition(movement.position);
- let xyz = cartesian3ToWGS84(pick);
- let layerDataList = that.layerDataList;
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = w - 430 + 430 / 2;
- let top = 430 / 2 + 60;
- that.$layer.iframe({
- id: "BJTC",
- content: {
- content: BuildingStretchingAnalysis, //传递的组件对象
- parent: that, //当前的vue对象
- data: { info: { Minfo, layerDataList, xyz } }, //props
- },
- offset: [left, top], //left top
- area: ["430px", "430px"], //宽 高
- title: "楼体拉伸",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- },
- });
- that.removeEventHandler();
- }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
- },
- // 删除限高
- removeHighLimit() {
- viewer.entities.removeById("polygonA");
- // viewer.entities.removeById("JZXGD-A");
- var BoxIndex = popupBoxs.findIndex((c) => c.element.id == "JZXGD-A");
- if (BoxIndex > -1) {
- popupBoxs[BoxIndex].destroy();
- popupBoxs.splice(BoxIndex, 1);
- }
- this.layerList.forEach((layerName) => {
- var hyp = new Cesium.HypsometricSetting();
- hyp.MaxVisibleValue = -1000;
- let layer = scene.layers.find(layerName);
- layer.hypsometricSetting = {
- hypsometricSetting: hyp,
- analysisMode:
- Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL,
- };
- });
- for (let index = popupBoxs.length - 1; index >= 0; index--) {
- const popupBox = popupBoxs[index];
- if (popupBox.element.id.includes("JZXG-")) {
- popupBox.destroy();
- popupBoxs.splice(index, 1);
- }
- }
- },
- //取消左键事件
- removeEventHandler() {
- if (this.handler) {
- this.tooltip.setVisible(false);
- this.handler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE);
- this.handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
- this.handler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK);
- this.handler.destroy();
- this.handler = null;
- }
- },
- //删除规划地块
- removeLandPlanningList() {
- for (let index = 0; index < this.LandPlanningList.length; index++) {
- const element = this.LandPlanningList[index];
- viewer.entities.removeById("ydhxp-" + element.id);
- viewer.entities.removeById("ydhxl-" + element.id);
- }
- this.LandPlanningList = [];
- },
- //删除道路线
- removeDLlayerDatasList() {
- for (let index = 0; index < this.DLlayerDatas.length; index++) {
- const element = this.DLlayerDatas[index];
- element.entities.forEach((entitie) => {
- viewer.entities.removeById(entitie);
- });
- }
- this.DLlayerDatas = [];
- },
- //删除建筑退线
- removeJZTXlayerDatas() {
- for (let index = 0; index < this.JZTXlayerDatas.length; index++) {
- const element = this.JZTXlayerDatas[index];
- viewer.entities.removeById("JZTXQ-" + element.id);
- }
- this.JZTXlayerDatas = [];
- },
- //删除地类图斑
- removeDLTBlayerDatas() {
- for (let index = 0; index < this.DLTBlayerDatas.length; index++) {
- const element = this.DLTBlayerDatas[index];
- viewer.entities.removeById("DLTB-" + element.id);
- viewer.entities.removeById("DLTBlable-" + element.id);
- }
- this.DLTBlayerDatas = [];
- },
- /**
- * 点查图层信息
- */
- initEntitiesHandler() {
- let that = this;
- this.getEntitiesHandler = new Cesium.ScreenSpaceEventHandler(
- scene.canvas
- );
- this.getEntitiesHandler.setInputAction(function (click) {
- var pick = viewer.scene.pick(click.position);
- //用地红线信息弹窗
- if (pick && pick.id.id && pick.id.id.indexOf("ydhxp") !== -1) {
- let id = pick.id.id.split("ydhxp-")[1];
- let info = that.LandPlanningList.find((c) => c.id == id);
- that.openOBJInfo("用地红线详情", info.data);
- }
- if (pick && pick.id.id && pick.id.id.indexOf("ydhxl") !== -1) {
- let id = pick.id.id.split("ydhxl-")[1];
- let info = that.LandPlanningList.find((c) => c.id == id);
- that.openOBJInfo("用地红线详情", info.data);
- }
- //道路信息弹窗
- if (pick && pick.id.id && pick.id.id.indexOf("DLX-") !== -1) {
- let id = pick.id.id.split("DLX-")[1];
- let info = that.DLlayerDatas.find((c) => c.id == id);
- that.openOBJInfo("道路信息详情", info.data);
- }
- //图斑地类弹窗
- if (pick && pick.id.id && pick.id.id.indexOf("DLTB-") !== -1) {
- let id = pick.id.id.split("DLTB-")[1];
- let info = that.DLTBlayerDatas.find((c) => c.id == id);
- that.openOBJInfo("地类信息详情", info.data);
- }
- //城镇开发边界弹窗
- if (pick && pick.id.id && pick.id.id.indexOf("CZKFBJ-") !== -1) {
- let id = pick.id.id.split("CZKFBJ-")[1];
- let info = ghqk.CZKFBJDatas.find((c) => c.id == id);
- that.openOBJInfo("城镇开发边界信息详情", info.data);
- }
- }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
- },
- //打开用地红线信息弹窗
- openOBJInfo(title, info) {
- if (this.OBJInfolayerid) {
- this.$layer.close(this.OBJInfolayerid);
- }
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = 430 / 2 + 556;
- let top = 430 / 2 + 60;
- this.OBJInfolayerid = this.$layer.iframe({
- content: {
- content: PlanningPlotInfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: { info }, //props
- },
- offset: [left, top], //left top
- area: ["430px", "430px"], //宽 高
- title: title,
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- /**
- * //打开限高分析信息弹窗
- * @param layerDataList 楼层信息
- * @param JZXGD 限高值
- * @param DKBM [] 要分析的地块编码
- */
- openXGFXInfo(layerDataList, JZXGD, DKBM) {
- let that = this;
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = w - 430 + 430 / 2;
- let top = 430 / 2 + 60;
- this.$layer.iframe({
- id: "BJTC",
- content: {
- content: HighLimitAnalysis, //传递的组件对象
- parent: this, //当前的vue对象
- data: { info: { layerDataList, JZXGD, DKBM } }, //props
- },
- offset: [left, top], //left top
- area: ["430px", "430px"], //宽 高
- title: "限高分析",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- this.removeLandPlanningList();
- this.removeHighLimit();
- },
- });
- },
- /**
- * //打开退线分析信息弹窗
- * @param layerDataList 楼层信息
- * @param JZTXlayerDatas 退线信息
- * @param DKBM 地块编码
- */
- openJZXGInfo(layerDataList, JZTXlayerDataList, Minfo, DKBM) {
- let that = this;
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = w - 430 + 430 / 2;
- let top = 430 / 2 + 60;
- this.$layer.iframe({
- id: "BJTC",
- content: {
- content: backLineAnalysisinfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: {
- info: { layerDataList, JZTXlayerDataList, Minfo, DKBM },
- }, //props
- },
- offset: [left, top], //left top
- area: ["430px", "430px"], //宽 高
- title: "控规分析",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- this.removeLandPlanningList();
- this.removeJZTXlayerDatas();
- this.removeDLlayerDatasList();
- },
- });
- },
- /**
- * //打开地类图斑分析信息弹窗
- * @param LandPlanningList 规划地块数组
- * @param DLTBlayerDataList 地类图斑信息
- */
- openDLTBInfo(LandPlanningList, DLTBlayerDataList, Minfo) {
- let that = this;
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = w - 430 + 430 / 2;
- let top = 430 / 2 + 60;
- this.$layer.iframe({
- id: "BJTC",
- content: {
- content: ZYAnalysisinfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: {
- info: { LandPlanningList, DLTBlayerDataList, Minfo },
- }, //props
- },
- offset: [left, top], //left top
- area: ["430px", "430px"], //宽 高
- title: "占压分析",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- this.removeLandPlanningList();
- this.removeDLTBlayerDatas();
- },
- });
- },
- /**
- * //打开指标分析信息弹窗
- * @param tableDataList 控规指标和项目指标
- */
- openZBFXInfo(tableDataList) {
- // if (this.ZBFXInfolayerid) {
- // this.$layer.close(this.ZBFXInfolayerid);
- // }
- let that = this;
- let wpx = 650;
- let hpx = 430;
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = w - wpx + wpx / 2;
- let top = hpx / 2 + 60;
- this.$layer.iframe({
- id: "BJTC",
- content: {
- content: ZBFXAnalysisinfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: {
- info: { tableDataList },
- }, //props
- },
- offset: [left, top], //left top
- area: [wpx + "px", hpx + "px"], //宽 高
- title: "指标分析",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- //指标分析数据
- this.removeLandPlanningList();
- //限高分析数据
- this.removeHighLimit();
- },
- });
- },
- /**
- * //打开模型对比弹窗
- */
- openMXDBInfo() {
- let that = this;
- let modelsloadData = that.modelsload.map((item) => {
- return {
- id: item.id,
- Minfo: item.Minfo,
- layerDataList: item.layerDataList,
- };
- });
- //弹窗最小化
- this.$layer.min(this.layerid);
- if (this.MXDBInfolayerid) {
- this.$layer.close(this.MXDBInfolayerid);
- }
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = 430 / 2;
- let top = 100 / 2 + 60;
- this.MXDBInfolayerid = this.$layer.iframe({
- content: {
- content: MXDBinfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: {
- info: { modelsloadData },
- }, //props
- },
- offset: [left, top], //left top
- area: ["430px", "100px"], //宽 高
- title: "模型对比",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //还原弹窗
- this.$layer.full(that.layerid);
- //关闭事件
- this.DestroyAll();
- this.WaitingSelectionModel = null;
- },
- });
- },
- /**
- * //打开建筑风貌弹窗
- */
- openArchitecturaInfo(layerDataList, LandPlanningList, Minfo) {
- let that = this;
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = w - 430 + 430 / 2;
- let top = 430 / 2 + 60;
- this.$layer.iframe({
- id: "BJTC",
- content: {
- content: ArchitecturaAnalysis, //传递的组件对象
- parent: this, //当前的vue对象
- data: { info: { Minfo, layerDataList, LandPlanningList } }, //props
- },
- offset: [left, top], //left top
- area: ["430px", "430px"], //宽 高
- title: "建筑风貌分析",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {},
- });
- },
- /**
- * //打开人视弹窗
- */
- openRSInfo() {
- let that = this;
- let w = document.body.offsetWidth;
- let h = document.body.offsetHeight;
- //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
- //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
- let left = w - 430 + 430 / 2;
- let top = 100 / 2 + 300;
- this.$layer.iframe({
- id: "BJTC",
- content: {
- content: RSAnalysis, //传递的组件对象
- parent: this, //当前的vue对象
- data: { info: {} }, //props
- },
- offset: [left, top], //left top
- area: ["20rem", "35rem"], //宽 高
- title: "人视分析",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {},
- });
- },
- /**
- * 压平
- * @param Minfos 模型信息
- */
- async yp(Minfos) {
- for (let index = 0; index < Minfos.length; index++) {
- const Minfo = Minfos[index];
- //获取模型信息
- let queryBySQLParameters = {
- getFeatureMode: "SQL",
- datasetNames: [Minfo.datasourcename + ":项目范围"],
- queryParameter: {
- attributeFilter: "1=1",
- },
- hasGeometry: true,
- };
- let e = await mapQuery(
- Minfo.dataurl + "/featureResults.json?returnContent=true",
- queryBySQLParameters
- );
- if (e && e.totalCount > 0) {
- e.features.forEach((element) => {
- let flatPoints = element.geometry.points
- .map((item) => [item.x, item.y, 6.5])
- .flat();
- viewer.scene.layers.layerQueue.forEach((layer) => {
- let name = "flatten" + Math.random();
- let istrue = layer.addFlattenRegion({
- position: flatPoints,
- name: name,
- });
- });
- });
- }
- }
- },
- qxyp() {
- viewer.scene.layers.layerQueue.forEach((layer) => {
- layer.removeAllFlattenRegion();
- });
- },
- removeAll() {
- this.removeEventHandler();
- this.removeLandPlanningList();
- this.removeHighLimit();
- this.removeDLlayerDatasList();
- this.removeJZTXlayerDatas();
- this.removeDLTBlayerDatas();
- ghqk.removeAll();
- this.$layer.close("BJTC");
- },
- DestroyAll() {
- scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
- this.qxyp();
- if (this.getEntitiesHandler) {
- this.getEntitiesHandler.removeInputAction(
- Cesium.ScreenSpaceEventType.LEFT_CLICK
- );
- }
- this.removeAll();
- this.removeModel();
- undergroundMode(false);
- },
- },
- beforeDestroy() {
- this.DestroyAll();
- },
- };
- </script>
- <style lang="scss">
- @import "@/../../zt.scss";
- </style>
- <style lang="scss" scoped>
- .card_body_style {
- border: 1px dashed #02a7f0;
- }
- .hover_style:hover {
- border: 1px solid #02a7f0;
- }
- .checkedState {
- position: relative;
- .status {
- position: absolute;
- right: 0;
- top: 0;
- // z-index: 2;
- overflow: hidden;
- // border-radius: 6px;
- }
- .icon {
- position: absolute;
- right: 0;
- top: 0;
- width: 4rem;
- height: 4rem;
- border: 8px;
- background: #ffff80;
- -webkit-clip-path: polygon(100% 0, 0 0, 100% 100%);
- clip-path: polygon(100% 0, 0 0, 100% 100%);
- }
- .txts {
- line-height: 2.6rem;
- text-align: center;
- transform: rotate(45deg);
- transform-origin: center center;
- color: #ec808c;
- // font-size: 18px;
- }
- /* 带圆角的话这个status 和 txts的宽度/宽度 是要比icon的宽度/高度小的,效果可以自己慢慢调 */
- .ce {
- width: 4rem;
- height: 4rem;
- }
- }
- .con-col {
- display: flex;
- flex-flow: column nowrap;
- justify-content: center;
- align-items: center;
- border-radius: 4px;
- }
- </style>
|