MultiLevelQuery.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  1. <template>
  2. <el-tabs class="multi_level_query_table" v-if="store.state.query_pick_pane.length > 0" @tab-click="handleClick"
  3. @tab-remove="removeTab">
  4. <el-tab-pane :label="store.state.query_pick_last_pane.name" name="second">
  5. <el-table :header-cell-style="{
  6. background: 'rgba(10, 25, 38, 0.6)',
  7. color: '#66b1ff',
  8. fontSize: '14px',
  9. fontFamily: 'Microsoft YaHei',
  10. fontWeight: '400',
  11. }" :data="store.state.query_pick_last_pane.value" style="width: 100%">
  12. <el-table-column show-overflow-tooltip="true" prop="filedZH" label="属性" width="140"
  13. v-if="filedZH != '空间信息'">
  14. </el-table-column>
  15. <el-table-column show-overflow-tooltip="true" prop="data" label="属性值">
  16. </el-table-column>
  17. </el-table>
  18. </el-tab-pane>
  19. <!-- <el-tab-pane :closable="item.close" :label="item.name" :name="item.name" -->
  20. <el-tab-pane :label="item.name" :name="item.name" v-for="(item, index) in store.state.query_pick_pane" :key="index"
  21. v-if="item.show">
  22. <div v-if="item.name != '权属'">
  23. <pie class="echart" unit="平方米" :ref="`echartRef`" @echartClick="echartClick"></pie>
  24. <el-table :data="tableData" style="width: 100%" :header-cell-style="{
  25. background: 'rgba(10, 25, 38, 0.6)',
  26. color: '#66b1ff',
  27. fontSize: '14px',
  28. fontFamily: 'Microsoft YaHei',
  29. fontWeight: '400',
  30. }">
  31. <el-table-column show-overflow-tooltip="true" width="150" v-for="header in headers" :key="header"
  32. :label="header" :prop="header" v-if="header != '空间信息'">
  33. </el-table-column>
  34. </el-table>
  35. </div>
  36. <div v-else>
  37. <el-tabs @tab-click="handleClickQwnership">
  38. <pie class="echart" unit="平方米" :ref="`qwnership_pie`"></pie>
  39. <el-tab-pane v-for="(item, index) in qwnershipTabs" :key="index" :label="item.dataname"
  40. :name="item.dataname">
  41. <el-table :data="tableData_qwnership" style="width: 100%" :header-cell-style="{
  42. background: 'rgba(10, 25, 38, 0.6)',
  43. color: '#66b1ff',
  44. fontSize: '14px',
  45. fontFamily: 'Microsoft YaHei',
  46. fontWeight: '400',
  47. }">
  48. <el-table-column show-overflow-tooltip="true" width="150" v-for="header in headers_qwnership"
  49. :key="header" :label="header" :prop="header" v-if="header != '空间信息'">
  50. </el-table-column>
  51. </el-table>
  52. </el-tab-pane>
  53. </el-tabs>
  54. </div>
  55. </el-tab-pane>
  56. <el-tab-pane label="自定义" name="自定义">
  57. <!-- <el-input clearable v-model="state" @input="change_witch" class="search" placeholder="请输入内容"></el-input> -->
  58. <el-checkbox-group v-model="check_list_active">
  59. <el-checkbox v-model="item.ckeck" :label="item.label" v-for="(item, index) in check_list"
  60. :key="index"></el-checkbox>
  61. </el-checkbox-group>
  62. <div style="margin-bottom: 20px;">
  63. <el-button size="small" @click="addTab()">
  64. 添加
  65. </el-button>
  66. </div>
  67. </el-tab-pane>
  68. </el-tabs>
  69. </template>
  70. <script>
  71. //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  72. import { GetTabsData, GetTabsPane } from '@/api/cockpitNew'
  73. import * as wellknown from "wellknown";
  74. import * as turf from "@turf/turf";
  75. import pie from "@/components/echartsTemplate/pieNew.vue";
  76. let manager_multi_level_query = null;
  77. let pick_entity = null;
  78. let manager_multi_level_vector = null;
  79. let query_click_by_iserver = null;
  80. export default {
  81. components: { pie },
  82. data() {
  83. return {
  84. activeName: 'second',
  85. activeNameQwnership: 'Qwnership',
  86. handler_multi_level_query: null,
  87. manager_multi_level_query: null,
  88. manager_multi_level_vector: null,
  89. pick_entity: null,
  90. pick_entity_geo: null,
  91. eclickname: '',
  92. echartList: {},
  93. tabIndex: 2,
  94. state: '',
  95. activecheckList: [],
  96. // check_list: [{ label: '三调', ckeck: true }, { label: '权属', ckeck: true }, { label: '农用' }, { label: '上映' }],
  97. check_list_active: [],
  98. check_list: [],
  99. active_tabs_table: [],
  100. rawData: [],
  101. headers: [], // 用于存储所有可能的 filedZH 值
  102. qwnershipTabs: [],
  103. rawData_qwnership: [],
  104. headers_qwnership: [],
  105. };
  106. },
  107. //监听属性 类似于data概念
  108. computed: {
  109. tableData() {
  110. // 首次加载时确定所有可能的 filedZH 值
  111. // if (!this.headers.length) {
  112. this.headers = [];
  113. this.rawData.forEach(item => {
  114. item.forEach(field => {
  115. if (!this.headers.includes(field.filedZH)) {
  116. this.headers.push(field.filedZH);
  117. }
  118. });
  119. });
  120. // }
  121. // 转换 rawData 为适合 el-table 使用的格式
  122. return this.rawData.map(item => {
  123. // 创建一个包含所有 headers 字段的对象
  124. const row = {};
  125. this.headers.forEach(header => {
  126. // 查找当前数据项中对应 filedZH 的 data 值
  127. const field = item.find(f => f.filedZH === header);
  128. row[header] = field ? field.data : ''; // 如果没有找到,则使用空字符串
  129. });
  130. return row;
  131. });
  132. },
  133. tableData_qwnership() {
  134. // 首次加载时确定所有可能的 filedZH 值
  135. // if (!this.headers.length) {
  136. this.headers_qwnership = [];
  137. this.rawData_qwnership.forEach(item => {
  138. item.forEach(field => {
  139. if (!this.headers_qwnership.includes(field.filedZH)) {
  140. this.headers_qwnership.push(field.filedZH);
  141. }
  142. });
  143. });
  144. // }
  145. // 转换 rawData 为适合 el-table 使用的格式
  146. return this.rawData_qwnership.map(item => {
  147. // 创建一个包含所有 headers 字段的对象
  148. const row = {};
  149. this.headers_qwnership.forEach(header => {
  150. // 查找当前数据项中对应 filedZH 的 data 值
  151. const field = item.find(f => f.filedZH === header);
  152. row[header] = field ? field.data : ''; // 如果没有找到,则使用空字符串
  153. });
  154. return row;
  155. });
  156. },
  157. },
  158. //监控data中的数据变化
  159. watch: {},
  160. //方法集合
  161. methods: {
  162. change_witch() {
  163. },
  164. removeTab(targetName) {
  165. // let tabs = store.state.query_pick_pane;
  166. // let activeName = this.activeName;
  167. // if (activeName === targetName) {
  168. // tabs.forEach((tab, index) => {
  169. // if (tab.name === targetName) {
  170. // let nextTab = tabs[index + 1] || tabs[index - 1];
  171. // if (nextTab) {
  172. // activeName = nextTab.name;
  173. // }
  174. // }
  175. // });
  176. // }
  177. // this.activeName = activeName;
  178. // store.state.query_pick_pane = tabs.filter(tab => tab.name !== targetName);
  179. },
  180. addTab() {
  181. // let newTabName = ++this.tabIndex + '';
  182. // store.state.query_pick_pane.push({
  183. // name: newTabName,
  184. // value: [1, 2, 3, 4],// element.data
  185. // close: 'closable'
  186. // });
  187. // this.activeName = newTabName;
  188. // this.activecheckList.forEach((res) => {
  189. // store.state.query_pick_pane.push({
  190. // name: res,
  191. // value: [1, 2, 3, 4],// element.data
  192. // close: 'closable'
  193. // });
  194. // this.activeName = res;
  195. // })
  196. // store.state.query_pick_pane
  197. console.log(this.check_list_active, "this.check_list_active");
  198. console.log('store.state.query_pick_pane: ', store.state.query_pick_pane);
  199. // this.check_list_active.forEach((res) => {
  200. // store.state.query_pick_pane.forEach((item) => {
  201. // if (item.name == res) {
  202. // console.log('item.name == res: ', item.name, res);
  203. // item.show = true;
  204. // } else {
  205. // item.show = false;
  206. // }
  207. // })
  208. // })
  209. this.updateShowProperties(this.check_list_active, store.state.query_pick_pane)
  210. },
  211. go(e) {
  212. const that = this;
  213. e.forEach(element => {
  214. if (element.filed == "geom") {
  215. this.gogeojson(element.data)
  216. }
  217. });
  218. },
  219. gogeojson(data) {
  220. let geojson = wellknown.parse(data);
  221. const twoDArray = geojson.coordinates[0];
  222. const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
  223. this.pick_entity_geo = oneDArray;
  224. pick_entity.entities.add({
  225. polygon: {
  226. // 获取指定属性(positions,holes(图形内需要挖空的区域))
  227. hierarchy: {
  228. positions: Cesium.Cartesian3.fromDegreesArray(oneDArray),
  229. },
  230. // 边框
  231. outline: true,
  232. // 边框颜色
  233. outlineColor: Cesium.Color.RED,
  234. // 边框尺寸
  235. outlineWidth: 2,
  236. // 填充的颜色,withAlpha透明度
  237. material: Cesium.Color.GREEN.withAlpha(0),
  238. // 是否被提供的材质填充
  239. fill: true,
  240. // 恒定高度
  241. height: 1.1,
  242. // 显示在距相机的距离处的属性,多少区间内是可以显示的
  243. // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(1000, 10000000),
  244. // 是否显示
  245. show: true,
  246. // 顺序,仅当`clampToGround`为true并且支持地形上的折线时才有效。
  247. zIndex: 10
  248. }
  249. });
  250. let flag = true;
  251. let time = setInterval(() => {
  252. flag = !flag
  253. this.switch_show(flag);
  254. }, 500);
  255. setTimeout(() => {
  256. clearInterval(time);
  257. pick_entity.entities.values.forEach((res) => {
  258. pick_entity.entities.remove(res);
  259. })
  260. }, 6000)
  261. // 注意:polygon首尾坐标要一致
  262. var polygon = turf.polygon([geojson.coordinates[0]]);
  263. var centroid = turf.centroid(polygon).geometry.coordinates;
  264. viewer.camera.flyTo({
  265. duration: 1,
  266. destination: Cesium.Cartesian3.fromDegrees(centroid[0], centroid[1], 3000),
  267. // destination: {
  268. // x: -6283267.004204832,
  269. // y: 28123682.896774407,
  270. // z: 23709669.98539126
  271. // },
  272. orientation: {
  273. heading: 6.149339593573709,
  274. pitch: -1.539825618847483,
  275. roll: 0
  276. },
  277. });
  278. },
  279. reset() {
  280. for (let index = 0; index < 10; index++) {
  281. var len = viewer.dataSources.length;
  282. if (len > 0) {
  283. for (var n = 0; n < len; n++) {
  284. if (viewer.dataSources.get(n) != undefined && viewer.dataSources.get(n).name != undefined && viewer.dataSources.get(n).name === 'MultiLevelQuery_echart') {
  285. viewer.dataSources.remove(viewer.dataSources.get(n));
  286. }
  287. }
  288. }
  289. }
  290. },
  291. addPolygon(geom, id, colors, fillreset) {
  292. let geojson = wellknown.parse(geom);
  293. let _this = this;
  294. // viewer.entities.removeAll();
  295. let scolor = colors
  296. ? Cesium.Color.fromCssColorString(colors)
  297. : Cesium.Color.RED;
  298. let fcolor =
  299. colors && !fillreset
  300. ? Cesium.Color.fromCssColorString(colors)
  301. : Cesium.Color.WHITE;
  302. let polygon = Cesium.GeoJsonDataSource.load(geojson, {
  303. clampToGround: true,
  304. stroke: scolor,
  305. fill: fcolor.withAlpha(0.3), //注意:颜色必须大写,即不能为blue
  306. strokeWidth: 5,
  307. });
  308. polygon.then(function (dataSource) {
  309. // dataSource.id = id;
  310. // 将数据源添加到Cesium Viewer
  311. dataSource.name = 'MultiLevelQuery_echart'
  312. viewer.dataSources.add(dataSource);
  313. viewer.zoomTo(dataSource);
  314. dataSourceList_gh[id] = dataSource;
  315. if (id == "all") _this.isshowAll = true;
  316. });
  317. },
  318. echartClick(name, { iseyes }) {
  319. this.reset();
  320. this.tableData.forEach((res) => {
  321. const keys = Object.keys(res);
  322. for (const key of keys) {
  323. let value = res[key];
  324. if (value == name) {
  325. console.log('name: ', name);
  326. console.log('value ', value);
  327. this.addPolygon(res.空间信息.split(";")[1], "all", "#ff0000", true);
  328. }
  329. }
  330. })
  331. },
  332. clear_data() {
  333. const that = this;
  334. store.state.query_pick_last_pane = null;
  335. store.state.query_pick_pane = [];
  336. this.tableData = [];
  337. this.tableData_qwnership = [];
  338. this.remove_query_click_by_iserver();
  339. // 图标
  340. var entities = manager_multi_level_query.entities.values;
  341. for (var i = entities.length - 1; i >= 0; i--) {
  342. manager_multi_level_query.entities.remove(entities[i]);
  343. }
  344. this.reset();
  345. },
  346. remove_query_click_by_iserver() {
  347. for (var i = 0; i < 10; i++) {
  348. query_click_by_iserver.entities.values.forEach((res) => {
  349. query_click_by_iserver.entities.remove(res);
  350. })
  351. }
  352. },
  353. init_handler() {
  354. const that = this;
  355. this.check_list_active = [];
  356. this.check_list = [];
  357. that.clear_data();
  358. if (that.handler_multi_level_query == null) {
  359. that.handler_multi_level_query = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
  360. }
  361. that.handler_multi_level_query.setInputAction(async event => {
  362. let pickObj = viewer.scene.pick(event.position);
  363. var position = viewer.scene.pickPosition(event.position);
  364. if (!position)//点击到地球之外
  365. return false;
  366. var cartographic = Cesium.Cartographic.fromCartesian(position);
  367. let longitude = Cesium.Math.toDegrees(cartographic.longitude);
  368. let latitude = Cesium.Math.toDegrees(cartographic.latitude);
  369. let height = cartographic.height;
  370. let heading = viewer.scene.camera.heading;
  371. let pitch = viewer.scene.camera.pitch;
  372. if (!position) {
  373. position = Cesium.Cartesian3.fromDegrees(0, 0, 0);
  374. }
  375. const geojsonPoint = {
  376. "type": "Point",
  377. "coordinates": [longitude, latitude] // 注意经纬度顺序
  378. };
  379. const wkt = wellknown.stringify(geojsonPoint);
  380. let id = store.state.vectorlayerlist[store.state.vectorlayerlist.length - 1].id
  381. let obj = {
  382. defaultType: null,
  383. layerId: id
  384. }
  385. let data = await GetTabsData(obj);
  386. for (let index = 0; index < data.data.length; index++) {
  387. const element = data.data[index];
  388. let tableId = element.tableId;
  389. let pane_obj = {
  390. sourcePointWkt: wkt,
  391. sourceLayerId: id,
  392. // sourcePointWkt: "POINT(109.5139541 18.3146153)",
  393. // sourceLayerId: "dd699f839bc04969ae2dc2e1964d0ad1",
  394. sourceLayerType: '0',
  395. queryTableId: tableId,
  396. }
  397. if (index == 0) {
  398. let res = await GetTabsPane(pane_obj);
  399. let filteredData = res.data.data[0].filter((res) => {
  400. return res.filed != 'geom'
  401. })
  402. store.state.query_pick_last_pane = {
  403. name: element.name,
  404. value: filteredData,
  405. };
  406. } else {
  407. let res = await GetTabsPane(pane_obj);
  408. if (element.defaultType == "0") {
  409. // store.state.query_pick_pane.push({
  410. // name: element.name,
  411. // value: res,
  412. // close: 'closable',
  413. // show: true
  414. // });
  415. this.check_list_active.push(element.name);
  416. } else {
  417. }
  418. store.state.query_pick_pane.push({
  419. name: element.name,
  420. value: res,
  421. close: 'closable',
  422. show: element.defaultType == '0' ? true : false
  423. });
  424. }
  425. this.check_list.push({
  426. label: element.name,
  427. ckeck: element.defaultType == '0' ? true : false
  428. });
  429. }
  430. // this.highlightResults(longitude, latitude);
  431. this.highlightResultsPng(longitude, latitude);
  432. that.handler_multi_level_query.destroy();
  433. that.handler_multi_level_query = null;
  434. }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
  435. },
  436. highlightResultsPng(longitude, latitude) {
  437. manager_multi_level_query.entities.add({
  438. name: "manager_multi_level_query",
  439. position: Cesium.Cartesian3.fromDegrees(longitude, latitude, 40),
  440. billboard: {
  441. // 图像地址,URI或Canvas的属性
  442. image: "./static/images/overview/go.png",
  443. height: 34,
  444. width: 36,
  445. scale: 1.0,
  446. zIndex: 2,
  447. show: true
  448. },
  449. })
  450. },
  451. updateShowProperties(firstArray, secondArray) {
  452. // 创建一个映射表,用于快速查找第一个数组中的元素
  453. const firstArrayMap = new Map(firstArray.map(name => [name, true]));
  454. // 遍历第二个数组,更新show属性
  455. secondArray.forEach(obj => {
  456. // 如果在第一个数组中存在对应的name,则show为true;否则为false
  457. obj.show = firstArrayMap.has(obj.name);
  458. });
  459. // 返回更新后的secondArray,虽然原始数组被直接修改
  460. return secondArray;
  461. },
  462. handleClick(tab, event) {
  463. let index = Number(tab.index) - 2
  464. if (tab.name == '权属') {
  465. this.qwnershipTabsFun();
  466. } else {
  467. store.state.query_pick_pane.forEach((res) => {
  468. if (res.name == tab.name) {
  469. let data = [];
  470. this.active_tabs_table = res.value.data.data;
  471. this.rawData = res.value.data.data
  472. res.value.data.datalist.forEach((res) => {
  473. data.push({
  474. name: res.groupvalue,
  475. value: res.sumvalue
  476. })
  477. })
  478. this.setEchart(data, "vertical", index);
  479. }
  480. })
  481. }
  482. },
  483. handleClickQwnership(tab, event) {
  484. let index = 0;
  485. this.qwnershipTabs.forEach((res) => {
  486. if (res.dataname == tab.name) {
  487. this.rawData_qwnership = res.data
  488. let data = [];
  489. res.datalist.forEach((res) => {
  490. data.push({
  491. name: res.groupvalue,
  492. value: res.sumvalue
  493. })
  494. })
  495. this.setEchart_qwnership(data, "vertical", index);
  496. index++;
  497. }
  498. })
  499. },
  500. // 权属tabs
  501. qwnershipTabsFun() {
  502. store.state.query_pick_pane.forEach((res) => {
  503. if (res.name == '权属') {
  504. this.qwnershipTabs = res.value.data.child;
  505. // this.activeNameQwnership = this.qwnershipTabs[0].dataname
  506. }
  507. })
  508. },
  509. setEchart_qwnership(data, type, index) {
  510. this.$nextTick(() => {
  511. let max = 7
  512. let legend_right = "4%"
  513. this.$refs.qwnership_pie[index].setOptions({ data, type, max, legend_right });
  514. });
  515. },
  516. setEchart(data, type, index) {
  517. this.$nextTick(() => {
  518. let max = 7
  519. let legend_right = "4%"
  520. this.$refs.echartRef[index].setOptions({ data, type, max, legend_right });
  521. });
  522. },
  523. calcIserverURI(url) {
  524. let uriArr = url.split("/");
  525. uriArr[5] = uriArr[5].replace("map-", "data-");
  526. uriArr[7] = "data";
  527. uriArr[8] = "featureResults.rjson?returnContent=true";
  528. return uriArr.join("/");
  529. },
  530. convertCoordinates(coordArray) {
  531. return coordArray.map(coord => [coord.x, coord.y]);
  532. },
  533. isArray2D(arr) {
  534. // 首先检查arr是否是数组
  535. if (!Array.isArray(arr)) {
  536. return false;
  537. }
  538. // 检查数组中的每个元素是否也是数组
  539. for (let i = 0; i < arr.length; i++) {
  540. if (!Array.isArray(arr[i])) {
  541. return false;
  542. }
  543. }
  544. // 如果所有元素都是数组,那么arr是二维数组
  545. return true;
  546. },
  547. async highlightResults(longitude, latitude) {
  548. // 高亮结果
  549. let queryByIDParameters = {
  550. getFeatureMode: "BUFFER",
  551. // getFeatureMode: "SPATIAL",
  552. spatialQueryMode: "INTERSECT",
  553. datasetNames: store.state.vectorlayerlist[store.state.vectorlayerlist.length - 1].source.split(","),
  554. geometry: {
  555. parts: [1],
  556. points: [{ y: latitude, x: longitude }],
  557. type: "POINT",
  558. },
  559. bufferDistance: 0.00005,
  560. hasGeometry: true,
  561. };
  562. let response = await axios.post(this.calcIserverURI(store.state.vectorlayerlist[store.state.vectorlayerlist.length - 1].url), queryByIDParameters);
  563. const outputCoords = this.convertCoordinates(response.data.features[0].geometry.points);
  564. outputCoords.push(outputCoords[0])
  565. let f = { "type": "Polygon", "coordinates": [outputCoords] };
  566. let result = turf.buffer(f, 1 / 99999, {
  567. units: "kilometers",
  568. });
  569. let positions = [];
  570. const twoDArray = result.geometry.coordinates[0];
  571. const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
  572. positions = oneDArray;
  573. if (this.isArray2D(oneDArray)) {
  574. const oneDArray2 = oneDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
  575. positions = oneDArray2;
  576. } else {
  577. }
  578. query_click_by_iserver.entities.add({
  579. polygon: {
  580. // 获取指定属性(positions,holes(图形内需要挖空的区域))
  581. hierarchy: {
  582. positions: Cesium.Cartesian3.fromDegreesArray(positions)
  583. },
  584. // 边框
  585. outline: false,
  586. // 边框颜色
  587. outlineColor: Cesium.Color.RED,
  588. // 边框尺寸
  589. outlineWidth: 10,
  590. // 填充的颜色,withAlpha透明度
  591. material: Cesium.Color.RED,
  592. // 是否被提供的材质填充
  593. fill: true,
  594. // 恒定高度
  595. height: 1.1,
  596. // 显示在距相机的距离处的属性,多少区间内是可以显示的
  597. // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(1000, 10000000),
  598. // 是否显示
  599. show: true,
  600. // 顺序,仅当`clampToGround`为true并且支持地形上的折线时才有效。
  601. zIndex: 10
  602. }
  603. });
  604. },
  605. },
  606. beforeCreate() { }, //生命周期 - 创建之前
  607. created() { }, //生命周期 - 创建完成(可以访问当前this实例)
  608. beforeMount() { }, //生命周期 - 挂载之前
  609. mounted() {
  610. const that = this;
  611. this.$nextTick(() => {
  612. query_click_by_iserver = new Cesium.CustomDataSource("query_click_by_iserver");
  613. viewer.dataSources.add(query_click_by_iserver);
  614. manager_multi_level_query = new Cesium.CustomDataSource("manager_multi_level_query");
  615. viewer.dataSources.add(manager_multi_level_query);
  616. })
  617. }, //生命周期 - 挂在完成
  618. beforeUpdate() { }, //生命周期 - 更新之前
  619. updated() { }, //生命周期 - 更新之后
  620. beforeDestroy() { }, //生命周期 - 销毁之前
  621. destroy() { },//生命周期 - 销毁完成
  622. activated() { }, //若组件实例是 <KeepAlive> 缓存树的一部分,当组件被插入到 DOM 中时调用。
  623. deactivated() { } //若组件实例是 <KeepAlive> 缓存树的一部分,当组件从 DOM 中被移除时调用。
  624. };
  625. </script>
  626. <style lang="scss" scoped>
  627. .el-collapse {
  628. // width: 95%;
  629. border: none;
  630. background-color: transparent !important;
  631. }
  632. .el-scrollbar {
  633. border: 1px solid #0f7ac8 !important;
  634. // padding: 0 10px;
  635. }
  636. .el-collapse-item__header {
  637. // border-bottom: 1px solid rgba(102, 126, 143, 0.747);
  638. background-color: transparent !important;
  639. color: rgb(217, 237, 254) !important;
  640. border-color: transparent !important;
  641. }
  642. .el-collapse-item__wrap {
  643. background-color: transparent !important;
  644. border-color: transparent !important;
  645. }
  646. .el-collapse-item__content {
  647. // background-color: rgba(255, 192, 203, 0.425) !important;
  648. background-color: transparent !important;
  649. color: rgb(217, 237, 254) !important;
  650. }
  651. </style>
  652. <style lang="scss" scoped>
  653. .echart {
  654. width: 300px;
  655. height: 420px;
  656. }
  657. .echart1 {
  658. height: 280px;
  659. }
  660. .multi_level_query_table {
  661. position: absolute;
  662. top: 7rem;
  663. width: 19rem;
  664. }
  665. /* 去掉tabs标签栏下的下划线 */
  666. ::v-deep .el-tabs__nav-wrap::after {
  667. position: static !important;
  668. /* background-color: #fff; */
  669. }
  670. /* 下划线切换高亮 */
  671. ::v-deep .el-tabs__active-bar {
  672. background-color: #30fdff;
  673. }
  674. ::v-deep .el-collapse-item__header {
  675. color: #64daff !important;
  676. font-weight: 600;
  677. }
  678. .el-tab-pane {
  679. height: 33rem;
  680. overflow: auto;
  681. }
  682. .list_vector_multi {
  683. background-image: url("/static/images/ghzc/内容框.png");
  684. width: 18rem;
  685. border-top: 1px solid #CCC;
  686. font-size: 14px;
  687. padding: 0.1rem 0rem 0.1rem 0rem;
  688. border-left: 1px solid #CCC;
  689. border-right: 1px solid #CCC;
  690. // border-bottom:1px solid #CCC ;
  691. }
  692. .list_vector_multi:last-child {
  693. border-bottom: 1px solid #CCC;
  694. }
  695. .filed_box {
  696. display: inline-block;
  697. }
  698. .el-checkbox {
  699. color: white;
  700. }
  701. .is-disabled {
  702. display: inline;
  703. }
  704. /deep/ .el-table tr {
  705. background: rgba(10, 25, 38, 0.5) !important;
  706. }
  707. /deep/ .el-table td.el-table__cell,
  708. .el-table th.el-table__cell.is-leaf {
  709. background: rgba(10, 25, 38, 0.5) !important;
  710. border-bottom: 0px solid #ebeef5;
  711. }
  712. .el-table {
  713. color: #fff;
  714. background: rgba(10, 25, 38, 0.5) !important;
  715. }
  716. /deep/ .el-table__fixed-right::before,
  717. .el-table__fixed::before {
  718. background: rgba(10, 25, 38, 0.9) !important;
  719. }
  720. /deep/ .el-table__fixed-right-patch {
  721. background: rgba(10, 25, 38, 0.9) !important;
  722. }
  723. /deep/ .el-table--border::after,
  724. .el-table--group::after,
  725. .el-table::before {
  726. background: rgba(10, 25, 38, 0) !important;
  727. }
  728. .content_item {
  729. color: #30fdff;
  730. .item_field {
  731. color: #30fdff;
  732. }
  733. }
  734. </style>