projectManagement.vue 125 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559
  1. <template>
  2. <div
  3. class="ZTGlobal"
  4. style="width: 100%; padding: 1rem 1rem 0rem 1rem; color: white"
  5. >
  6. <el-row :gutter="10">
  7. <el-col :span="12">
  8. <el-input
  9. size="mini"
  10. placeholder="请输入项目名称"
  11. v-model="input3"
  12. class="input-with-select"
  13. clearable
  14. >
  15. <el-button
  16. slot="append"
  17. icon="el-icon-search"
  18. @click="getProjectInfos"
  19. ></el-button>
  20. </el-input>
  21. </el-col>
  22. <el-col :span="5" :offset="6">
  23. <el-button
  24. size="mini"
  25. type="primary"
  26. plain
  27. @click="openaddProjectInfo()"
  28. >新增项目</el-button
  29. >
  30. <!-- <el-button size="mini" type="primary" plain>导入项目</el-button> -->
  31. </el-col>
  32. </el-row>
  33. <el-row
  34. :gutter="10"
  35. v-loading="loading"
  36. element-loading-text="数据加载中"
  37. element-loading-spinner="el-icon-loading"
  38. element-loading-background="rgba(0, 0, 0, 0.8)"
  39. >
  40. <el-col :span="24">
  41. <el-tabs v-model="activeName" style="height: 100%">
  42. <el-tab-pane label="未上会项目" name="未上会项目">
  43. <el-collapse accordion @change="handleChangeXM">
  44. <el-collapse-item
  45. v-for="item in wsh"
  46. :key="item.id"
  47. :name="item.id"
  48. >
  49. <template slot="title">
  50. {{ item.projectname }}({{
  51. getConstructionModel(item).length
  52. }}个)
  53. <el-tooltip
  54. class="item"
  55. effect="dark"
  56. content="项目详情"
  57. placement="top-start"
  58. >
  59. <i
  60. style="padding-left: 10px"
  61. class="el-icon-info"
  62. @click.stop="openProjectInfo(item)"
  63. ></i>
  64. </el-tooltip>
  65. <el-tooltip
  66. class="item"
  67. effect="dark"
  68. content="项目修改"
  69. placement="top-start"
  70. >
  71. <i
  72. style="padding-left: 10px"
  73. class="el-icon-edit"
  74. @click.stop="openaddProjectInfo(item)"
  75. ></i>
  76. </el-tooltip>
  77. <el-tooltip
  78. class="item"
  79. effect="dark"
  80. content="删除项目"
  81. placement="top-start"
  82. >
  83. <i
  84. style="padding-left: 10px"
  85. class="el-icon-delete"
  86. @click.stop="deleteProject(item.id)"
  87. ></i>
  88. </el-tooltip>
  89. </template>
  90. <el-row :gutter="10">
  91. <el-col :span="24">
  92. <el-button
  93. style="margin-left: 10px"
  94. size="mini"
  95. type="default"
  96. plain
  97. @click="openAddConstructionModelInfo(item)"
  98. >导入模型</el-button
  99. >
  100. <el-button
  101. size="mini"
  102. type="default"
  103. plain
  104. @click="ModelComparison(item)"
  105. >模型对比</el-button
  106. >
  107. <el-button
  108. size="mini"
  109. type="default"
  110. plain
  111. @click="setStrategy(item)"
  112. >选定方案</el-button
  113. >
  114. </el-col>
  115. </el-row>
  116. <el-row
  117. :gutter="10"
  118. v-for="itemModel in getConstructionModel(item)"
  119. :key="itemModel.id"
  120. >
  121. <el-col :span="24">
  122. <div
  123. class="checkedState"
  124. :ref="'Model' + itemModel.id"
  125. @click="SelectConstructionModelHendle(itemModel)"
  126. >
  127. <div class="status ce" style="display: none">
  128. <div class="icon"></div>
  129. <div class="txts ce">待选定</div>
  130. </div>
  131. <el-card
  132. shadow="hover"
  133. class="card_body_style hover_style"
  134. >
  135. <el-row>
  136. <el-col :span="24">
  137. <el-checkbox
  138. @click.stop.native=""
  139. v-model="itemModel.checked"
  140. :key="'itemModelChecked' + itemModel.id"
  141. >{{ itemModel.modelname }}</el-checkbox
  142. >
  143. </el-col>
  144. </el-row>
  145. <el-row>
  146. <el-col :span="24">
  147. {{
  148. itemModel.creationtime
  149. ? itemModel.creationtime.substring(0, 10)
  150. : ""
  151. }}
  152. </el-col>
  153. </el-row>
  154. <el-row>
  155. <el-col :span="6">
  156. <div
  157. class="con-col hover_style"
  158. style="cursor: pointer"
  159. @click.stop="openConstructionModel(itemModel)"
  160. >
  161. <i
  162. style="font-size: 2rem"
  163. class="el-icon-s-operation"
  164. @click.stop="openConstructionModel(itemModel)"
  165. ></i>
  166. <a @click.stop="openConstructionModel(itemModel)"
  167. >详情</a
  168. >
  169. </div>
  170. </el-col>
  171. <el-col :span="6">
  172. <div
  173. class="con-col hover_style"
  174. style="cursor: pointer"
  175. @click.stop="positionModel(itemModel)"
  176. >
  177. <i
  178. style="font-size: 2rem"
  179. class="el-icon-location-outline"
  180. @click.stop="positionModel(itemModel)"
  181. ></i>
  182. <a @click.stop="positionModel(itemModel)">定位</a>
  183. </div>
  184. </el-col>
  185. <el-col :span="6">
  186. <div
  187. class="con-col hover_style"
  188. style="cursor: pointer"
  189. @click.stop="openAnalyzeList(itemModel)"
  190. >
  191. <i
  192. style="font-size: 2rem"
  193. class="el-icon-share"
  194. @click.stop="openAnalyzeList(itemModel)"
  195. ></i>
  196. <a @click.stop="openAnalyzeList(itemModel)"
  197. >分析</a
  198. >
  199. </div>
  200. </el-col>
  201. <el-col :span="6">
  202. <div
  203. class="con-col hover_style"
  204. style="cursor: pointer"
  205. @click.stop="removeConstructionmodel(itemModel)"
  206. >
  207. <i
  208. style="font-size: 2rem"
  209. class="el-icon-delete"
  210. @click.stop="removeConstructionmodel(itemModel)"
  211. ></i>
  212. <a>删除</a>
  213. </div>
  214. </el-col>
  215. </el-row>
  216. <el-row
  217. :ref="itemModel.id + 'AnalyzeList'"
  218. class="none"
  219. >
  220. <el-row :gutter="24">
  221. <el-col :span="8">
  222. <el-button
  223. type="primary"
  224. size="mini"
  225. @click.stop="normAnalysis(item, itemModel)"
  226. >指标分析
  227. </el-button>
  228. </el-col>
  229. <el-col :span="8">
  230. <el-button
  231. type="primary"
  232. size="mini"
  233. @click.stop="openskylineAnalysis(itemModel)"
  234. >天际线分析</el-button
  235. >
  236. </el-col>
  237. <el-col :span="8">
  238. <el-button
  239. type="primary"
  240. size="mini"
  241. @click.stop="openSunlightAnalysis(itemModel)"
  242. >日照分析</el-button
  243. >
  244. </el-col>
  245. </el-row>
  246. <el-row :gutter="24">
  247. <el-col :span="8">
  248. <el-button
  249. type="primary"
  250. size="mini"
  251. @click.stop="KGAnalysis(itemModel)"
  252. >控规分析
  253. </el-button>
  254. </el-col>
  255. <el-col :span="8">
  256. <el-button
  257. type="primary"
  258. size="mini"
  259. @click.stop="CheckPark(itemModel, true)"
  260. >车位审核
  261. </el-button>
  262. </el-col>
  263. <el-col :span="8">
  264. <el-button
  265. type="primary"
  266. size="mini"
  267. @click.stop="RSAnalysis(itemModel)"
  268. >人视分析
  269. </el-button>
  270. </el-col>
  271. <!-- <el-col :span="8">
  272. <el-button
  273. type="primary"
  274. size="mini"
  275. @click.stop="DistrictAnalysis(itemModel)"
  276. >区位分析
  277. </el-button>
  278. </el-col> -->
  279. <!-- <el-col :span="8">
  280. <el-button
  281. type="primary"
  282. size="mini"
  283. @click.stop="limitHeightAnalysis(itemModel)"
  284. >限高分析
  285. </el-button>
  286. </el-col> -->
  287. <!-- <el-col :span="8">
  288. <el-button
  289. type="primary"
  290. size="mini"
  291. @click.stop="trafficAnalysis(itemModel)"
  292. >交通分析
  293. </el-button>
  294. </el-col> -->
  295. </el-row>
  296. <el-row :gutter="24">
  297. <el-col :span="8">
  298. <el-button
  299. type="primary"
  300. size="mini"
  301. @click.stop="undergroundModeAnalysis()"
  302. >地下分析
  303. </el-button>
  304. </el-col>
  305. <!-- <el-col :span="8">
  306. <el-button
  307. type="primary"
  308. size="mini"
  309. @click.stop="backLineAnalysis(itemModel)"
  310. >建筑退线
  311. </el-button>
  312. </el-col> -->
  313. <el-col :span="8">
  314. <el-button
  315. type="primary"
  316. size="mini"
  317. @click.stop="occupyAnalysis(itemModel)"
  318. >占压分析
  319. </el-button>
  320. </el-col>
  321. <el-col :span="8">
  322. <el-button
  323. type="primary"
  324. size="mini"
  325. @click.stop="ArchitecturalAnalysis(itemModel)"
  326. >建筑风貌
  327. </el-button>
  328. </el-col>
  329. </el-row>
  330. <el-row :gutter="24">
  331. <el-col :span="8">
  332. <el-button
  333. type="primary"
  334. size="mini"
  335. @click.stop="
  336. BuildingStretchingAnalysis(itemModel)
  337. "
  338. >楼体拉伸
  339. </el-button>
  340. </el-col>
  341. <el-col :span="8">
  342. <el-button
  343. type="primary"
  344. size="mini"
  345. @click.stop="openNightscapeAnalysis(itemModel)"
  346. >夜景分析</el-button
  347. >
  348. </el-col>
  349. </el-row>
  350. <el-row :gutter="24">
  351. <!-- <el-col :span="8">
  352. <el-button
  353. type="primary"
  354. size="mini"
  355. @click.stop="PlanningAnalysis(itemModel)"
  356. >规划情况
  357. </el-button>
  358. </el-col> -->
  359. </el-row>
  360. </el-row>
  361. </el-card>
  362. </div>
  363. </el-col>
  364. </el-row>
  365. </el-collapse-item>
  366. </el-collapse>
  367. <el-pagination
  368. :hide-on-single-page="true"
  369. style="color: white"
  370. @size-change="wshhandleSizeChange"
  371. @current-change="wshhandleCurrentChange"
  372. :page-size="wshqueryParams.pageSize"
  373. layout="prev, pager, next"
  374. :total="wshqueryParams.total"
  375. >
  376. </el-pagination>
  377. </el-tab-pane>
  378. <el-tab-pane label="已上会项目" name="已上会项目">
  379. <el-collapse accordion>
  380. <el-collapse-item
  381. v-for="item in ysh"
  382. :key="item.id"
  383. :name="item.id"
  384. >
  385. <template slot="title">
  386. {{ item.projectname }}({{
  387. getConstructionModel(item).length
  388. }}个)<i
  389. style="padding-left: 10px"
  390. class="header-icon el-icon-info"
  391. @click.stop="openProjectInfo(item)"
  392. ></i>
  393. </template>
  394. <div>
  395. <el-row :gutter="10">
  396. <el-col :span="24">
  397. <el-button
  398. size="mini"
  399. type="primary"
  400. plain
  401. @click="ModelComparison(item)"
  402. >模型对比</el-button
  403. >
  404. <!-- <el-button
  405. style="margin-left: 10px"
  406. size="mini"
  407. type="primary"
  408. plain
  409. >模型注册</el-button
  410. > -->
  411. </el-col>
  412. </el-row>
  413. <el-row
  414. :gutter="10"
  415. v-for="itemModel in getConstructionModel(item)"
  416. :key="itemModel.id"
  417. >
  418. <el-col :span="24">
  419. <div class="checkedState" :ref="'Model' + itemModel.id">
  420. <div
  421. class="status ce"
  422. :style="{
  423. display: itemModel.selectionStatus
  424. ? 'block'
  425. : 'none',
  426. }"
  427. >
  428. <div class="icon"></div>
  429. <div class="txts ce">已选定</div>
  430. </div>
  431. <el-card
  432. shadow="hover"
  433. class="card_body_style hover_style"
  434. >
  435. <el-row>
  436. <el-col :span="24">
  437. <el-checkbox
  438. @click.stop.native=""
  439. v-model="itemModel.checked"
  440. :key="'itemModelChecked' + itemModel.id"
  441. >{{ itemModel.modelname }}</el-checkbox
  442. >
  443. </el-col>
  444. </el-row>
  445. <el-row>
  446. <el-col :span="24">
  447. {{
  448. itemModel.creationtime
  449. ? itemModel.creationtime.substring(0, 10)
  450. : ""
  451. }}
  452. </el-col>
  453. </el-row>
  454. <el-row>
  455. <el-col :span="6">
  456. <div
  457. class="con-col hover_style"
  458. style="cursor: pointer"
  459. @click.stop="openConstructionModel(itemModel)"
  460. >
  461. <i
  462. style="font-size: 2rem"
  463. class="el-icon-s-operation"
  464. @click.stop="openConstructionModel(itemModel)"
  465. ></i>
  466. <a
  467. @click.stop="openConstructionModel(itemModel)"
  468. >详情</a
  469. >
  470. </div>
  471. </el-col>
  472. <el-col :span="6">
  473. <div
  474. class="con-col hover_style"
  475. style="cursor: pointer"
  476. @click.stop="positionModel(itemModel)"
  477. >
  478. <i
  479. style="font-size: 2rem"
  480. class="el-icon-location-outline"
  481. @click.stop="positionModel(itemModel)"
  482. ></i>
  483. <a @click.stop="positionModel(itemModel)"
  484. >定位</a
  485. >
  486. </div>
  487. </el-col>
  488. <el-col :span="6">
  489. <div
  490. class="con-col hover_style"
  491. style="cursor: pointer"
  492. @click.stop="openAnalyzeList(itemModel)"
  493. >
  494. <i
  495. style="font-size: 2rem"
  496. class="el-icon-share"
  497. @click.stop="openAnalyzeList(itemModel)"
  498. ></i>
  499. <a @click.stop="openAnalyzeList(itemModel)"
  500. >分析</a
  501. >
  502. </div>
  503. </el-col>
  504. <el-col :span="6">
  505. <div
  506. class="con-col hover_style"
  507. style="cursor: pointer"
  508. @click.stop="removeConstructionmodel(itemModel)"
  509. >
  510. <i
  511. style="font-size: 2rem"
  512. class="el-icon-delete"
  513. @click.stop="
  514. removeConstructionmodel(itemModel)
  515. "
  516. ></i>
  517. <a>删除</a>
  518. </div>
  519. </el-col>
  520. </el-row>
  521. <el-row
  522. :ref="itemModel.id + 'AnalyzeList'"
  523. class="none"
  524. >
  525. <el-row :gutter="24">
  526. <el-col :span="8">
  527. <el-button
  528. type="primary"
  529. size="mini"
  530. @click.stop="normAnalysis(item, itemModel)"
  531. >指标分析
  532. </el-button>
  533. </el-col>
  534. <el-col :span="8">
  535. <el-button
  536. type="primary"
  537. size="mini"
  538. @click.stop="openskylineAnalysis(itemModel)"
  539. >天际线分析</el-button
  540. >
  541. </el-col>
  542. <el-col :span="8">
  543. <el-button
  544. type="primary"
  545. size="mini"
  546. @click.stop="openSunlightAnalysis(itemModel)"
  547. >日照分析</el-button
  548. >
  549. </el-col>
  550. </el-row>
  551. <el-row :gutter="24">
  552. <el-col :span="8">
  553. <el-button
  554. type="primary"
  555. size="mini"
  556. @click.stop="KGAnalysis(itemModel)"
  557. >控规分析
  558. </el-button>
  559. </el-col>
  560. <el-col :span="8">
  561. <el-button
  562. type="primary"
  563. size="mini"
  564. @click.stop="CheckPark(itemModel, true)"
  565. >车位审核
  566. </el-button>
  567. </el-col>
  568. <el-col :span="8">
  569. <el-button
  570. type="primary"
  571. size="mini"
  572. @click.stop="RSAnalysis(itemModel)"
  573. >人视分析
  574. </el-button>
  575. </el-col>
  576. <!-- <el-col :span="8">
  577. <el-button
  578. type="primary"
  579. size="mini"
  580. @click.stop="DistrictAnalysis(itemModel)"
  581. >区位分析
  582. </el-button>
  583. </el-col> -->
  584. <!-- <el-col :span="8">
  585. <el-button
  586. type="primary"
  587. size="mini"
  588. @click.stop="limitHeightAnalysis(itemModel)"
  589. >限高分析
  590. </el-button>
  591. </el-col> -->
  592. <!-- <el-col :span="8">
  593. <el-button
  594. type="primary"
  595. size="mini"
  596. @click.stop="trafficAnalysis(itemModel)"
  597. >交通分析
  598. </el-button>
  599. </el-col> -->
  600. </el-row>
  601. <el-row :gutter="24">
  602. <el-col :span="8">
  603. <el-button
  604. type="primary"
  605. size="mini"
  606. @click.stop="undergroundModeAnalysis()"
  607. >地下分析
  608. </el-button>
  609. </el-col>
  610. <!-- <el-col :span="8">
  611. <el-button
  612. type="primary"
  613. size="mini"
  614. @click.stop="backLineAnalysis(itemModel)"
  615. >建筑退线
  616. </el-button>
  617. </el-col> -->
  618. <el-col :span="8">
  619. <el-button
  620. type="primary"
  621. size="mini"
  622. @click.stop="occupyAnalysis(itemModel)"
  623. >占压分析
  624. </el-button>
  625. </el-col>
  626. <el-col :span="8">
  627. <el-button
  628. type="primary"
  629. size="mini"
  630. @click.stop="ArchitecturalAnalysis(itemModel)"
  631. >建筑风貌
  632. </el-button>
  633. </el-col>
  634. </el-row>
  635. <el-row :gutter="24">
  636. <el-col :span="8">
  637. <el-button
  638. type="primary"
  639. size="mini"
  640. @click.stop="
  641. BuildingStretchingAnalysis(itemModel)
  642. "
  643. >楼体拉伸
  644. </el-button>
  645. </el-col>
  646. <el-col :span="8">
  647. <el-button
  648. type="primary"
  649. size="mini"
  650. @click.stop="
  651. openNightscapeAnalysis(itemModel)
  652. "
  653. >夜景分析</el-button
  654. >
  655. </el-col>
  656. </el-row>
  657. <el-row :gutter="24">
  658. <!-- <el-col :span="8">
  659. <el-button
  660. type="primary"
  661. size="mini"
  662. @click.stop="PlanningAnalysis(itemModel)"
  663. >规划情况
  664. </el-button>
  665. </el-col> -->
  666. </el-row>
  667. </el-row>
  668. </el-card>
  669. </div>
  670. </el-col>
  671. </el-row>
  672. </div>
  673. </el-collapse-item>
  674. </el-collapse>
  675. <el-pagination
  676. :hide-on-single-page="true"
  677. style="color: white"
  678. @size-change="yshhandleSizeChange"
  679. @current-change="yshhandleCurrentChange"
  680. :page-size="yshqueryParams.pageSize"
  681. layout="prev, pager, next"
  682. :total="yshqueryParams.total"
  683. >
  684. </el-pagination>
  685. </el-tab-pane>
  686. </el-tabs>
  687. </el-col>
  688. </el-row>
  689. </div>
  690. </template>
  691. <script>
  692. import {
  693. cartesian3ToWGS84,
  694. mapQuery,
  695. flatten,
  696. mercator2lonLat,
  697. undergroundMode,
  698. } from "@/utils/MapHelper/MapHelper.js";
  699. import { v4 as uuidv4 } from "uuid";
  700. import { isFunction, flatMap, values } from "lodash-es";
  701. import {
  702. booleanContains,
  703. area,
  704. intersect,
  705. polygon,
  706. point,
  707. midpoint,
  708. difference,
  709. } from "@turf/turf";
  710. import NightscapeAnalysis from "@/views/ConstructionApplication3D/NightscapeAnalysis/NightscapeAnalysis.vue";
  711. import addProjectInfo from "@/views/ConstructionApplication3D/projectInfo/addProjectInfo.vue";
  712. import projectInfo from "@/views/ConstructionApplication3D/projectInfo/projectInfo.vue";
  713. import skylineAnalysis from "@/views/ConstructionApplication3D/skylineAnalysis/skylineAnalysis.vue";
  714. import SunlightAnalysis from "@/views/ConstructionApplication3D/SunlightAnalysis/SunlightAnalysis.vue";
  715. // import SunlightAnalysis from "@/views/ConstructionApplication3D/SunlightAnalysis/SunlightTImesAnalysis.vue";
  716. import ConstructionModelInfo from "@/views/ConstructionApplication3D/ConstructionModelInfo/ConstructionModelInfo.vue";
  717. import addConstructionModelInfo from "@/views/ConstructionApplication3D/ConstructionModelInfo/addConstructionModelInfo.vue";
  718. import PlanningPlotInfo from "@/views/ConstructionApplication3D/PlanningPlot/PlanningPlotInfo.vue";
  719. import HighLimitAnalysis from "@/views/ConstructionApplication3D/HighLimitAnalysis/HighLimitAnalysis.vue";
  720. import backLineAnalysisinfo from "@/views/ConstructionApplication3D/backLineAnalysis/backLineAnalysisinfo.vue";
  721. import ZYAnalysisinfo from "@/views/ConstructionApplication3D/ZYAnalysisinfo/ZYAnalysisinfo.vue";
  722. import ZBFXAnalysisinfo from "@/views/ConstructionApplication3D/ZBFXAnalysisinfo/ZBFXAnalysisinfo.vue";
  723. import MXDBinfo from "@/views/ConstructionApplication3D/MXDBinfo/MXDBinfo.vue";
  724. import ArchitecturaAnalysis from "@/views/ConstructionApplication3D/ArchitecturaAnalysis/ArchitecturaAnalysis.vue";
  725. import RSAnalysis from "@/views/ConstructionApplication3D/RSAnalysis/RSAnalysis.vue";
  726. import BuildingStretchingAnalysis from "@/views/ConstructionApplication3D/BuildingStretchingAnalysis/BuildingStretchingAnalysis.vue";
  727. import parkResult from "@/views/ConstructionApplication3D/parkCheck/parkResult.vue";
  728. import clipboxByEditor from "@/views/ConstructionApplication3D/clipboxByEditor/clipboxByEditor.vue";
  729. import ghqk from "./ghqk.js";
  730. import CheckParkAnalyse from "./CheckParkAnalyse.js";
  731. import Popup from "../Popup.js";
  732. import {
  733. listProjectinformation,
  734. delConstructionmodel,
  735. updateConstructionmodel,
  736. updateProjectinformation,
  737. delProjectinformation,
  738. } from "@/api/zt/ztApi.js";
  739. var popupBoxs = [];
  740. export default {
  741. name: "constructionApplication3D",
  742. data() {
  743. return {
  744. input3: "",
  745. activeName: "未上会项目",
  746. ysh: [],
  747. wsh: [],
  748. WaitingSelectionModel: null,
  749. //点击查询用地红线事件
  750. handler: null,
  751. //点查entities事件
  752. getEntitiesHandler: null,
  753. tooltip: createTooltip(document.body),
  754. //模型数据数组
  755. layerDataList: [],
  756. //模型图层数组
  757. layerList: [],
  758. // 规划地块数组
  759. LandPlanningList: [],
  760. //道路数组
  761. DLlayerDatas: [],
  762. //地下模式状态
  763. underground: false,
  764. //建筑退线数组
  765. JZTXlayerDatas: [],
  766. //地类图斑数组
  767. DLTBlayerDatas: [],
  768. //多模型对比获取到的【id:uuidv4(),模型信息,模型图层数组,模型数据数组】
  769. modelsload: [],
  770. loading: false,
  771. constructionmodel: [],
  772. yshqueryParams: {
  773. total: 0,
  774. pageNum: 1,
  775. pageSize: 10,
  776. },
  777. wshqueryParams: {
  778. total: 0,
  779. pageNum: 1,
  780. pageSize: 10,
  781. },
  782. };
  783. },
  784. props: {
  785. info: {
  786. type: Object,
  787. default: () => {
  788. return {};
  789. },
  790. },
  791. layerid: {
  792. type: String,
  793. default: "",
  794. },
  795. lydata: {
  796. type: Object,
  797. default: () => {
  798. return {};
  799. },
  800. },
  801. lyoption: {
  802. type: Object,
  803. default: () => {
  804. return {};
  805. },
  806. },
  807. },
  808. computed: {},
  809. mounted() {
  810. // this.constructionmodel = window.constructionmodel;
  811. this.initEntitiesHandler();
  812. this.init();
  813. },
  814. methods: {
  815. async init() {
  816. await this.wshinit();
  817. await this.yshinit();
  818. },
  819. async wshinit() {
  820. this.wsh = await this.getshProjectinformations("0", this.wshqueryParams);
  821. },
  822. async yshinit() {
  823. this.ysh = await this.getshProjectinformations("1", this.yshqueryParams);
  824. },
  825. //页大小触发
  826. wshhandleSizeChange(val) {
  827. this.wshqueryParams.pageSize = val;
  828. this.wshqueryParams.pageNum = 1;
  829. this.wshinit();
  830. },
  831. //跳转页触发
  832. wshhandleCurrentChange(val) {
  833. this.wshqueryParams.pageNum = val;
  834. this.wshinit();
  835. },
  836. //页大小触发
  837. yshhandleSizeChange(val) {
  838. this.yshqueryParams.pageSize = val;
  839. this.yshqueryParams.pageNum = 1;
  840. this.yshinit();
  841. },
  842. //跳转页触发
  843. yshhandleCurrentChange(val) {
  844. this.yshqueryParams.pageNum = val;
  845. this.yshinit();
  846. },
  847. /**
  848. * 查询过滤
  849. */
  850. getProjectInfos() {
  851. //先清空当前视图
  852. scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
  853. this.qxyp();
  854. this.removeModel();
  855. this.removeAll();
  856. undergroundMode(false);
  857. //过滤
  858. this.init();
  859. },
  860. /**
  861. * //获取项目进度
  862. * @param meetingprogress
  863. */
  864. async getshProjectinformations(meetingprogress, queryParams) {
  865. let Projectinformations = await listProjectinformation({
  866. meetingprogress: meetingprogress,
  867. projectname: this.input3,
  868. ...queryParams,
  869. });
  870. queryParams.total = Projectinformations.total;
  871. return Projectinformations.rows;
  872. // let Projectinformations = window.projectinformation.filter(
  873. // (c) => c.meetingprogress == meetingprogress
  874. // );
  875. // return Projectinformations;
  876. },
  877. //获取项目模型信息
  878. getConstructionModel(Projectinfo) {
  879. return Projectinfo.ztConstructionmodelList;
  880. },
  881. /**
  882. * //选定方案
  883. * @param projectin 方案信息
  884. */
  885. setStrategy(projectin) {
  886. if (this.WaitingSelectionModel) {
  887. this.$layer.confirm("确认该项目已上会?", async (layerid) => {
  888. projectin.meetingprogress = "1";
  889. this.WaitingSelectionModel.selectionStatus = true;
  890. let Projectinfoistrue = await updateProjectinformation({
  891. id: projectin.id,
  892. meetingprogress: "1",
  893. });
  894. if (Projectinfoistrue.code == 200) {
  895. let ismodeltrue = await updateConstructionmodel({
  896. id: this.WaitingSelectionModel.id,
  897. selectionStatus: this.WaitingSelectionModel.selectionStatus,
  898. });
  899. if (ismodeltrue.code == 200) {
  900. this.$message({
  901. message: ismodeltrue.msg,
  902. type: "success",
  903. });
  904. this.getProjectInfos();
  905. this.$layer.close(layerid);
  906. }
  907. }
  908. });
  909. } else {
  910. this.$message({
  911. message: "请先选中待上会模型方案",
  912. type: "warning",
  913. });
  914. }
  915. },
  916. //分析列表显隐
  917. async openAnalyzeList(itemModel) {
  918. this.SelectConstructionModelHendle(itemModel);
  919. debugger;
  920. for (let key in this.$refs) {
  921. if (key.includes("AnalyzeList")) {
  922. if (key == itemModel.id + "AnalyzeList") {
  923. var classList = this.$refs[key][0].$el.classList;
  924. classList.toggle("none");
  925. } else {
  926. var classList = this.$refs[key][0].$el.classList;
  927. classList.add("none");
  928. }
  929. }
  930. }
  931. // const classList =
  932. // this.$refs[itemModel.id + "AnalyzeList"][0].$el.classList;
  933. // classList.toggle("none");
  934. },
  935. //切换项目
  936. handleChangeXM(val) {
  937. // closAndChangeXM(val);
  938. // 清除待选模型
  939. this.WaitingSelectionModel = null;
  940. // 清除其他选定样式
  941. for (let key in this.$refs) {
  942. if (key.indexOf("Model") !== -1) {
  943. let item = this.$refs[key][0];
  944. if (item) {
  945. item.childNodes.forEach((Citem) => {
  946. if (
  947. Citem.className &&
  948. Citem.className.indexOf("status ce") !== -1
  949. ) {
  950. Citem.style.display = "none";
  951. }
  952. });
  953. }
  954. }
  955. if (key.indexOf("AnalyzeList") !== -1) {
  956. let itemfx = this.$refs[key][0];
  957. if (itemfx) {
  958. itemfx.$el.classList.add("none");
  959. }
  960. }
  961. }
  962. },
  963. /**
  964. * //打开切换项目时关闭并初始化新项目必要图层
  965. * @param xmid
  966. */
  967. closAndChangeXM(xmid) {
  968. //清空之前打开的项目信息等
  969. //打开新项目图层
  970. },
  971. //选中报建模型
  972. SelectConstructionModelHendle(Minfo) {
  973. debugger;
  974. if (this.WaitingSelectionModel != Minfo) {
  975. this.removeModel();
  976. this.WaitingSelectionModel = null;
  977. this.removeAll();
  978. debugger;
  979. var wshData = this.wsh.find((c) => c.id == Minfo.projectinformationid);
  980. if (wshData && wshData.meetingprogress != "1") {
  981. // 清除其他选定样式
  982. for (let key in this.$refs) {
  983. if (key.indexOf("Model") !== -1) {
  984. let item = this.$refs[key][0];
  985. item.childNodes.forEach((Citem) => {
  986. if (
  987. Citem.className &&
  988. Citem.className.indexOf("status ce") !== -1
  989. ) {
  990. Citem.style.display = "none";
  991. }
  992. });
  993. }
  994. }
  995. // 添加当前选定样式及待选模型
  996. this.$refs["Model" + Minfo.id][0].childNodes.forEach((item) => {
  997. if (item.className && item.className.indexOf("status ce") !== -1) {
  998. item.style.display = "block";
  999. }
  1000. });
  1001. }
  1002. this.WaitingSelectionModel = Minfo;
  1003. //添加模型
  1004. this.addModel(Minfo);
  1005. }
  1006. },
  1007. //添加项目模型
  1008. openAddConstructionModelInfo(info) {
  1009. if (this.AddConstructionModelInfolayerid) {
  1010. this.$layer.close(this.AddConstructionModelInfolayerid);
  1011. }
  1012. this.AddConstructionModelInfolayerid = this.$layer.iframe({
  1013. content: {
  1014. content: addConstructionModelInfo, //传递的组件对象
  1015. parent: this, //当前的vue对象
  1016. data: { info }, //props
  1017. },
  1018. area: ["30rem", "40rem"], //宽 高
  1019. title: "添加项目模型详情",
  1020. maxmin: false,
  1021. shade: false, //是否显示遮罩
  1022. shadeClose: false, //点击遮罩是否关闭
  1023. cancel: async () => {
  1024. //关闭事件
  1025. debugger;
  1026. // this.wsh = await this.getshProjectinformations("0");
  1027. this.wshinit();
  1028. },
  1029. });
  1030. },
  1031. // 添加项目信息
  1032. openaddProjectInfo(item) {
  1033. if (this.addProjectInfolayerid) {
  1034. this.$layer.close(this.addProjectInfolayerid);
  1035. }
  1036. this.addProjectInfolayerid = this.$layer.iframe({
  1037. content: {
  1038. content: addProjectInfo, //传递的组件对象
  1039. parent: this, //当前的vue对象
  1040. data: { info: item }, //props
  1041. },
  1042. area: ["30rem", "38rem"], //宽 高
  1043. title: item != null ? "修改项目详情" : "添加项目详情",
  1044. maxmin: false,
  1045. shade: false, //是否显示遮罩
  1046. shadeClose: false, //点击遮罩是否关闭
  1047. cancel: async () => {
  1048. //关闭事件
  1049. debugger;
  1050. // this.wsh = await this.getshProjectinformations("0");
  1051. this.wshinit();
  1052. },
  1053. });
  1054. },
  1055. //删除报建模型
  1056. async removeConstructionmodel(Minfo) {
  1057. this.$layer.confirm("确认删除该报建模型?", async (layerid) => {
  1058. let istrue = await delConstructionmodel(Minfo.id);
  1059. if (istrue.code == 200) {
  1060. this.$message({
  1061. message: istrue.msg,
  1062. type: "success",
  1063. });
  1064. this.getProjectInfos();
  1065. this.$layer.close(layerid);
  1066. }
  1067. });
  1068. },
  1069. //删除项目
  1070. async deleteProject(id) {
  1071. this.$layer.confirm("确认删除该项目?", async (layerid) => {
  1072. let istrue = await delProjectinformation(id);
  1073. if (istrue.code == 200) {
  1074. this.$message({
  1075. message: istrue.msg,
  1076. type: "success",
  1077. });
  1078. this.getProjectInfos();
  1079. this.$layer.close(layerid);
  1080. }
  1081. });
  1082. },
  1083. //打开项目信息弹窗
  1084. openProjectInfo(info) {
  1085. if (this.ProjectInfolayerid) {
  1086. this.$layer.close(this.ProjectInfolayerid);
  1087. }
  1088. let w = document.body.offsetWidth;
  1089. let h = document.body.offsetHeight;
  1090. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  1091. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  1092. let left = 430 / 2 + 556;
  1093. let top = 430 / 2 + 60;
  1094. this.ProjectInfolayerid = this.$layer.iframe({
  1095. content: {
  1096. content: projectInfo, //传递的组件对象
  1097. parent: this, //当前的vue对象
  1098. data: { info }, //props
  1099. },
  1100. offset: [left, top], //left top
  1101. area: ["430px", "430px"], //宽 高
  1102. title: "项目详情",
  1103. maxmin: false,
  1104. shade: false, //是否显示遮罩
  1105. shadeClose: false, //点击遮罩是否关闭
  1106. cancel: () => {
  1107. //关闭事件
  1108. // alert("关闭iframe");
  1109. },
  1110. });
  1111. },
  1112. // 打开模型信息弹窗
  1113. openConstructionModel(info) {
  1114. if (this.ConstructionModellayerid) {
  1115. this.$layer.close(this.ConstructionModellayerid);
  1116. }
  1117. let w = document.body.offsetWidth;
  1118. let h = document.body.offsetHeight;
  1119. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  1120. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  1121. let left = 430 / 2 + 556;
  1122. let top = 430 / 2 + 60;
  1123. let layerid = this.$layer.iframe({
  1124. content: {
  1125. content: ConstructionModelInfo, //传递的组件对象
  1126. parent: this, //当前的vue对象
  1127. data: { info }, //props
  1128. },
  1129. offset: [left, top], //left top
  1130. area: ["430px", "430px"], //宽 高
  1131. title: "模型详情",
  1132. maxmin: false,
  1133. shade: false, //是否显示遮罩
  1134. shadeClose: false, //点击遮罩是否关闭
  1135. cancel: () => {
  1136. //关闭事件
  1137. // alert("关闭iframe");
  1138. },
  1139. });
  1140. },
  1141. //打开夜景分析弹窗
  1142. openNightscapeAnalysis(info) {
  1143. let w = document.body.offsetWidth;
  1144. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  1145. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  1146. let left = w - 430 + 430 / 2;
  1147. let top = 550 / 2 + 60;
  1148. this.$layer.iframe({
  1149. id: "BJTC",
  1150. content: {
  1151. content: NightscapeAnalysis, //传递的组件对象
  1152. parent: this, //当前的vue对象
  1153. data: { info }, //props
  1154. },
  1155. offset: [left, top], //left top
  1156. area: ["430px", "550px"],
  1157. title: "夜景分析",
  1158. maxmin: false,
  1159. shade: false, //是否显示遮罩
  1160. shadeClose: false, //点击遮罩是否关闭
  1161. cancel: () => {
  1162. //关闭事件
  1163. // alert("关闭iframe");
  1164. },
  1165. });
  1166. },
  1167. //打开天际线分析弹窗
  1168. openskylineAnalysis(info) {
  1169. let w = document.body.offsetWidth;
  1170. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  1171. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  1172. let left = w - 430 + 430 / 2;
  1173. let top = 550 / 2 + 60;
  1174. this.$layer.iframe({
  1175. id: "BJTC",
  1176. content: {
  1177. content: skylineAnalysis, //传递的组件对象
  1178. parent: this, //当前的vue对象
  1179. data: { info }, //props
  1180. },
  1181. offset: [left, top], //left top
  1182. area: ["300px", "450px"],
  1183. title: "天际线分析",
  1184. maxmin: false,
  1185. shade: false, //是否显示遮罩
  1186. shadeClose: false, //点击遮罩是否关闭
  1187. cancel: () => {
  1188. //关闭事件
  1189. // alert("关闭iframe");
  1190. },
  1191. });
  1192. },
  1193. //打开日照分析弹窗
  1194. openSunlightAnalysis(info) {
  1195. let w = document.body.offsetWidth;
  1196. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  1197. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  1198. let left = w - 430 + 430 / 2;
  1199. let top = 550 / 2 + 60;
  1200. this.$layer.iframe({
  1201. id: "BJTC",
  1202. content: {
  1203. content: SunlightAnalysis, //传递的组件对象
  1204. parent: this, //当前的vue对象
  1205. data: { info }, //props
  1206. },
  1207. offset: [left, top], //left top
  1208. area: ["430px", "600px"],
  1209. title: "日照分析",
  1210. maxmin: false,
  1211. shade: false, //是否显示遮罩
  1212. shadeClose: false, //点击遮罩是否关闭
  1213. cancel: () => {
  1214. //关闭事件
  1215. // alert("关闭iframe");
  1216. },
  1217. });
  1218. },
  1219. //添加模型
  1220. async addModel(Minfo) {
  1221. await this.yp([Minfo]);
  1222. var modelLayer = scene.open(Minfo.url);
  1223. let that = this;
  1224. that.layerDataList = [];
  1225. Cesium.when(modelLayer, async function (layers) {
  1226. layers.forEach((layer) => {
  1227. viewer.flyTo(layer);
  1228. layer.shadowType = 2;
  1229. that.layerList.push(layer.name);
  1230. });
  1231. //获取模型信息
  1232. let queryBySQLParameters = {
  1233. getFeatureMode: "SQL",
  1234. datasetNames: [Minfo.datasourcename + ":" + Minfo.datasetname],
  1235. queryParameter: {
  1236. attributeFilter: "1=1",
  1237. },
  1238. hasGeometry: true,
  1239. };
  1240. let e = await mapQuery(
  1241. Minfo.dataurl + "/featureResults.json?returnContent=true",
  1242. queryBySQLParameters
  1243. );
  1244. if (e) {
  1245. e.features.forEach((feature) => {
  1246. let layerData = { data: [], geometry: feature.geometry };
  1247. feature.fieldNames.forEach((fieldName, i) => {
  1248. let Field = e.datasetInfos
  1249. ? e.datasetInfos[0].fieldInfos.find(
  1250. (c) =>
  1251. c.name && c.name.toUpperCase() == fieldName.toUpperCase()
  1252. )
  1253. : null;
  1254. if (Field) {
  1255. layerData.data.push({
  1256. label: fieldName,
  1257. labelCN: Field ? Field.caption : fieldName,
  1258. value: feature.fieldValues[i],
  1259. });
  1260. }
  1261. });
  1262. that.layerDataList.push(layerData);
  1263. });
  1264. }
  1265. that.layerDataList.forEach((layerData) => {
  1266. // 添加模型楼号
  1267. let SMID = layerData.data.find((c) => c.label == "SMID").value;
  1268. let HEIGHT = layerData.data.find((c) => c.label == "HEIGHT").value;
  1269. let x = layerData.geometry.center.x;
  1270. let y = layerData.geometry.center.y;
  1271. let z = Number(HEIGHT) + 29.7;
  1272. let BUILDNO = "";
  1273. if (layerData.data.find((c) => c.label == "BUILDNO")) {
  1274. BUILDNO = layerData.data.find((c) => c.label == "BUILDNO").value;
  1275. }
  1276. var BoxIndex = popupBoxs.findIndex(
  1277. (c) => c.element.id == "MXLH-" + SMID
  1278. );
  1279. if (BoxIndex > -1) {
  1280. popupBoxs[BoxIndex].destroy();
  1281. popupBoxs.splice(BoxIndex, 1);
  1282. }
  1283. let dom = document.createElement("div");
  1284. dom.id = "MXLH-" + SMID;
  1285. dom.style.position = "absolute";
  1286. dom.style.width = "0";
  1287. dom.style.height = "0";
  1288. // dom.style.color = "rgba(2, 23, 44, 0.8)";
  1289. // dom.style.backgroundColor = "rgba(2, 23, 44, 0.8)";
  1290. dom.style.fontSize = "1.4rem";
  1291. let domContent = document.createElement("div");
  1292. domContent.style.position = "absolute";
  1293. domContent.style.borderRadius = "5px";
  1294. // domContent.style.border = "1px solid rgba(7, 131, 250, 0.3)";
  1295. // domContent.style.backgroundColor = "rgba(2, 23, 44, 0.7)";
  1296. domContent.style.bottom = "0px";
  1297. domContent.style.left = "0px";
  1298. domContent.style.whiteSpace = "nowrap";
  1299. domContent.style.color = "rgba(83, 249, 255,1)";
  1300. // domContent.style.padding = "8px 12px";
  1301. domContent.style.transform = "translate(-50%, 0%)";
  1302. domContent.innerHTML = BUILDNO;
  1303. dom.appendChild(domContent);
  1304. var popupBox = new Popup({
  1305. viewer: viewer,
  1306. element: dom,
  1307. pixelOffset: new Cesium.Cartesian2(0, 0),
  1308. translucencyByDistance: new Cesium.NearFarScalar(0, 1, 50000, 1),
  1309. distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  1310. 0,
  1311. 51000
  1312. ),
  1313. position: Cesium.Cartesian3.fromDegrees(x, y, z),
  1314. });
  1315. popupBox.show();
  1316. popupBoxs.push(popupBox);
  1317. // if (viewer.entities.getById("MXLH-" + SMID)) {
  1318. // viewer.entities.removeById("MXLH-" + SMID);
  1319. // }
  1320. // let label = viewer.entities.add({
  1321. // id: "MXLH-" + SMID,
  1322. // // name: "MXLH-" + SMID,
  1323. // //点
  1324. // position: Cesium.Cartesian3.fromDegrees(x, y, z),
  1325. // label: {
  1326. // text: BUILDNO, //描述内容
  1327. // font: "20px Sans-Serif", //字体大小 类型
  1328. // fillColor: new Cesium.Color(83 / 255, 249 / 255, 255 / 255, 1), //颜色
  1329. // outlineColor: Cesium.Color.GOLD,
  1330. // style: Cesium.LabelStyle.CENTER_LABEL,
  1331. // // 垂直位置
  1332. // verticalOrigin: Cesium.VerticalOrigin.BUTTON,
  1333. // // 中心位置
  1334. // pixelOffset: new Cesium.Cartesian2(0, -10),
  1335. // //设置背景颜色透明
  1336. // backgroundColor: new Cesium.Color(
  1337. // 35 / 255,
  1338. // 55 / 255,
  1339. // 75 / 255,
  1340. // 0
  1341. // ),
  1342. // //打开背景 打开背景 (不会被线段覆盖)
  1343. // showBackground: true,
  1344. // heightReference: Cesium.HeightReference.NONE,
  1345. // },
  1346. // });
  1347. });
  1348. });
  1349. },
  1350. //添加多个模型
  1351. async addModels(Minfos, completed) {
  1352. await this.yp(Minfos);
  1353. debugger;
  1354. let models = [];
  1355. Minfos.forEach((element) => {
  1356. var modelLayer = scene.open(element.url);
  1357. models.push(modelLayer);
  1358. });
  1359. // 为每个 Promise 添加 .catch() 处理程序
  1360. const modifiedPromises = models.map((promise) => {
  1361. return promise.otherwise((error) => {
  1362. // 在这里处理错误,例如记录日志或执行其他操作
  1363. // 返回一个默认值或空值,以便 Cesium.when.all 可以继续处理其他 Promise
  1364. return null; // 或者其他默认值
  1365. });
  1366. });
  1367. let that = this;
  1368. Cesium.when
  1369. .all(modifiedPromises, async function (modelLayers) {
  1370. debugger;
  1371. for (let index = 0; index < modelLayers.length; index++) {
  1372. let modelData = {
  1373. id: uuidv4(),
  1374. Minfo: null,
  1375. layers: [],
  1376. layerDataList: [],
  1377. };
  1378. const Minfo = Minfos[index];
  1379. modelData.Minfo = Minfo;
  1380. const layer = modelLayers[index];
  1381. if (layer) {
  1382. layer.forEach((element) => {
  1383. // element.shadowType = 2;
  1384. //不同视口显隐
  1385. for (let n = 0; n < modelLayers.length; n++) {
  1386. if (index == n) {
  1387. element.setVisibleInViewport(n, true);
  1388. } else {
  1389. element.setVisibleInViewport(n, false);
  1390. }
  1391. }
  1392. modelData.layers.push(element.name);
  1393. });
  1394. //获取模型信息
  1395. let queryBySQLParameters = {
  1396. getFeatureMode: "SQL",
  1397. datasetNames: [Minfo.datasourcename + ":" + Minfo.datasetname],
  1398. queryParameter: {
  1399. attributeFilter: "1=1",
  1400. },
  1401. hasGeometry: true,
  1402. };
  1403. let e = await mapQuery(
  1404. Minfo.dataurl + "/featureResults.json?returnContent=true",
  1405. queryBySQLParameters
  1406. );
  1407. e.features.forEach((feature) => {
  1408. let layerData = { data: [], geometry: feature.geometry };
  1409. feature.fieldNames.forEach((fieldName, i) => {
  1410. let Field = e.datasetInfos
  1411. ? e.datasetInfos[0].fieldInfos.find(
  1412. (c) =>
  1413. c.name &&
  1414. c.name.toUpperCase() == fieldName.toUpperCase()
  1415. )
  1416. : null;
  1417. if (Field) {
  1418. layerData.data.push({
  1419. label: fieldName,
  1420. labelCN: Field ? Field.caption : fieldName,
  1421. value: feature.fieldValues[i],
  1422. });
  1423. }
  1424. });
  1425. modelData.layerDataList.push(layerData);
  1426. });
  1427. // modelData.layerDataList.forEach((layerData) => {
  1428. // // 添加模型楼号
  1429. // let SMID = layerData.data.find((c) => c.label == "SMID").value;
  1430. // let x = layerData.geometry.position.x;
  1431. // let y = layerData.geometry.position.y;
  1432. // let z =
  1433. // layerData.geometry.boundingBox.upper.z -
  1434. // layerData.geometry.boundingBox.lower.z;
  1435. // let BUILDNO = layerData.data.find(
  1436. // (c) => c.label == "BUILDNO"
  1437. // ).value;
  1438. // if (
  1439. // viewer.entities.getById("MXLH-" + modelData.id + "-" + SMID)
  1440. // ) {
  1441. // viewer.entities.removeById(
  1442. // "MXLH-" + modelData.id + "-" + SMID
  1443. // );
  1444. // }
  1445. // let labeltext = viewer.entities.add({
  1446. // id: "MXLH-" + modelData.id + "-" + SMID,
  1447. // //点
  1448. // position: Cesium.Cartesian3.fromDegrees(x, y, z),
  1449. // label: {
  1450. // text: BUILDNO, //描述内容
  1451. // font: "20px Sans-Serif", //字体大小 类型
  1452. // fillColor: new Cesium.Color(
  1453. // 83 / 255,
  1454. // 249 / 255,
  1455. // 255 / 255,
  1456. // 1
  1457. // ), //颜色
  1458. // outlineColor: Cesium.Color.GOLD,
  1459. // style: Cesium.LabelStyle.CENTER_LABEL,
  1460. // // 垂直位置
  1461. // verticalOrigin: Cesium.VerticalOrigin.BUTTON,
  1462. // // 中心位置
  1463. // pixelOffset: new Cesium.Cartesian2(0, -10),
  1464. // //设置背景颜色透明
  1465. // backgroundColor: new Cesium.Color(
  1466. // 35 / 255,
  1467. // 55 / 255,
  1468. // 75 / 255,
  1469. // 0
  1470. // ),
  1471. // //打开背景 打开背景 (不会被线段覆盖)
  1472. // showBackground: true,
  1473. // heightReference: Cesium.HeightReference.NONE ,
  1474. // },
  1475. // });
  1476. // });
  1477. that.modelsload.push(modelData);
  1478. } else {
  1479. that.loading = false;
  1480. scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
  1481. that.removeModel();
  1482. that.$message({
  1483. message: "模型:" + Minfo.modelname + "加载失败,请检查服务",
  1484. type: "warning",
  1485. });
  1486. for (let index = 0; index < modelLayers.length; index++) {
  1487. const layer = modelLayers[index];
  1488. if (layer) {
  1489. layer.forEach((element) => {
  1490. scene.layers.remove(element.name);
  1491. });
  1492. }
  1493. }
  1494. return;
  1495. }
  1496. }
  1497. if (completed && isFunction(completed)) {
  1498. completed();
  1499. }
  1500. })
  1501. .otherwise(function (error) {
  1502. debugger;
  1503. that.loading = false;
  1504. that.$message({
  1505. message: "加载失败,请联系管理员",
  1506. type: "warning",
  1507. });
  1508. scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
  1509. that.removeModel();
  1510. scene.layers.removeAll();
  1511. });
  1512. },
  1513. //删除模型图层
  1514. removeModel() {
  1515. // this.qxyp();
  1516. this.layerList.forEach((element) => {
  1517. scene.layers.remove(element);
  1518. });
  1519. this.layerList = [];
  1520. for (let index = popupBoxs.length - 1; index >= 0; index--) {
  1521. const popupBox = popupBoxs[index];
  1522. if (popupBox.element.id.includes("MXLH-")) {
  1523. popupBox.destroy();
  1524. popupBoxs.splice(index, 1);
  1525. }
  1526. }
  1527. // this.layerDataList.forEach((element) => {
  1528. // let SMID = element.data.find((c) => c.label == "SMID").value;
  1529. // viewer.entities.removeById("MXLH-" + SMID);
  1530. // });
  1531. this.layerDataList = [];
  1532. //清除多模型图层,数据
  1533. this.modelsload.forEach((model) => {
  1534. model.layers.forEach((element) => {
  1535. scene.layers.remove(element);
  1536. });
  1537. // model.layerDataList.forEach((layerData) => {
  1538. // let SMID = layerData.data.find((c) => c.label == "SMID").value;
  1539. // viewer.entities.removeById("MXLH-" + model.id + "-" + SMID);
  1540. // });
  1541. });
  1542. this.modelsload = [];
  1543. },
  1544. //定位模型
  1545. async positionModel(Minfo) {
  1546. if (this.WaitingSelectionModel == Minfo && this.layerList.length > 0) {
  1547. this.layerList.forEach((element, i) => {
  1548. let layer = scene.layers.find(element);
  1549. viewer.flyTo(layer);
  1550. });
  1551. } else {
  1552. this.SelectConstructionModelHendle(Minfo);
  1553. }
  1554. },
  1555. //模型对比按钮
  1556. ModelComparison(info) {
  1557. let that = this;
  1558. if (this.modelsload.length > 0) {
  1559. scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
  1560. this.removeModel();
  1561. return;
  1562. }
  1563. this.loading = true;
  1564. let modeinfos = this.getConstructionModel(info);
  1565. let checkedModeinfos = [];
  1566. modeinfos.forEach((modeinfo) => {
  1567. if (modeinfo.checked) {
  1568. checkedModeinfos.push(modeinfo);
  1569. }
  1570. });
  1571. if (checkedModeinfos.length > 0 && checkedModeinfos.length < 5) {
  1572. switch (checkedModeinfos.length) {
  1573. case 1:
  1574. scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
  1575. break;
  1576. case 2:
  1577. scene.multiViewportMode = Cesium.MultiViewportMode.HORIZONTAL;
  1578. break;
  1579. case 3:
  1580. scene.multiViewportMode =
  1581. Cesium.MultiViewportMode.VerticalTrisection;
  1582. break;
  1583. case 4:
  1584. scene.multiViewportMode = Cesium.MultiViewportMode.SEVEN_DIVISIONS;
  1585. break;
  1586. default:
  1587. scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
  1588. break;
  1589. }
  1590. this.removeModel();
  1591. //加载模型
  1592. this.addModels(checkedModeinfos, function () {
  1593. that.openMXDBInfo();
  1594. that.loading = false;
  1595. });
  1596. } else if (checkedModeinfos.length >= 5) {
  1597. this.loading = false;
  1598. this.$message({
  1599. message: "不能多于4个模型。",
  1600. type: "warning",
  1601. });
  1602. } else {
  1603. this.loading = false;
  1604. this.$message({
  1605. message: "请点击复选框,选中至少一个模型进行对比。",
  1606. type: "warning",
  1607. });
  1608. }
  1609. },
  1610. // 获取规划地块
  1611. getGuiHuaDiKuai(completed) {
  1612. if (this.LandPlanningList.length > 0 || this.handler != null) {
  1613. this.removeAll();
  1614. }
  1615. let that = this;
  1616. this.handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
  1617. this.handler.setInputAction((evt) => {
  1618. that.tooltip.showAt(
  1619. evt.endPosition,
  1620. `<p>点击地图,选择要分析的点位坐标,右键取消</p>`
  1621. );
  1622. }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
  1623. this.handler.setInputAction((evt) => {
  1624. that.removeEventHandler();
  1625. }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
  1626. this.handler.setInputAction(async function (movement) {
  1627. that.tooltip.setVisible(false);
  1628. //拾取图层
  1629. let pick = scene.pickPosition(movement.position);
  1630. let xy = cartesian3ToWGS84(pick);
  1631. //查询用地红线
  1632. let layer = flatten(window.layerTree).find(
  1633. (item) => item.core == "003006"
  1634. );
  1635. let queryByIDParameters = {
  1636. getFeatureMode: "BUFFER",
  1637. datasetNames: [
  1638. layer.date_server.datasourcename +
  1639. ":" +
  1640. layer.date_server.datasetname,
  1641. ],
  1642. geometry: {
  1643. parts: [1],
  1644. points: [{ y: xy.lat, x: xy.lng }],
  1645. type: "POINT",
  1646. },
  1647. bufferDistance: 0.000005,
  1648. hasGeometry: true,
  1649. };
  1650. let e = await mapQuery(
  1651. layer.date_server.url + "/featureResults.json?returnContent=true",
  1652. queryByIDParameters
  1653. );
  1654. if (e && e.totalCount > 0) {
  1655. let GHYDlayerData = {
  1656. id: uuidv4(),
  1657. layerInfo: layer,
  1658. data: [],
  1659. geometry: e.features[0].geometry,
  1660. };
  1661. e.features[0].fieldNames.forEach((fieldName, i) => {
  1662. let Field = e.datasetInfos
  1663. ? e.datasetInfos[0].fieldInfos.find(
  1664. (c) =>
  1665. c.name &&
  1666. c.name.toUpperCase() == fieldName.toUpperCase() &&
  1667. c.name.toUpperCase().indexOf("SM") == -1
  1668. )
  1669. : null;
  1670. if (Field) {
  1671. GHYDlayerData.data.push({
  1672. label: fieldName,
  1673. labelCN: Field ? Field.caption : fieldName,
  1674. value: e.features[0].fieldValues[i],
  1675. });
  1676. }
  1677. });
  1678. let ps = [];
  1679. for (
  1680. let index = 0;
  1681. index < GHYDlayerData.geometry.points.length;
  1682. index++
  1683. ) {
  1684. const element = GHYDlayerData.geometry.points[index];
  1685. ps.push(element.x);
  1686. ps.push(element.y);
  1687. }
  1688. //获取地块编码
  1689. // let SMID = GHYDlayerData.data.find((c) => c.label == "SMID").value;
  1690. let DKBM = GHYDlayerData.data.find((c) => c.label == "DKBM").value;
  1691. let YDMJ = GHYDlayerData.data.find((c) => c.label == "YDMJ").value;
  1692. const line = viewer.entities.add({
  1693. id: "ydhxl-" + GHYDlayerData.id,
  1694. polyline: {
  1695. positions: Cesium.Cartesian3.fromDegreesArray(ps),
  1696. width: 5,
  1697. material: Cesium.Color.RED,
  1698. clampToGround: true,
  1699. },
  1700. });
  1701. //生成点
  1702. const point = viewer.entities.add({
  1703. id: "ydhxp-" + GHYDlayerData.id,
  1704. //点
  1705. position: Cesium.Cartesian3.fromDegrees(ps[0], ps[1]),
  1706. label: {
  1707. text: DKBM + " " + YDMJ + "㎡", //描述内容
  1708. font: "30px Sans-Serif", //字体大小 类型
  1709. fillColor: Cesium.Color.RED, //颜色
  1710. outlineColor: Cesium.Color.GOLD,
  1711. style: Cesium.LabelStyle.CENTER_LABEL,
  1712. // 垂直位置
  1713. verticalOrigin: Cesium.VerticalOrigin.BUTTON,
  1714. // 中心位置
  1715. pixelOffset: new Cesium.Cartesian2(0, -10),
  1716. //设置背景颜色透明
  1717. backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.0),
  1718. //打开背景 打开背景 (不会被线段覆盖)
  1719. showBackground: true,
  1720. heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
  1721. clampToS3M: true,
  1722. },
  1723. });
  1724. that.LandPlanningList.push(GHYDlayerData);
  1725. }
  1726. that.removeEventHandler();
  1727. if (completed && isFunction(completed)) {
  1728. completed();
  1729. }
  1730. }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
  1731. },
  1732. //控规分析
  1733. KGAnalysis(Minfo) {
  1734. let that = this;
  1735. this.getGuiHuaDiKuai(function () {
  1736. that.getBufferTraffic();
  1737. that.getbackLine(Minfo);
  1738. });
  1739. },
  1740. //区位分析
  1741. DistrictAnalysis() {
  1742. this.getGuiHuaDiKuai();
  1743. },
  1744. /**
  1745. * 限高分析
  1746. * @param Minfo 报建模型信息
  1747. */
  1748. limitHeightAnalysis(Minfo) {
  1749. let that = this;
  1750. this.getGuiHuaDiKuai(function () {
  1751. that.HighLimit(Minfo);
  1752. });
  1753. },
  1754. // 生成限高
  1755. async HighLimit(Minfo) {
  1756. let that = this;
  1757. let JZXGD = 0;
  1758. let DKBM = [];
  1759. if (that.LandPlanningList.length > 0) {
  1760. let ps = [];
  1761. for (
  1762. let LandPlanningListindex = 0;
  1763. LandPlanningListindex < that.LandPlanningList.length;
  1764. LandPlanningListindex++
  1765. ) {
  1766. const GHYDlayerData = that.LandPlanningList[LandPlanningListindex];
  1767. let bm = GHYDlayerData.data.find((c) => c.label == "DKBM");
  1768. if (bm && bm.value) {
  1769. DKBM.push(bm.value);
  1770. }
  1771. //基础高度(地形高度)加入地形后可删除
  1772. let jcgd = 0;
  1773. //获取模型信息
  1774. let queryBySQLParameters = {
  1775. getFeatureMode: "SQL",
  1776. datasetNames: [Minfo.datasourcename + ":项目范围"],
  1777. queryParameter: {
  1778. attributeFilter: " DKBM = '" + bm.value + "'",
  1779. },
  1780. hasGeometry: true,
  1781. };
  1782. let e = await mapQuery(
  1783. Minfo.dataurl + "/featureResults.json?returnContent=true",
  1784. queryBySQLParameters
  1785. );
  1786. if (e && e.totalCount > 0) {
  1787. e.features.forEach((feature) => {
  1788. feature.fieldNames.forEach((fieldName, i) => {
  1789. if (
  1790. fieldName == "BASEH" &&
  1791. Number(feature.fieldValues[i]) > jcgd
  1792. ) {
  1793. jcgd = Number(feature.fieldValues[i]);
  1794. }
  1795. });
  1796. });
  1797. }
  1798. ps = [];
  1799. for (
  1800. let index = 0;
  1801. index < GHYDlayerData.geometry.points.length;
  1802. index++
  1803. ) {
  1804. const element = GHYDlayerData.geometry.points[index];
  1805. ps.push(element.x);
  1806. ps.push(element.y);
  1807. }
  1808. JZXGD = Number(
  1809. GHYDlayerData.data.find((c) => c.label == "JZXGD").value
  1810. );
  1811. let entity = viewer.entities.add({
  1812. id: "polygonA",
  1813. polygon: {
  1814. hierarchy: Cesium.Cartesian3.fromDegreesArray(ps),
  1815. height: JZXGD + jcgd || 0,
  1816. material: new Cesium.Color(1, 1, 0.2, 0.5),
  1817. outline: true,
  1818. outlineColor: Cesium.Color.RED,
  1819. clampToGround: true,
  1820. },
  1821. });
  1822. debugger;
  1823. let dom = document.createElement("div");
  1824. dom.id = "JZXGD-A";
  1825. dom.style.position = "absolute";
  1826. dom.style.width = "0";
  1827. dom.style.height = "0";
  1828. // dom.style.color = "rgba(2, 23, 44, 0.8)";
  1829. // dom.style.backgroundColor = "rgba(2, 23, 44, 0.8)";
  1830. dom.style.fontSize = "1rem";
  1831. let domContent = document.createElement("div");
  1832. domContent.style.position = "absolute";
  1833. domContent.style.borderRadius = "5px";
  1834. domContent.style.border = "1px solid rgba(7, 131, 250, 0.3)";
  1835. domContent.style.backgroundColor = "rgba(2, 23, 44, 0.7)";
  1836. domContent.style.bottom = "0px";
  1837. domContent.style.left = "0px";
  1838. domContent.style.whiteSpace = "nowrap";
  1839. domContent.style.color = "red";
  1840. // domContent.style.padding = "8px 12px";
  1841. domContent.style.transform = "translate(-50%, 0%)";
  1842. domContent.innerHTML = "限高上限:" + JZXGD + "米";
  1843. dom.appendChild(domContent);
  1844. var popupBox = new Popup({
  1845. viewer: viewer,
  1846. element: dom,
  1847. pixelOffset: new Cesium.Cartesian2(0, 0),
  1848. translucencyByDistance: new Cesium.NearFarScalar(0, 1, 50000, 1),
  1849. distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  1850. 0,
  1851. 51000
  1852. ),
  1853. position: Cesium.Cartesian3.fromDegrees(ps[0], ps[1], JZXGD + jcgd),
  1854. });
  1855. popupBox.show();
  1856. popupBoxs.push(popupBox);
  1857. // let label = viewer.entities.add({
  1858. // id: "JZXGD-A",
  1859. // //点
  1860. // position: Cesium.Cartesian3.fromDegrees(ps[0], ps[1], JZXGD + jcgd),
  1861. // label: {
  1862. // text: "限高上限:" + JZXGD + "米", //描述内容
  1863. // // font: "20px Sans-Serif", //字体大小 类型
  1864. // fillColor: Cesium.Color.RED, //颜色
  1865. // // outlineColor: Cesium.Color.GOLD,
  1866. // // style: Cesium.LabelStyle.CENTER_LABEL,
  1867. // // // 垂直位置
  1868. // // verticalOrigin: Cesium.VerticalOrigin.BUTTON,
  1869. // // // 中心位置
  1870. // // pixelOffset: new Cesium.Cartesian2(0, -10),
  1871. // // //设置背景颜色透明
  1872. // // backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.0),
  1873. // // //打开背景 打开背景 (不会被线段覆盖)
  1874. // // showBackground: true,
  1875. // heightReference: Cesium.HeightReference.NONE,
  1876. // },
  1877. // });
  1878. // that.layerList.forEach((layer) => {
  1879. // debugger;
  1880. // var hyp = new Cesium.HypsometricSetting();
  1881. // //创建分层设色对象 设置最大/最小可见高度 颜色表 显示模式 透明度及线宽
  1882. // var colorTable = new Cesium.ColorTable();
  1883. // colorTable.insert(999, new Cesium.Color(1, 0, 0));
  1884. // colorTable.insert(JZXGD, new Cesium.Color(1, 0, 0));
  1885. // hyp.MaxVisibleValue = 999;
  1886. // hyp.MinVisibleValue = JZXGD;
  1887. // hyp.ColorTable = colorTable;
  1888. // hyp.DisplayMode = Cesium.HypsometricSettingEnum.DisplayMode.FACE;
  1889. // hyp.Opacity = 0.5;
  1890. // hyp.LineInterval = 10.0;
  1891. // //设置图层分层设色属性
  1892. // layer.hypsometricSetting = {
  1893. // hypsometricSetting: hyp,
  1894. // CoverageArea: ps,
  1895. // analysisMode:
  1896. // Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION,
  1897. // };
  1898. // });
  1899. that.layerDataList.forEach((layerData) => {
  1900. let LANDNO = layerData.data.find((c) => c.label == "LANDNO").value;
  1901. if (bm.value == LANDNO) {
  1902. let SMID = layerData.data.find((c) => c.label == "SMID").value;
  1903. let Height = layerData.data.find(
  1904. (c) => c.label == "HEIGHT"
  1905. ).value;
  1906. // let x = layerData.geometry.boundingBox.upper.x;
  1907. // let y = layerData.geometry.boundingBox.upper.y;
  1908. // let z =
  1909. // layerData.geometry.boundingBox.upper.z -
  1910. // layerData.geometry.boundingBox.lower.z;
  1911. let x = layerData.geometry.center.x;
  1912. let y = layerData.geometry.center.y;
  1913. let z = Number(Height);
  1914. // if (viewer.entities.getById("JZXG-" + SMID)) {
  1915. // viewer.entities.removeById("JZXG-" + SMID);
  1916. // }
  1917. debugger;
  1918. var BoxIndex = popupBoxs.findIndex(
  1919. (c) => c.element.id == "JZXG-" + SMID
  1920. );
  1921. if (BoxIndex > -1) {
  1922. popupBoxs[BoxIndex].destroy();
  1923. popupBoxs.splice(BoxIndex, 1);
  1924. }
  1925. let cg = this.calculateHighLimit(Height, JZXGD);
  1926. if (cg > 0) {
  1927. debugger;
  1928. let dom = document.createElement("div");
  1929. dom.id = "JZXG-" + SMID;
  1930. dom.style.position = "absolute";
  1931. dom.style.width = "0";
  1932. dom.style.height = "0";
  1933. // dom.style.color = "rgba(2, 23, 44, 0.8)";
  1934. // dom.style.backgroundColor = "rgba(2, 23, 44, 0.8)";
  1935. dom.style.fontSize = "1rem";
  1936. let domContent = document.createElement("div");
  1937. domContent.style.position = "absolute";
  1938. domContent.style.borderRadius = "5px";
  1939. domContent.style.border = "1px solid rgba(7, 131, 250, 0.3)";
  1940. domContent.style.backgroundColor = "rgba(2, 23, 44, 0.7)";
  1941. domContent.style.bottom = "0px";
  1942. domContent.style.left = "0px";
  1943. domContent.style.whiteSpace = "nowrap";
  1944. domContent.style.color = "white";
  1945. // domContent.style.padding = "8px 12px";
  1946. domContent.style.transform = "translate(-50%, 0%)";
  1947. domContent.innerHTML = "超高:" + cg + "米";
  1948. dom.appendChild(domContent);
  1949. var popupBox = new Popup({
  1950. viewer: viewer,
  1951. element: dom,
  1952. pixelOffset: new Cesium.Cartesian2(0, 0),
  1953. translucencyByDistance: new Cesium.NearFarScalar(
  1954. 0,
  1955. 1,
  1956. 50000,
  1957. 1
  1958. ),
  1959. distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  1960. 0,
  1961. 51000
  1962. ),
  1963. position: Cesium.Cartesian3.fromDegrees(x, y, z + jcgd + 3),
  1964. });
  1965. popupBox.show();
  1966. popupBoxs.push(popupBox);
  1967. // let label = viewer.entities.add({
  1968. // id: "JZXG-" + SMID,
  1969. // //点
  1970. // position: Cesium.Cartesian3.fromDegrees(x, y, z + jcgd + 6),
  1971. // label: {
  1972. // text: "超高:" + cg + "米", //描述内容
  1973. // font: "14px", //字体大小 类型
  1974. // fillColor: new Cesium.Color(
  1975. // 255 / 255,
  1976. // 255 / 255,
  1977. // 255 / 255,
  1978. // 1
  1979. // ), //颜色
  1980. // // outlineColor: Cesium.Color.GOLD,
  1981. // // // style: Cesium.LabelStyle.CENTER_LABEL,
  1982. // // // 垂直位置
  1983. // // verticalOrigin: Cesium.VerticalOrigin.BUTTON,
  1984. // // // 中心位置
  1985. // // pixelOffset: new Cesium.Cartesian2(0, -10),
  1986. // //设置背景颜色透明
  1987. // backgroundColor: new Cesium.Color(
  1988. // 0 / 255,
  1989. // 0 / 255,
  1990. // 0 / 255,
  1991. // 0.6
  1992. // ),
  1993. // //打开背景 打开背景 (不会被线段覆盖)
  1994. // // showBackground: true,
  1995. // heightReference: Cesium.HeightReference.NONE,
  1996. // },
  1997. // });
  1998. }
  1999. }
  2000. });
  2001. }
  2002. }
  2003. // this.openXGFXInfo(that.layerDataList, JZXGD, DKBM);
  2004. },
  2005. /**
  2006. * // 计算超高距离
  2007. * @param Height 建筑高度
  2008. * @param JZXGD 限高上限
  2009. */
  2010. calculateHighLimit(Height, JZXGD) {
  2011. let sd = Height - JZXGD;
  2012. return sd.toFixed(2);
  2013. },
  2014. /**
  2015. * 交通分析
  2016. */
  2017. trafficAnalysis() {
  2018. let that = this;
  2019. this.getGuiHuaDiKuai(function () {
  2020. that.getBufferTraffic();
  2021. });
  2022. },
  2023. /**
  2024. * 查询200米范围内的道路
  2025. */
  2026. async getBufferTraffic() {
  2027. let that = this;
  2028. let geo = this.LandPlanningList[0].geometry;
  2029. // let geo = {
  2030. // id: 0,
  2031. // style: null,
  2032. // parts: geometry.parts,
  2033. // points: geometry.points,
  2034. // type: "REGION",
  2035. // prjCoordSys: {
  2036. // epsgCode: null,
  2037. // },
  2038. // };
  2039. // 加载道路红线
  2040. //道路红线
  2041. let layer = flatten(window.layerTree).find(
  2042. (item) => item.core == "005006"
  2043. );
  2044. if (layer && layer.date_server.url) {
  2045. let queryByGeometryParameters = {
  2046. getFeatureMode: "BUFFER",
  2047. datasetNames: [
  2048. layer.date_server.datasourcename +
  2049. ":" +
  2050. layer.date_server.datasetname,
  2051. ],
  2052. geometry: geo,
  2053. bufferDistance: 0.002,
  2054. hasGeometry: "true",
  2055. };
  2056. let e = await mapQuery(
  2057. layer.date_server.url + "/featureResults.json?returnContent=true",
  2058. queryByGeometryParameters
  2059. );
  2060. if (e && e.totalCount > 0) {
  2061. e.features.forEach((feature) => {
  2062. let DLlayerData = {
  2063. id: uuidv4(),
  2064. layerInfo: layer,
  2065. data: [],
  2066. geometry: feature.geometry,
  2067. entities: [],
  2068. };
  2069. feature.fieldNames.forEach((fieldName, i) => {
  2070. let Field = e.datasetInfos
  2071. ? e.datasetInfos[0].fieldInfos.find(
  2072. (c) =>
  2073. c.name &&
  2074. c.name.toUpperCase() == fieldName.toUpperCase() &&
  2075. c.name.toUpperCase().indexOf("SM") == -1
  2076. )
  2077. : null;
  2078. if (Field) {
  2079. DLlayerData.data.push({
  2080. label: fieldName,
  2081. labelCN: Field ? Field.caption : fieldName,
  2082. value: feature.fieldValues[i],
  2083. });
  2084. }
  2085. });
  2086. let ps = [];
  2087. for (
  2088. let index = 0;
  2089. index < feature.geometry.points.length;
  2090. index++
  2091. ) {
  2092. const element = feature.geometry.points[index];
  2093. ps.push(element.x);
  2094. ps.push(element.y);
  2095. }
  2096. //判断是否规划道路
  2097. const line = viewer.entities.add({
  2098. id: "DLX-" + DLlayerData.id,
  2099. polyline: {
  2100. positions: Cesium.Cartesian3.fromDegreesArray(ps),
  2101. width: 5,
  2102. material: Cesium.Color.GREENYELLOW,
  2103. clampToGround: true,
  2104. },
  2105. });
  2106. DLlayerData.entities.push(line.id);
  2107. that.DLlayerDatas.push(DLlayerData);
  2108. });
  2109. }
  2110. }
  2111. // 加载道路中线
  2112. layer = flatten(window.layerTree).find((item) => item.core == "005004");
  2113. if (layer && layer.date_server.url) {
  2114. let queryByGeometryParameters = {
  2115. getFeatureMode: "BUFFER",
  2116. datasetNames: [
  2117. layer.date_server.datasourcename +
  2118. ":" +
  2119. layer.date_server.datasetname,
  2120. ],
  2121. geometry: geo,
  2122. bufferDistance: 0.002,
  2123. hasGeometry: "true",
  2124. };
  2125. let e = await mapQuery(
  2126. layer.date_server.url + "/featureResults.json?returnContent=true",
  2127. queryByGeometryParameters
  2128. );
  2129. if (e && e.totalCount > 0) {
  2130. e.features.forEach((feature) => {
  2131. let DLlayerData = {
  2132. id: uuidv4(),
  2133. layerInfo: layer,
  2134. data: [],
  2135. geometry: feature.geometry,
  2136. entities: [],
  2137. };
  2138. feature.fieldNames.forEach((fieldName, i) => {
  2139. let Field = e.datasetInfos
  2140. ? e.datasetInfos[0].fieldInfos.find(
  2141. (c) =>
  2142. c.name &&
  2143. c.name.toUpperCase() == fieldName.toUpperCase() &&
  2144. c.name.toUpperCase().indexOf("SM") == -1
  2145. )
  2146. : null;
  2147. if (Field) {
  2148. DLlayerData.data.push({
  2149. label: fieldName,
  2150. labelCN: Field ? Field.caption : fieldName,
  2151. value: feature.fieldValues[i],
  2152. });
  2153. }
  2154. });
  2155. let ps = [];
  2156. for (
  2157. let index = 0;
  2158. index < feature.geometry.points.length;
  2159. index++
  2160. ) {
  2161. const element = feature.geometry.points[index];
  2162. ps.push(element.x);
  2163. ps.push(element.y);
  2164. }
  2165. //判断是否规划道路
  2166. let SSQK = DLlayerData.data.find((c) => c.label == "SSQK");
  2167. if (SSQK && SSQK.value == "规划") {
  2168. var line = viewer.entities.add({
  2169. id: "DLX-" + DLlayerData.id,
  2170. polyline: {
  2171. positions: Cesium.Cartesian3.fromDegreesArray(ps),
  2172. width: 4,
  2173. material: new Cesium.PolylineDashMaterialProperty({
  2174. color: Cesium.Color.CYAN,
  2175. clampToGround: true,
  2176. }),
  2177. clampToGround: true,
  2178. },
  2179. });
  2180. DLlayerData.entities.push(line.id);
  2181. } else {
  2182. const line = viewer.entities.add({
  2183. id: "DLX-" + DLlayerData.id,
  2184. polyline: {
  2185. positions: Cesium.Cartesian3.fromDegreesArray(ps),
  2186. width: 5,
  2187. material: Cesium.Color.CYAN,
  2188. clampToGround: true,
  2189. },
  2190. });
  2191. DLlayerData.entities.push(line.id);
  2192. }
  2193. that.DLlayerDatas.push(DLlayerData);
  2194. });
  2195. }
  2196. }
  2197. // 加载禁止开口线
  2198. layer = flatten(window.layerTree).find((item) => item.core == "005005");
  2199. if (layer && layer.date_server.url) {
  2200. let queryByGeometryParameters = {
  2201. getFeatureMode: "BUFFER",
  2202. datasetNames: [
  2203. layer.date_server.datasourcename +
  2204. ":" +
  2205. layer.date_server.datasetname,
  2206. ],
  2207. geometry: geo,
  2208. bufferDistance: 0.002,
  2209. hasGeometry: "true",
  2210. };
  2211. let e = await mapQuery(
  2212. layer.date_server.url + "/featureResults.json?returnContent=true",
  2213. queryByGeometryParameters
  2214. );
  2215. if (e && e.totalCount > 0) {
  2216. e.features.forEach((feature) => {
  2217. let DLlayerData = {
  2218. id: uuidv4(),
  2219. layerInfo: layer,
  2220. data: [],
  2221. geometry: feature.geometry,
  2222. entities: [],
  2223. };
  2224. feature.fieldNames.forEach((fieldName, i) => {
  2225. let Field = e.datasetInfos
  2226. ? e.datasetInfos[0].fieldInfos.find(
  2227. (c) =>
  2228. c.name &&
  2229. c.name.toUpperCase() == fieldName.toUpperCase() &&
  2230. c.name.toUpperCase().indexOf("SM") == -1
  2231. )
  2232. : null;
  2233. if (Field) {
  2234. DLlayerData.data.push({
  2235. label: fieldName,
  2236. labelCN: Field ? Field.caption : fieldName,
  2237. value: feature.fieldValues[i],
  2238. });
  2239. }
  2240. });
  2241. let ps = [];
  2242. for (
  2243. let index = 0;
  2244. index < feature.geometry.points.length;
  2245. index++
  2246. ) {
  2247. const element = feature.geometry.points[index];
  2248. ps.push(element.x);
  2249. ps.push(element.y);
  2250. }
  2251. const line = viewer.entities.add({
  2252. id: "DLX-" + DLlayerData.id,
  2253. polyline: {
  2254. positions: Cesium.Cartesian3.fromDegreesArray(ps),
  2255. width: 5,
  2256. material: Cesium.Color.RED,
  2257. clampToGround: true,
  2258. },
  2259. });
  2260. DLlayerData.entities.push(line.id);
  2261. that.DLlayerDatas.push(DLlayerData);
  2262. });
  2263. }
  2264. }
  2265. },
  2266. //切换地下模式
  2267. undergroundModeAnalysis() {
  2268. let that = this;
  2269. let w = document.body.offsetWidth;
  2270. let h = document.body.offsetHeight;
  2271. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  2272. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  2273. let left = w - 340 + 340 / 2;
  2274. let top = 340 / 2 + 60;
  2275. this.$layer.iframe({
  2276. id: "BJTC",
  2277. content: {
  2278. content: clipboxByEditor, //传递的组件对象
  2279. parent: this, //当前的vue对象
  2280. data: {}, //props
  2281. },
  2282. offset: [left, top], //left top
  2283. area: ["340px", "180px"], //宽 高
  2284. title: "地下分析",
  2285. maxmin: false,
  2286. shade: false, //是否显示遮罩
  2287. shadeClose: false, //点击遮罩是否关闭
  2288. cancel: () => {
  2289. //关闭事件
  2290. },
  2291. });
  2292. },
  2293. //建筑退线
  2294. backLineAnalysis(Minfo) {
  2295. let that = this;
  2296. this.getGuiHuaDiKuai(function () {
  2297. that.getbackLine(Minfo);
  2298. });
  2299. },
  2300. // 绘制建筑退线面
  2301. async getbackLine(Minfo) {
  2302. let that = this;
  2303. let DKBM = [];
  2304. if (that.LandPlanningList.length > 0) {
  2305. let layer = flatten(window.layerTree).find(
  2306. (item) => item.core == "004004"
  2307. );
  2308. if (layer && layer.date_server && layer.date_server.url) {
  2309. for (
  2310. let GHYDindex = 0;
  2311. GHYDindex < that.LandPlanningList.length;
  2312. GHYDindex++
  2313. ) {
  2314. const GHYDlayerData = that.LandPlanningList[GHYDindex];
  2315. let bm = GHYDlayerData.data.find((c) => c.label == "DKBM");
  2316. if (bm && bm.value) {
  2317. DKBM.push(bm.value);
  2318. }
  2319. //基础高度(地形高度)加入地形后可删除
  2320. let jcgd = 0;
  2321. //获取模型信息
  2322. let queryBySQLParameters = {
  2323. getFeatureMode: "SQL",
  2324. datasetNames: [Minfo.datasourcename + ":项目范围"],
  2325. queryParameter: {
  2326. attributeFilter: " DKBM = '" + bm.value + "'",
  2327. },
  2328. hasGeometry: true,
  2329. };
  2330. let exmfw = await mapQuery(
  2331. Minfo.dataurl + "/featureResults.json?returnContent=true",
  2332. queryBySQLParameters
  2333. );
  2334. if (exmfw && exmfw.totalCount > 0) {
  2335. exmfw.features.forEach((feature) => {
  2336. feature.fieldNames.forEach((fieldName, i) => {
  2337. if (
  2338. fieldName == "BASEH" &&
  2339. Number(feature.fieldValues[i]) > jcgd
  2340. ) {
  2341. jcgd = Number(feature.fieldValues[i]);
  2342. }
  2343. });
  2344. });
  2345. }
  2346. let queryByGeometryParameters = {
  2347. getFeatureMode: "SQL",
  2348. datasetNames: [
  2349. layer.date_server.datasourcename +
  2350. ":" +
  2351. layer.date_server.datasetname,
  2352. ],
  2353. queryParameter: {
  2354. attributeFilter: "DKBM = '" + bm.value + "'",
  2355. },
  2356. hasGeometry: "true",
  2357. };
  2358. let e = await mapQuery(
  2359. layer.date_server.url + "/featureResults.json?returnContent=true",
  2360. queryByGeometryParameters
  2361. );
  2362. if (e && e.totalCount > 0) {
  2363. e.features.forEach((feature) => {
  2364. let JZTXlayerData = {
  2365. id: uuidv4(),
  2366. layerInfo: layer,
  2367. data: [],
  2368. geometry: feature.geometry,
  2369. // entities: [],
  2370. };
  2371. feature.fieldNames.forEach((fieldName, i) => {
  2372. let Field = e.datasetInfos
  2373. ? e.datasetInfos[0].fieldInfos.find(
  2374. (c) =>
  2375. c.name &&
  2376. c.name.toUpperCase() == fieldName.toUpperCase() &&
  2377. c.name.toUpperCase().indexOf("SM") == -1
  2378. )
  2379. : null;
  2380. if (Field) {
  2381. JZTXlayerData.data.push({
  2382. label: fieldName,
  2383. labelCN: Field ? Field.caption : fieldName,
  2384. value: feature.fieldValues[i],
  2385. });
  2386. }
  2387. });
  2388. let ps = [];
  2389. for (
  2390. let index = 0;
  2391. index < feature.geometry.points.length;
  2392. index++
  2393. ) {
  2394. const element = feature.geometry.points[index];
  2395. ps.push(element.x);
  2396. ps.push(element.y);
  2397. ps.push(0);
  2398. }
  2399. debugger;
  2400. //限高高度
  2401. let xg = 87.4;
  2402. let xgdata = GHYDlayerData.data.find((c) => c.label == "JZXGD");
  2403. if (xgdata && xgdata.value) {
  2404. xg = Number(xgdata.value);
  2405. }
  2406. //添加建筑退线线
  2407. var orangePolygon1 = viewer.entities.add({
  2408. id: "JZTXQ-" + JZTXlayerData.id,
  2409. polygon: {
  2410. hierarchy: Cesium.Cartesian3.fromDegreesArrayHeights(ps),
  2411. extrudedHeight: xg + jcgd,
  2412. perPositionHeight: true,
  2413. material: Cesium.Color.CHARTREUSE.withAlpha(0.1),
  2414. outline: true,
  2415. outlineColor: Cesium.Color.MEDIUMSPRINGGREEN,
  2416. outlineWidth: 1.0,
  2417. },
  2418. });
  2419. // JZTXlayerData.entities.push(orangePolygon1);
  2420. that.JZTXlayerDatas.push(JZTXlayerData);
  2421. });
  2422. }
  2423. }
  2424. }
  2425. }
  2426. this.openJZXGInfo(that.layerDataList, that.JZTXlayerDatas, Minfo, DKBM);
  2427. },
  2428. //占压分析
  2429. occupyAnalysis(Minfo) {
  2430. let that = this;
  2431. this.getGuiHuaDiKuai(function () {
  2432. that.getoccupy(Minfo);
  2433. });
  2434. },
  2435. /**
  2436. * 获取用地用海分类统一颜色
  2437. */
  2438. getLandColor(name) {
  2439. var color = "rgb(172,255,207)";
  2440. window.colorList.forEach((element) => {
  2441. if (element.name.indexOf(name) > -1) color = element.color;
  2442. });
  2443. return color;
  2444. },
  2445. /**
  2446. * 获取占压交集
  2447. * @param Minfo
  2448. */
  2449. async getoccupy(Minfo) {
  2450. let that = this;
  2451. if (that.LandPlanningList.length > 0) {
  2452. let layer = flatten(window.layerTree).find(
  2453. (item) => item.core == "002002"
  2454. );
  2455. if (layer && layer.date_server && layer.date_server.url) {
  2456. for (
  2457. let GHYDindex = 0;
  2458. GHYDindex < that.LandPlanningList.length;
  2459. GHYDindex++
  2460. ) {
  2461. const GHYDlayerData = that.LandPlanningList[GHYDindex];
  2462. let queryByGeometryParameters = {
  2463. getFeatureMode: "SPATIAL",
  2464. datasetNames: [
  2465. layer.date_server.datasourcename +
  2466. ":" +
  2467. layer.date_server.datasetname,
  2468. ],
  2469. geometry: GHYDlayerData.geometry,
  2470. spatialQueryMode: "INTERSECT",
  2471. hasGeometry: "true",
  2472. };
  2473. let e = await mapQuery(
  2474. layer.date_server.url + "/featureResults.json?returnContent=true",
  2475. queryByGeometryParameters
  2476. );
  2477. if (e && e.totalCount > 0) {
  2478. e.features.forEach((feature) => {
  2479. let DLTBlayerData = {
  2480. id: uuidv4(),
  2481. layerInfo: layer,
  2482. data: [],
  2483. geometry: feature.geometry,
  2484. };
  2485. feature.fieldNames.forEach((fieldName, i) => {
  2486. let Field = e.datasetInfos
  2487. ? e.datasetInfos[0].fieldInfos.find(
  2488. (c) =>
  2489. c.name &&
  2490. c.name.toUpperCase() == fieldName.toUpperCase() &&
  2491. c.name.toUpperCase().indexOf("SM") == -1
  2492. )
  2493. : null;
  2494. if (Field) {
  2495. DLTBlayerData.data.push({
  2496. label: fieldName,
  2497. labelCN: Field ? Field.caption : fieldName,
  2498. value: feature.fieldValues[i],
  2499. });
  2500. }
  2501. });
  2502. let ps = [];
  2503. for (
  2504. let index = 0;
  2505. index < feature.geometry.points.length;
  2506. index++
  2507. ) {
  2508. const element = feature.geometry.points[index];
  2509. ps.push(element.x);
  2510. ps.push(element.y);
  2511. }
  2512. let DLLX = DLTBlayerData.data.find(
  2513. (c) => c.label == "DLMC"
  2514. ).value;
  2515. let col = Cesium.Color.fromCssColorString(
  2516. that.getLandColor(DLLX)
  2517. );
  2518. //添加地类图斑
  2519. var orangePolygon1 = viewer.entities.add({
  2520. id: "DLTB-" + DLTBlayerData.id,
  2521. polygon: {
  2522. hierarchy: Cesium.Cartesian3.fromDegreesArray(ps),
  2523. // perPositionHeight: true,
  2524. material: col,
  2525. outline: true,
  2526. outlineColor: Cesium.Color.BLACK,
  2527. outlineWidth: 2.0,
  2528. },
  2529. });
  2530. const point = viewer.entities.add({
  2531. id: "DLTBlable-" + DLTBlayerData.id,
  2532. //点
  2533. position: Cesium.Cartesian3.fromDegrees(
  2534. DLTBlayerData.geometry.center.x,
  2535. DLTBlayerData.geometry.center.y
  2536. ),
  2537. label: {
  2538. text: DLLX, //描述内容
  2539. fillColor: Cesium.Color.WHITE,
  2540. font: "40px Calibri",
  2541. scale: 0.5,
  2542. fillStyle: Cesium.LabelStyle.FILL,
  2543. // 垂直位置
  2544. verticalOrigin: Cesium.VerticalOrigin.BUTTON,
  2545. // 中心位置
  2546. pixelOffset: new Cesium.Cartesian2(0, -10),
  2547. //设置背景颜色透明
  2548. backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.8),
  2549. //打开背景 打开背景 (不会被线段覆盖)
  2550. showBackground: true,
  2551. heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
  2552. clampToS3M: true,
  2553. },
  2554. });
  2555. that.DLTBlayerDatas.push(DLTBlayerData);
  2556. });
  2557. }
  2558. }
  2559. }
  2560. }
  2561. this.openDLTBInfo(that.LandPlanningList, that.DLTBlayerDatas, Minfo);
  2562. },
  2563. /**
  2564. * 指标分析
  2565. * @param Minfo
  2566. */
  2567. normAnalysis(info, Minfo) {
  2568. let that = this;
  2569. if (!info.plotnumber) {
  2570. that.$message({
  2571. message: "请现在项目信息中补全项目地块编码",
  2572. type: "warning",
  2573. });
  2574. return;
  2575. }
  2576. this.getGuiHuaDiKuai(function () {
  2577. for (let index = 0; index < that.LandPlanningList.length; index++) {
  2578. const LandPlanning = that.LandPlanningList[index];
  2579. let DKBM = LandPlanning.data.find((c) => c.label == "DKBM")
  2580. ? LandPlanning.data.find((c) => c.label == "DKBM").value
  2581. : "";
  2582. let plotnumbers = info.plotnumber.split(",");
  2583. let isInclude = plotnumbers.some((element) => element.includes(DKBM));
  2584. if (!isInclude || !DKBM) {
  2585. that.$message({
  2586. message: "请选择项目内的地块进行查询",
  2587. type: "warning",
  2588. });
  2589. return;
  2590. }
  2591. }
  2592. that.HighLimit(Minfo);
  2593. that.getnorm(Minfo);
  2594. });
  2595. },
  2596. /**
  2597. * 获取指标
  2598. * @param Minfo
  2599. */
  2600. async getnorm(Minfo) {
  2601. debugger;
  2602. //组装指标对象
  2603. let tableDataList = [];
  2604. for (let index = 0; index < this.LandPlanningList.length; index++) {
  2605. const LandPlanning = this.LandPlanningList[index];
  2606. let KG_Data = {},
  2607. TJFA_Data = {},
  2608. FA_Data = {};
  2609. KG_Data.DKBM = LandPlanning.data.find((c) => c.label == "DKBM")
  2610. ? LandPlanning.data.find((c) => c.label == "DKBM").value
  2611. : "";
  2612. KG_Data.YDMJ = LandPlanning.data.find((c) => c.label == "YDMJ")
  2613. ? LandPlanning.data.find((c) => c.label == "YDMJ").value
  2614. : "";
  2615. KG_Data.JZMJ = LandPlanning.data.find((c) => c.label == "JZMJ")
  2616. ? LandPlanning.data.find((c) => c.label == "JZMJ").value
  2617. : "";
  2618. // KG_Data.JZMJ = "";
  2619. KG_Data.JDMJ = LandPlanning.data.find((c) => c.label == "JDMJ")
  2620. ? LandPlanning.data.find((c) => c.label == "JDMJ").value
  2621. : "";
  2622. // KG_Data.JRJZMJ = LandPlanning.data.find((c) => c.label == "JRJZMJ")
  2623. // ? LandPlanning.data.find((c) => c.label == "JRJZMJ").value
  2624. // : "";
  2625. KG_Data.RJLD = LandPlanning.data.find((c) => c.label == "RJLD")
  2626. ? LandPlanning.data.find((c) => c.label == "RJLD").value
  2627. : "";
  2628. KG_Data.RJLX = LandPlanning.data.find((c) => c.label == "RJLX")
  2629. ? LandPlanning.data.find((c) => c.label == "RJLX").value
  2630. : "";
  2631. KG_Data.JZMDD = LandPlanning.data.find((c) => c.label == "JZMDD")
  2632. ? LandPlanning.data.find((c) => c.label == "JZMDD").value
  2633. : "";
  2634. KG_Data.JZMDX = LandPlanning.data.find((c) => c.label == "JZMDX")
  2635. ? LandPlanning.data.find((c) => c.label == "JZMDX").value
  2636. : "";
  2637. KG_Data.JZXGD = LandPlanning.data.find((c) => c.label == "JZXGD")
  2638. ? LandPlanning.data.find((c) => c.label == "JZXGD").value
  2639. : "";
  2640. KG_Data.JZXGX = LandPlanning.data.find((c) => c.label == "JZXGX")
  2641. ? LandPlanning.data.find((c) => c.label == "JZXGX").value
  2642. : "";
  2643. KG_Data.JRJZMJD = "";
  2644. KG_Data.JRJZMJX = "";
  2645. if (Minfo.dataurl && Minfo.datasourcename) {
  2646. //获取项目范围数据数据
  2647. let queryByGeometryParameters = {
  2648. getFeatureMode: "SQL",
  2649. datasetNames: [Minfo.datasourcename + ":项目范围"],
  2650. queryParameter: {
  2651. attributeFilter: "DKBM = '" + KG_Data.DKBM + "'",
  2652. },
  2653. hasGeometry: "true",
  2654. };
  2655. let e = await mapQuery(
  2656. Minfo.dataurl + "/featureResults.json?returnContent=true",
  2657. queryByGeometryParameters
  2658. );
  2659. //项目用地总面积
  2660. let xmzmj = 0;
  2661. if (e && e.totalCount > 0) {
  2662. e.features.forEach((feature) => {
  2663. let DataPs = feature.geometry.points.map((item) => [
  2664. item.x,
  2665. item.y,
  2666. ]);
  2667. if (DataPs.length > 0) {
  2668. if (DataPs[0] != DataPs[DataPs.length - 1]) {
  2669. DataPs.push(DataPs[0]);
  2670. }
  2671. let polygonPs = polygon([DataPs]);
  2672. let areaPs = area(polygonPs);
  2673. xmzmj += areaPs;
  2674. }
  2675. });
  2676. }
  2677. FA_Data.YDMJ = xmzmj;
  2678. //基底面积查建筑轮廓数据
  2679. FA_Data.JDMJ = 0;
  2680. let queryByGeometryParameters2 = {
  2681. getFeatureMode: "SQL",
  2682. datasetNames: [Minfo.datasourcename + ":" + Minfo.datasetname],
  2683. queryParameter: {
  2684. attributeFilter: "LANDNO = '" + KG_Data.DKBM + "'",
  2685. },
  2686. hasGeometry: "true",
  2687. };
  2688. let e2 = await mapQuery(
  2689. Minfo.dataurl + "/featureResults.json?returnContent=true",
  2690. queryByGeometryParameters2
  2691. );
  2692. //建筑基底总面积
  2693. let jzjdzmj = 0;
  2694. //建筑总面积
  2695. let jzzmj = 0;
  2696. //地上建筑总面积
  2697. let dsjzzmj = 0;
  2698. //地下建筑总面积
  2699. let dxjzzmj = 0;
  2700. //最大建筑高度
  2701. let maxJZGD = 0;
  2702. if (e2 && e2.totalCount > 0) {
  2703. e2.features.forEach((feature) => {
  2704. let BUILDAREAIndex = feature.fieldNames.findIndex(
  2705. (c) => c == "BUILDAREA"
  2706. );
  2707. if (BUILDAREAIndex) {
  2708. let jzmj = feature.fieldValues[BUILDAREAIndex] || 0;
  2709. if (Number(jzmj)) {
  2710. jzzmj += Number(jzmj);
  2711. }
  2712. }
  2713. let TBUILDAREAIndex = feature.fieldNames.findIndex(
  2714. (c) => c == "TBUILDAREA"
  2715. );
  2716. if (TBUILDAREAIndex) {
  2717. let dsjzmj = feature.fieldValues[TBUILDAREAIndex] || 0;
  2718. if (Number(dsjzmj)) {
  2719. dsjzzmj += Number(dsjzmj);
  2720. }
  2721. }
  2722. let DBUILDAREAIndex = feature.fieldNames.findIndex(
  2723. (c) => c == "DBUILDAREA"
  2724. );
  2725. if (DBUILDAREAIndex) {
  2726. let dxjzmj = feature.fieldValues[DBUILDAREAIndex] || 0;
  2727. if (Number(dxjzmj)) {
  2728. dxjzzmj += Number(dxjzmj);
  2729. }
  2730. }
  2731. let HEIGHTIndex = feature.fieldNames.findIndex(
  2732. (c) => c == "HEIGHT"
  2733. );
  2734. if (HEIGHTIndex) {
  2735. let jzgd = feature.fieldValues[HEIGHTIndex] || 0;
  2736. if (Number(jzgd) > maxJZGD) {
  2737. maxJZGD = Number(jzgd);
  2738. }
  2739. }
  2740. let DataPs = feature.geometry.points.map((item) => [
  2741. item.x,
  2742. item.y,
  2743. ]);
  2744. if (DataPs.length > 0) {
  2745. if (DataPs[0] != DataPs[DataPs.length - 1]) {
  2746. DataPs.push(DataPs[0]);
  2747. }
  2748. let polygonPs = polygon([DataPs]);
  2749. let areaPs = area(polygonPs);
  2750. jzjdzmj += areaPs;
  2751. }
  2752. });
  2753. }
  2754. FA_Data.JZMJ = Number(jzzmj);
  2755. FA_Data.JZGD = Number(maxJZGD).toFixed(2);
  2756. FA_Data.JDMJ = jzjdzmj;
  2757. //计容建筑面积 为地上建筑总面积
  2758. FA_Data.JRJZMJ = dsjzzmj;
  2759. // 容积率 20240814改为使用建筑面积计算容积率
  2760. // FA_Data.RJL = (FA_Data.JRJZMJ / FA_Data.YDMJ).toFixed(2);
  2761. FA_Data.RJL = (FA_Data.JZMJ / FA_Data.YDMJ).toFixed(2);
  2762. //建筑密度
  2763. FA_Data.JZMD = (Number(FA_Data.JDMJ / FA_Data.YDMJ) * 100).toFixed(2);
  2764. }
  2765. tableDataList.push({ Minfo, KG_Data, FA_Data, TJFA_Data });
  2766. }
  2767. var result = await CheckParkAnalyse.buidAreaAndParksComputer(
  2768. Minfo,
  2769. false
  2770. );
  2771. if (result != null) {
  2772. for (var i = 0; i < tableDataList.length; i++) {
  2773. var item = tableDataList[i];
  2774. var land = result.buildings.find(
  2775. (t) => t.landNo == item.KG_Data.DKBM
  2776. );
  2777. if (land == null) continue;
  2778. tableDataList[i].FA_Data.JZMJ = land.mj;
  2779. tableDataList[i].FA_Data.JRJZMJ = land.jrmj;
  2780. debugger;
  2781. //20240814改为使用建筑面积计算容积率
  2782. // tableDataList[i].FA_Data.RJL = (land.jrmj / item.FA_Data.YDMJ).toFixed(2);
  2783. tableDataList[i].FA_Data.RJL = (
  2784. (land.mj - land.dxjzmj) /
  2785. item.FA_Data.YDMJ
  2786. ).toFixed(2);
  2787. //开发商提交的方案文档指标
  2788. debugger;
  2789. tableDataList[i].TJFA_Data.JZMJ = land.famj;
  2790. tableDataList[i].TJFA_Data.JRJZMJ = land.fajrmj;
  2791. tableDataList[i].infoData = land;
  2792. }
  2793. }
  2794. this.openZBFXInfo([tableDataList]);
  2795. },
  2796. /**
  2797. * 规划情况分析
  2798. */
  2799. async PlanningAnalysis(Minfo) {
  2800. let that = this;
  2801. this.getGuiHuaDiKuai(function () {
  2802. if (that.LandPlanningList.length > 0) {
  2803. ghqk.getPlanning(that.LandPlanningList, Minfo);
  2804. } else {
  2805. that.$message({
  2806. message: "当前位置未找到规划地块,请选择其他位置。",
  2807. type: "warning",
  2808. });
  2809. }
  2810. });
  2811. },
  2812. /**
  2813. * 建筑风貌分析
  2814. */
  2815. async ArchitecturalAnalysis(Minfo) {
  2816. this.openArchitecturaInfo(
  2817. this.layerDataList,
  2818. this.LandPlanningList,
  2819. Minfo
  2820. );
  2821. },
  2822. /**
  2823. * 人视分析
  2824. */
  2825. async RSAnalysis(Minfo) {
  2826. this.openRSInfo();
  2827. },
  2828. /**
  2829. * 车位审查
  2830. */
  2831. async CheckPark(Minfo, isJSPark) {
  2832. var that = this;
  2833. var result = await CheckParkAnalyse.buidAreaAndParksComputer(
  2834. Minfo,
  2835. isJSPark
  2836. );
  2837. // if (that.skylineAnalysislayerid) {
  2838. // that.$layer.close(that.skylineAnalysislayerid);
  2839. // }
  2840. let w = document.body.offsetWidth;
  2841. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  2842. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  2843. var fontSize = document.body.style.fontSize;
  2844. if ((fontSize = "")) fontSize = 14;
  2845. else fontSize = parseInt(fontSize.replace("px", ""));
  2846. let left = w - 400;
  2847. let top = 550 / 2 + 60;
  2848. // that.skylineAnalysislayerid =
  2849. that.$layer.iframe({
  2850. id: "BJTC",
  2851. content: {
  2852. content: parkResult, //传递的组件对象
  2853. parent: that, //当前的vue对象
  2854. data: { info: result }, //props
  2855. },
  2856. offset: [left, top], //left top
  2857. area: ["40rem", "25rem"],
  2858. title: "车位审查结果",
  2859. maxmin: false,
  2860. shade: false, //是否显示遮罩
  2861. shadeClose: false, //点击遮罩是否关闭
  2862. cancel: () => {
  2863. //关闭事件
  2864. // alert("关闭iframe");
  2865. },
  2866. });
  2867. },
  2868. /**
  2869. * 楼体拉伸
  2870. */
  2871. BuildingStretchingAnalysis(Minfo) {
  2872. let that = this;
  2873. if (this.handler != null) {
  2874. this.removeAll();
  2875. }
  2876. this.handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
  2877. this.handler.setInputAction((evt) => {
  2878. that.tooltip.showAt(
  2879. evt.endPosition,
  2880. `<p>点击地图,选择要分析的楼体,右键取消</p>`
  2881. );
  2882. }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
  2883. this.handler.setInputAction((evt) => {
  2884. that.removeEventHandler();
  2885. }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
  2886. this.handler.setInputAction(async function (movement) {
  2887. that.tooltip.setVisible(false);
  2888. //拾取图层
  2889. let pick = scene.pickPosition(movement.position);
  2890. let xyz = cartesian3ToWGS84(pick);
  2891. let layerDataList = that.layerDataList;
  2892. let w = document.body.offsetWidth;
  2893. let h = document.body.offsetHeight;
  2894. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  2895. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  2896. let left = w - 430 + 430 / 2;
  2897. let top = 430 / 2 + 60;
  2898. that.$layer.iframe({
  2899. id: "BJTC",
  2900. content: {
  2901. content: BuildingStretchingAnalysis, //传递的组件对象
  2902. parent: that, //当前的vue对象
  2903. data: { info: { Minfo, layerDataList, xyz } }, //props
  2904. },
  2905. offset: [left, top], //left top
  2906. area: ["430px", "430px"], //宽 高
  2907. title: "楼体拉伸",
  2908. maxmin: false,
  2909. shade: false, //是否显示遮罩
  2910. shadeClose: false, //点击遮罩是否关闭
  2911. cancel: () => {
  2912. //关闭事件
  2913. },
  2914. });
  2915. that.removeEventHandler();
  2916. }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
  2917. },
  2918. // 删除限高
  2919. removeHighLimit() {
  2920. viewer.entities.removeById("polygonA");
  2921. // viewer.entities.removeById("JZXGD-A");
  2922. var BoxIndex = popupBoxs.findIndex((c) => c.element.id == "JZXGD-A");
  2923. if (BoxIndex > -1) {
  2924. popupBoxs[BoxIndex].destroy();
  2925. popupBoxs.splice(BoxIndex, 1);
  2926. }
  2927. this.layerList.forEach((layerName) => {
  2928. var hyp = new Cesium.HypsometricSetting();
  2929. hyp.MaxVisibleValue = -1000;
  2930. let layer = scene.layers.find(layerName);
  2931. layer.hypsometricSetting = {
  2932. hypsometricSetting: hyp,
  2933. analysisMode:
  2934. Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL,
  2935. };
  2936. });
  2937. for (let index = popupBoxs.length - 1; index >= 0; index--) {
  2938. const popupBox = popupBoxs[index];
  2939. if (popupBox.element.id.includes("JZXG-")) {
  2940. popupBox.destroy();
  2941. popupBoxs.splice(index, 1);
  2942. }
  2943. }
  2944. },
  2945. //取消左键事件
  2946. removeEventHandler() {
  2947. if (this.handler) {
  2948. this.tooltip.setVisible(false);
  2949. this.handler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE);
  2950. this.handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
  2951. this.handler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK);
  2952. this.handler.destroy();
  2953. this.handler = null;
  2954. }
  2955. },
  2956. //删除规划地块
  2957. removeLandPlanningList() {
  2958. for (let index = 0; index < this.LandPlanningList.length; index++) {
  2959. const element = this.LandPlanningList[index];
  2960. viewer.entities.removeById("ydhxp-" + element.id);
  2961. viewer.entities.removeById("ydhxl-" + element.id);
  2962. }
  2963. this.LandPlanningList = [];
  2964. },
  2965. //删除道路线
  2966. removeDLlayerDatasList() {
  2967. for (let index = 0; index < this.DLlayerDatas.length; index++) {
  2968. const element = this.DLlayerDatas[index];
  2969. element.entities.forEach((entitie) => {
  2970. viewer.entities.removeById(entitie);
  2971. });
  2972. }
  2973. this.DLlayerDatas = [];
  2974. },
  2975. //删除建筑退线
  2976. removeJZTXlayerDatas() {
  2977. for (let index = 0; index < this.JZTXlayerDatas.length; index++) {
  2978. const element = this.JZTXlayerDatas[index];
  2979. viewer.entities.removeById("JZTXQ-" + element.id);
  2980. }
  2981. this.JZTXlayerDatas = [];
  2982. },
  2983. //删除地类图斑
  2984. removeDLTBlayerDatas() {
  2985. for (let index = 0; index < this.DLTBlayerDatas.length; index++) {
  2986. const element = this.DLTBlayerDatas[index];
  2987. viewer.entities.removeById("DLTB-" + element.id);
  2988. viewer.entities.removeById("DLTBlable-" + element.id);
  2989. }
  2990. this.DLTBlayerDatas = [];
  2991. },
  2992. /**
  2993. * 点查图层信息
  2994. */
  2995. initEntitiesHandler() {
  2996. let that = this;
  2997. this.getEntitiesHandler = new Cesium.ScreenSpaceEventHandler(
  2998. scene.canvas
  2999. );
  3000. this.getEntitiesHandler.setInputAction(function (click) {
  3001. var pick = viewer.scene.pick(click.position);
  3002. //用地红线信息弹窗
  3003. if (pick && pick.id.id && pick.id.id.indexOf("ydhxp") !== -1) {
  3004. let id = pick.id.id.split("ydhxp-")[1];
  3005. let info = that.LandPlanningList.find((c) => c.id == id);
  3006. that.openOBJInfo("用地红线详情", info.data);
  3007. }
  3008. if (pick && pick.id.id && pick.id.id.indexOf("ydhxl") !== -1) {
  3009. let id = pick.id.id.split("ydhxl-")[1];
  3010. let info = that.LandPlanningList.find((c) => c.id == id);
  3011. that.openOBJInfo("用地红线详情", info.data);
  3012. }
  3013. //道路信息弹窗
  3014. if (pick && pick.id.id && pick.id.id.indexOf("DLX-") !== -1) {
  3015. let id = pick.id.id.split("DLX-")[1];
  3016. let info = that.DLlayerDatas.find((c) => c.id == id);
  3017. that.openOBJInfo("道路信息详情", info.data);
  3018. }
  3019. //图斑地类弹窗
  3020. if (pick && pick.id.id && pick.id.id.indexOf("DLTB-") !== -1) {
  3021. let id = pick.id.id.split("DLTB-")[1];
  3022. let info = that.DLTBlayerDatas.find((c) => c.id == id);
  3023. that.openOBJInfo("地类信息详情", info.data);
  3024. }
  3025. //城镇开发边界弹窗
  3026. if (pick && pick.id.id && pick.id.id.indexOf("CZKFBJ-") !== -1) {
  3027. let id = pick.id.id.split("CZKFBJ-")[1];
  3028. let info = ghqk.CZKFBJDatas.find((c) => c.id == id);
  3029. that.openOBJInfo("城镇开发边界信息详情", info.data);
  3030. }
  3031. }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
  3032. },
  3033. //打开用地红线信息弹窗
  3034. openOBJInfo(title, info) {
  3035. if (this.OBJInfolayerid) {
  3036. this.$layer.close(this.OBJInfolayerid);
  3037. }
  3038. let w = document.body.offsetWidth;
  3039. let h = document.body.offsetHeight;
  3040. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  3041. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  3042. let left = 430 / 2 + 556;
  3043. let top = 430 / 2 + 60;
  3044. this.OBJInfolayerid = this.$layer.iframe({
  3045. content: {
  3046. content: PlanningPlotInfo, //传递的组件对象
  3047. parent: this, //当前的vue对象
  3048. data: { info }, //props
  3049. },
  3050. offset: [left, top], //left top
  3051. area: ["430px", "430px"], //宽 高
  3052. title: title,
  3053. maxmin: false,
  3054. shade: false, //是否显示遮罩
  3055. shadeClose: false, //点击遮罩是否关闭
  3056. cancel: () => {
  3057. //关闭事件
  3058. // alert("关闭iframe");
  3059. },
  3060. });
  3061. },
  3062. /**
  3063. * //打开限高分析信息弹窗
  3064. * @param layerDataList 楼层信息
  3065. * @param JZXGD 限高值
  3066. * @param DKBM [] 要分析的地块编码
  3067. */
  3068. openXGFXInfo(layerDataList, JZXGD, DKBM) {
  3069. let that = this;
  3070. let w = document.body.offsetWidth;
  3071. let h = document.body.offsetHeight;
  3072. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  3073. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  3074. let left = w - 430 + 430 / 2;
  3075. let top = 430 / 2 + 60;
  3076. this.$layer.iframe({
  3077. id: "BJTC",
  3078. content: {
  3079. content: HighLimitAnalysis, //传递的组件对象
  3080. parent: this, //当前的vue对象
  3081. data: { info: { layerDataList, JZXGD, DKBM } }, //props
  3082. },
  3083. offset: [left, top], //left top
  3084. area: ["430px", "430px"], //宽 高
  3085. title: "限高分析",
  3086. maxmin: false,
  3087. shade: false, //是否显示遮罩
  3088. shadeClose: false, //点击遮罩是否关闭
  3089. cancel: () => {
  3090. //关闭事件
  3091. this.removeLandPlanningList();
  3092. this.removeHighLimit();
  3093. },
  3094. });
  3095. },
  3096. /**
  3097. * //打开退线分析信息弹窗
  3098. * @param layerDataList 楼层信息
  3099. * @param JZTXlayerDatas 退线信息
  3100. * @param DKBM 地块编码
  3101. */
  3102. openJZXGInfo(layerDataList, JZTXlayerDataList, Minfo, DKBM) {
  3103. let that = this;
  3104. let w = document.body.offsetWidth;
  3105. let h = document.body.offsetHeight;
  3106. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  3107. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  3108. let left = w - 430 + 430 / 2;
  3109. let top = 430 / 2 + 60;
  3110. this.$layer.iframe({
  3111. id: "BJTC",
  3112. content: {
  3113. content: backLineAnalysisinfo, //传递的组件对象
  3114. parent: this, //当前的vue对象
  3115. data: {
  3116. info: { layerDataList, JZTXlayerDataList, Minfo, DKBM },
  3117. }, //props
  3118. },
  3119. offset: [left, top], //left top
  3120. area: ["430px", "430px"], //宽 高
  3121. title: "控规分析",
  3122. maxmin: false,
  3123. shade: false, //是否显示遮罩
  3124. shadeClose: false, //点击遮罩是否关闭
  3125. cancel: () => {
  3126. //关闭事件
  3127. this.removeLandPlanningList();
  3128. this.removeJZTXlayerDatas();
  3129. this.removeDLlayerDatasList();
  3130. },
  3131. });
  3132. },
  3133. /**
  3134. * //打开地类图斑分析信息弹窗
  3135. * @param LandPlanningList 规划地块数组
  3136. * @param DLTBlayerDataList 地类图斑信息
  3137. */
  3138. openDLTBInfo(LandPlanningList, DLTBlayerDataList, Minfo) {
  3139. let that = this;
  3140. let w = document.body.offsetWidth;
  3141. let h = document.body.offsetHeight;
  3142. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  3143. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  3144. let left = w - 430 + 430 / 2;
  3145. let top = 430 / 2 + 60;
  3146. this.$layer.iframe({
  3147. id: "BJTC",
  3148. content: {
  3149. content: ZYAnalysisinfo, //传递的组件对象
  3150. parent: this, //当前的vue对象
  3151. data: {
  3152. info: { LandPlanningList, DLTBlayerDataList, Minfo },
  3153. }, //props
  3154. },
  3155. offset: [left, top], //left top
  3156. area: ["430px", "430px"], //宽 高
  3157. title: "占压分析",
  3158. maxmin: false,
  3159. shade: false, //是否显示遮罩
  3160. shadeClose: false, //点击遮罩是否关闭
  3161. cancel: () => {
  3162. //关闭事件
  3163. this.removeLandPlanningList();
  3164. this.removeDLTBlayerDatas();
  3165. },
  3166. });
  3167. },
  3168. /**
  3169. * //打开指标分析信息弹窗
  3170. * @param tableDataList 控规指标和项目指标
  3171. */
  3172. openZBFXInfo(tableDataList) {
  3173. // if (this.ZBFXInfolayerid) {
  3174. // this.$layer.close(this.ZBFXInfolayerid);
  3175. // }
  3176. let that = this;
  3177. let wpx = 650;
  3178. let hpx = 430;
  3179. let w = document.body.offsetWidth;
  3180. let h = document.body.offsetHeight;
  3181. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  3182. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  3183. let left = w - wpx + wpx / 2;
  3184. let top = hpx / 2 + 60;
  3185. this.$layer.iframe({
  3186. id: "BJTC",
  3187. content: {
  3188. content: ZBFXAnalysisinfo, //传递的组件对象
  3189. parent: this, //当前的vue对象
  3190. data: {
  3191. info: { tableDataList },
  3192. }, //props
  3193. },
  3194. offset: [left, top], //left top
  3195. area: [wpx + "px", hpx + "px"], //宽 高
  3196. title: "指标分析",
  3197. maxmin: false,
  3198. shade: false, //是否显示遮罩
  3199. shadeClose: false, //点击遮罩是否关闭
  3200. cancel: () => {
  3201. //关闭事件
  3202. //指标分析数据
  3203. this.removeLandPlanningList();
  3204. //限高分析数据
  3205. this.removeHighLimit();
  3206. },
  3207. });
  3208. },
  3209. /**
  3210. * //打开模型对比弹窗
  3211. */
  3212. openMXDBInfo() {
  3213. let that = this;
  3214. let modelsloadData = that.modelsload.map((item) => {
  3215. return {
  3216. id: item.id,
  3217. Minfo: item.Minfo,
  3218. layerDataList: item.layerDataList,
  3219. };
  3220. });
  3221. //弹窗最小化
  3222. this.$layer.min(this.layerid);
  3223. if (this.MXDBInfolayerid) {
  3224. this.$layer.close(this.MXDBInfolayerid);
  3225. }
  3226. let w = document.body.offsetWidth;
  3227. let h = document.body.offsetHeight;
  3228. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  3229. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  3230. let left = 430 / 2;
  3231. let top = 100 / 2 + 60;
  3232. this.MXDBInfolayerid = this.$layer.iframe({
  3233. content: {
  3234. content: MXDBinfo, //传递的组件对象
  3235. parent: this, //当前的vue对象
  3236. data: {
  3237. info: { modelsloadData },
  3238. }, //props
  3239. },
  3240. offset: [left, top], //left top
  3241. area: ["430px", "100px"], //宽 高
  3242. title: "模型对比",
  3243. maxmin: false,
  3244. shade: false, //是否显示遮罩
  3245. shadeClose: false, //点击遮罩是否关闭
  3246. cancel: () => {
  3247. //还原弹窗
  3248. this.$layer.full(that.layerid);
  3249. //关闭事件
  3250. this.DestroyAll();
  3251. },
  3252. });
  3253. },
  3254. /**
  3255. * //打开建筑风貌弹窗
  3256. */
  3257. openArchitecturaInfo(layerDataList, LandPlanningList, Minfo) {
  3258. let that = this;
  3259. let w = document.body.offsetWidth;
  3260. let h = document.body.offsetHeight;
  3261. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  3262. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  3263. let left = w - 430 + 430 / 2;
  3264. let top = 430 / 2 + 60;
  3265. this.$layer.iframe({
  3266. id: "BJTC",
  3267. content: {
  3268. content: ArchitecturaAnalysis, //传递的组件对象
  3269. parent: this, //当前的vue对象
  3270. data: { info: { Minfo, layerDataList, LandPlanningList } }, //props
  3271. },
  3272. offset: [left, top], //left top
  3273. area: ["430px", "430px"], //宽 高
  3274. title: "建筑风貌分析",
  3275. maxmin: false,
  3276. shade: false, //是否显示遮罩
  3277. shadeClose: false, //点击遮罩是否关闭
  3278. cancel: () => {},
  3279. });
  3280. },
  3281. /**
  3282. * //打开人视弹窗
  3283. */
  3284. openRSInfo() {
  3285. let that = this;
  3286. let w = document.body.offsetWidth;
  3287. let h = document.body.offsetHeight;
  3288. //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
  3289. //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
  3290. let left = w - 430 + 430 / 2;
  3291. let top = 100 / 2 + 300;
  3292. this.$layer.iframe({
  3293. id: "BJTC",
  3294. content: {
  3295. content: RSAnalysis, //传递的组件对象
  3296. parent: this, //当前的vue对象
  3297. data: { info: {} }, //props
  3298. },
  3299. offset: [left, top], //left top
  3300. area: ["20rem", "35rem"], //宽 高
  3301. title: "人视分析",
  3302. maxmin: false,
  3303. shade: false, //是否显示遮罩
  3304. shadeClose: false, //点击遮罩是否关闭
  3305. cancel: () => {},
  3306. });
  3307. },
  3308. /**
  3309. * 压平
  3310. * @param Minfos 模型信息
  3311. */
  3312. async yp(Minfos) {
  3313. for (let index = 0; index < Minfos.length; index++) {
  3314. const Minfo = Minfos[index];
  3315. //获取模型信息
  3316. let queryBySQLParameters = {
  3317. getFeatureMode: "SQL",
  3318. datasetNames: [Minfo.datasourcename + ":项目范围"],
  3319. queryParameter: {
  3320. attributeFilter: "1=1",
  3321. },
  3322. hasGeometry: true,
  3323. };
  3324. let e = await mapQuery(
  3325. Minfo.dataurl + "/featureResults.json?returnContent=true",
  3326. queryBySQLParameters
  3327. );
  3328. if (e && e.totalCount > 0) {
  3329. e.features.forEach((element) => {
  3330. let flatPoints = element.geometry.points
  3331. .map((item) => [item.x, item.y, 6.5])
  3332. .flat();
  3333. viewer.scene.layers.layerQueue.forEach((layer) => {
  3334. let name = "flatten" + Math.random();
  3335. let istrue = layer.addFlattenRegion({
  3336. position: flatPoints,
  3337. name: name,
  3338. });
  3339. });
  3340. });
  3341. }
  3342. }
  3343. },
  3344. qxyp() {
  3345. viewer.scene.layers.layerQueue.forEach((layer) => {
  3346. layer.removeAllFlattenRegion();
  3347. });
  3348. },
  3349. removeAll() {
  3350. this.removeEventHandler();
  3351. this.removeLandPlanningList();
  3352. this.removeHighLimit();
  3353. this.removeDLlayerDatasList();
  3354. this.removeJZTXlayerDatas();
  3355. this.removeDLTBlayerDatas();
  3356. ghqk.removeAll();
  3357. this.$layer.close("BJTC");
  3358. },
  3359. DestroyAll() {
  3360. scene.multiViewportMode = Cesium.MultiViewportMode.NONE;
  3361. this.qxyp();
  3362. if (this.getEntitiesHandler) {
  3363. this.getEntitiesHandler.removeInputAction(
  3364. Cesium.ScreenSpaceEventType.LEFT_CLICK
  3365. );
  3366. }
  3367. this.removeAll();
  3368. this.removeModel();
  3369. undergroundMode(false);
  3370. },
  3371. },
  3372. beforeDestroy() {
  3373. this.DestroyAll();
  3374. },
  3375. };
  3376. </script>
  3377. <style lang="scss">
  3378. @import "@/../../zt.scss";
  3379. </style>
  3380. <style lang="scss" scoped>
  3381. .card_body_style {
  3382. border: 1px dashed #02a7f0;
  3383. }
  3384. .hover_style:hover {
  3385. border: 1px solid #02a7f0;
  3386. }
  3387. .checkedState {
  3388. position: relative;
  3389. .status {
  3390. position: absolute;
  3391. right: 0;
  3392. top: 0;
  3393. // z-index: 2;
  3394. overflow: hidden;
  3395. // border-radius: 6px;
  3396. }
  3397. .icon {
  3398. position: absolute;
  3399. right: 0;
  3400. top: 0;
  3401. width: 4rem;
  3402. height: 4rem;
  3403. border: 8px;
  3404. background: #ffff80;
  3405. -webkit-clip-path: polygon(100% 0, 0 0, 100% 100%);
  3406. clip-path: polygon(100% 0, 0 0, 100% 100%);
  3407. }
  3408. .txts {
  3409. line-height: 2.6rem;
  3410. text-align: center;
  3411. transform: rotate(45deg);
  3412. transform-origin: center center;
  3413. color: #ec808c;
  3414. // font-size: 18px;
  3415. }
  3416. /* 带圆角的话这个status 和 txts的宽度/宽度 是要比icon的宽度/高度小的,效果可以自己慢慢调 */
  3417. .ce {
  3418. width: 4rem;
  3419. height: 4rem;
  3420. }
  3421. }
  3422. .con-col {
  3423. display: flex;
  3424. flex-flow: column nowrap;
  3425. justify-content: center;
  3426. align-items: center;
  3427. border-radius: 4px;
  3428. }
  3429. </style>