BoxCommonVector.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920
  1. <template>
  2. <div class="ghzc BoxCommonVector">
  3. <div class="innerContainerVector leftPaneVector" v-drag v-if="title">
  4. <h2 class="PangetitleVector darg-div">
  5. <span class="pange_textVector">{{ title }}</span>
  6. <slot name="title"></slot>
  7. <span class="clearBtn" @click="cockpit" v-if="!cockpit_vector.mapType">
  8. <i class="el-icon-thumb"></i>
  9. 图斑详情查询
  10. </span>
  11. <i class="el-icon-close" v-if="$route.path == '/overview'" @click="close"></i>
  12. </h2>
  13. <template v-if="islist">
  14. <el-input v-if="word" clearable v-model="state" @input="change_witch" class="search"
  15. placeholder="请输入内容"></el-input>
  16. <div class="searchDiv" v-else>
  17. <div class="sidiv" v-for="sitem in searchs" :key="sitem.key">
  18. <el-input v-if="sitem.type == 'input'" clearable v-model="searchform[sitem.key]" @input="change_witch"
  19. class="search" :placeholder="sitem.label"></el-input>
  20. <el-select v-else-if="sitem.type == 'select'" clearable v-model="searchform[sitem.key]"
  21. :placeholder="sitem.label" @change="change_witch">
  22. <el-option v-for="item in sitem.options" :key="item.value" :label="item.label"
  23. :value="item.value"></el-option>
  24. </el-select>
  25. <!-- clearable -->
  26. <el-cascader v-else-if="sitem.type == 'cascader'" v-model="searchform[sitem.key]" :show-all-levels="false"
  27. :options="sitem.options" :placeholder="sitem.label" :props="{
  28. checkStrictly: true,
  29. expandTrigger: 'hover',
  30. emitPath: false,
  31. }" @change="change_witch"></el-cascader>
  32. </div>
  33. </div>
  34. <div v-if="cockpit_vector.showtotal" class="shownum">
  35. 上报总数量:{{ active_dableData.length }}{{ isShallow }}个
  36. </div>
  37. <el-table :row-class-name="tableRowClassName" ref="singleTable" :data="active_dableData" style="width: 100%"
  38. height="670" :header-cell-style="{
  39. background: 'rgba(10, 25, 38, 0.6)',
  40. color: '#66b1ff',
  41. fontSize: '14px',
  42. fontFamily: 'Microsoft YaHei',
  43. fontWeight: '400',
  44. }">
  45. <el-table-column show-overflow-tooltip="true" v-for="(item, index) in store.state.cockpit_vector.columns"
  46. :key="index" :width="index ? 100 : cockpit_vector.columns.length > 2 ? 150 : 230" :prop="item"
  47. :label="item">
  48. </el-table-column>
  49. <el-table-column fixed="right" label="操作" :width="cockpit_vector.action ? 100 : 50">
  50. <template slot-scope="scope">
  51. <!-- <el-button @click="info(scope.row)" type="text" size="small">详情</el-button> -->
  52. <el-button @click="go(scope.row)" type="text" size="small">定位</el-button>
  53. <el-button v-if="cockpit_vector.action" @click="start(scope.row)" type="text" size="small">开工</el-button>
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. </template>
  58. <slot name="all"></slot>
  59. </div>
  60. <div class="sm-panel sm-function-module-query" v-if="isShallow" v-drag>
  61. <div class="sm-panel-header">
  62. <span>详情</span>
  63. <i class="el-icon-close" @click="closeIsShallow"></i>
  64. </div>
  65. <el-tabs type="border-card" class="xz_box info" v-model="activeTabs" stretch>
  66. <el-tab-pane label="基本信息" name="base">
  67. <CockpitVector :baseData="details"></CockpitVector>
  68. </el-tab-pane>
  69. <!-- -->
  70. <el-tab-pane label="全过程管理信息" name="qgc" v-if="title.includes('山水工程')">
  71. </el-tab-pane>
  72. </el-tabs>
  73. </div>
  74. <startWork ref="startWorkRef" @close="reset"></startWork>
  75. </div>
  76. </template>
  77. <script>
  78. import { QueryOne, QueryList } from "@/api/cockpitNew";
  79. import * as tdsy from "@/views/cockpit/js/tdsy";
  80. import * as wellknown from "wellknown";
  81. import * as turf from "@turf/turf";
  82. import { loadGeoJSON } from "@/utils/MapHelper/help.js";
  83. import * as pick_cockpit_vector from "@/components/Query/clickQuery/pick_cockpit_vector.js";
  84. import CockpitVector from "@/components/Query/clickQuery/CockpitVector.vue";
  85. import startWork from "./startWorkModal.vue";
  86. let BoxCommonVector_entity = null;
  87. let layerSources = {};
  88. export default {
  89. components: {
  90. CockpitVector,
  91. startWork,
  92. },
  93. props: {
  94. islist: {
  95. type: Boolean,
  96. default: true,
  97. },
  98. },
  99. data() {
  100. return {
  101. state: "",
  102. timeout: null,
  103. title: "",
  104. active_dableData: [],
  105. tableData: null,
  106. layersData: {},
  107. scrollTop_index: null,
  108. tempdataLayerId: null,
  109. searchs: [],
  110. searchform: {},
  111. xzqTreeData: [],
  112. isShallow: false,
  113. activeTabs: "base",
  114. details: {},
  115. };
  116. },
  117. methods: {
  118. start(item) {
  119. this.$refs.startWorkRef.Init(item);
  120. },
  121. reset(){
  122. this.searchform= {}
  123. this.word=""
  124. this.init_vector(this.searchform)
  125. },
  126. closeIsShallow() {
  127. this.isShallow = false;
  128. this.details = [];
  129. },
  130. cockpit() {
  131. //驾驶舱矢量数据点选查询
  132. pick_cockpit_vector.init_handler();
  133. },
  134. tableRowClassName({ row, rowIndex }) {
  135. if (rowIndex === this.scrollTop_index) {
  136. return "warning-row";
  137. }
  138. return "";
  139. },
  140. async draw_vector_server(jscType, goitrem) {
  141. let res = await QueryOne({ jscType, id: "4602" });
  142. this.layersData = {
  143. ...res.data,
  144. label: this.title,
  145. // url: "http://192.168.60.2:8090/iserver/services/map-YinZiGongZuoKongJian/rest/maps/ssxf",
  146. };
  147. if (goitrem) this.go(goitrem);
  148. else {
  149. tdsy.addLayer(this.layersData);
  150. store.state.vectorlayerlist.push(this.layersData);
  151. }
  152. },
  153. async Getlayers(mapurl) {
  154. let url = `${mapurl}/layers.json`;
  155. let res = await axios.get(url);
  156. let layers = res.data[0].subLayers.layers;
  157. if (layers.length > 0) {
  158. var params_gh = {
  159. layerName: layers[0].name,
  160. isVisible: true,
  161. displayFilter: `xmmc = '${item["项目名称"]}'`,
  162. };
  163. tdsy.superProvider.setLayerStatusParameters([params_gh]).then((res) => {
  164. if (res) this.goLayer(item.geom, res);
  165. });
  166. }
  167. },
  168. async setLayerStatus(item) {
  169. if (item.did) {
  170. let did_v = `[${Number(item.did) - 1}]`;
  171. this.tempdataLayerId = did_v;
  172. if (tdsy.layersObj[did_v]) {
  173. tdsy.layersObj[did_v].show = true;
  174. // viewer.flyTo(layerSources[did_v], {
  175. // offset: new Cesium.HeadingPitchRange(0, -45),
  176. // });
  177. loadGeoJSON(item.geom, null, { isfly: true }, (data) => {
  178. layerSources[did_v] = data;
  179. });
  180. } else {
  181. this.goLayer(item.geom, did_v);
  182. }
  183. } else {
  184. this.Getlayers(this.layersData.url);
  185. }
  186. },
  187. goLayer(geom, lid) {
  188. if (tdsy.layer) tdsy.layer.show = false;
  189. // tdsy.removelayer();
  190. let layer = viewer.imageryLayers.addImageryProvider(
  191. new Cesium.SuperMapImageryProvider({
  192. url: this.layersData.url,
  193. layersID: lid,
  194. })
  195. );
  196. tdsy.layersObj[lid] = layer;
  197. loadGeoJSON(geom, null, { isfly: true }, (data) => {
  198. layerSources[lid] = data;
  199. });
  200. },
  201. // loadGeoJSON(geojson, id, yanse, isfly = true) {
  202. // let polygon = Cesium.GeoJsonDataSource.load(geojson, {
  203. // clampToGround: true,
  204. // stroke: yanse
  205. // ? Cesium.Color.fromCssColorString(yanse)
  206. // : Cesium.Color.RED.withAlpha(0),
  207. // fill: yanse
  208. // ? Cesium.Color.fromCssColorString(yanse).withAlpha(0.3)
  209. // : Cesium.Color.WHITE.withAlpha(0),
  210. // strokeWidth: isfly ? 5 : 2,
  211. // });
  212. // polygon.then(function (dataSource) {
  213. // viewer.dataSources.add(dataSource);
  214. // layerSources[id] = dataSource;
  215. // if (isfly)
  216. // viewer.flyTo(dataSource, {
  217. // offset: new Cesium.HeadingPitchRange(0, -45),
  218. // });
  219. // });
  220. // },
  221. multiPolygonToPolygons(multiPolygon) {
  222. const polygons = [];
  223. multiPolygon.coordinates.forEach((polygonCoordinates) => {
  224. polygons.push({
  225. type: "Polygon",
  226. coordinates: polygonCoordinates,
  227. });
  228. });
  229. return polygons;
  230. },
  231. // draw_vector_tdgy_gy_jd(data) {
  232. // const that = this;
  233. // data.forEach((res) => {
  234. // res.type = this.title
  235. // if (res.geom) {
  236. // res.geom.coordinates.forEach((res_coordinates) => {
  237. // // let arrayt = [];
  238. // // if (res_coordinates.length == 1) {
  239. // // arrayt = res_coordinates[0]
  240. // // const twoDArray = arrayt;
  241. // // const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
  242. // // tdsy.add(res, oneDArray);
  243. // // } else {
  244. // // // arrayt = res_coordinates
  245. // // }
  246. // // 多面转单面
  247. // // if (res.geom.type == 'MultiPolygon') {
  248. // // let polygons = that.multiPolygonToPolygons(geojson);
  249. // // // 在
  250. // // polygons.forEach((res) => {
  251. // // that.add_viewer_for_vector(res, data);
  252. // // tdsy.add(res, oneDArray);
  253. // // })
  254. // // } else {
  255. // // }
  256. // })
  257. // }
  258. // })
  259. // },
  260. draw_vector_tdgy_gy_jd(data) {
  261. // tdsy.remove();
  262. data.forEach((res, index) => {
  263. res.type = "图斑上图";
  264. res.index = index;
  265. if (res.geom) {
  266. let geojson = res.geom;
  267. if (geojson.type == "MultiPolygon") {
  268. geojson.coordinates.forEach((res) => {
  269. const twoDArray = res[0];
  270. const oneDArray = twoDArray.reduce(
  271. (accumulator, currentValue) => accumulator.concat(currentValue),
  272. []
  273. );
  274. tdsy.add(res, oneDArray);
  275. });
  276. } else {
  277. const twoDArray = geojson.coordinates[0];
  278. const oneDArray = twoDArray.reduce(
  279. (accumulator, currentValue) => accumulator.concat(currentValue),
  280. []
  281. );
  282. tdsy.add(res, oneDArray);
  283. }
  284. }
  285. });
  286. },
  287. close() {
  288. store.setViewerFlagb(true);
  289. tdsy.remove(true);
  290. store.state.vectorData = [];
  291. store.hideToolBar();
  292. },
  293. info() { },
  294. switch_show(flag) {
  295. BoxCommonVector_entity.entities.values.forEach((res) => {
  296. res.show = flag;
  297. });
  298. },
  299. build_data(geojson) {
  300. geojson.coordinates.forEach((res) => {
  301. const twoDArray = res[0];
  302. const oneDArray = twoDArray.reduce(
  303. (accumulator, currentValue) => accumulator.concat(currentValue),
  304. []
  305. );
  306. BoxCommonVector_entity.entities.add({
  307. polygon: {
  308. // 获取指定属性(positions,holes(图形内需要挖空的区域))
  309. hierarchy: {
  310. positions: Cesium.Cartesian3.fromDegreesArrayHeights(
  311. oneDArray.slice(0, -3)
  312. ),
  313. },
  314. // 边框
  315. outline: true,
  316. // 边框颜色
  317. outlineColor: Cesium.Color.RED,
  318. // 边框尺寸
  319. outlineWidth: 10,
  320. // 填充的颜色,withAlpha透明度
  321. material: Cesium.Color.GREEN.withAlpha(0),
  322. // 是否被提供的材质填充
  323. fill: false,
  324. // 恒定高度
  325. height: 1.1,
  326. // 显示在距相机的距离处的属性,多少区间内是可以显示的
  327. // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(1000, 10000000),
  328. // 是否显示
  329. show: true,
  330. // 顺序,仅当`clampToGround`为true并且支持地形上的折线时才有效。
  331. zIndex: 10,
  332. },
  333. });
  334. // 注意:polygon首尾坐标要一致
  335. var polygon = turf.polygon([twoDArray]);
  336. var centroid = turf.centroid(polygon).geometry.coordinates;
  337. viewer.camera.flyTo({
  338. duration: 1,
  339. destination: Cesium.Cartesian3.fromDegrees(
  340. centroid[0],
  341. centroid[1],
  342. 3000
  343. ),
  344. // destination: {
  345. // x: -6283267.004204832,
  346. // y: 28123682.896774407,
  347. // z: 23709669.98539126
  348. // },
  349. orientation: {
  350. heading: 6.149339593573709,
  351. pitch: -1.539825618847483,
  352. roll: 0,
  353. },
  354. });
  355. });
  356. },
  357. go(item) {
  358. if (!item.geom) {
  359. this.$message.warning("缺少定位图斑");
  360. } else {
  361. if (this.cockpit_vector.mapType) {
  362. this.setLayerStatus(item);
  363. } else {
  364. // this.addpolygon(item);
  365. this.tempdataLayerId = "h_" + item.index;
  366. if (layerSources["h_" + item.index]) {
  367. viewer.flyTo(layerSources["h_" + item.index], {
  368. offset: new Cesium.HeadingPitchRange(0, -45),
  369. });
  370. } else {
  371. loadGeoJSON(
  372. item.geom,
  373. "#ff0000",
  374. { isfly: true, sw: 5 },
  375. (data) => {
  376. layerSources["h_" + item.index] = data;
  377. data.entities.values.forEach((entity) => {
  378. entity.properties = item;
  379. });
  380. }
  381. );
  382. }
  383. }
  384. }
  385. store.setVectordataid(item.dataid);
  386. let arr = [];
  387. // BoxCommonVector_entity = new Cesium.CustomDataSource("BoxCommonVector_entity");
  388. // viewer.dataSources.add(BoxCommonVector_entity);
  389. Object.keys(item).forEach((key) => {
  390. arr.push({
  391. name: key,
  392. value: item[key],
  393. });
  394. });
  395. this.scrollTop_index = item.index;
  396. this.details = arr;
  397. this.isShallow = true;
  398. // store.setActiveToolBar(9);
  399. },
  400. addpolygon(item) {
  401. const that = this;
  402. let geojson = item.geom;
  403. if (geojson.type == "MultiPolygon") {
  404. this.build_data(geojson);
  405. } else {
  406. const twoDArray = geojson.coordinates[0];
  407. const oneDArray = twoDArray.reduce(
  408. (accumulator, currentValue) => accumulator.concat(currentValue),
  409. []
  410. );
  411. BoxCommonVector_entity.entities.add({
  412. polygon: {
  413. // 获取指定属性(positions,holes(图形内需要挖空的区域))
  414. hierarchy: {
  415. positions: Cesium.Cartesian3.fromDegreesArrayHeights(
  416. oneDArray.slice(0, -3)
  417. ),
  418. },
  419. // 边框
  420. outline: true,
  421. // 边框颜色
  422. outlineColor: Cesium.Color.RED,
  423. // 边框尺寸
  424. outlineWidth: 10,
  425. // 填充的颜色,withAlpha透明度
  426. material: Cesium.Color.GREEN.withAlpha(0),
  427. // 是否被提供的材质填充
  428. fill: false,
  429. // 恒定高度
  430. height: 1.1,
  431. // 显示在距相机的距离处的属性,多少区间内是可以显示的
  432. // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(1000, 10000000),
  433. // 是否显示
  434. show: true,
  435. // 顺序,仅当`clampToGround`为true并且支持地形上的折线时才有效。
  436. zIndex: 10,
  437. },
  438. });
  439. // 注意:polygon首尾坐标要一致
  440. var polygon = turf.polygon([geojson.coordinates[0]]);
  441. var centroid = turf.centroid(polygon).geometry.coordinates;
  442. viewer.camera.flyTo({
  443. duration: 1,
  444. destination: Cesium.Cartesian3.fromDegrees(
  445. centroid[0],
  446. centroid[1],
  447. 3000
  448. ),
  449. // destination: {
  450. // x: -6283267.004204832,
  451. // y: 28123682.896774407,
  452. // z: 23709669.98539126
  453. // },
  454. orientation: {
  455. heading: 6.149339593573709,
  456. pitch: -1.539825618847483,
  457. roll: 0,
  458. },
  459. });
  460. }
  461. let flag = true;
  462. let time = setInterval(() => {
  463. flag = !flag;
  464. that.switch_show(flag);
  465. }, 500);
  466. setTimeout(() => {
  467. clearInterval(time);
  468. for (var i = 0; i < 10; i++) {
  469. BoxCommonVector_entity.entities.values.forEach((res) => {
  470. BoxCommonVector_entity.entities.remove(res);
  471. });
  472. }
  473. }, 6000);
  474. },
  475. change_witch() {
  476. if (this.word) this.get_searchWord(this.state);
  477. else this.init_vector(this.searchform);
  478. },
  479. // get_search(word) {
  480. // if (word.length == 0) {
  481. // this.active_dableData = this.tableData;
  482. // } else {
  483. // let gy_ju = {
  484. // beginTime: store.state.cockpit_date[0],
  485. // endTime: store.state.cockpit_date[1],
  486. // jscType: store.state.cockpit_vector.tablejscType + '_cx',
  487. // id: '4602',
  488. // val0: word,
  489. // }
  490. // if (this.title == '国有建设用地完成项目' || this.title == '山水工程项目') {
  491. // gy_ju.beginTime = undefined
  492. // gy_ju.endTime = undefined
  493. // }
  494. // Promise.all([QueryList(gy_ju)]).then((values) => {
  495. // values[0].data.map((res) => {
  496. // if (res.geom) {
  497. // res.geom = wellknown.parse(res.geom.split(";")[1]);
  498. // }
  499. // })
  500. // this.active_dableData = values[0].data
  501. // }).catch((error) => {
  502. // console.error(error); // 如果有任何一个 promise 失败,则捕获这个错误
  503. // });
  504. // }
  505. // },
  506. get_searchWord() {
  507. if (this.state.length == 0) {
  508. this.active_dableData = this.tableData;
  509. } else {
  510. // console.log('this.tableData: ', this.tableData);
  511. // this.active_dableData = this.tableData.filter((item) => {
  512. // item.项目名称.indexOf(word) >= 0
  513. // })
  514. this.active_dableData = this.tableData.filter((item) => {
  515. if (item[this.word] && this.state) {
  516. return item[this.word].indexOf(this.state) >= 0;
  517. }
  518. return false;
  519. });
  520. }
  521. },
  522. async init_vector(params) {
  523. const that = this;
  524. let obj = {
  525. jscType: store.state.cockpit_vector.tablejscType,
  526. beginTime: store.state.cockpit_date[0],
  527. endTime: store.state.cockpit_date[1],
  528. id: store.state.cockpit_region.id,
  529. ...params,
  530. };
  531. if (this.title == "国有建设用地完成项目" || this.title == "山水工程项目") {
  532. obj.beginTime = undefined;
  533. obj.endTime = undefined;
  534. }
  535. if (this.title == "进出平衡") {
  536. (obj.jscType = "jsc_gdbh_jcph_zbmc"),
  537. (obj.val2 = 0),
  538. (obj.val1 = 50000),
  539. (obj.beginTime = store.state.cockpit_date[1].slice(0, 4)),
  540. (obj.endTime = undefined);
  541. }
  542. if (this.title == "土地收储计划项目") {
  543. obj.beginTime = undefined;
  544. obj.endTime = undefined;
  545. }
  546. let data = await QueryList(obj);
  547. data.data.map((res) => {
  548. if (res.geom) {
  549. res.geom = wellknown.parse(res.geom.split(";")[1]);
  550. }
  551. });
  552. this.active_dableData = data.data;
  553. this.tableData = data.data;
  554. },
  555. },
  556. computed: {
  557. cockpit_vector() {
  558. return store.state.cockpit_vector;
  559. },
  560. computed_vectorData() {
  561. return store.state.vectorData;
  562. },
  563. },
  564. watch: {
  565. cockpit_vector(newVal, oldVal) {
  566. this.title = newVal.title;
  567. this.word = newVal.word;
  568. this.searchs = newVal.searchs;
  569. this.searchform = newVal.searchform;
  570. this.state = "";
  571. this.isShallow = false;
  572. if (newVal.goitem) {
  573. this.draw_vector_server(newVal.mapType, newVal.goitem);
  574. } else if (newVal.tableData && newVal.tableData.length > 0) {
  575. this.active_dableData = []; //防止重复点击tableData不刷新
  576. this.active_dableData = newVal.tableData;
  577. this.tableData = newVal.tableData;
  578. // this.init_vector()
  579. } else if (this.title) {
  580. this.init_vector();
  581. }
  582. },
  583. active_dableData(newVal, oldVal) {
  584. if (this.cockpit_vector.mapType)
  585. this.draw_vector_server(this.cockpit_vector.mapType);
  586. // else this.draw_vector_tdgy_gy_jd(newVal);
  587. else {
  588. newVal.forEach((res, index) => {
  589. res.type = "图斑上图";
  590. res.index = index;
  591. if (res.geom)
  592. loadGeoJSON(res.geom, "#55A1E3", {}, (data) => {
  593. layerSources[index] = data;
  594. data.entities.values.forEach((entity) => {
  595. entity.properties = res;
  596. });
  597. });
  598. });
  599. }
  600. },
  601. tempdataLayerId(newVal, oldVal) {
  602. if (oldVal && tdsy.layersObj[oldVal]) {
  603. tdsy.layersObj[oldVal].show = false;
  604. } else if (tdsy.layersObj[newVal]) {
  605. // tdsy.layersObj[newVal].show = true;
  606. }
  607. if (oldVal && layerSources[oldVal]) {
  608. try {
  609. viewer.dataSources.remove(layerSources[oldVal]);
  610. } catch (error) {
  611. console.log(error);
  612. }
  613. layerSources[oldVal] = null;
  614. }
  615. },
  616. computed_vectorData(newVal, oldVal) {
  617. this.details = newVal;
  618. this.isShallow = true;
  619. newVal.forEach((res) => {
  620. if (res.name == "index") {
  621. const TableRows = this.$refs.singleTable.bodyWrapper.querySelectorAll(
  622. ".el-table__body tbody .el-table__row"
  623. );
  624. let scrollTop = 0;
  625. for (let i = 0; i < TableRows.length; i++) {
  626. if (i === res.value) {
  627. break;
  628. }
  629. scrollTop += TableRows[i].offsetHeight;
  630. }
  631. this.$refs.singleTable.bodyWrapper.scrollTop = scrollTop;
  632. this.scrollTop_index = res.value;
  633. }
  634. });
  635. },
  636. },
  637. mounted() {
  638. const that = this;
  639. this.$nextTick(() => {
  640. BoxCommonVector_entity = new Cesium.CustomDataSource(
  641. "BoxCommonVector_entity"
  642. );
  643. viewer.dataSources.add(BoxCommonVector_entity);
  644. });
  645. },
  646. };
  647. </script>
  648. <style lang="scss" scoped>
  649. @import "../../../complianceAnalysis//ghzc.scss";
  650. div::-webkit-scrollbar {
  651. width: 9px;
  652. height: 19px;
  653. }
  654. .sm-panel {
  655. width: 400px;
  656. height: 700px;
  657. // z-index: 999999;
  658. }
  659. .CockpitVectorBox {
  660. top: 0px !important;
  661. }
  662. .BoxCommonVector {
  663. width: 100%;
  664. height: 100%;
  665. position: absolute;
  666. left: 0rem;
  667. top: 0rem;
  668. }
  669. .innerContainerVector {
  670. width: 430px;
  671. height: 760px; //calc(100% - 20px);
  672. position: absolute;
  673. top: 28px;
  674. z-index: 99;
  675. background-image: url("/static/images/ghzc/内容框.png");
  676. background-size: 100% 100%;
  677. border-top-right-radius: 15px;
  678. .searchDiv {
  679. width: 100%;
  680. display: flex;
  681. justify-content: space-between;
  682. margin-right: 10px;
  683. .sidiv {
  684. // min-width: calc(50% - 10px);
  685. height: 40px;
  686. margin-bottom: 5px;
  687. margin-right: 5px;
  688. display: inline-block;
  689. }
  690. }
  691. .shownum {
  692. line-height: 20px;
  693. padding-top: 10px;
  694. padding-left: 5px;
  695. background: rgba(10, 25, 38, 1) !important;
  696. }
  697. .search {
  698. // margin: 2rem;
  699. }
  700. /deep/ .el-input {
  701. display: inline-block;
  702. }
  703. /deep/ .el-input__inner {
  704. // background: transparent !important;
  705. color: white !important;
  706. background: rgba(10, 25, 38, 0.5);
  707. border-color: #5ecef09a;
  708. // color: #64daff;
  709. // font-size: 12px;
  710. }
  711. }
  712. .leftPaneVector {
  713. left: 20px;
  714. .el-icon-close {
  715. width: 22px;
  716. height: 22px;
  717. color: #fff !important;
  718. background-color: #335f87;
  719. line-height: 23px;
  720. padding: 0 5px;
  721. border-radius: 4px;
  722. top: 10px !important;
  723. position: absolute;
  724. right: 10px;
  725. }
  726. .PangetitleVector {
  727. box-sizing: border-box;
  728. width: 100%;
  729. height: 42px;
  730. background: url("/static/images/overview/titlebox.gif") no-repeat !important;
  731. background-size: 100% 100% !important;
  732. line-height: 35px;
  733. font-size: 14px;
  734. padding-left: 15px;
  735. // display: flex;
  736. position: relative;
  737. overflow: hidden;
  738. }
  739. .pange_textVector {
  740. font-size: 14px !important;
  741. font-family: "HarmonyOS Sans, HarmonyOS Sans";
  742. font-weight: bold;
  743. font-size: 18px;
  744. color: #ffffff;
  745. margin-left: 30px;
  746. }
  747. .clearBtn {
  748. cursor: pointer;
  749. // background-color: #3f94f53f;
  750. // border: 1px solid #3f93f5;
  751. color: #b6e0ff;
  752. padding: 5px 15px;
  753. display: inline-block;
  754. margin-left: 15px;
  755. &:hover {
  756. font-weight: bold;
  757. }
  758. }
  759. }
  760. /deep/.el-input__inner:focus {
  761. border: 1px solid #1fb1ef;
  762. }
  763. /deep/.el-input__inner {
  764. border: 1px solid rgba(10, 25, 38, 0.5);
  765. background: rgba(10, 25, 38, 0.5);
  766. border-radius: 18px;
  767. height: 30px;
  768. color: white;
  769. line-height: 30px;
  770. // background: #ffffff3b;
  771. }
  772. /deep/.el-input__icon {
  773. line-height: 30px;
  774. border-radius: 0 18px 18px 0;
  775. cursor: pointer;
  776. }
  777. /deep/.el-input__suffix {
  778. background: #1fb1ef;
  779. right: 1px;
  780. padding: 0 5px;
  781. border-radius: 0 18px 18px 0;
  782. opacity: 0.8;
  783. color: #fff;
  784. }
  785. /deep/ .el-autocomplete-suggestion {
  786. margin-top: 8px;
  787. border-radius: 6px;
  788. border: 1px solid #198ec0;
  789. background: rgba(10, 25, 38, 0.9);
  790. color: rgba(25, 142, 192, 1);
  791. .popper__arrow {
  792. top: -8px;
  793. border-bottom-color: rgba(31, 177, 239, 1);
  794. }
  795. .popper__arrow::after {
  796. border-bottom-color: rgba(0, 80, 111, 0.9);
  797. }
  798. .el-autocomplete-suggestion__wrap {
  799. padding: 2px;
  800. }
  801. }
  802. /deep/ .el-autocomplete-suggestion li {
  803. color: #ffffff;
  804. }
  805. /deep/ .el-autocomplete-suggestion li:hover {
  806. background-color: rgba(8, 162, 223, 0.8);
  807. border-radius: 6px;
  808. }
  809. /deep/ .el-table tr {
  810. background: rgba(10, 25, 38, 0.5) !important;
  811. }
  812. /deep/ .el-table td.el-table__cell,
  813. .el-table th.el-table__cell.is-leaf {
  814. background: rgba(10, 25, 38, 0.5) !important;
  815. border-bottom: 0px solid #ebeef5;
  816. }
  817. /deep/.el-table th.el-table__cell {
  818. background: rgba(10, 25, 38, 0.5) !important;
  819. }
  820. .el-table {
  821. color: #fff;
  822. background: rgba(10, 25, 38, 0.5) !important;
  823. }
  824. /deep/ .el-table__fixed-right::before,
  825. .el-table__fixed::before {
  826. background: rgba(10, 25, 38, 0.9) !important;
  827. }
  828. /deep/ .el-table__fixed-right-patch {
  829. background: rgba(10, 25, 38, 0.9) !important;
  830. }
  831. /deep/ .el-table--border::after,
  832. .el-table--group::after,
  833. .el-table::before {
  834. background: rgba(10, 25, 38, 0) !important;
  835. }
  836. /deep/ .el-table .warning-row {
  837. background: rgb(102, 177, 255) !important;
  838. }
  839. .sm-panel-header {
  840. /deep/ .el-icon-close:before {
  841. position: absolute;
  842. top: 10px;
  843. right: 10px;
  844. font-size: larger;
  845. font-weight: bold;
  846. &:hover {
  847. color: aqua;
  848. }
  849. }
  850. }
  851. </style>