index.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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: 'f6' }
  99. },
  100. {
  101. tableName: 'glsms_proimgup',
  102. params: { module: '1004', floor: 'f5' }
  103. },
  104. {
  105. tableName: 'glsms_proimgup',
  106. params: { module: '1004', floor: 'f4' }
  107. },
  108. {
  109. tableName: 'glsms_proimgup',
  110. params: { module: '1004', floor: 'f3' }
  111. },
  112. {
  113. tableName: 'glsms_proimgup',
  114. params: { module: '1004', floor: 'f2' }
  115. },
  116. {
  117. tableName: 'glsms_proimgup',
  118. params: { module: '1004', floor: 'f1' }
  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. data.forEach(el => {
  134. if (el.count > 0) {
  135. let obj = {
  136. gname: el.params.floor,
  137. code: el.params.floor.toUpperCase(),
  138. gcode: el.params.floor
  139. .toUpperCase()
  140. .split('')
  141. .reverse()
  142. .join(''),
  143. seq:
  144. el.params.floor.substring(0, 1) == 'b'
  145. ? -Number(el.params.floor.substring(1, 2)) + '00'
  146. : Number(el.params.floor.substring(1, 2)) + '00'
  147. }
  148. this.floorData.push(obj)
  149. }
  150. })
  151. })
  152. }
  153. },
  154. computed: {
  155. ...mapGetters(['floorsArr', 'plazaId'])
  156. },
  157. mounted() {
  158. let module = window.location.href.split('=')[1]
  159. if (module == 'comprehensive ') {
  160. this.matterId = 1
  161. }
  162. this.everySystem = this.matter[0].children
  163. this.tabSize()
  164. }
  165. }
  166. </script>
  167. <style lang="less" scoped>
  168. .other {
  169. background: rgba(242, 245, 247, 1);
  170. height: 100%;
  171. overflow: auto;
  172. .other-top {
  173. margin-top: 24px;
  174. position: fixed;
  175. text-align: center;
  176. width: 100%;
  177. z-index: 2;
  178. .other-system {
  179. padding: 12px 23px;
  180. color: #1f2429;
  181. background: #fff;
  182. font-size: 16px;
  183. cursor: pointer;
  184. vertical-align: bottom;
  185. img {
  186. width: 16px;
  187. height: 16px;
  188. margin-right: 4px;
  189. margin-bottom: 3px;
  190. }
  191. }
  192. .isActive {
  193. color: #025baa;
  194. font-weight: bolder;
  195. background: linear-gradient(360deg, rgba(2, 91, 170, 0.1) 0%, rgba(2, 91, 170, 0) 100%);
  196. }
  197. }
  198. .other-bottom {
  199. display: flex;
  200. .other-left {
  201. position: fixed;
  202. z-index: 2;
  203. padding-top: 100px;
  204. color: #646c73;
  205. font-size: 14px;
  206. }
  207. .li-style {
  208. padding: 0 0 8px 35px;
  209. cursor: pointer;
  210. display: flex;
  211. align-items: center;
  212. .circle {
  213. width: 6px;
  214. height: 6px;
  215. border-radius: 50%;
  216. display: inline-block;
  217. margin-right: 10px;
  218. background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
  219. }
  220. .hanzi {
  221. padding: 10px 2px;
  222. width: 200px;
  223. display: inline-block;
  224. &:hover {
  225. color: rgba(2, 91, 170, 1);
  226. background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);
  227. }
  228. }
  229. }
  230. .other-right {
  231. margin-top: 24px;
  232. flex: 1;
  233. }
  234. .legend-boxs {
  235. position: fixed;
  236. right: 32px;
  237. top: 155px;
  238. }
  239. }
  240. .qtfugl {
  241. // border: 1px solid blue;
  242. // height: 95%;
  243. background: #ffffff;
  244. margin: 80px 80px 10px 230px;
  245. overflow: auto;
  246. height: calc(100% - 140px);
  247. .fzyfImg {
  248. // width: 100%;
  249. // height: 100%;
  250. // width: 1035px;
  251. // height: 544px;
  252. // margin: 0 auto;
  253. // margin-top: 200px;
  254. img {
  255. width: 100%;
  256. // height: 100%;
  257. object-fit: cover;
  258. // max-width: 100%;
  259. // max-height: 100%;
  260. // display: block;
  261. // margin: 0 auto;
  262. }
  263. }
  264. .fzyfwtp {
  265. width: 1035px;
  266. height: 544px;
  267. margin: 0 auto;
  268. margin-top: 93px;
  269. position: relative;
  270. img {
  271. width: 126px;
  272. height: 121px;
  273. position: absolute;
  274. top: 50%;
  275. left: 50%;
  276. margin-top: -60px;
  277. margin-left: -63px;
  278. }
  279. .fjt {
  280. margin-top: 7px;
  281. font-size: 16px;
  282. font-family: MicrosoftYaHei;
  283. color: rgba(100, 108, 115, 1);
  284. line-height: 21px;
  285. position: absolute;
  286. top: 50%;
  287. left: 50%;
  288. margin-top: 65px;
  289. margin-left: -60px;
  290. }
  291. }
  292. }
  293. }
  294. // @media screen and (max-width: 1600px) {
  295. // /*当屏幕尺寸小于1366px时,应用下面的CSS样式*/
  296. // .fzyfImg {
  297. // margin-top: 120px !important;
  298. // height: 500px !important;
  299. // }
  300. // }
  301. // @media screen and (max-width: 1366px) {
  302. // /*当屏幕尺寸小于1366px时,应用下面的CSS样式*/
  303. // .fzyfImg {
  304. // margin-top: 90px !important;
  305. // height: 400px !important;
  306. // }
  307. // }
  308. </style>