previewPicture.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  1. <template>
  2. <div class="pop-up-main">
  3. <div class="paln-box">
  4. <div
  5. class="movableItem"
  6. :style="{ width: width, height: height }"
  7. @mousewheel="rollImg($event)"
  8. @mousedown="drag($event, 1)"
  9. ref="bigImage"
  10. >
  11. <!-- 图片不可选中 或不可拖拽到新标签打开-->
  12. <slot
  13. name="svg"
  14. oncontextmenu="return false;"
  15. onselectstart="return false;"
  16. draggable="false"
  17. ></slot>
  18. <template v-if="isEdit && iconWidth">
  19. <img
  20. ref="signImage"
  21. :src="iconImgUrl"
  22. @mousedown="dragSign($event, key)"
  23. v-for="(item, key) in equipment"
  24. :key="key"
  25. :style="{
  26. top: equipment[key].top + '%',
  27. left: equipment[key].left + '%',
  28. width: iconWidth,
  29. height: iconHeight,
  30. }"
  31. class="equipment"
  32. />
  33. </template>
  34. <el-popover
  35. width="200"
  36. placement="bottom-start"
  37. trigger="hover"
  38. :close-delay="100"
  39. content="暂无描述"
  40. v-else-if="!isEdit && iconWidth && arrIcon.length == equipment.length"
  41. v-for="(item, key) in equipment"
  42. :key="key"
  43. popper-class="preview-popover"
  44. >
  45. <!-- &&arrIcon.length==equipment.length -->
  46. <template>
  47. <div v-if="equipment[key].describe" class="describe">
  48. <p class="describe-top">
  49. {{ equipment[key].describe.deviceName }}
  50. </p>
  51. <p class="describe-center">
  52. {{ equipment[key].describe.remark }}
  53. </p>
  54. <p class="describe-bottom">
  55. {{ equipment[key].describe.location }}
  56. </p>
  57. </div>
  58. </template>
  59. <!-- <img oncontextmenu="return false;" onselectstart="return false;" draggable="false" slot="reference"
  60. ref="signImage" :src="$baseUrl + equipment[key].iconImgUrl"
  61. :style="{top:equipment[key].top+'%',left:equipment[key].left+'%',width:arrIcon[key].iconWidth,height:arrIcon[key].iconHeight}"
  62. class="equipment" /> -->
  63. </el-popover>
  64. </div>
  65. </div>
  66. </div>
  67. </template>
  68. <script>
  69. export default {
  70. props: {
  71. equipment: {
  72. type: Array,
  73. default: () => {
  74. return [
  75. {
  76. iconImgUrl: "",
  77. top: 0,
  78. left: 0,
  79. },
  80. ];
  81. },
  82. },
  83. isEdit: {
  84. default: false,
  85. },
  86. imgUrl: {},
  87. },
  88. data() {
  89. return {
  90. // 定时器
  91. timer: "",
  92. // 图片加载失败
  93. imgOnerror: false,
  94. imgIndex: 0,
  95. isChange: true,
  96. // 图片显示默认大小
  97. width: "1400px",
  98. height: "0px",
  99. // 可缩小倍数,为空则可无限缩小
  100. minification: 3,
  101. // 可放大倍数 为空则可无限放大
  102. magnification: "",
  103. bigMaxWidth: 1600,
  104. bigMaxHeight: 800,
  105. // 小图标信息
  106. iconImgUrl: "",
  107. iconWidth: "",
  108. // 存储每个小图标处理好的宽高
  109. iconHeight: "",
  110. arrIcon: [],
  111. iconMaxWidth: 32,
  112. iconMaxHeight: 32,
  113. tog: 1,
  114. };
  115. },
  116. methods: {
  117. // 获取图片大小
  118. getImgInfo(
  119. imgUrl,
  120. MaxWidth,
  121. MaxHeight,
  122. StrWidth,
  123. StrHeight,
  124. Array = false,
  125. arr,
  126. num = 0
  127. ) {
  128. var img = new Image();
  129. // img.src = imgUrl;
  130. img = document.getElementsByClassName("svg");
  131. let _this = this;
  132. img.onerror = () => {
  133. // console.log("加载失败!!", _this.arrIcon.length);
  134. // console.log(imgUrl, MaxWidth, MaxHeight, StrWidth, StrHeight);
  135. _this.imgOnerror = true;
  136. _this.imgIndex =
  137. _this.arrIcon.length - 1 < 0 ? 0 : _this.arrIcon.length - 1;
  138. this.timer = setTimeout(() => {
  139. if (num <= 5) {
  140. _this.getImgInfo(
  141. imgUrl,
  142. MaxWidth,
  143. MaxHeight,
  144. StrWidth,
  145. StrHeight,
  146. Array,
  147. arr,
  148. num + 1
  149. );
  150. }
  151. clearInterval(this.timer);
  152. }, 2000);
  153. };
  154. img.onload = function (e) {
  155. // 显示时 初始 最大宽度
  156. let maxWidth = MaxWidth;
  157. // 显示时 初始 最大高度
  158. let maxHeight = MaxHeight;
  159. if (
  160. e.path[0].naturalWidth <= maxWidth &&
  161. e.path[0].naturalHeight <= maxHeight
  162. ) {
  163. _this[StrWidth] = e.path[0].naturalWidth + "px";
  164. _this[StrHeight] = e.path[0].naturalHeight + "px";
  165. } else {
  166. _this[StrWidth] = e.path[0].naturalWidth + "px";
  167. _this[StrHeight] = e.path[0].naturalHeight + "px";
  168. if (
  169. e.path[0].naturalWidth > maxWidth &&
  170. e.path[0].naturalHeight <= maxHeight
  171. ) {
  172. let ratio = e.path[0].naturalWidth / e.path[0].naturalHeight;
  173. _this[StrWidth] = "1600px";
  174. _this[StrHeight] = maxWidth / ratio + "px";
  175. } else if (
  176. e.path[0].naturalWidth <= maxWidth &&
  177. e.path[0].naturalHeight > maxHeight
  178. ) {
  179. let ratio = e.path[0].naturalWidth / e.path[0].naturalHeight;
  180. _this[StrWidth] = maxHeight * ratio + "px";
  181. _this[StrHeight] = "800px";
  182. } else if (
  183. e.path[0].naturalWidth > maxWidth &&
  184. e.path[0].naturalHeight > maxHeight
  185. ) {
  186. let ratio = e.path[0].naturalWidth / e.path[0].naturalHeight;
  187. let w = maxWidth;
  188. let h = w / ratio;
  189. if (h > maxHeight) {
  190. let ratio2 = w / h;
  191. h = maxHeight;
  192. w = h * ratio2;
  193. }
  194. _this[StrWidth] = w + "px";
  195. _this[StrHeight] = h + "px";
  196. }
  197. }
  198. if (Array) {
  199. _this[arr].push({
  200. iconWidth: _this[StrWidth],
  201. iconHeight: _this[StrHeight],
  202. });
  203. // console.log(
  204. // "tow#################################arrIcon",
  205. // _this[arr].length
  206. // );
  207. }
  208. // _this[StrWidth] = `${e.path[0].naturalWidth}px`;
  209. // _this[StrHeight] = `${e.path[0].naturalHeight}px`;
  210. // vm.$set(vm.imgInfo, "width", img.width);
  211. // vm.$set(vm.imgInfo, "height", img.height);
  212. // console.log("打印图片信息", imgUrl, _this[StrWidth], _this[StrHeight]); // 打印图片信息
  213. // console.log("打印图片信息", e.path[0].naturalHeight); // 打印图片信息
  214. // console.log("打印图片信息", e); // 打印图片信息
  215. // console.log("打印图片信息this.width", _this[StrWidth]); // 打印图片信息
  216. // console.log("打印图片信息this.height", _this[StrHeight]); // 打印图片信息
  217. };
  218. },
  219. // 缩放
  220. rollImg() {
  221. var that = this;
  222. // var oImg = document.getElementsByClassName("movableItem")[0];
  223. var oImg = this.$refs.bigImage;
  224. // console.log(
  225. // "length",
  226. // document.getElementsByClassName("movableItem").length
  227. // );
  228. // console.log("oImg", oImg);
  229. var _this = this;
  230. function fnWheel(obj, fncc) {
  231. obj.onmousewheel = fn;
  232. if (obj.addEventListener) {
  233. obj.addEventListener("DOMMouseScroll", fn, false);
  234. }
  235. function fn(ev) {
  236. var oEvent = ev || window.event;
  237. var down = true;
  238. if (oEvent.detail) {
  239. down = oEvent.detail > 0;
  240. } else {
  241. down = oEvent.wheelDelta < 0;
  242. }
  243. if (fncc) {
  244. fncc.call(this, down, oEvent);
  245. }
  246. if (oEvent.preventDefault) {
  247. oEvent.preventDefault();
  248. }
  249. return false;
  250. }
  251. }
  252. fnWheel(oImg, function (down, oEvent) {
  253. var oldWidth = this.offsetWidth;
  254. var oldHeight = this.offsetHeight;
  255. var oldLeft = this.offsetLeft;
  256. var oldTop = this.offsetTop;
  257. var parent = oEvent.path[2];
  258. // 获取父元素距离页面可视区域的位置
  259. var parentLeft = parent.getBoundingClientRect().left;
  260. var parentTop = parent.getBoundingClientRect().top;
  261. // 比例 = (点击位置距离可视窗口位置 - 父元素距离可视窗口位置 - 相对定位的left)/ 本身宽度
  262. var scaleX = (oEvent.clientX - parentLeft - oldLeft) / oldWidth; //比例
  263. var scaleY = (oEvent.clientY - parentTop - oldTop) / oldHeight;
  264. let nowWidth = this.style.width.split("p")[0];
  265. let initWidth = _this.width.split("p")[0];
  266. let initHeight = _this.height.split("p")[0];
  267. let miniFlag = true;
  268. let magniFlag = true;
  269. if (_this.minification) {
  270. // 限制缩小范围
  271. if (nowWidth <= parseInt(initWidth / _this.minification)) {
  272. miniFlag = false;
  273. // console.log("限制缩小范围");
  274. // console.log(
  275. // "限制缩小范围",
  276. // nowWidth,
  277. // parseInt(initWidth / _this.minification)
  278. // );
  279. this.style.width = parseInt(initWidth / _this.minification) + "px";
  280. this.style.height =
  281. parseInt(initHeight / _this.minification) + "px";
  282. }
  283. if (_this.magnification) {
  284. // 限制放大范围
  285. if (nowWidth >= parseInt(initWidth * _this.magnification)) {
  286. magniFlag = false;
  287. // console.log("限制放大范围");
  288. this.style.width =
  289. parseInt(initWidth * _this.magnification) + "px";
  290. this.style.height =
  291. parseInt(initHeight * _this.magnification) + "px";
  292. }
  293. }
  294. }
  295. if (down && miniFlag) {
  296. // console.log("缩小");
  297. this.style.width = parseInt(this.offsetWidth * 0.9) + "px";
  298. this.style.height = parseInt(this.offsetHeight * 0.9) + "px";
  299. that.width = parseInt(this.offsetWidth * 0.9) + "px";
  300. that.height = parseInt(this.offsetHeight * 0.9) + "px";
  301. } else if (!down && magniFlag) {
  302. // console.log("放大");
  303. this.style.width = parseInt(this.offsetWidth * 1.1) + "px";
  304. this.style.height = parseInt(this.offsetHeight * 1.1) + "px";
  305. that.width = parseInt(this.offsetWidth * 1.1) + "px";
  306. that.height = parseInt(this.offsetHeight * 1.1) + "px";
  307. }
  308. var newWidth = this.offsetWidth;
  309. var newHeight = this.offsetHeight;
  310. // 新的相对位置left = 原先的相对位置left - 比例 *(本身新的宽度-旧的宽度)
  311. this.style.left =
  312. Math.round(this.offsetLeft - scaleX * (newWidth - oldWidth)) + "px";
  313. this.style.top =
  314. Math.round(this.offsetTop - scaleY * (newHeight - oldHeight)) + "px";
  315. });
  316. // console.log(that.width)
  317. },
  318. // },
  319. //拖拽
  320. drag(ev) {
  321. // var ie = document.all;
  322. // console.log(ev / 0);
  323. var nn6 = document.getElementById && !document.all;
  324. var isdrag = false;
  325. var y, x;
  326. var nTY, nTX;
  327. var oDragObj;
  328. function moveMouse(e) {
  329. if (isdrag) {
  330. oDragObj.style.top =
  331. (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y) + "px";
  332. oDragObj.style.left =
  333. (nn6 ? nTX + e.clientX - x : nTX + event.clientX - x) + "px";
  334. return false;
  335. }
  336. }
  337. function initDrag(e) {
  338. // console.log("点击图片initDrag");
  339. var oDragHandle = nn6 ? e.target : event.srcElement;
  340. var topElement = "HTML";
  341. while (
  342. oDragHandle.tagName != topElement &&
  343. oDragHandle.className != "movableItem"
  344. ) {
  345. oDragHandle = nn6
  346. ? oDragHandle.parentNode
  347. : oDragHandle.parentElement;
  348. }
  349. if (oDragHandle.className == "movableItem") {
  350. isdrag = true;
  351. oDragObj = oDragHandle;
  352. // 父元素宽高
  353. let width = e.path[2].offsetWidth;
  354. let height = e.path[2].offsetHeight;
  355. // 这里判断第一次获取不到style 样式 默认为 居中50%
  356. if (oDragObj.style.top == "") {
  357. // nTY = parseInt((50 * height) / 100 + 0);
  358. nTY = 0;
  359. nTX = parseInt((50 * width) / 100 + 0);
  360. } else {
  361. nTY = parseInt(oDragObj.style.top + 0);
  362. nTX = parseInt(oDragObj.style.left + 0);
  363. }
  364. y = nn6 ? e.clientY : event.clientY;
  365. x = nn6 ? e.clientX : event.clientX;
  366. oDragObj.style.cursor = "move";
  367. document.onmousemove = moveMouse;
  368. return false;
  369. }
  370. }
  371. document.onmousemove = initDrag;
  372. // document.onmouseup = new Function("isdrag=false");
  373. document.onmouseup = function (e) {
  374. isdrag = false;
  375. document.onmousemove = null;
  376. document.onmouseup = null;
  377. var oDragHandle = nn6 ? e.target : event.srcElement;
  378. var topElement = "HTML";
  379. while (
  380. oDragHandle.tagName != topElement &&
  381. oDragHandle.className != "movableItem"
  382. ) {
  383. oDragHandle = nn6
  384. ? oDragHandle.parentNode
  385. : oDragHandle.parentElement;
  386. }
  387. if (oDragHandle.className == "movableItem") {
  388. oDragObj = oDragHandle;
  389. oDragObj.style.cursor = "Default";
  390. }
  391. };
  392. ev = event || window.event;
  393. // 取消事件冒泡行为
  394. // window.event ? (window.event.cancelBubble = true) : ev.stopPropagation();
  395. },
  396. // 拖拽标记
  397. // eslint-disable-next-line no-unused-vars
  398. dragSign(ev, key) {
  399. var nn6 = document.getElementById && !document.all;
  400. var isdrag = false;
  401. var y, x;
  402. var nTY, nTX;
  403. var oDragObj;
  404. let _this = this;
  405. function moveMouse(e) {
  406. if (isdrag) {
  407. this.equipmentKey = key;
  408. // console.log("thisequipmentKey", this.equipmentKey);
  409. let widthItem = e.path[1].style.width.split("p");
  410. let heightItem = e.path[1].style.height.split("p");
  411. let width = widthItem[0];
  412. // eslint-disable-next-line no-unused-vars
  413. let height = heightItem[0];
  414. let top =
  415. ((nn6
  416. ? (nTY / 100) * height + e.clientY - y
  417. : (nTY / 100) * height + event.clientY - y) /
  418. height) *
  419. 100;
  420. let left =
  421. ((nn6
  422. ? (nTX / 100) * width + e.clientX - x
  423. : (nTX / 100) * width + event.clientX - x) /
  424. width) *
  425. 100;
  426. if (top >= 0 && top <= 100) {
  427. _this.equipment[key].top = top;
  428. }
  429. if (left >= 0 && left <= 100) {
  430. _this.equipment[key].left = left;
  431. }
  432. return false;
  433. }
  434. }
  435. // eslint-disable-next-line no-unused-vars
  436. function initDrag(e) {
  437. // console.log("_this", _this);
  438. var oDragHandle = nn6 ? e.target : event.srcElement;
  439. var topElement = "HTML";
  440. while (
  441. oDragHandle.tagName != topElement &&
  442. oDragHandle.className.indexOf("equipment") == -1
  443. ) {
  444. oDragHandle = nn6
  445. ? oDragHandle.parentNode
  446. : oDragHandle.parentElement;
  447. }
  448. if (oDragHandle.className.indexOf("equipment") != -1) {
  449. isdrag = true;
  450. oDragObj = oDragHandle;
  451. // 父元素宽高
  452. let width = e.path[1].offsetWidth;
  453. let height = e.path[1].offsetHeight;
  454. // console.log(width, height);
  455. console.log("oDragObj.style", oDragObj.style);
  456. // 这里判断第一次获取不到style 样式 默认为 居中50%
  457. if (oDragObj.style.top == "") {
  458. nTY = parseInt((50 * height) / 100 + 0);
  459. nTX = parseInt((50 * width) / 100 + 0);
  460. } else if (oDragObj.style.top.indexOf("%") != -1) {
  461. nTY = oDragObj.style.top.split("%")[0];
  462. nTX = oDragObj.style.left.split("%")[0];
  463. } else {
  464. nTY = parseInt(oDragObj.style.top + 0);
  465. nTX = parseInt(oDragObj.style.left + 0);
  466. }
  467. y = nn6 ? e.clientY : event.clientY;
  468. x = nn6 ? e.clientX : event.clientX;
  469. oDragObj.style.cursor = "move";
  470. document.onmousemove = moveMouse;
  471. return false;
  472. }
  473. }
  474. // document.onmousedown = initDrag;
  475. document.onmousemove = initDrag;
  476. document.onmouseup = function (e) {
  477. isdrag = false;
  478. document.onmousemove = null;
  479. document.onmouseup = null;
  480. var oDragHandle = nn6 ? e.target : event.srcElement;
  481. var topElement = "HTML";
  482. while (
  483. oDragHandle.tagName != topElement &&
  484. oDragHandle.className != "equipment"
  485. ) {
  486. oDragHandle = nn6
  487. ? oDragHandle.parentNode
  488. : oDragHandle.parentElement;
  489. }
  490. if (oDragHandle.className == "equipment") {
  491. oDragObj = oDragHandle;
  492. oDragObj.style.cursor = "Default";
  493. }
  494. };
  495. // _this.equipmentKey = key;
  496. // _this.equipment[_this.equipmentKey].left = l;
  497. // _this.equipment[_this.equipmentKey].top = t;
  498. ev = event || window.event;
  499. // 取消事件冒泡行为
  500. window.event ? (window.event.cancelBubble = true) : ev.stopPropagation();
  501. },
  502. },
  503. watch: {
  504. equipment() {
  505. if (this.equipment.length != 0) {
  506. this.arrIcon = [];
  507. let finish = true;
  508. this.equipment.filter((item) => {
  509. if (!item.iconImgUrl) {
  510. finish = false;
  511. }
  512. return true;
  513. });
  514. console.log("finish", finish);
  515. if (finish) {
  516. this.equipment.filter((item, index) => {
  517. if (index >= this.imgIndex) {
  518. console.log("iconImgUrl", this.equipment[index].iconImgUrl);
  519. this.getImgInfo(
  520. this.$baseUrl + item.iconImgUrl,
  521. this.iconMaxWidth,
  522. this.iconMaxHeight,
  523. "iconWidth",
  524. "iconHeight",
  525. true,
  526. "arrIcon"
  527. );
  528. }
  529. // console.log("22filter", index);
  530. return true;
  531. });
  532. }
  533. }
  534. },
  535. },
  536. created() {
  537. this.getImgInfo(
  538. this.imgUrl,
  539. this.bigMaxWidth,
  540. this.bigMaxHeight,
  541. "width",
  542. "height"
  543. );
  544. if (this.equipment.length != 0) {
  545. this.arrIcon = [];
  546. let finish = true;
  547. this.equipment.filter((item) => {
  548. if (!item.iconImgUrl) {
  549. finish = false;
  550. }
  551. return true;
  552. });
  553. // console.log("finish", finish);
  554. if (finish) {
  555. this.equipment.filter((item, index) => {
  556. if (index >= this.imgIndex) {
  557. console.log("iconImgUrl", this.equipment[index].iconImgUrl);
  558. this.getImgInfo(
  559. this.$baseUrl + item.iconImgUrl,
  560. this.iconMaxWidth,
  561. this.iconMaxHeight,
  562. "iconWidth",
  563. "iconHeight",
  564. true,
  565. "arrIcon"
  566. );
  567. }
  568. // console.log("22filter", index);
  569. return true;
  570. });
  571. }
  572. }
  573. this.iconImgUrl = JSON.parse(
  574. JSON.stringify(this.$baseUrl + this.equipment[0].iconImgUrl)
  575. );
  576. // console.log("imgUrl", this.imgUrl);
  577. // console.log("equipment", this.equipment);
  578. // //禁止鼠标右键
  579. // document.oncontextmenu = function() {
  580. // return false;
  581. // };
  582. },
  583. };
  584. </script>
  585. <style lang="less">
  586. .preview-popover {
  587. background-color: #d3edf7dd;
  588. padding: 12px;
  589. .popper__arrow::after {
  590. border-bottom-color: #d3edf7dd !important;
  591. }
  592. .describe {
  593. p {
  594. padding-bottom: 5px;
  595. &:last-child {
  596. padding-bottom: 0px;
  597. }
  598. }
  599. .describe-top {
  600. // color: sandybrown;
  601. // color: red;
  602. color: rgb(21, 110, 110);
  603. }
  604. .describe-center {
  605. color: rgb(79, 21, 206);
  606. }
  607. .describe-bottom {
  608. color: rgb(30, 31, 29);
  609. }
  610. }
  611. }
  612. </style>
  613. <style lang="less" scoped>
  614. .pop-up-main {
  615. width: 100%;
  616. height: calc(100vh - 18vh);
  617. overflow-y: hidden;
  618. .paln-box {
  619. width: 100%;
  620. height: 100%;
  621. position: relative;
  622. .movableItem {
  623. position: absolute;
  624. // top: 75%;
  625. left: 50%;
  626. transform: translate(-50%, -10%);
  627. img,
  628. .svg {
  629. z-index: 1;
  630. width: 100%;
  631. height: 100%;
  632. }
  633. .equipment {
  634. position: absolute;
  635. top: 0;
  636. left: 0;
  637. transform: translate(-50%, -50%);
  638. z-index: 2;
  639. font-size: 40px;
  640. // color: red;
  641. // background: blue;
  642. zoom: 1;
  643. }
  644. }
  645. .shuaxin {
  646. position: absolute;
  647. z-index: 2;
  648. font-size: 40px;
  649. top: 20px;
  650. left: 20px;
  651. cursor: pointer;
  652. &:hover {
  653. color: yellowgreen;
  654. }
  655. }
  656. .equipment {
  657. color: white;
  658. }
  659. &/deep/.el-button {
  660. z-index: 2;
  661. position: absolute;
  662. bottom: 60px;
  663. right: 20px;
  664. width: 60px;
  665. height: 35px;
  666. span {
  667. display: inline-block;
  668. position: absolute;
  669. top: 50%;
  670. left: 50%;
  671. transform: translate(-50%, -50%);
  672. }
  673. i {
  674. display: inline-block;
  675. position: absolute;
  676. top: 50%;
  677. left: 25%;
  678. transform: translate(-50%, -50%);
  679. }
  680. }
  681. }
  682. }
  683. // body {
  684. // height: 100%;
  685. // overflow: hidden;
  686. // margin: 0;
  687. // padding: 0;
  688. // }
  689. </style>