123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272 |
- <template>
- <div style="padding: 0px 35px; display: flex; justify-content: space-between">
- <div>
- <border-panel height="360px" style="margin-bottom: 6px" title="建筑信息">
- <BuildingInfo :detail="detail" v-if="detail" />
- <div slot="ext-header">
- <div class="float-btn" @click="openModal({ name: 'qtModal' })">
- 其他
- </div>
- </div>
- </border-panel>
- <border-panel height="585px" style="margin-bottom: 6px" title="管理单位">
- <GementUnit :detail="detail" v-if="detail" @openModal="openModal" />
- </border-panel>
- </div>
- <div style="width: 1000px; position: relative">
- <div style="height: calc(100% - 325px)">
- <iframe
- ref="box"
- :src="dtData.txdz"
- style="height: 100%; width: 100%"
- v-if="dtData && dtData.txdz && middleType === '720'"
- ></iframe>
- <div style="height: 100%; width: 100%" v-if="middleType === 'map'">
- <Map :data="mapData" v-if="mapData" />
- </div>
- </div>
- <border-panel
- class="ylym2"
- :header-type="3"
- height="313px"
- width="955px"
- style="margin: 7px"
- title='火灾风险"一楼一码"'
- >
- <Risklevel :detail="detail" v-if="detail" @openModal="openModal" />
- </border-panel>
- <div
- class="m-btn d"
- :class="middleType === '720' ? 'map' : 'd'"
- @click="changeMiddleType"
- v-if="dtData && dtData.txdz"
- ></div>
- </div>
- <div>
- <border-panel height="521px" style="margin-bottom: 6px" title="智慧消防">
- <VideoInfo :detail="detail" v-if="detail" @openModal="openModal" />
- </border-panel>
- <border-panel
- height="425px"
- style="margin-bottom: 6px"
- title="自查、监督、维保"
- >
- <maintenance-supervision
- :detail="detail"
- v-if="detail"
- @openModal="openModal"
- />
- </border-panel>
- </div>
- <!-- 管理单位弹窗 -->
- <basic-modal top="120px" ref="gldwModal" name="管理单位" width="90%">
- <GldwModalContent :default="params.gldwModal" />
- </basic-modal>
- <!-- 其他 -->
- <basic-modal top="120px" ref="qtModal" name="其他">
- <BasicInfoModalContent />
- </basic-modal>
- <!-- 风险问号弹窗 -->
- <basic-modal top="30px" ref="whFxModal" name="安全风险分级预警流程" width="90%">
- <div style="display: flex; justify-content: center">
- <img src="../../assets/images/zl-fxyj.png" />
- </div>
- </basic-modal>
- <!-- 隐患问号弹窗 -->
- <basic-modal top="30px" ref="whYhModal" name="隐患闭环处置流程" width="90%">
- <div style="display: flex; justify-content: center">
- <img src="../../assets/images/dd-yhczlc.png" />
- </div>
- </basic-modal>
- <!-- 历史火灾 -->
- <basic-modal top="120px" ref="qhyyModal" name="历史火灾">
- <QhyyModalContent :default="params.qhyyModal" />
- </basic-modal>
- <!-- 隐患 -->
- <basic-modal top="120px" ref="yhModal">
- <YhModalContent :default="params.yhModal" />
- <YlycModalHeader slot="title" />
- </basic-modal>
- <!-- 智慧消防 -->
- <basic-modal top="120px" ref="zhxfModal" name="智慧消防">
- <fxfbCont
- :gcjzmc="params && params.zhxfModal ? params.zhxfModal.gcjzmc : null"
- :sbType="params && params.zhxfModal ? params.zhxfModal.sblx : null" />
- </basic-modal>
- <!-- 自查 -->
- <basic-modal top="120px" ref="zcModal" name="自查、督查、维保信息">
- <MaintenanceModalContent :default="params.zcModal" />
- </basic-modal>
- </div>
- </template>
- <script>
- import BuildingInfo from "./components/BuildingInfo.vue";
- import VideoInfo from "./components/VideoInfo.vue";
- import GementUnit from "./components/GementUnit.vue";
- import Risklevel from "./components/Risklevel.vue";
- import MaintenanceSupervision from "./components/MaintenanceSupervision.vue";
- import HistoricalFire from "./components/HistoricalFire.vue";
- import HiddenDanger from "./components/HiddenDanger.vue";
- import { getBuildDetail, get720 } from "@/api/detail.js";
- import Map from "@/components/Map.vue";
- import GldwModalContent from "./components/GldwModalContent.vue";
- import BasicInfoModalContent from "../Home/components/BasicInfoModalContent.vue";
- import QhyyModalContent from "./components/QhyyModalContent.vue";
- import YhModalContent from "./components/YhModalContent.vue";
- import MaintenanceModalContent from "./components/MaintenanceModalContent.vue";
- import fxfbCont from '../Iot/components/fxfbCont.vue';
- export default {
- name: "BasicInfoPage",
- components: {
- BuildingInfo,
- VideoInfo,
- GementUnit,
- Risklevel,
- MaintenanceSupervision,
- HistoricalFire,
- HiddenDanger,
- Map,
- GldwModalContent,
- BasicInfoModalContent,
- QhyyModalContent,
- YhModalContent,
- MaintenanceModalContent,
- fxfbCont
- },
- data() {
- return {
- id: null,
- detail: null,
- middleType: "720",
- mapData: null,
- params: {
- gldwModal: null,
- qhyyModal: null,
- yhModal: null,
- zhxfModal: null,
- zcModal: null,
- },
- dtData: null,
- };
- },
- methods: {
- openModal(data) {
- console.log(data);
- this.params[data.name] = data.params;
- this.showModal(data.name);
- },
- changeMiddleType() {
- if (this.middleType === "720") {
- this.getMapData();
- this.middleType = "map";
- } else {
- this.middleType = "720";
- }
- },
- getMapData() {
- // console.log(this.params.id);
- this.mapData = null;
- this.mapData = {
- jd: this.detail.jd,
- wd: this.detail.wd,
- zl: null,
- jzmc: this.detail.gcjzmc,
- showzhd: false,
- };
- },
- getQueryString(name) {
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
- var r = window.location.search.substr(1).match(reg);
- if (r != null) {
- return unescape(r[2]);
- }
- return null;
- },
- getData() {
- getBuildDetail(this.id).then((res) => {
- this.detail = res.data.data;
- this.params.zhxfModal.gcjzmc = this.detail.gcjzmc
- });
- get720({ jzid: this.id, pageSize: 1000 }).then((res) => {
- console.log(res);
- this.dtData = res.data.rows.find((p) => p.jzid.toString() === this.id);
- console.log(this.dtData);
- if (!this.dtData || !this.dtData.txdz) {
- this.changeMiddleType();
- }
- });
- },
- },
- mounted() {
- // 获取参数
- const id = this.getQueryString("id");
- console.log(id);
- if (!id) {
- return;
- }
- this.id = id;
- this.getData();
- },
- };
- </script>
- <style scoped lang="less">
- .ylym {
- position: absolute;
- bottom: 0;
- left: 0;
- }
- .m-btn {
- width: 78px;
- height: 72px;
- position: absolute;
- right: 20px;
- top: 30px;
- z-index: 99;
- cursor: pointer;
- }
- .m-btn.d {
- background: url("../../assets/images/dd-change-720.png") center center
- no-repeat;
- background-size: 78px 72px;
- }
- .m-btn.map {
- background: url("../../assets/images/dd-change-map.png") center center
- no-repeat;
- background-size: 78px 72px;
- }
- .float-btn {
- width: 55px;
- height: 22px;
- left: 392px;
- top: 127px;
- background: linear-gradient(
- 180deg,
- rgba(0, 209, 255, 0.245) 0%,
- rgba(0, 255, 224, 0.435) 100%
- );
- border: 1px solid rgba(0, 213, 255, 0.22);
- border-radius: 2px;
- font-family: "Abel";
- font-style: normal;
- font-weight: 400;
- font-size: 12px;
- line-height: 24px;
- align-items: center;
- color: #ffffff;
- text-align: center;
- cursor: pointer;
- }
- </style>
|