drafts.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  1. <template>
  2. <div id="drafts">
  3. <div class="tit">草稿箱</div>
  4. <div class="conent">
  5. <div class="left-nav">
  6. <Tree :data="treeData" @change="change" v-if="treeData.length"></Tree>
  7. <div v-else style="text-align: center;margin-top: 20px;">暂无数据</div>
  8. <!-- <el-tree ref="tree" :data="treeData" :props="defaultProps" @node-click="handleNodeClick" node-key="id" :expand-on-click-node="false"-->
  9. <!-- :current-node-key="currentNodekey"-->
  10. <!-- :default-expanded-keys="expandedkeys">-->
  11. <!-- <span class="span-ellipsis" slot-scope="{ node, data }">-->
  12. <!-- <span :title="node.label">{{ node.label }}</span>-->
  13. <!-- </span>-->
  14. <!-- </el-tree>-->
  15. </div>
  16. <div class="conent-right">
  17. <div class="conent-tit">
  18. <div class="tit-left" v-if="floorName">{{systemName}}-{{floorName}}</div>
  19. <div class="tit-right">
  20. <a-button @click="modalStatusTip=!modalStatusTip;grouptype='checked';grouptype1='uncheck';" :disabled="!floorName">删除</a-button>
  21. <!-- <a-button @click="deleteBtn" :disabled="!floorName">删除</a-button>-->
  22. <a-button @click="publishBtn" :disabled="!floorName">发布</a-button>
  23. <a-button type="primary" @click="goToEditer" :disabled="!floorName">编辑</a-button>
  24. </div>
  25. </div>
  26. <div class="concent-bottom">
  27. <div class="map">
  28. <div class="canvas-container" ref="draftsCanvas">
  29. <div id="fengMap"></div>
  30. <canvas
  31. id="canvas"
  32. :width="canvasWidth"
  33. :height="canvasHeight"
  34. ref="canvas"
  35. tabindex="0"
  36. ></canvas>
  37. </div>
  38. </div>
  39. <div v-show="!legend" class="legend-btn" @click="legend = !legend">
  40. <a-icon type="left" style="color: #8D9399;font-size: 10px" />
  41. </div>
  42. <div v-show="legend" class="legend-btn legend-btn-close" @click="legend = !legend">
  43. <a-icon type="right" style="color: #8D9399;font-size: 10px" />
  44. </div>
  45. <div class="legend" v-if="legend">
  46. <div
  47. style="font-size:14px;color: #1F2429;padding-left: 12px;height: 40px;line-height: 40px"
  48. >可能需要补充的图例</div>
  49. <a-table
  50. v-loading="legendLoading"
  51. :columns="columns"
  52. :rowKey="(record,index)=>{return index}"
  53. :data-source="legendData"
  54. size="middle"
  55. :pagination="false"
  56. >
  57. <div slot="Url" slot-scope="text,record">
  58. <img
  59. v-if="record.Url"
  60. style=" width: 20px;height: 22px;"
  61. :src="'/serve/topology-wanda/Picture/query/'+ record.Url"
  62. alt
  63. />
  64. <span v-else>---</span>
  65. </div>
  66. <span></span>
  67. </a-table>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <Modal
  73. :show="modalStatusTip"
  74. title="确定要删除吗?"
  75. mode="tip"
  76. type="error"
  77. @close="modalClose"
  78. >
  79. <template #content>
  80. <div style="font-size: 15px; padding-left: 16px;padding-top: 16px;" v-if="categoryId=='XFBFYCFL'||categoryId=='FZQZL'" >
  81. <Radio :checked="grouptype" @change="grouptype='checked';grouptype1='uncheck'" >仅删除草稿</Radio>
  82. <br>
  83. <Radio :checked="grouptype1" @change="grouptype1='checked';grouptype='uncheck'" >删除草稿和已发布的原理图</Radio>
  84. <!-- <radio-group v-if="categoryId=='XFBFYCFL'||categoryId=='FZQZL'" :group-data.sync="groupData" :type="grouptype" @change="handleChange" />-->
  85. </div>
  86. </template>
  87. <template #handle>
  88. <Button @click="modalClose" type="default">取消</Button>
  89. <Button @click="modalConfirm" type="error">确定</Button>
  90. </template>
  91. </Modal>
  92. </div>
  93. </template>
  94. <script>
  95. import Tree from "./../components/Tree/Tree.vue";
  96. import { SFengParser } from "@saga-web/feng-map";
  97. import { SFloorParser } from "@saga-web/big";
  98. import { FloorView } from "./../lib/FloorView";
  99. import { EditScence } from "@/components/mapClass/EditScence";
  100. import bus from "@/bus";
  101. import {
  102. readGroup,
  103. queryDraftGroup,
  104. queryStatistic,
  105. deleteGraph,
  106. publishGraph,
  107. deleteByCategory
  108. } from "@/api/editer.js";
  109. import { STopologyParser } from "./../lib/parsers/STopologyParser";
  110. import { uuid } from "@/components/mapClass/until";
  111. import { SImageItem } from "@saga-web/graph/lib";
  112. import store from "../store";
  113. import { Loading } from "element-ui";
  114. import { getUrlMsg } from "@/components/urlMsg.js";
  115. let fengmap = null;
  116. export default {
  117. components: { Tree },
  118. data() {
  119. return {
  120. modalStatusTip:false,
  121. grouptype:'checked',
  122. grouptype1:'uncheck',
  123. treeData: [],
  124. columns: [
  125. {
  126. title: "名称", // 列的名称
  127. dataIndex: "Name", // 列的标识
  128. scopedSlots: { customRender: "Name" }
  129. },
  130. {
  131. title: "图例", // 列的名称
  132. dataIndex: "Url", // 列的标识
  133. scopedSlots: { customRender: "Url" }
  134. }
  135. ],
  136. legendData: [],
  137. legend: true,
  138. canvasWidth: 700,
  139. canvasHeight: 600,
  140. view: null,
  141. urlMsg: null,
  142. floorList: {},
  143. mapServerURL: "http://map.wanda.cn/editor",
  144. mapthemeUrl: `http://map.wanda.cn/editor/webtheme`,
  145. key: "23f30a832a862c58637a4aadbf50a566",
  146. appName: "万达可视化系统",
  147. defaultProps: {
  148. children: "Category",
  149. label: "Gcode"
  150. },
  151. projectId: "", //项目id
  152. fmapID: "", //蜂鸟地图id
  153. graphId: "", //绘制生成得图id
  154. legendLoading: false,
  155. systemName: "",
  156. floorName: "",
  157. floorId: "", //楼层id
  158. BuildingID: "1", // 建筑id
  159. categoryId: "", //系统类id
  160. currentNodekey: "", //默认选中的节点树
  161. expandedkeys: [] //默认展开的节点树
  162. };
  163. },
  164. methods: {
  165. // handleNodeClick(data, node) {
  166. // this.legendData = [];
  167. // this.systemName = "";
  168. // this.floorName = "";
  169. // if (data.Gname) {
  170. // this.systemName = node.parent.data.Gcode;
  171. // this.floorName = data.Gcode;
  172. // this.floorId = data.Gname;
  173. // this.categoryId = node.parent.data.Id;
  174. // this.getLegend();
  175. // this.checkFloor(data.Gname);
  176. // }
  177. // },
  178. //初始化获取蜂鸟所有底图数据
  179. init() {
  180. const loadings = Loading.service({
  181. lock: true,
  182. text: "Loading",
  183. spinner: "el-icon-loading",
  184. background: "rgba(0, 0, 0, 0.7)"
  185. });
  186. // const loadings = this.$loading({type: 'global'});
  187. document.getElementById(`canvas`).focus();
  188. if(this.fmapID.includes('null')){
  189. loadings.close();
  190. this.getTreeData();
  191. }
  192. fengmap = new SFengParser(
  193. "fengMap",
  194. this.mapServerURL + "/fmap/" + this.fmapID,
  195. this.key,
  196. this.appName,
  197. null,
  198. this.mapthemeUrl
  199. );
  200. fengmap.loadMap(this.fmapID, resp => {
  201. this.floorList = resp;
  202. fengmap
  203. .loadTheme(
  204. `${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`
  205. )
  206. .then(response => {
  207. // 获取楼层数据数据
  208. loadings.close();
  209. this.getTreeData();
  210. });
  211. });
  212. },
  213. clearGraphy() {
  214. if (this.view) {
  215. this.view.scene = null;
  216. return;
  217. }
  218. this.view = new FloorView("canvas");
  219. document.getElementById("canvas").focus();
  220. },
  221. parserData(floor) {
  222. if (floor == "g80") {
  223. // 屋顶
  224. if (fengmap.frImg) {
  225. const imgItem = new SImageItem(
  226. null,
  227. `${this.mapServerURL}/webtheme/${this.fmapID}/${fengmap.frImg}`
  228. );
  229. this.scene.addItem(imgItem);
  230. this.view.fitSceneToView();
  231. this.loading = false;
  232. this.isQuerying = false;
  233. }
  234. } else {
  235. if (this.floorList[floor]) {
  236. fengmap.parseData(this.floorList[floor], res => {
  237. if (res.err) {
  238. console.log(res.err);
  239. return;
  240. }
  241. this.fParser = new SFloorParser(null);
  242. this.fParser.parseData(res);
  243. this.fParser.spaceList.forEach(t => {
  244. t.selectable = true;
  245. this.scene.addItem(t);
  246. });
  247. this.fParser.wallList.forEach(t => this.scene.addItem(t));
  248. this.fParser.virtualWallList.forEach(t => this.scene.addItem(t));
  249. this.fParser.doorList.forEach(t => this.scene.addItem(t));
  250. this.fParser.columnList.forEach(t => this.scene.addItem(t));
  251. this.fParser.casementList.forEach(t => this.scene.addItem(t));
  252. this.view.scene = this.scene;
  253. this.view.fitSceneToView();
  254. this.loading = false;
  255. this.isQuerying = false;
  256. console.log("success");
  257. });
  258. } else {
  259. console.log("楼层不正确");
  260. }
  261. }
  262. },
  263. change(id) {
  264. console.log(id);
  265. const data = this.treeData;
  266. (function recursion(newObj) {
  267. newObj.map(function(item, index) {
  268. item.open = false;
  269. item.checked = false;
  270. if (item.Category && item.Category.length > 0) {
  271. item.children = item.Category;
  272. recursion(item.Category);
  273. }
  274. });
  275. })(data);
  276. let items = null;
  277. data.forEach(ele => {
  278. ele.children.forEach(item => {
  279. ele.open = true;
  280. if (item.children) {
  281. item.children.forEach(item1 => {
  282. item.open = true;
  283. if (item1.id == id.id) {
  284. items = item;
  285. item1.checked = "checked";
  286. }
  287. });
  288. } else {
  289. if (item.id == id.id) {
  290. items = ele;
  291. ele.open = true;
  292. item.checked = "checked";
  293. }
  294. }
  295. });
  296. });
  297. this.legendData = [];
  298. this.systemName = "";
  299. this.floorName = "";
  300. this.systemName = items.Gcode;
  301. this.floorName = id.Gcode;
  302. this.floorId = id.Gname;
  303. this.categoryId = items.Id;
  304. // this.getLegend();
  305. this.checkFloor(id.Gname);
  306. console.log(items);
  307. },
  308. getTreeData() {
  309. const loadings = Loading.service({
  310. lock: true,
  311. text: "Loading",
  312. spinner: "el-icon-loading",
  313. background: "rgba(0, 0, 0, 0.7)"
  314. });
  315. queryDraftGroup({ projectId: this.projectId })
  316. .then(res => {
  317. console.log(res);
  318. loadings.close();
  319. if (res.Result == "success") {
  320. const data = res.Data;
  321. this.systemName = "";
  322. this.floorName = "";
  323. this.floorId = "";
  324. this.categoryId = "";
  325. if (data.length) {
  326. (function recursion(newObj) {
  327. newObj.map(function(item, index) {
  328. item.id = item.Id || item.Gname;
  329. item.name = item.Gcode;
  330. item.checked = false;
  331. if (item.Category && item.Category.length > 0) {
  332. item.children = item.Category;
  333. item.open = false;
  334. recursion(item.Category);
  335. }
  336. });
  337. })(data);
  338. data.forEach(ele => {
  339. ele.children.forEach(item => {
  340. ele.open = true;
  341. if (item.children) {
  342. item.open = true;
  343. item.children.forEach(item1 => {
  344. item1.id = item.Id + item1.Gname;
  345. });
  346. } else {
  347. item.id = ele.Id + item.Gname;
  348. }
  349. });
  350. });
  351. this.treeData = data;
  352. if (this.treeData[0].children[0].children) {
  353. this.treeData[0].open = true;
  354. this.treeData[0].children[0].open = true;
  355. this.treeData[0].children[0].children[0].checked = "checked";
  356. this.systemName = this.treeData[0].children[0].Gcode;
  357. this.floorName = this.treeData[0].children[0].children[0].Gcode;
  358. this.floorId = this.treeData[0].children[0].children[0].Gname;
  359. this.categoryId = this.treeData[0].children[0].Id;
  360. // this.getLegend();
  361. this.checkFloor(this.treeData[0].children[0].children[0].Gname);
  362. } else {
  363. this.treeData[0].open = true;
  364. this.treeData[0].children[0].checked = "checked";
  365. this.systemName = this.treeData[0].Gcode;
  366. this.floorName = this.treeData[0].children[0].Gcode;
  367. this.floorId = this.treeData[0].children[0].Gname;
  368. this.categoryId = this.treeData[0].Id;
  369. // this.getLegend();
  370. this.checkFloor(this.treeData[0].children[0].Gname);
  371. }
  372. } else {
  373. this.treeData = data;
  374. }
  375. } else {
  376. this.treeData = [];
  377. this.$message.error("获取楼层结构失败");
  378. }
  379. // 如果没有楼层则底图清空
  380. if (this.treeData.length == 0) {
  381. this.checkFloor("");
  382. }
  383. })
  384. .catch(() => {
  385. loadings.close();
  386. this.$message.error("请求失败");
  387. });
  388. },
  389. //获取补充图例
  390. getLegend() {
  391. this.legendLoading = true;
  392. this.legendData = [];
  393. queryStatistic({
  394. projectId: this.projectId,
  395. graphId: this.graphId,
  396. categoryId: this.categoryId
  397. }).then(res => {
  398. console.log(res);
  399. this.legendLoading = false;
  400. if (res.data.Result == "success") {
  401. const data = res.data.Data;
  402. data.map(item => {
  403. this.legendData.push(item);
  404. });
  405. } else {
  406. this.legendData = [];
  407. this.$message.error("获取楼层结构补充图例失败");
  408. }
  409. });
  410. },
  411. modalClose() {
  412. this.modalStatusTip = false;
  413. },
  414. modalConfirm() {
  415. this.deleteBtn();
  416. this.modalStatusTip = false;
  417. },
  418. //删除
  419. deleteBtn() {
  420. if(this.categoryId=='XFBFYCFL'||this.categoryId=='FZQZL'){
  421. if(this.grouptype=='checked'){
  422. this.deleteGraphMap();
  423. }else{
  424. this.deleteByCategoryMap();
  425. }
  426. }else{
  427. this.deleteGraphMap()
  428. }
  429. },
  430. //原理图删除
  431. deleteByCategoryMap(){
  432. const loadings = Loading.service({
  433. lock: true,
  434. text: "Loading",
  435. spinner: "el-icon-loading",
  436. background: "rgba(0, 0, 0, 0.7)"
  437. });
  438. let params = {
  439. "BuildingID": this.BuildingID,
  440. "CategoryID": this.categoryId,
  441. "FloorID": this.floorId,
  442. "ProjectID": this.projectId
  443. }
  444. deleteByCategory(params).then(res=>{
  445. loadings.close();
  446. if (res.Result == "success") {
  447. this.$message.success("删除成功");
  448. this.getTreeData();
  449. // this.init();
  450. this.legendData = [];
  451. } else {
  452. this.$message.error(res.Message);
  453. }
  454. }).catch(()=>{
  455. loadings.close();
  456. });
  457. },
  458. //正常删除
  459. deleteGraphMap(){
  460. const loadings = Loading.service({
  461. lock: true,
  462. text: "Loading",
  463. spinner: "el-icon-loading",
  464. background: "rgba(0, 0, 0, 0.7)"
  465. });
  466. deleteGraph([{ Id: this.graphId }]).then(res => {
  467. console.log(res);
  468. loadings.close();
  469. if (res.Result == "success") {
  470. this.$message.success("删除成功");
  471. this.getTreeData();
  472. // this.init();
  473. this.legendData = [];
  474. } else {
  475. this.$message.error(res.Message);
  476. }
  477. }).catch(()=>{
  478. loadings.close();
  479. });
  480. },
  481. //发布
  482. publishBtn() {
  483. const loadings = Loading.service({
  484. lock: true,
  485. text: "Loading",
  486. spinner: "el-icon-loading",
  487. background: "rgba(0, 0, 0, 0.7)"
  488. });
  489. console.log(this.floorId);
  490. const data = {
  491. BuildingID: this.BuildingID,
  492. CategoryID: this.categoryId,
  493. FloorID: this.floorId,
  494. GraphId: this.graphId,
  495. ProjectID: this.projectId,
  496. Pub: false,
  497. PubUser: ""
  498. };
  499. publishGraph(data).then(res => {
  500. loadings.close();
  501. if (res.Result == "success") {
  502. this.$message.success("发布成功");
  503. this.getTreeData();
  504. this.legendData = [];
  505. } else {
  506. this.$message.error(res.Message);
  507. }
  508. });
  509. },
  510. // 读取数据
  511. readGroup(floorid) {
  512. const data = {
  513. categoryId: this.categoryId,
  514. projectId: this.projectId,
  515. BuildingID: this.BuildingID, // 建筑ID
  516. FloorID: floorid, // 楼层id
  517. Pub: false
  518. };
  519. return readGroup(data);
  520. },
  521. /**
  522. * @name goToEditer
  523. * @description t跳转editer编辑器
  524. */
  525. goToEditer() {
  526. setTimeout(() => {
  527. /* const token = this.$store.getters["token"];
  528. const data = `categoryId=${this.categoryId}&projectId=${this.projectId}&BuildingID=1&FloorID=${this.floorId}&FloorName=${this.floorName}&fmapID=${this.fmapID}&token=${token}`;
  529. const url =
  530. window.location.origin +
  531. "/wandaEditer/editer?" +
  532. encodeURIComponent(data);
  533. window.open(url, true); */
  534. // 发布成功跳转草稿箱
  535. const token = this.$store.getters["token"];
  536. this.$router.push({
  537. path: "editer",
  538. query: {
  539. categoryId: this.categoryId,
  540. projectId: this.projectId,
  541. BuildingID: 1,
  542. FloorName: this.floorName,
  543. FloorID: this.floorId,
  544. fmapID: this.fmapID,
  545. token:token
  546. }
  547. });
  548. }, 1000);
  549. },
  550. // 切换草稿箱楼层
  551. checkFloor(floorid) {
  552. this.scene = new EditScence();
  553. this.scene.isEditStatus = false;
  554. this.clearGraphy();
  555. const loadings = Loading.service({
  556. lock: true,
  557. text: "Loading",
  558. spinner: "el-icon-loading",
  559. background: "rgba(0, 0, 0, 0.7)"
  560. });
  561. if(!floorid){
  562. loadings.close();
  563. this.view.fitSceneToView();
  564. return
  565. }
  566. setTimeout(() => {
  567. this.view.scene = this.scene;
  568. this.parserData(floorid);
  569. this.readGroup(floorid).then(data => {
  570. if (data.Result == "success") {
  571. this.graphId = data.Data[0].ID;
  572. if (data.Data) {
  573. loadings.close();
  574. const parserData = new STopologyParser(null);
  575. parserData.parseData(data.Data[0].Elements);
  576. // 多边形
  577. parserData.zoneLegendList.forEach(t => {
  578. this.scene.addItem(t);
  579. this.scene.Nodes.push(t);
  580. });
  581. // 增加文字
  582. parserData.textMarkerList.forEach(t => {
  583. this.scene.addItem(t);
  584. this.scene.Markers.push(t);
  585. });
  586. // 增加图片
  587. parserData.imageMarkerList.forEach(t => {
  588. this.scene.addItem(t);
  589. this.scene.Markers.push(t);
  590. });
  591. // 增加直线
  592. parserData.lineMarkerList.forEach(t => {
  593. this.scene.addItem(t);
  594. this.scene.Markers.push(t);
  595. });
  596. // 增加图标类图例
  597. parserData.imageLegendList.forEach(t => {
  598. this.scene.addItem(t);
  599. this.scene.Nodes.push(t);
  600. });
  601. // 增加管线类
  602. // 增加图标类图例
  603. parserData.relationList.forEach(t => {
  604. this.scene.addItem(t);
  605. this.scene.Relations.push(t);
  606. });
  607. this.view.fitSceneToView();
  608. this.getLegend();
  609. }
  610. } else {
  611. loadings.close();
  612. }
  613. }).catch(()=>{
  614. loadings.close();
  615. });
  616. }, 100);
  617. }
  618. },
  619. mounted() {
  620. this.canvasWidth = this.$refs.draftsCanvas.offsetWidth - 10;
  621. this.canvasHeight = this.$refs.draftsCanvas.offsetHeight - 10;
  622. const href = window.location.href;
  623. let params = href.split("?")[1];
  624. if (!params) {
  625. // 参数有问题
  626. return false;
  627. }
  628. params = decodeURIComponent(params);
  629. const paramsArr = params.split("&");
  630. const obj = {};
  631. paramsArr.map(item => {
  632. const arr = item.split("=");
  633. obj[arr[0]] = arr[1];
  634. });
  635. console.log("obj", obj);
  636. this.projectId = obj.projectId ? obj.projectId : "1000423";
  637. this.fmapID = obj.fmapID ? obj.fmapID : "1000423_120";
  638. this.init();
  639. }
  640. };
  641. </script>
  642. <style lang="less" scoped>
  643. #drafts {
  644. widows: 100%;
  645. height: 100%;
  646. background: #f7f9fa;
  647. position: relative;
  648. .tit {
  649. width: 100%;
  650. height: 48px;
  651. display: flex;
  652. justify-content: center;
  653. align-items: center;
  654. border-bottom: #e4e5e7 solid 1px;
  655. font-size: 16px;
  656. font-weight: bold;
  657. }
  658. .conent {
  659. width: 100%;
  660. height: calc(100% - 48px);
  661. display: flex;
  662. position: relative;
  663. .left-nav {
  664. width: 224px;
  665. height: 100%;
  666. overflow-y: scroll;
  667. padding: 0 12px;
  668. /deep/ .el-tree {
  669. background: #f7f9fa;
  670. .el-tree-node__content {
  671. height: 38px;
  672. }
  673. /deep/.el-tree-node:focus > .el-tree-node__content {
  674. background-color: #e1f2ff !important;
  675. color: #0091ff !important;
  676. }
  677. }
  678. .span-ellipsis {
  679. width: 100%;
  680. overflow: hidden;
  681. white-space: nowrap;
  682. text-overflow: ellipsis;
  683. }
  684. }
  685. .conent-right {
  686. flex: 1;
  687. height: 100%;
  688. background: #fff;
  689. .conent-tit {
  690. width: 100%;
  691. display: flex;
  692. height: 59px;
  693. border: 1px solid #eff0f1;
  694. align-items: center;
  695. justify-content: space-between;
  696. padding: 0 16px 0 16px;
  697. box-sizing: border-box;
  698. .tit-left {
  699. font-size: 16px;
  700. font-weight: bold;
  701. color: rgba(31, 35, 41, 1);
  702. }
  703. .tit-right {
  704. width: 198px;
  705. display: flex;
  706. justify-content: space-between;
  707. margin-left: auto;
  708. }
  709. }
  710. .concent-bottom {
  711. height: calc(100% - 61px);
  712. display: flex;
  713. position: relative;
  714. .map {
  715. flex: 1;
  716. position: relative;
  717. height: 100%;
  718. /*height: calc(100% - 61px);*/
  719. /*background: red;*/
  720. }
  721. .legend {
  722. position: absolute;
  723. right: 0;
  724. top: 0;
  725. width: 200px;
  726. border-left: 1px solid #eff0f1;
  727. background-color: #ffffff;
  728. height: 100%;
  729. overflow-y: scroll;
  730. }
  731. .legend-btn {
  732. position: absolute;
  733. right: 0px;
  734. top: 9px;
  735. width: 10px;
  736. height: 24px;
  737. background: rgba(228, 229, 231, 1);
  738. display: flex;
  739. justify-content: center;
  740. align-items: center;
  741. cursor: pointer;
  742. }
  743. .legend-btn-close {
  744. right: 200px;
  745. }
  746. }
  747. }
  748. }
  749. }
  750. #fengMap {
  751. position: absolute;
  752. width: 100px;
  753. height: 100px;
  754. z-index: -1;
  755. }
  756. .canvas-container {
  757. width: 100%;
  758. height: 100%;
  759. }
  760. </style>