index.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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. module: ''
  63. }
  64. },
  65. components: { floorListOther, OtherDialog, ZhsxOther, GcfzDialog },
  66. methods: {
  67. tabSyatem(item) {
  68. this.matterId = item.id
  69. this.everySystem = item.children
  70. this.systemName = item.name
  71. },
  72. emitFloor(item) {
  73. this.queryPicter(item.gname)
  74. this.floorInfo = item
  75. this.picFloor = this.floorInfo.gname
  76. },
  77. dialogVisible(item) {
  78. this.$refs.gcfzDialog.showModal(item)
  79. },
  80. queryPicter(floor) {
  81. this.picFloor = this.$cookie.get('floorNow')
  82. let getParams = {
  83. module: '1004',
  84. floor: floor,
  85. plazaId: this.plazaId
  86. }
  87. queryPic({ getParams }).then(res => {
  88. //console.log('库房管理图', res)
  89. this.picFloorImg = res.data[0].url ? res.data[0].url : ''
  90. })
  91. },
  92. // 查询哪几个楼层有库房图
  93. tabSize() {
  94. let data = { plazaId: this.plazaId }
  95. let postParams = [
  96. {
  97. tableName: 'glsms_proimgup',
  98. params: { module: '1004', floor: 'f1' }
  99. },
  100. {
  101. tableName: 'glsms_proimgup',
  102. params: { module: '1004', floor: 'f2' }
  103. },
  104. {
  105. tableName: 'glsms_proimgup',
  106. params: { module: '1004', floor: 'f3' }
  107. },
  108. {
  109. tableName: 'glsms_proimgup',
  110. params: { module: '1004', floor: 'f4' }
  111. },
  112. {
  113. tableName: 'glsms_proimgup',
  114. params: { module: '1004', floor: 'f5' }
  115. },
  116. {
  117. tableName: 'glsms_proimgup',
  118. params: { module: '1004', floor: 'f6' }
  119. },
  120. {
  121. tableName: 'glsms_proimgup',
  122. params: { module: '1004', floor: 'b1' }
  123. },
  124. {
  125. tableName: 'glsms_proimgup',
  126. params: { module: '1004', floor: 'b2' }
  127. }
  128. ]
  129. queryTab({ data, postParams }).then(res => {
  130. //console.log('查询哪几层楼有图', res)
  131. this.floorData = []
  132. let data = res.data.data
  133. console.log('data', data)
  134. data.forEach(el => {
  135. if (el.count > 0) {
  136. let obj = {
  137. gname: el.params.floor,
  138. code: el.params.floor.toUpperCase(),
  139. gcode: el.params.floor
  140. .toUpperCase()
  141. .split('')
  142. .reverse()
  143. .join(''),
  144. seq:
  145. el.params.floor.substring(1, 2) == 'b'
  146. ? el.params.floor.substring(1, 2) + '00'
  147. : -el.params.floor.substring(1, 2) + '00'
  148. }
  149. this.floorData.push(obj)
  150. }
  151. })
  152. })
  153. }
  154. },
  155. computed: {
  156. ...mapGetters(['floorsArr', 'plazaId'])
  157. },
  158. mounted() {
  159. let module = window.location.href.split('=')[1]
  160. if (module == 'comprehensive ') {
  161. this.matterId = 1
  162. }
  163. this.everySystem = this.matter[0].children
  164. this.tabSize()
  165. }
  166. }
  167. </script>
  168. <style lang="less" scoped>
  169. .other {
  170. background: rgba(242, 245, 247, 1);
  171. height: 100%;
  172. overflow: hidden;
  173. .other-top {
  174. margin-top: 24px;
  175. position: fixed;
  176. text-align: center;
  177. width: 100%;
  178. z-index: 2;
  179. .other-system {
  180. padding: 12px 23px;
  181. color: #1f2429;
  182. background: #fff;
  183. font-size: 16px;
  184. cursor: pointer;
  185. vertical-align: bottom;
  186. img {
  187. width: 16px;
  188. height: 16px;
  189. margin-right: 4px;
  190. margin-bottom: 3px;
  191. }
  192. }
  193. .isActive {
  194. color: #025baa;
  195. font-weight: bolder;
  196. background: linear-gradient(360deg, rgba(2, 91, 170, 0.1) 0%, rgba(2, 91, 170, 0) 100%);
  197. }
  198. }
  199. .other-bottom {
  200. display: flex;
  201. .other-left {
  202. position: fixed;
  203. z-index: 2;
  204. padding-top: 100px;
  205. color: #646c73;
  206. font-size: 14px;
  207. }
  208. .li-style {
  209. padding: 0 0 8px 35px;
  210. cursor: pointer;
  211. display: flex;
  212. align-items: center;
  213. .circle {
  214. width: 6px;
  215. height: 6px;
  216. border-radius: 50%;
  217. display: inline-block;
  218. margin-right: 10px;
  219. background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
  220. }
  221. .hanzi {
  222. padding: 10px 2px;
  223. width: 200px;
  224. display: inline-block;
  225. &:hover {
  226. color: rgba(2, 91, 170, 1);
  227. background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);
  228. }
  229. }
  230. }
  231. .other-right {
  232. margin-top: 24px;
  233. flex: 1;
  234. }
  235. .legend-boxs {
  236. position: fixed;
  237. right: 32px;
  238. top: 155px;
  239. }
  240. }
  241. .qtfugl {
  242. .fzyfImg {
  243. width: 1035px;
  244. height: 544px;
  245. margin: 0 auto;
  246. margin-top: 200px;
  247. img {
  248. width: 100%;
  249. height: 100%;
  250. object-fit: cover;
  251. // max-width: 100%;
  252. // max-height: 100%;
  253. // display: block;
  254. // margin: 0 auto;
  255. }
  256. }
  257. .fzyfwtp {
  258. width: 1035px;
  259. height: 544px;
  260. margin: 0 auto;
  261. margin-top: 93px;
  262. position: relative;
  263. img {
  264. width: 126px;
  265. height: 121px;
  266. position: absolute;
  267. top: 50%;
  268. left: 50%;
  269. margin-top: -60px;
  270. margin-left: -63px;
  271. }
  272. .fjt {
  273. margin-top: 7px;
  274. font-size: 16px;
  275. font-family: MicrosoftYaHei;
  276. color: rgba(100, 108, 115, 1);
  277. line-height: 21px;
  278. position: absolute;
  279. top: 50%;
  280. left: 50%;
  281. margin-top: 65px;
  282. margin-left: -60px;
  283. }
  284. }
  285. }
  286. }
  287. </style>