BoxCommonVector.vue 26 KB

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