<template>
  <el-dialog
    id="eldig"
    :visible="visible"
    :title="title"
    :width="width"
    custom-class="bi_enterprise_dialog"
    append-to-body
    top="4vh"
    @close="handlerClose">
    <!-- 消防模块 -->
    <xf-point v-if="value.otherInfo && value.otherInfo.type === 'point'" :id="value.id" :type="value.otherInfo.type" :gangkou="gangkou"/>
    <xf-control v-if="value.otherInfo && (value.otherInfo.type === 'xfbf01' || value.otherInfo.type ==='xfkzs01' || value.otherInfo.type ==='xfjyd01' || value.otherInfo.type ==='xfsy01')" :id="value.id" :type="value.otherInfo.type" :gangkou="gangkou"/>
    <!-- 气象模块 -->
    <weatherstation v-if="value.type === '12'" :id="value.id" :type="value.type" :gangkou="gangkou"/>
    <windspeedstation v-if="value.type === '11'" :id="value.id" :type="value.type" :gangkou="gangkou"/>
    <!-- 摄像头 -->
    <video-play-plat v-if="value.otherInfo && value.otherInfo.type === 'platcamera'" :id="value.id" :type="value.otherInfo.type" :gangkou="gangkou"/>
    <!-- 物资装备库 -->
    <wu-zi v-if="value.type === '0'" :id="value.id" :type="value.type"/>
    <!-- 避难所 -->
    <bi-nan-suo v-if="value.type === '1'" :id="value.id" :type="value.type"/>
    <!-- 排水井 -->
    <pai-shui-jing v-if="value.type === '2'" :id="value.id" :type="value.type"/>
    <!-- 封闭卡口 -->
    <feng-bi-ka-kou v-if="value.type === '3'" :id="value.id" :type="value.type"/>
    <!-- 报警点 -->
    <bao-jing v-if="value.type === '13'" :id="value.id" :type="value.type"/>
    <send-message v-if="value.type === 'sendMessage'" :id="value.id" :info="value" @close="handlerClose"/>
  </el-dialog>
</template>

<script>
import XfControl from '../../../map/dialog/xfControl.vue'
import XfPoint from '../../../map/dialog/xfPoint.vue'
import weatherstation from '../../../map/dialog/weatherstation.vue'
import windspeedstation from '../../../map/dialog/weatherstation.vue'
import videoPlayPlat from '../../../map/dialog/video_play_plat.vue'
import WuZi from '../dialog/wuZi.vue'
import BiNanSuo from '../dialog/biNanSuo.vue'
import PaiShuiJing from '../dialog/paiShuiJing.vue'
import FengBiKaKou from '../dialog/fengBiKaKou.vue'
import BaoJing from '../dialog/baoJing.vue'
import SendMessage from '../dialog/sendMessage.vue'

export default {
  components: { SendMessage, WuZi, BiNanSuo, PaiShuiJing, FengBiKaKou, BaoJing, videoPlayPlat, windspeedstation, weatherstation, XfPoint, XfControl },
  props: {
    visible: {
      type: Boolean,
      required: true
    },
    value: {
      type: Object,
      default: () => ({})
    },
    title: {
      type: String,
      required: false,
      default: '弹窗默认标题'
    },
    width: {
      type: String,
      default: '1350px'
    }
  },
  data() {
    return {
      gangkou: '0003'
    }
  },
  methods: {
    handlerClose() {
      this.$emit('update:visible', false)
    }
  }
}
</script>

