projectManagement.vue 117 KB

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