1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559 |
- <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();
- },
- });
- },
- /**
- * //打开建筑风貌弹窗
- */
- 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>
|