<style lang="scss">
.bi_enterprise_dialog {
  border-radius: 8px !important;
  background-color: #000d27f5 !important;
  border: 2px solid #034383;

  .vue-treeselect__control {
    background: none !important;
    border: 1px solid #ffffff60 !important;
  }

  .el-dialog__header {
    border-bottom: 1px solid #012b81 !important;
  }

  .el-dialog__headerbtn .el-dialog__close {
    color: #cac7c7 !important;
  }

  .el-dialog__title {
    color: #fff !important;
  }

  .el-table {
    background-color: transparent !important;
  }

  .el-table tr {
    background-color: #202e89 !important;
    color: #fff !important;
  }

  .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
    background-color: #202e89 !important;
  }

  .el-table th.el-table__cell.is-leaf,
  .el-table td.el-table__cell {
    border-bottom: 1px solid rgba(36, 81, 192, 0.48) !important;
  }

  .el-table--border .el-table__cell {
    border-right: 1px solid rgba(36, 81, 192, 0.48) !important;
  }

  .el-table--group,
  .el-table--border {
    border-color: rgba(36, 81, 192, 0.48) !important;
  }

  .el-table::before,
  .el-table--group::after,
  .el-table--border::after {
    background-color: rgba(36, 81, 192, 0.48) !important;
  }

  .el-table .el-table__header-wrapper tr th {
    background-color: #1c2c96 !important;
    color: #fff !important;
  }

  .pagination-container {
    background-color: #202e89 !important;
  }

  .el-pagination {
    color: #fff !important;
  }

  .el-pagination__total,
  .el-pagination__jump {
    color: #fff !important;
  }

  .el-input__inner {
    background: none;
    color: #FFFFFF;
    border: 1px solid #ffffff60 !important;
  }

  .el-pagination.is-background .btn-prev,
  .el-pagination.is-background .btn-next,
  .el-pagination.is-background .el-pager li {
    margin: 0 5px;
    background-color: #4174d1 !important;
    color: #ffffff !important;
    min-width: 30px;
    border-radius: 2px;
  }

  .ui-foot {
    position: absolute;
    width: 100%;
    bottom: 0;
    height: 60px;
    line-height: 60px;
    background: none;
    text-align: center;
    z-index: 99;
  }

  .el-table--border th.el-table__cell {
    border-bottom: 1px solid rgba(36, 81, 192, .48) !important;
  }

  .level-title {
    color: #FFFFFF !important;
  }

  .el-dialog__body {
    padding: 0 !important;
    color: #ffffff !important;
    height: auto;
    max-height: 85vh;
    overflow-x: hidden;
    overflow-y: auto;

    &::-webkit-scrollbar {
     width: 4px;
     height: 1px;
    }

    &::-webkit-scrollbar-thumb {
      border-radius: 10px;
      -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, .2);
      background-color: #003bb1bd;
    }

    &::-webkit-scrollbar-track {
      -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, .2);
      border-radius: 10px;
      background-color: transparent;
    }
  }

  .table-ui .tbg {
    background: none;
  }

  .table-ui .tit {
    background: none;
    color: #FFFFFF;
  }

  .table-ui td {
    border: 1px solid #043e99 !important;
  }

  .el-table__body tr.current-row>td.el-table__cell {
    background: #1c2c96 !important;
  }

  .el-picker-panel {
    color: #ffffff;
    border: 1px solid #dfe4ed;
    -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
    background: #333aa8 !important;
    border-radius: 4px;
    line-height: 30px;
    margin: 5px 0;
  }

  .el-card {
    background: none !important;
    color: #FFFFFF !important;
  }

  .el-card__header {
    color: #FFFFFF !important;
  }

  .el-tree,
  .el-tree-node:focus>.el-tree-node__content,
  .el-tree-node__content:hover {
    background-color: #202e89 !important;
    color: #fff !important;
  }

  .el-table--small {
    font-size: 20px !important;
  }

  .el-button--mini {
    font-size: 24px !important;
  }

  .el-table__cell {
    font-size: 24px !important;
  }

  .el-card__header {
    color: #fff !important;
    font-size: 24px !important;
  }

  .app-container {
    padding-bottom: 50px !important;
  }

  .level-title h1 {
    font-size: 24px !important;
  }

  .el-pagination span:not([class*=suffix]),
  .el-pagination button {
    font-size: 24px;
  }

  .el-pagination__sizes .el-input .el-input__inner {
    font-size: 24px;
    padding-left: 8px;
  }

  .el-pagination .el-select .el-input {
    width: 130px;
    margin: 0 5px;
  }
  .el-table .cell {
    line-height: 36px !important;
  }

  .el-scrollbar__wrap {
    overflow-x: hidden !important;
  }
}
</style>
