basePlanEditer.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. <template>
  2. <div class="baseTopo" id="baseTopo" ref="baseTopo">
  3. <topoTooltip
  4. v-show="showTooltip"
  5. class="topoTooltip-box"
  6. ref="topoTooltip"
  7. @closeTooltip="showTooltip = false"
  8. :havItem="havItem"
  9. ></topoTooltip>
  10. <canvas style="border: none; outline: medium" id="persagy_plan" :width="canvasWidth" :height="canvasHeight" tabindex="0"></canvas>
  11. </div>
  12. </template>
  13. <script>
  14. import { SFloorParser, getJsonz } from "@persagy-web/big";
  15. import { SImageItem, SImageShowType } from "@persagy-web/graph";
  16. import { SPlanView, SPlanParser, SPlanScene, SPlanEquipment } from "@/lib";
  17. import { SBaseEquipment } from "@/components/editClass/big-edit";
  18. import topoTooltip from "./topoTooltip.vue";
  19. import { mapState, mapMutations } from "vuex";
  20. import base64ToFile from "@/utils/base64ToFile";
  21. import { v1 as uuidv1 } from "uuid";
  22. import bus from "@/bus/bus";
  23. import { saveGroup } from "@/api/editer";
  24. import { publishGraph } from "@/api/home";
  25. import { planerSave, planerRead, pubPlanerRead } from "@/api/labsl";
  26. import { equipQuery } from "@/api/equipcomponent";
  27. import { imgBaseUrl, imgServeUpload } from "@/api/imageservice";
  28. export default {
  29. components: { topoTooltip },
  30. props: {
  31. // 1.底图颜色
  32. baseMapStyle: {
  33. type: Object,
  34. default: () => {
  35. return {
  36. default: {
  37. strokeColor: "#F0F3F7",
  38. fillColor: "#F0F3F7",
  39. lineWidth: 1,
  40. effect: {},
  41. },
  42. };
  43. },
  44. required: false,
  45. },
  46. // 设备默认样式
  47. defaultEquipStyle: {
  48. type: Object,
  49. default: () => {
  50. return {
  51. color: "#1F2429",
  52. size: 12,
  53. url: "tognyong2020102700.svg",
  54. formula: "",
  55. };
  56. },
  57. },
  58. },
  59. data() {
  60. return {
  61. scene: null, //场景
  62. view: null, //视图
  63. canvasWidth: 700, //画布宽
  64. canvasHeight: 700, //画布高
  65. havItem: false, //右击是否选中item
  66. showTooltip: false, //是否显示tooltip
  67. planContent: {}, // 读图后存储图所有数据
  68. autoSave: null, // 自动保存定时器
  69. };
  70. },
  71. computed: {
  72. ...mapState(["editCmd", "legendObj", "graphId", "id", "state", "projectId", "floorMap", "equipItemList", "buildingId", "floorId", "objExtInfo"]),
  73. },
  74. mounted() {
  75. // 获取 canvas 的宽高
  76. this.canvasWidth = this.$refs.baseTopo.offsetWidth;
  77. this.canvasHeight = this.$refs.baseTopo.offsetHeight - 10;
  78. // 初始化场景类
  79. this.view = new SPlanView("persagy_plan");
  80. if (this.scene) this.view.scene = this.scene;
  81. this.init();
  82. // 初始化bus绑定事件
  83. this.initBusEvent();
  84. // 右键事件
  85. this.scene.getItem = this.onContextMenu;
  86. this.scene.emitChoice = this.emitChoice;
  87. //左键事件
  88. this.scene.vueOnMouseDown = this.vueOnMouseDown;
  89. // 屏蔽浏览器右键功能(防止与编辑器右键交互重合)
  90. document.getElementById("baseTopo").oncontextmenu = function (e) {
  91. return false;
  92. };
  93. // 2分钟自动保存
  94. this.autoSave = setInterval(() => {
  95. this.autoSaveTopo();
  96. }, 120000);
  97. },
  98. methods: {
  99. ...mapMutations([
  100. "SETCHOICELEHEND",
  101. "SETLEGENDOBJ",
  102. "SETPROJECT",
  103. "SETCATEGROY",
  104. "SETISPUB",
  105. "ADDEQUIPITEM",
  106. "EDITEQUIPITEM",
  107. "SETVERSION",
  108. "ADDEQUIP",
  109. "DELETEQUIP",
  110. "INITSTYLE",
  111. "INITOBJEXTINFO",
  112. ]),
  113. // 清空画布
  114. clearImg() {
  115. this.scene = new SPlanScene();
  116. this.scene.imgServeUrl = imgBaseUrl;
  117. this.scene.emitChoice = this.emitChoice;
  118. this.scene.clearCmdStatus = this.clearCmdStatus;
  119. this.scene.vueOnMouseDown = this.vueOnMouseDown;
  120. if (this.view) {
  121. this.view.update();
  122. }
  123. },
  124. // 初始化
  125. init() {
  126. this.clearImg();
  127. this.view ? (this.view.scene = this.scene) : null;
  128. // 判断是否有楼层底图,有则获取数据并解析
  129. if (this.floorMap) this.getMapBlob();
  130. // 读取平面图数据
  131. this.readPlanMsg();
  132. },
  133. // 请求获取地图的压缩包
  134. getMapBlob() {
  135. if (this.floorMap.includes("png") || this.floorMap.includes("jpg")) {
  136. const url = `/image-service/common/image_get?systemId=dataPlatform&key=${this.floorMap}`;
  137. this.getImage(url);
  138. } else {
  139. const url = `/image-service/common/file_get?systemId=revit&key=${this.floorMap}`;
  140. getJsonz(url).then((data) => {
  141. // 解析数据并放入压缩包中
  142. this.parserData(data);
  143. });
  144. }
  145. },
  146. // 获取图片
  147. getImage(url) {
  148. const imgItem = new SImageItem(null, url);
  149. imgItem.showType = SImageShowType.AutoFit;
  150. imgItem.connect("imgLoadOver", this, () => {
  151. // 画板是否可拖动;
  152. this.scene.addItem(imgItem);
  153. this.view.DragMove = true;
  154. this.view.fitSceneToView();
  155. });
  156. },
  157. // 解析数据并注入 scene 类中
  158. parserData(data) {
  159. const parser = new SFloorParser();
  160. parser.parseData(data);
  161. parser.spaceList.forEach((t) => {
  162. //是否显示空间
  163. // t.visible = this.isSpaceSelectable;
  164. //设置样式
  165. Object.assign(t, this.baseMapStyle.default);
  166. //是否展示名称
  167. // t.showBaseName = true;
  168. // 是否可选
  169. // t.selectable = true;
  170. // t.connect("onMouseDown", this, this.clickSpaceItem);
  171. // 添加图例
  172. this.scene.addItem(t);
  173. });
  174. parser.wallList.forEach((t) => {
  175. // 是否显示
  176. // t.visible = this.isShowWall;
  177. // 是否可选
  178. // t.selectable = true;
  179. this.scene.addItem(t);
  180. });
  181. parser.virtualWallList.forEach((t) => {
  182. // 是否显示
  183. // t.visible = this.isShowVirtualWall;
  184. // 是否可选
  185. // t.selectable = true;
  186. this.scene.addItem(t);
  187. });
  188. parser.doorList.forEach((t) => {
  189. // 是否显示
  190. // t.visible = this.isShowDoor;
  191. // 是否可选
  192. // t.selectable = true;
  193. this.scene.addItem(t);
  194. });
  195. parser.columnList.forEach((t) => {
  196. // 是否显示
  197. // t.visible = this.isShowColumn;
  198. // 是否可选
  199. // t.selectable = true;
  200. this.scene.addItem(t);
  201. });
  202. parser.casementList.forEach((t) => {
  203. // 是否显示
  204. // t.visible = this.isShowWindow;
  205. // 是否可选
  206. // t.selectable = true;
  207. this.scene.addItem(t);
  208. });
  209. // 画板是否可拖动
  210. this.view.DragMove = true;
  211. this.view.fitSceneToView();
  212. },
  213. // 恢复命令状态
  214. clearCmdStatus() {
  215. this.SETCHOICELEHEND("");
  216. this.SETLEGENDOBJ(null);
  217. },
  218. // 右键获取item
  219. onContextMenu(item, [event]) {
  220. this.showTooltip = true;
  221. if (item) {
  222. this.havItem = true;
  223. } else {
  224. this.havItem = false;
  225. }
  226. const doms = document.getElementsByClassName("topoTooltip-box")[0];
  227. doms.style.left = event.offsetX + "px";
  228. doms.style.top = event.offsetY + "px";
  229. },
  230. // 左键事键
  231. vueOnMouseDown(e) {
  232. // 关闭tooltip
  233. this.showTooltip = false;
  234. },
  235. // 选中后的回调函数
  236. emitChoice(itemList) {
  237. bus.$emit("emitChoice", itemList);
  238. },
  239. //初始化bus绑定事件
  240. initBusEvent() {
  241. // 改变样式
  242. bus.$off("updateStyle");
  243. bus.$on("updateStyle", (type, val) => {
  244. this.scene.updateStyle(type, val);
  245. });
  246. // 撤销
  247. bus.$off("topoUndo");
  248. bus.$on("topoUndo", (val) => {
  249. this.scene.undo();
  250. });
  251. // 重做
  252. bus.$off("topoRedo");
  253. bus.$on("topoRedo", (val) => {
  254. this.scene.redo();
  255. });
  256. // 删除
  257. bus.$off("deleteItem");
  258. bus.$on("deleteItem", (val) => {
  259. this.scene.deleteItem([val]);
  260. this.EDITEQUIPITEM();
  261. });
  262. // 复制
  263. bus.$off("copy");
  264. bus.$on("copy", (val) => {
  265. this.scene.copy();
  266. });
  267. // 粘贴
  268. bus.$off("paste");
  269. bus.$on("paste", (val) => {
  270. this.scene.paste();
  271. });
  272. // 保存
  273. bus.$off("saveTopo");
  274. bus.$on("saveTopo", (val) => {
  275. this.saveTopoDraft();
  276. });
  277. // 设置实例置顶置底
  278. bus.$off("setOrder");
  279. bus.$on("setOrder", (val) => {
  280. this.scene.setOrder(val);
  281. });
  282. // 设置实例status状态
  283. bus.$off("setItemStatus");
  284. bus.$on("setItemStatus", (val) => {
  285. this.scene.setItemStatus();
  286. });
  287. // 下载图片
  288. bus.$off("saveTopoImg");
  289. bus.$on("saveTopoImg", () => {
  290. // 隐藏选择器
  291. this.scene.selectContainer.clear();
  292. this.view.saveImageSize(`${this.planContent.name}.png`, "png", this.canvasWidth, this.canvasHeight);
  293. });
  294. // 发布图片
  295. bus.$off("issueTopo");
  296. bus.$on("issueTopo", () => {
  297. this.saveTopoDraft().then(() => {
  298. this.issueDraft();
  299. });
  300. });
  301. // 手动添加设备实例
  302. bus.$off("addEquipment");
  303. bus.$on("addEquipment", (val) => {
  304. this.addEquipmentList(val);
  305. });
  306. // 更改设备信息点
  307. bus.$off("changeEquipMsgPoint");
  308. bus.$on("changeEquipMsgPoint", (val) => {
  309. this.scene.changeEquipMsgPoint(val);
  310. });
  311. // 选中item
  312. bus.$off("chioceItem");
  313. bus.$on("chioceItem", (item) => {
  314. this.scene.toggleItem(item);
  315. });
  316. },
  317. // 读取拓扑图
  318. readPlanMsg() {
  319. const obj = {
  320. graphId: this.graphId,
  321. id: this.id,
  322. };
  323. if (this.state === "Publish") {
  324. // 已发布
  325. pubPlanerRead(obj).then((res) => {
  326. this.getDataSuc(res);
  327. });
  328. } else {
  329. planerRead(obj).then((res) => {
  330. this.getDataSuc(res);
  331. });
  332. }
  333. },
  334. // 读图成功回调
  335. getDataSuc(res) {
  336. // let anchorList = []; //保存锚点对象
  337. if (res.result == "failure") return;
  338. this.SETCATEGROY(res.content);
  339. this.planContent = res.content;
  340. const parse = new SPlanParser();
  341. parse.parseData(res.content.elements);
  342. parse.markers.forEach((item) => {
  343. item.selectable = true;
  344. item.moveable = true;
  345. item.connect("finishCreated", this.scene, this.scene.finishCreated);
  346. item.connect("onContextMenu", this, this.scene.getItem);
  347. // 判断如果是图,需要拼接路径
  348. if (item.data.properties.type == "BaseImage") {
  349. if (item.data.style?.default?.url) {
  350. item.url = imgBaseUrl + item.data.style.default.url;
  351. }
  352. }
  353. this.scene.addItem(item);
  354. });
  355. // 保存设备位置信息
  356. if (res.content.elements.objExtInfo?.length) {
  357. const objExtInfo = {};
  358. if (res.content.elements.objExtInfo?.length) {
  359. res.content.elements.objExtInfo.forEach((item) => {
  360. objExtInfo[item.id] = item;
  361. });
  362. }
  363. this.INITOBJEXTINFO(objExtInfo);
  364. }
  365. // 保存样式信息
  366. if (res.content.style) {
  367. // 拼接设备默认样式
  368. res.content.style.defaultEquipStyle = this.defaultEquipStyle;
  369. this.INITSTYLE(res.content.style);
  370. }
  371. // parse.nodes.forEach((item) => {
  372. // item.connect("finishCreated", this.scene, this.scene.finishCreated);
  373. // item.connect("onContextMenu", this, this.scene.getItem);
  374. // this.scene.addItem(item);
  375. // // 如果为设备则存于vuex中便于联动
  376. // if (item instanceof SBaseEquipment) {
  377. // anchorList = anchorList.concat(item.anchorList);
  378. // this.ADDEQUIPITEM(item);
  379. // }
  380. // });
  381. // 管线元素最后添加
  382. // parse.relations.forEach((t) => {
  383. // // 设置锚点
  384. // if (t.anchor1Id) {
  385. // let startAnc = null;
  386. // anchorList.forEach((aItem) => {
  387. // if (aItem.id == t.anchor1Id) {
  388. // startAnc = aItem;
  389. // }
  390. // });
  391. // if (startAnc) {
  392. // startAnc.isConnected = true;
  393. // startAnc.parent?.connect("changePos", t, t.changePos);
  394. // t.startAnchor = startAnc || null;
  395. // console.log("startAnc", startAnc);
  396. // }
  397. // }
  398. // if (t.anchor12d) {
  399. // let endAnc = null;
  400. // anchorList.forEach((aItem) => {
  401. // if (aItem.id == t.anchor12d) {
  402. // endAnc = aItem;
  403. // }
  404. // });
  405. // if (endAnc) {
  406. // endAnc.isConnected = true;
  407. // endAnc.parent?.connect("changePos", t, t.changePos);
  408. // t.endAnchor = endAnc || null;
  409. // }
  410. // }
  411. // t.connect("finishCreated", this.scene, this.scene.finishCreated);
  412. // t.connect("onContextMenu", this, this.scene.getItem);
  413. // this.scene.addItem(t);
  414. // });
  415. if (res.content.ruleList?.length) {
  416. res.content.ruleList.forEach(async (rule) => {
  417. if (rule.commond && rule.commond === "query") {
  418. if (rule.returnType && rule.returnType === "equip") {
  419. const params = {...rule.params, buildingId: this.buildingId, floorId: this.floorId}
  420. const res = await equipQuery(params);
  421. this.mergeEquipData(res.content);
  422. } else if (rule.returnType && rule.returnType === "zone") {
  423. setTimeout(() => {
  424. console.error("请求空间数据");
  425. }, 1000);
  426. } else if (rule.returnType && rule.returnType === "equipGroup") {
  427. setTimeout(() => {
  428. console.error("请求设备组数据");
  429. }, 1000);
  430. }
  431. } else if (rule.commond && rule.commond === "delete") {
  432. /**
  433. * 暂未实现
  434. */
  435. console.error("删除命令!!!", rule);
  436. }
  437. });
  438. }
  439. },
  440. // 解析设备数据
  441. mergeEquipData(equipList) {
  442. equipList.forEach((equip) => {
  443. if (!this.equipItemList[equip.id]) {
  444. if (this.objExtInfo[equip.id]) {
  445. equip = {...this.objExtInfo[equip.id], ...equip}
  446. }
  447. if (!equip.pos) { //如果未维护设备在图中的坐标
  448. if (equip.locationJson) {
  449. // 判断设备是否维护BIM坐标
  450. equip.pos = equip.locationJson;
  451. } else {
  452. // 否则显示默认坐标位置
  453. equip.pos = { x: 0, y: 0, z: 0 };
  454. }
  455. }
  456. const equipItem = new SPlanEquipment(null, equip);
  457. equipItem.selectable = true;
  458. equipItem.moveable = true;
  459. equipItem.connect("finishCreated", this.scene, this.scene.finishCreated);
  460. equipItem.connect("onContextMenu", this, this.scene.getItem);
  461. if (this.style[equip.id]) {
  462. Object.assign(equipItem, this.style[equip.id]);
  463. } else if (this.style[equip.classCode]) {
  464. Object.assign(equipItem, this.style[equip.calssCode]);
  465. } else {
  466. Object.assign(equipItem, this.style["defaultEquipStyle"]);
  467. }
  468. this.scene.addItem(equipItem);
  469. this.equipItemList[equip.id] = equipItem;
  470. }
  471. });
  472. },
  473. // 生成快照并保存草稿
  474. saveTopoDraft() {
  475. const uuid = uuidv1();
  476. return Promise.all([this.generateSnap(uuid), this.saveDraft(uuid)]).then((vals) => {
  477. // 重设版本号
  478. this.SETVERSION(vals[1].version);
  479. this.$message.success(`保存成功${vals[1].version}`);
  480. });
  481. },
  482. // 生成快照
  483. generateSnap(uuid) {
  484. // 隐藏选择器
  485. this.scene.selectContainer.clear();
  486. setTimeout(() => {
  487. // base64数据
  488. const data = this.view.imageUrl("png");
  489. // 根据base64生成file
  490. const file = base64ToFile(data);
  491. const reader = new FileReader();
  492. const fileType = file.name.split(".");
  493. const imgType = fileType[fileType.length - 1];
  494. return new Promise((resolve, reject) => {
  495. reader.onloadend = function () {
  496. // 这个事件在读取结束后,无论成功或者失败都会触发
  497. if (reader.error) {
  498. console.log("reader error", reader.error);
  499. reject(reader.error);
  500. } else {
  501. // 构造 XMLHttpRequest 对象,发送文件 Binary 数据
  502. const xhr = new XMLHttpRequest();
  503. xhr.open(
  504. "POST",
  505. `/image-service/common/image_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true&key=${uuid}.${imgType}`
  506. );
  507. xhr.send(reader.result);
  508. xhr.onreadystatechange = function () {
  509. if (xhr.readyState == 4) {
  510. if (xhr.status == 200) {
  511. resolve(xhr);
  512. }
  513. }
  514. };
  515. }
  516. };
  517. reader.readAsArrayBuffer(file);
  518. });
  519. }, 80);
  520. },
  521. // 保存草稿
  522. saveDraft(uuid) {
  523. const elements = this.scene.save();
  524. const obj = {
  525. elements,
  526. // name: this.planContent.name, // 名称
  527. // categoryId: this.categoryId, // 图分类ID
  528. // projectId: this.projectId, // 项目ID
  529. // label: this.planContent.label,
  530. // buildingId: "1", // 建筑ID
  531. // floorId: "1", // 楼层id
  532. // note: "1", // 图说明
  533. pic: `${uuid}.png`,
  534. graphId: this.graphId,
  535. id: this.id,
  536. // version: this.version,
  537. };
  538. return new Promise((resolve, reject) => {
  539. saveGroup(obj).then((res) => {
  540. // 如果是从已发布跳转过来
  541. if (this.state === "Publish") {
  542. // 设置发布状态为 未发布
  543. this.SETSTATE("Draft");
  544. const gid = res.entityList[0].graphId;
  545. const id = res.entityList[0].id;
  546. // 重设图id 与 id
  547. this.SETPROJECT({ graphId: gid, id: id });
  548. // 修改url参数
  549. this.$router.push({
  550. name: "Editer",
  551. query: {
  552. graphId: gid,
  553. id: id,
  554. state: "Draft",
  555. },
  556. });
  557. }
  558. resolve(res.entityList[0]);
  559. });
  560. });
  561. },
  562. // 自动保存
  563. autoSaveTopo() {
  564. if (this.scene && this.scene.undoStack.isChange) {
  565. this.saveTopoDraft().then(() => {
  566. this.scene.undoStack.isChange = false;
  567. });
  568. }
  569. },
  570. // 发布草稿
  571. issueDraft() {
  572. const pa = {
  573. graphId: this.graphId,
  574. id: this.id,
  575. };
  576. publishGraph(pa).then((res) => {
  577. this.$message.success("发布成功");
  578. });
  579. },
  580. // 手动添加设备
  581. addEquipmentList(list) {
  582. const parse = new SPlanParser();
  583. list.forEach((item, i) => {
  584. const x = (i + 1) * 100 + 300;
  585. const baseUrl = "/image-service/common/image_get?systemId=dataPlatform&key=";
  586. const url = baseUrl + item.url;
  587. const svg2Base = "";
  588. const EquipHeight = this.canvasHeight - 100;
  589. const data = {
  590. nodeId: uuidv1(),
  591. /** 名称 */
  592. name: "基础设备",
  593. /** 返回物理世界对象 ID 列表 */
  594. attachObjectIds: [item.id],
  595. size: { width: 50, height: 50 },
  596. /** 图标 (Image),线类型 (Line) */
  597. type: "Image",
  598. /** 位置 */
  599. pos: { x: x, y: 100 },
  600. /** 由应用自己定义 */
  601. properties: {
  602. type: "BaseEquipment",
  603. classCode: item.classCode, // 设备类型
  604. localId: item.localId, // 本地编码
  605. localName: item.localName, //本地名称
  606. },
  607. style: {
  608. default: {
  609. strokecolor: "#c0ccda",
  610. url: url,
  611. base64Url: "",
  612. },
  613. },
  614. };
  615. parse.addNode(data);
  616. });
  617. // 添加到 scence 中
  618. parse.nodes.forEach((item) => {
  619. item.connect("finishCreated", this.scene, this.scene.finishCreated);
  620. item.connect("onContextMenu", this, this.scene.getItem);
  621. this.scene.addItem(item);
  622. // 如果为设备则存于vuex中便于联动
  623. if (item instanceof SBaseEquipment) {
  624. this.ADDEQUIPITEM(item);
  625. }
  626. });
  627. },
  628. },
  629. watch: {
  630. editCmd(val) {
  631. console.trace(val);
  632. if (this.scene) {
  633. // 设置当前编辑状态
  634. this.scene.editCmd = val;
  635. }
  636. },
  637. legendObj: {
  638. handler: function (val, oldVal) {
  639. this.scene.legendObj = val;
  640. },
  641. deep: true,
  642. },
  643. },
  644. beforeDestroy() {
  645. clearInterval(this.autoSave);
  646. },
  647. };
  648. </script>
  649. <style lang="less" scoped>
  650. .baseTopo {
  651. width: 100%;
  652. height: 100%;
  653. position: relative;
  654. .topoTooltip-box {
  655. position: absolute;
  656. left: 0;
  657. top: 0;
  658. }
  659. }
  660. </style>