index.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <template>
  2. <div style="padding: 0px 35px; display: flex; justify-content: space-between">
  3. <div>
  4. <border-panel height="360px" style="margin-bottom: 6px" title="建筑信息">
  5. <BuildingInfo :detail="detail" v-if="detail" />
  6. <div slot="ext-header">
  7. <div class="float-btn" @click="openModal({ name: 'qtModal' })">
  8. 其他
  9. </div>
  10. </div>
  11. </border-panel>
  12. <border-panel height="585px" style="margin-bottom: 6px" title="管理单位">
  13. <GementUnit :detail="detail" v-if="detail" @openModal="openModal" />
  14. </border-panel>
  15. </div>
  16. <div style="width: 1000px; position: relative">
  17. <div style="height: calc(100% - 325px)">
  18. <iframe
  19. ref="box"
  20. :src="dtData.txdz"
  21. style="height: 100%; width: 100%"
  22. v-if="dtData && dtData.txdz && middleType === '720'"
  23. ></iframe>
  24. <div style="height: 100%; width: 100%" v-if="middleType === 'map'">
  25. <Map :data="mapData" v-if="mapData" />
  26. </div>
  27. </div>
  28. <border-panel
  29. class="ylym2"
  30. :header-type="3"
  31. height="313px"
  32. width="955px"
  33. style="margin: 7px"
  34. title='火灾风险"一楼一码"'
  35. >
  36. <Risklevel :detail="detail" v-if="detail" @openModal="openModal" />
  37. </border-panel>
  38. <div
  39. class="m-btn d"
  40. :class="middleType === '720' ? 'map' : 'd'"
  41. @click="changeMiddleType"
  42. v-if="dtData && dtData.txdz"
  43. ></div>
  44. </div>
  45. <div>
  46. <border-panel height="521px" style="margin-bottom: 6px" title="智慧消防">
  47. <VideoInfo :detail="detail" v-if="detail" @openModal="openModal" />
  48. </border-panel>
  49. <border-panel
  50. height="425px"
  51. style="margin-bottom: 6px"
  52. title="自查、监督、维保"
  53. >
  54. <maintenance-supervision
  55. :detail="detail"
  56. v-if="detail"
  57. @openModal="openModal"
  58. />
  59. </border-panel>
  60. </div>
  61. <!-- 管理单位弹窗 -->
  62. <basic-modal top="120px" ref="gldwModal" name="管理单位" width="90%">
  63. <GldwModalContent :default="params.gldwModal" />
  64. </basic-modal>
  65. <!-- 其他 -->
  66. <basic-modal top="120px" ref="qtModal" name="其他">
  67. <BasicInfoModalContent />
  68. </basic-modal>
  69. <!-- 风险问号弹窗 -->
  70. <basic-modal top="30px" ref="whFxModal" name="安全风险分级预警流程" width="90%">
  71. <div style="display: flex; justify-content: center">
  72. <img src="../../assets/images/zl-fxyj.png" />
  73. </div>
  74. </basic-modal>
  75. <!-- 隐患问号弹窗 -->
  76. <basic-modal top="30px" ref="whYhModal" name="隐患闭环处置流程" width="90%">
  77. <div style="display: flex; justify-content: center">
  78. <img src="../../assets/images/dd-yhczlc.png" />
  79. </div>
  80. </basic-modal>
  81. <!-- 历史火灾 -->
  82. <basic-modal top="120px" ref="qhyyModal" name="历史火灾">
  83. <QhyyModalContent :default="params.qhyyModal" />
  84. </basic-modal>
  85. <!-- 隐患 -->
  86. <basic-modal top="120px" ref="yhModal">
  87. <YhModalContent :default="params.yhModal" />
  88. <YlycModalHeader slot="title" />
  89. </basic-modal>
  90. <!-- 智慧消防 -->
  91. <basic-modal top="120px" ref="zhxfModal" name="智慧消防">
  92. <fxfbCont
  93. :gcjzmc="params && params.zhxfModal ? params.zhxfModal.gcjzmc : null"
  94. :sbType="params && params.zhxfModal ? params.zhxfModal.sblx : null" />
  95. </basic-modal>
  96. <!-- 自查 -->
  97. <basic-modal top="120px" ref="zcModal" name="自查、督查、维保信息">
  98. <MaintenanceModalContent :default="params.zcModal" />
  99. </basic-modal>
  100. </div>
  101. </template>
  102. <script>
  103. import BuildingInfo from "./components/BuildingInfo.vue";
  104. import VideoInfo from "./components/VideoInfo.vue";
  105. import GementUnit from "./components/GementUnit.vue";
  106. import Risklevel from "./components/Risklevel.vue";
  107. import MaintenanceSupervision from "./components/MaintenanceSupervision.vue";
  108. import HistoricalFire from "./components/HistoricalFire.vue";
  109. import HiddenDanger from "./components/HiddenDanger.vue";
  110. import { getBuildDetail, get720 } from "@/api/detail.js";
  111. import Map from "@/components/Map.vue";
  112. import GldwModalContent from "./components/GldwModalContent.vue";
  113. import BasicInfoModalContent from "../Home/components/BasicInfoModalContent.vue";
  114. import QhyyModalContent from "./components/QhyyModalContent.vue";
  115. import YhModalContent from "./components/YhModalContent.vue";
  116. import MaintenanceModalContent from "./components/MaintenanceModalContent.vue";
  117. import fxfbCont from '../Iot/components/fxfbCont.vue';
  118. export default {
  119. name: "BasicInfoPage",
  120. components: {
  121. BuildingInfo,
  122. VideoInfo,
  123. GementUnit,
  124. Risklevel,
  125. MaintenanceSupervision,
  126. HistoricalFire,
  127. HiddenDanger,
  128. Map,
  129. GldwModalContent,
  130. BasicInfoModalContent,
  131. QhyyModalContent,
  132. YhModalContent,
  133. MaintenanceModalContent,
  134. fxfbCont
  135. },
  136. data() {
  137. return {
  138. id: null,
  139. detail: null,
  140. middleType: "720",
  141. mapData: null,
  142. params: {
  143. gldwModal: null,
  144. qhyyModal: null,
  145. yhModal: null,
  146. zhxfModal: null,
  147. zcModal: null,
  148. },
  149. dtData: null,
  150. };
  151. },
  152. methods: {
  153. openModal(data) {
  154. console.log(data);
  155. this.params[data.name] = data.params;
  156. this.showModal(data.name);
  157. },
  158. changeMiddleType() {
  159. if (this.middleType === "720") {
  160. this.getMapData();
  161. this.middleType = "map";
  162. } else {
  163. this.middleType = "720";
  164. }
  165. },
  166. getMapData() {
  167. // console.log(this.params.id);
  168. this.mapData = null;
  169. this.mapData = {
  170. jd: this.detail.jd,
  171. wd: this.detail.wd,
  172. zl: null,
  173. jzmc: this.detail.gcjzmc,
  174. showzhd: false,
  175. };
  176. },
  177. getQueryString(name) {
  178. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  179. var r = window.location.search.substr(1).match(reg);
  180. if (r != null) {
  181. return unescape(r[2]);
  182. }
  183. return null;
  184. },
  185. getData() {
  186. getBuildDetail(this.id).then((res) => {
  187. this.detail = res.data.data;
  188. this.params.zhxfModal.gcjzmc = this.detail.gcjzmc
  189. });
  190. get720({ jzid: this.id, pageSize: 1000 }).then((res) => {
  191. console.log(res);
  192. this.dtData = res.data.rows.find((p) => p.jzid.toString() === this.id);
  193. console.log(this.dtData);
  194. if (!this.dtData || !this.dtData.txdz) {
  195. this.changeMiddleType();
  196. }
  197. });
  198. },
  199. },
  200. mounted() {
  201. // 获取参数
  202. const id = this.getQueryString("id");
  203. console.log(id);
  204. if (!id) {
  205. return;
  206. }
  207. this.id = id;
  208. this.getData();
  209. },
  210. };
  211. </script>
  212. <style scoped lang="less">
  213. .ylym {
  214. position: absolute;
  215. bottom: 0;
  216. left: 0;
  217. }
  218. .m-btn {
  219. width: 78px;
  220. height: 72px;
  221. position: absolute;
  222. right: 20px;
  223. top: 30px;
  224. z-index: 99;
  225. cursor: pointer;
  226. }
  227. .m-btn.d {
  228. background: url("../../assets/images/dd-change-720.png") center center
  229. no-repeat;
  230. background-size: 78px 72px;
  231. }
  232. .m-btn.map {
  233. background: url("../../assets/images/dd-change-map.png") center center
  234. no-repeat;
  235. background-size: 78px 72px;
  236. }
  237. .float-btn {
  238. width: 55px;
  239. height: 22px;
  240. left: 392px;
  241. top: 127px;
  242. background: linear-gradient(
  243. 180deg,
  244. rgba(0, 209, 255, 0.245) 0%,
  245. rgba(0, 255, 224, 0.435) 100%
  246. );
  247. border: 1px solid rgba(0, 213, 255, 0.22);
  248. border-radius: 2px;
  249. font-family: "Abel";
  250. font-style: normal;
  251. font-weight: 400;
  252. font-size: 12px;
  253. line-height: 24px;
  254. align-items: center;
  255. color: #ffffff;
  256. text-align: center;
  257. cursor: pointer;
  258. }
  259. </style>