index.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <!-- 设备设施 -->
  3. <div id='equipment'>
  4. <div class='eq-top'>
  5. <span class='eq-system' v-for='(item,index) in system' :class='item.id==systemId?"isActive":""' :key='index' @click='tabSyatem(item)'>
  6. <img :src='item.id==systemId?item.icon1:item.icon' />
  7. {{item.name}}
  8. </span>
  9. </div>
  10. <div class='eq-bottom'>
  11. <div class='eq-left'>
  12. <ul>
  13. <li
  14. class='li-style'
  15. :class='{"is-active": eve.id}'
  16. v-for='(eve,index) in everySystem'
  17. :key='"o"+index'
  18. @click='dialogVisible(eve)'
  19. >
  20. <span class='circle'></span>
  21. <span class='hanzi'>{{eve.label}}</span>
  22. </li>
  23. </ul>
  24. </div>
  25. <div class='eq-right'>
  26. <div class='eq-right-bottom'>
  27. <div class='title-box'>
  28. <!-- <img src='@/assets/imgs/mainIcon.png' /> -->
  29. <div class='eq-title'>
  30. <span>{{floorInfo.code}}</span>
  31. </div>
  32. </div>
  33. <div class='eq-content'>
  34. <div class='legend-boxs'>
  35. <Legend :systemName='systemName'></Legend>
  36. </div>
  37. <floorMap ref='floorMap'></floorMap>
  38. <div class='additional-box' v-if='fqPic.length>0'>
  39. <div class='additional' @click='additionalColl'>
  40. <img src='../../assets/imgs/bg.png' alt />
  41. </div>
  42. <el-collapse-transition>
  43. <div v-if='show' class='add-img'>图</div>
  44. </el-collapse-transition>
  45. </div>
  46. </div>
  47. <floor-list @emitFloor='emitFloor'></floor-list>
  48. </div>
  49. </div>
  50. <!-- <editList></editList> -->
  51. </div>
  52. <eq-dialog ref='dialog' :systemName='systemName' :smsxt='smsxt'></eq-dialog>
  53. </div>
  54. </template>
  55. <script>
  56. import floorList from '@/components/floorList.vue'
  57. import floorMap from '@/components/floorMap/index.vue'
  58. import eqDialog from './eqDialog'
  59. import editList from '@/components/edit.vue'
  60. import { system } from '@/utils/plugins/components.js'
  61. import { queryPic } from '@/api/public.js'
  62. export default {
  63. data() {
  64. return {
  65. system,
  66. everySystem: [],
  67. systemId: 1,
  68. categoryId: 'GDXT',
  69. systemName: '供电系统',
  70. floorInfo: {
  71. gname: 'f1',
  72. code: 'F1'
  73. },
  74. smsxt: '1001',
  75. dialogInfo: {},
  76. brand: [], //品牌
  77. manufacturer: [],
  78. show: false,
  79. fqPic: []
  80. }
  81. },
  82. components: { floorList, eqDialog, floorMap, editList },
  83. methods: {
  84. // 查询tab页
  85. tabSyatem(item) {
  86. console.log(item)
  87. this.systemId = item.id
  88. this.everySystem = item.children
  89. this.systemName = item.name
  90. this.smsxt = item.smsxt
  91. this.$cookie.set('categoryId', item.categoryId, 3)
  92. if (this.smsxt == '1003' || this.smsxt == '1004') {
  93. this.Index()
  94. }
  95. },
  96. emitFloor(item) {
  97. console.log('item', item)
  98. this.floorInfo = item
  99. this.$refs.floorMap.init(this.floorInfo.gname)
  100. },
  101. dialogVisible(eve) {
  102. console.log(eve)
  103. this.$refs.dialog.showModal(eve)
  104. },
  105. additionalColl() {
  106. this.show = !this.show
  107. },
  108. Index() {
  109. let picFloor = this.$cookie.get('floorNow')
  110. let getParams = {
  111. module: '1003',
  112. floor: picFloor,
  113. plazaId: this.$store.state.plazaId
  114. }
  115. if (this.smsxt) {
  116. getParams.system = this.smsxt
  117. }
  118. queryPic({ getParams }).then(res => {
  119. console.log('分区图', res)
  120. this.fqPic = res.data
  121. })
  122. }
  123. },
  124. mounted() {
  125. this.everySystem = this.system[0].children
  126. this.$refs.floorMap.init(this.floorInfo.gname)
  127. }
  128. }
  129. </script>
  130. <style lang="less" scoped>
  131. #equipment {
  132. background: rgba(242, 245, 247, 1);
  133. display: flex;
  134. flex: 1;
  135. overflow: hidden;
  136. .eq-top {
  137. margin-left: 260px;
  138. padding-top: 24px;
  139. position: fixed;
  140. z-index: 3;
  141. min-width: 1300px;
  142. .eq-system {
  143. padding: 12px 20px;
  144. background: #fff;
  145. font-size: 16px;
  146. cursor: pointer;
  147. img {
  148. width: 16px;
  149. height: 16px;
  150. margin-right: 4px;
  151. margin-bottom: 3px;
  152. }
  153. }
  154. .isActive {
  155. color: #025baa;
  156. font-weight: bolder;
  157. background: linear-gradient(360deg, rgba(2, 91, 170, 0.1) 0%, rgba(2, 91, 170, 0) 100%);
  158. }
  159. }
  160. .eq-bottom {
  161. display: flex;
  162. flex: 1;
  163. .eq-left {
  164. position: fixed;
  165. z-index: 2;
  166. width: 260px;
  167. padding-top: 100px;
  168. color: #646c73;
  169. font-size: 14px;
  170. height: 100%;
  171. background: rgba(242, 245, 247, 1);
  172. }
  173. .li-style {
  174. margin-left: 28px;
  175. // padding: 9px 6px;
  176. cursor: pointer;
  177. .circle {
  178. width: 6px;
  179. height: 6px;
  180. background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
  181. border-radius: 50%;
  182. display: inline-block;
  183. margin-right: 10px;
  184. }
  185. .hanzi {
  186. padding: 10px 2px;
  187. width: 200px;
  188. display: inline-block;
  189. &:hover {
  190. color: rgba(2, 91, 170, 1);
  191. background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);
  192. }
  193. }
  194. }
  195. .eq-right {
  196. flex: 1;
  197. .eq-right-bottom {
  198. display: flex;
  199. flex: 1;
  200. .title-box {
  201. position: fixed;
  202. z-index: 2;
  203. top: 146px;
  204. left: 260px;
  205. display: flex;
  206. img {
  207. margin-top: -5px;
  208. }
  209. .eq-title {
  210. width: 140px;
  211. height: 32px;
  212. background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);
  213. box-shadow: -6px 2px 8px 0px rgba(31, 36, 41, 0.1);
  214. color: #025baa;
  215. font-size: 16px;
  216. &::before {
  217. width: 2px;
  218. height: 16px;
  219. background: rgba(2, 91, 170, 1);
  220. display: inline-block;
  221. content: '';
  222. margin-right: 10px;
  223. margin-top: 8px;
  224. }
  225. }
  226. }
  227. .eq-content {
  228. flex: 1;
  229. .legend-boxs {
  230. position: fixed;
  231. z-index: 9;
  232. right: 32px;
  233. top: 160px;
  234. }
  235. .additional-box {
  236. position: relative;
  237. .additional {
  238. width: 44px;
  239. height: 44px;
  240. background: rgba(255, 255, 255, 1);
  241. box-shadow: 0px 2px 15px 0px rgba(31, 36, 41, 0.08);
  242. border-radius: 2px;
  243. position: fixed;
  244. right: 32px;
  245. top: 420px;
  246. z-index: 2;
  247. display: flex;
  248. justify-content: center;
  249. align-items: center;
  250. cursor: pointer;
  251. img {
  252. width: 20px;
  253. height: 20px;
  254. }
  255. }
  256. .add-img {
  257. width: 560px;
  258. height: 325px;
  259. background: #ffffff;
  260. -webkit-box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
  261. box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
  262. border-radius: 2px;
  263. border: 1px solid #e4e5e7;
  264. position: absolute;
  265. right: 77px;
  266. top: 93px;
  267. z-index: 2;
  268. }
  269. }
  270. }
  271. }
  272. }
  273. }
  274. }
  275. </style>
  276. <style lang="less">
  277. .el-table {
  278. th {
  279. background: rgba(248, 249, 250, 1);
  280. font-size: 12px;
  281. padding: 8px 0;
  282. color: #646a73;
  283. }
  284. td {
  285. font-size: 14px;
  286. color: #1f2429;
  287. padding: 8px 0;
  288. overflow: hidden;
  289. text-overflow: ellipsis;
  290. white-space: nowrap;
  291. }
  292. }
  293. </style>