index.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <div class='other'>
  3. <div class='other-top'>
  4. <span class='other-system' v-for='(item,index) in matter' :class='item.id==matterId?"isActive":""' :key='index' @click='tabSyatem(item)'>
  5. <img :src='item.id==matterId?item.icon1:item.icon' alt />
  6. {{item.name}}
  7. </span>
  8. </div>
  9. <div class='other-bottom' v-if='matterId!=1'>
  10. <div class='other-left'>
  11. <ul>
  12. <li class='li-style' v-for='(item,index) in everySystem' :key='"o"+index' @click='dialogVisible(item)'>
  13. <span class='circle'></span>
  14. <span class='hanzi'>{{item.label}}</span>
  15. </li>
  16. </ul>
  17. </div>
  18. <!-- 楼层 -->
  19. <div class='other-right' v-if='matterId!=1'>
  20. <floor-list-other v-if='floorData.length>0' :floorsArr='floorData' @emitFloor='emitFloor' :type='2'></floor-list-other>
  21. </div>
  22. </div>
  23. <other-dialog ref='dialog' :systemName='systemName'></other-dialog>
  24. <!-- 综合事项管理 -->
  25. <zhsx-other v-if='matterId==1&&everySystem.length>0' :everySystem='everySystem'></zhsx-other>
  26. <!-- 辅助用房管理 -->
  27. <div class='qtfugl' v-if='matterId==2'>
  28. <div v-if='floorData.length==0' class='fzyfwtp'>
  29. <img src='@/assets/imgs/wtp.png' alt />
  30. <p class='fjt'>暂无附加数据图片</p>
  31. </div>
  32. <div class='fzyfImg' v-else>
  33. <img :src='picFloorImg' alt />
  34. </div>
  35. </div>
  36. <gcfz-dialog ref='gcfzDialog' :systemName='systemName'></gcfz-dialog>
  37. </div>
  38. </template>
  39. <script>
  40. import ZhsxOther from './zhsxOther'
  41. import GcfzDialog from './gcfzDialog'
  42. import OtherDialog from './otherDialog'
  43. import { queryPic, queryTab } from '@/api/public.js'
  44. import floorListOther from '@/components/floorListOther.vue'
  45. import { matter } from '@/utils/plugins/components.js'
  46. import { mapGetters } from 'vuex'
  47. export default {
  48. data() {
  49. return {
  50. matter,
  51. everySystem: [],
  52. matterId: 1,
  53. systemName: '供电系统',
  54. floorInfo: {
  55. floorName: 'F1',
  56. floorId: 'f1'
  57. },
  58. picFloor: '',
  59. picFloorImg: [],
  60. dialogInfo: {},
  61. floorData: []
  62. }
  63. },
  64. components: { floorListOther, OtherDialog, ZhsxOther, GcfzDialog },
  65. methods: {
  66. tabSyatem(item) {
  67. this.matterId = item.id
  68. this.everySystem = item.children
  69. this.systemName = item.name
  70. },
  71. emitFloor(item) {
  72. this.queryPicter(item.gname)
  73. this.floorInfo = item
  74. this.picFloor = this.floorInfo.gname
  75. },
  76. dialogVisible(item) {
  77. this.$refs.gcfzDialog.showModal(item)
  78. },
  79. queryPicter(floor) {
  80. this.picFloor = this.$cookie.get('floorNow')
  81. let getParams = {
  82. module: '1004',
  83. floor: floor,
  84. plazaId: this.plazaId
  85. }
  86. queryPic({ getParams }).then(res => {
  87. //console.log('库房管理图', res)
  88. this.picFloorImg = res.data[0].url ? res.data[0].url : ''
  89. })
  90. },
  91. // 查询哪几个楼层有库房图
  92. tabSize() {
  93. let data = { plazaId: this.plazaId }
  94. let postParams = [
  95. {
  96. tableName: 'glsms_proimgup',
  97. params: { module: '1004', floor: 'f1' }
  98. },
  99. {
  100. tableName: 'glsms_proimgup',
  101. params: { module: '1004', floor: 'f2' }
  102. },
  103. {
  104. tableName: 'glsms_proimgup',
  105. params: { module: '1004', floor: 'f3' }
  106. },
  107. {
  108. tableName: 'glsms_proimgup',
  109. params: { module: '1004', floor: 'f4' }
  110. },
  111. {
  112. tableName: 'glsms_proimgup',
  113. params: { module: '1004', floor: 'f5' }
  114. },
  115. {
  116. tableName: 'glsms_proimgup',
  117. params: { module: '1004', floor: 'f6' }
  118. },
  119. {
  120. tableName: 'glsms_proimgup',
  121. params: { module: '1004', floor: 'b1' }
  122. },
  123. {
  124. tableName: 'glsms_proimgup',
  125. params: { module: '1004', floor: 'b2' }
  126. }
  127. ]
  128. queryTab({ data, postParams }).then(res => {
  129. //console.log('查询哪几层楼有图', res)
  130. this.floorData = []
  131. let data = res.data.data
  132. data.forEach(el => {
  133. if (el.count > 0) {
  134. let obj = {
  135. gname: el.params.floor,
  136. code: el.params.floor.toUpperCase(),
  137. gcode: el.params.floor
  138. .toUpperCase()
  139. .split('')
  140. .reverse()
  141. .join(''),
  142. seq:
  143. el.params.floor.substring(1, 2) == 'b'
  144. ? el.params.floor.substring(1, 2) + '00'
  145. : -el.params.floor.substring(1, 2) + '00'
  146. }
  147. this.floorData.push(obj)
  148. }
  149. })
  150. })
  151. }
  152. },
  153. computed: {
  154. ...mapGetters(['floorsArr', 'plazaId'])
  155. },
  156. mounted() {
  157. this.everySystem = this.matter[0].children
  158. this.tabSize()
  159. }
  160. }
  161. </script>
  162. <style lang="less" scoped>
  163. .other {
  164. background: rgba(242, 245, 247, 1);
  165. height: 100%;
  166. overflow: hidden;
  167. .other-top {
  168. margin-top: 24px;
  169. position: fixed;
  170. text-align: center;
  171. width: 100%;
  172. z-index: 2;
  173. .other-system {
  174. padding: 12px 23px;
  175. color: #1f2429;
  176. background: #fff;
  177. font-size: 16px;
  178. cursor: pointer;
  179. vertical-align: bottom;
  180. img {
  181. width: 16px;
  182. height: 16px;
  183. margin-right: 4px;
  184. margin-bottom: 3px;
  185. }
  186. }
  187. .isActive {
  188. color: #025baa;
  189. font-weight: bolder;
  190. background: linear-gradient(360deg, rgba(2, 91, 170, 0.1) 0%, rgba(2, 91, 170, 0) 100%);
  191. }
  192. }
  193. .other-bottom {
  194. display: flex;
  195. .other-left {
  196. position: fixed;
  197. z-index: 2;
  198. padding-top: 100px;
  199. color: #646c73;
  200. font-size: 14px;
  201. }
  202. .li-style {
  203. padding: 0 0 8px 35px;
  204. cursor: pointer;
  205. display: flex;
  206. align-items: center;
  207. .circle {
  208. width: 6px;
  209. height: 6px;
  210. border-radius: 50%;
  211. display: inline-block;
  212. margin-right: 10px;
  213. background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
  214. }
  215. .hanzi {
  216. padding: 10px 2px;
  217. width: 200px;
  218. display: inline-block;
  219. &:hover {
  220. color: rgba(2, 91, 170, 1);
  221. background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);
  222. }
  223. }
  224. }
  225. .other-right {
  226. margin-top: 24px;
  227. flex: 1;
  228. }
  229. .legend-boxs {
  230. position: fixed;
  231. right: 32px;
  232. top: 155px;
  233. }
  234. }
  235. .qtfugl {
  236. .fzyfImg {
  237. width: 1035px;
  238. height: 544px;
  239. margin: 0 auto;
  240. margin-top: 93px;
  241. img {
  242. max-width: 100%;
  243. max-height: 100%;
  244. display: block;
  245. margin: 0 auto;
  246. }
  247. }
  248. .fzyfwtp {
  249. width: 1035px;
  250. height: 544px;
  251. margin: 0 auto;
  252. margin-top: 93px;
  253. position: relative;
  254. img {
  255. width: 126px;
  256. height: 121px;
  257. position: absolute;
  258. top: 50%;
  259. left: 50%;
  260. margin-top: -60px;
  261. margin-left: -63px;
  262. }
  263. .fjt {
  264. margin-top: 7px;
  265. font-size: 16px;
  266. font-family: MicrosoftYaHei;
  267. color: rgba(100, 108, 115, 1);
  268. line-height: 21px;
  269. position: absolute;
  270. top: 50%;
  271. left: 50%;
  272. margin-top: 65px;
  273. margin-left: -60px;
  274. }
  275. }
  276. }
  277. }
  278. </style>