signMap.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <template>
  2. <div class="signMap" id="signMap">
  3. <div class="sum-title">
  4. 会议室
  5. </div>
  6. <div class="compass">
  7. <img src="../assets/img/main/compass.png" height="30" width="30"/>
  8. </div>
  9. <div class="screen">
  10. <img src="../assets/img/headside/screen_max.png" v-if="!screen_full" height="18" width="19"
  11. @click="full_screen"/>
  12. <img src="../assets/img/headside/screen_min.png" v-if="screen_full" height="18" width="19"
  13. @click="cancle_screen"/>
  14. </div>
  15. <div :class="[{'signMapList':true},{'full_state':full_state}]">
  16. <div class="tips" v-if="scan == ''">
  17. <span>请开始扫描</span>
  18. </div>
  19. <div class="signMapListBg">
  20. <span v-for="s in scan"
  21. :style="{ left: s.X*0.8+'PX', top: s.Y+'PX'}"
  22. >
  23. <el-popover
  24. placement="top-start"
  25. title="标题"
  26. width="200"
  27. trigger="hover"
  28. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
  29. <div slot="reference">
  30. <em class="types">
  31. <img src="../assets/img/signMap/ydgsm.png" height="54" width="54"
  32. v-if="s.WirelessType == 1"/>
  33. <img src="../assets/img/signMap/ltgsm.png" height="54" width="54"
  34. v-if="s.WirelessType == 2"/>
  35. <img src="../assets/img/signMap/dxcdma.png" height="54" width="54"
  36. v-if="s.WirelessType == 3"/>
  37. <img src="../assets/img/signMap/yd3g.png" height="54" width="54"
  38. v-if="s.WirelessType == 4"/>
  39. <img src="../assets/img/signMap/lt3g.png" height="54" width="54"
  40. v-if="s.WirelessType == 5"/>
  41. <img src="../assets/img/signMap/yd4g.png" height="54" width="54"
  42. v-if="s.WirelessType == 6"/>
  43. <img src="../assets/img/signMap/lt4g.png" height="54" width="54"
  44. v-if="s.WirelessType == 7"/>
  45. <img src="../assets/img/signMap/dx4g.png" height="54" width="54"
  46. v-if="s.WirelessType == 8"/>
  47. <img src="../assets/img/signMap/433M.png" height="54" width="54"
  48. v-if="s.WirelessType == 9"/>
  49. <img src="../assets/img/signMap/wifi.png" height="54" width="54"
  50. v-if="s.WirelessType == 10"/>
  51. <img src="../assets/img/signMap/ism.png" height="54" width="54"
  52. v-if="s.WirelessType == 11"/>
  53. <img src="../assets/img/signMap/800M.png" height="54" width="54"
  54. v-if="s.WirelessType == 12"/>
  55. </em>
  56. <s :class="[
  57. {'yd':s.WirelessType == 1 || s.WirelessType == 4 || s.WirelessType == 6},
  58. {'lt':s.WirelessType == 2 || s.WirelessType == 5 || s.WirelessType == 7},
  59. {'dx':s.WirelessType == 3 || s.WirelessType == 8 },
  60. {'qt':s.WirelessType == 9 || s.WirelessType == 10 || s.WirelessType == 11|| s.WirelessType == 12},
  61. ]"
  62. >{{s.WirelessType | typeName}}</s>
  63. </div>
  64. </el-popover>
  65. </span>
  66. </div>
  67. <div class="right_rule">
  68. <span>0</span>
  69. <span v-for="i in XMax" v-if="i % xLimit == 0">{{i}}</span>
  70. </div>
  71. <div class="bottom_rule">
  72. <span>0</span>
  73. <span v-for="i in YMax" v-if="i % yLimit == 0">{{i}}</span>
  74. </div>
  75. </div>
  76. </div>
  77. </template>
  78. <script>
  79. export default {
  80. data() {
  81. return {
  82. screen_full: false,
  83. checked: true,
  84. full_state: false,
  85. scan: [],
  86. XMax: 24,
  87. YMax: 56,
  88. xLimit: 2,
  89. yLimit: 2,
  90. }
  91. },
  92. props: ['signList'],
  93. watch: {
  94. signList: function (val) {
  95. // console.log(val);
  96. this.scan = val.Rs.Data;
  97. this.XMax = val.Rs.XMax;
  98. this.YMax = val.Rs.YMax;
  99. this.xLimit = parseInt(this.XMax / 12);
  100. this.yLimit = parseInt(this.YMax / 28);
  101. },
  102. },
  103. methods: {
  104. // 全屏
  105. full_screen() {
  106. this.screen_full = true;
  107. let elem = document.getElementById("signMap");
  108. this.full_state = true;
  109. if (elem.webkitRequestFullScreen) {
  110. elem.webkitRequestFullScreen();
  111. } else if (elem.mozRequestFullScreen) {
  112. elem.mozRequestFullScreen();
  113. } else if (elem.requestFullScreen) {
  114. elem.requestFullscreen();
  115. } else {
  116. this.screen_full = false;
  117. notice.notice_show("浏览器不支持全屏API或已被禁用", null, null, null, true, true);
  118. }
  119. },
  120. // 取消全屏
  121. cancle_screen() {
  122. this.screen_full = false;
  123. this.full_state = false;
  124. var elem = document;
  125. if (elem.webkitCancelFullScreen) {
  126. elem.webkitCancelFullScreen();
  127. } else if (elem.mozCancelFullScreen) {
  128. elem.mozCancelFullScreen();
  129. } else if (elem.cancelFullScreen) {
  130. elem.cancelFullScreen();
  131. } else if (elem.exitFullscreen) {
  132. elem.exitFullscreen();
  133. } else {
  134. this.screen_full = true;
  135. notice.notice_show("浏览器不支持全屏API或已被禁用", null, null, null, true, true);
  136. }
  137. },
  138. },
  139. filters: {
  140. typeName: function (value) {
  141. return filterWirelessType(value)
  142. },
  143. },
  144. }
  145. </script>
  146. <style scoped>
  147. .signMap {
  148. width: 100%;
  149. height: 473px;
  150. overflow: hidden;
  151. display: block;
  152. margin: 0 auto;
  153. margin-top: 0px;
  154. }
  155. .signMapList {
  156. position: relative;
  157. width: 100%;
  158. height: 80%;
  159. overflow: hidden;
  160. display: block;
  161. margin: 0 auto;
  162. margin-top: 20px;
  163. color: #6DC1FF;
  164. }
  165. .sum-title {
  166. width: 150px;
  167. height: 36px;
  168. font-size: 16px;
  169. line-height: 36px;
  170. color: #6DC1FF;
  171. margin: 0 auto;
  172. text-align: center;
  173. background: url("../assets/img/main/tit.png") top center no-repeat;
  174. background-size: 100%;
  175. }
  176. .compass {
  177. position: relative;
  178. left: 3%;
  179. top: -20px;
  180. float: left;
  181. }
  182. .screen {
  183. position: relative;
  184. right: 3%;
  185. top: -20px;
  186. float: right;
  187. cursor: pointer;
  188. }
  189. .signMapListBg {
  190. width: 95%;
  191. /*height: 385px;*/
  192. height: 90%;
  193. float: left;
  194. background: url("../assets/img/main/grid.png");
  195. background-size: 100% 100%;
  196. }
  197. .right_rule {
  198. float: left;
  199. width: 30px;
  200. height: 90%;
  201. }
  202. .right_rule span {
  203. width: 100%;
  204. overflow: hidden;
  205. display: block;
  206. margin: 0 auto;
  207. height: 8%;
  208. line-height: 100%;
  209. text-align: center;
  210. font-size: 12px;
  211. }
  212. .bottom_rule {
  213. width: 100%;
  214. overflow: hidden;
  215. display: block;
  216. margin: 0 auto;
  217. }
  218. .bottom_rule span {
  219. width: 3.2%;
  220. text-align: center;
  221. float: left;
  222. font-size: 12px;
  223. }
  224. .tips {
  225. position: absolute;
  226. top: 10%;
  227. left: 0;
  228. right: 0;
  229. margin: 0 auto;
  230. width: 306px;
  231. height: 306px;
  232. overflow: hidden;
  233. background: url("../assets/img/main/ready.png");
  234. background-size: 100% 100%;
  235. text-align: center;
  236. line-height: 306px;
  237. font-size: 30px;
  238. color: #fff;
  239. }
  240. .signMapListBg span {
  241. position: relative;
  242. float: left;
  243. overflow: hidden;
  244. cursor: pointer;
  245. }
  246. .signMapListBg em {
  247. overflow: hidden;
  248. display: block;
  249. margin: 0 auto;
  250. }
  251. .signMapListBg s {
  252. width: 100%;
  253. overflow: hidden;
  254. display: block;
  255. margin: 0 auto;
  256. text-align: center;
  257. font-size: 12px;
  258. text-decoration: none;
  259. }
  260. .signMapListBg img {
  261. -webkit-animation: twinkling 1s infinite ease-in-out;
  262. -webkit-animation-duration: 1s;
  263. animation-duration: 1s;
  264. -webkit-animation-fill-mode: both;
  265. animation-fill-mode: both
  266. }
  267. .signMap s {
  268. color: #72FF99;
  269. }
  270. s.yd {
  271. color: #72FF99;
  272. }
  273. s.lt {
  274. color: #FFB06B;
  275. }
  276. s.dx {
  277. color: #00FEFF;
  278. }
  279. s.qt {
  280. color: #FFE853;
  281. }
  282. @-webkit-keyframes twinkling {
  283. 0% {
  284. opacity: 0.5;
  285. }
  286. 100% {
  287. opacity: 1;
  288. }
  289. }
  290. @keyframes twinkling {
  291. 0% {
  292. opacity: 0.5;
  293. }
  294. 100% {
  295. opacity: 1;
  296. }
  297. }
  298. </style>