<script lang="ts">
export default {
  name: 'Intelligentlinkage' //智能联动
};
</script>

<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, nextTick } from "vue";
import { getLinkTaskTodo, getLinkTaskRecordLast } from "@/api/Intelligentlinkage/index";
import { useUserStore } from '@/store/modules/user';
import Videobox from "./video.vue";
import Editvideo from "@/views/linkagecontrol/Intelligentlinkage/editvideo.vue";
import { getDeviceByType, } from "@/api/device";
import axios from 'axios';
import { getdata, getArea } from "@/api/monitordevice";
import Page from '@/components/Pagination/page.vue'
import Eldialog from '@/components/seccmsdialog/eldialog.vue';
//控制行变色
const tableRowClassName = ({
  row,
  rowIndex,
}: {
  row: any
  rowIndex: number
}) => {
  if (rowIndex % 2 === 0) {
    return 'warning-row'
  } else if (rowIndex % 2 === 1) {
    return 'success-row'
  }
  return ''
}
const options: any = ref([])
function getLinkTask() {
  getLinkTaskRecordLast({ linkageType: '2' }).then((res: any) => {
    options.value = res.data
  })
}


const userStore = useUserStore();
const isCamera: any = ref(false)
const defaultprops = {
  label: "deviceName",
}
function handleNodeClick(data: any, node: any) {
  isVideoActive.value = data.orderNum - 1
}
const videoData: any = ref([])
const videoTree: any = ref([])
const vMove = {
  mounted(el: any) {
    el.onmousedown = function (e: any) {
      var init = e.clientX;
      var parent: any = document.getElementById("IntelligentlinkageLeft");
      const initWidth: any = parent.offsetWidth;
      document.onmousemove = function (e) {
        var end = e.clientX;
        var newWidth = end - init + initWidth;
        parent.style.width = newWidth + "px";
      };
      document.onmouseup = function () {
        document.onmousemove = document.onmouseup = null;
      };
    };
  }
}
const queryInfo: any = ref({
  patrolDeviceName: "",
  type: "",
  deviceModel: "",
  manufacturer: "",
  current: 1, // 当前页
  size: 10, // 页大小
})

const loading = ref(false)
const tableData: any = ref([])
const total = ref(0)
function resetting() {
  queryInfo.value = {
    areaId: "",
    patrolDeviceName: "",
    type: "",
    current: 1, // 当前页
    size: 10, // 页大小
  }
  getPublicData()
}
function getPublicData() {
  loading.value = true
  const params = {
    stationId: userStore.stationId,
    areaId: queryInfo.value.areaId,
    patrolDeviceName: queryInfo.value.patrolDeviceName,
    type: queryInfo.value.type,
    size: queryInfo.value.size,
    current: queryInfo.value.current,
  }
  getdata(params).then((res: any) => {
    loading.value = false
    tableData.value = res.data.records
    total.value = res.data.total
    queryInfo.value.size = res.data.size
    queryInfo.value.current = res.data.current
    loading.value = false
  })
}
const online = ref("")
function viewClick(row: any, type: any) {
  rowInfo.value = row
  online.value = type
  isVideo.value = true
}
const taskName: any = ref("")
const taskTodoId: any = ref("")
const PatrolEquipmentData: any = ref([]); // 初始化主设备选项框数组
function getDict() {  // 获取数组字典方法
  const paramss = {
    dictcode: 'PatrolEquipmentType'
  }
  // 设备类型
  getDeviceByType(paramss).then((res: any) => {
    PatrolEquipmentData.value = res.data
  })
}
function addCamera() {
  getPublicData()
  isCamera.value = true
}
const areaIdType: any = ref([])
const treeRef: any = ref()
const taskTodoIdOne = ref()
function getIntelligentlinkage(type: any) {
  if (taskTodoIdOne.value == undefined) {
    const params = {
      stationCode: userStore.stationCode,
      linkageType: '2'
    }
    getLinkTaskTodo(params).then((res: any) => {
      if (res.data == null) {
        return
      }
      taskName.value = res.data.taskName
      taskTodoId.value = res.data.taskTodoId
      for (let i = 0; i < res.data.children.length; i++) {
        if (res.data.children[i].flag == '0') {
          nextTick(() => {
            treeRef.value?.setCurrentKey(res.data.children[i].resultId);
            isVideoActive.value = i
          })
          break
        }
      }
      videoTree.value = JSON.parse(JSON.stringify(res.data.children))
      if (type == '1') {
        videoData.value = res.data.children
        for (let i = 0; i < res.data.children.length; i++) {
          res.data.children[i].isButton = false
          res.data.children[i].srcList = [userStore.webApiBaseUrl + "/previewimage?filename=" + encodeURI(res.data.children[i].defectFilePath)]
          res.data.children[i].defectFilePath = userStore.webApiBaseUrl + "/previewimage?filename=" + encodeURI(res.data.children[i].defectFilePath)
          axios.get(userStore.webApiMonitorUrl + '/api/play/start/' + res.data.children[i].deviceId + '/' + res.data.children[i].channelId, {}).then((ress: any) => {
            if (ress.data.data != undefined) {
              videoData.value[i].videoUrl = ress.data.data.ws_flv
              videoData.value[i].videofmp4 = ress.data.data.fmp4
            }
          }).catch(function (error: any) {
          })
        }
      } else {
        for (let j = 0; j < res.data.children.length; j++) {
          videoData.value[j].time = res.data.children[j].time
          videoData.value[j].analysisResult = res.data.children[j].analysisResult
          videoData.value[j].value = res.data.children[j].value
          videoData.value[j].unit = res.data.children[j].unit
        }
      }
    })
  } else {
    const params = {
      stationCode: userStore.stationCode,
      todoId: taskTodoIdOne.value,
      linkageType: '2'
    }
    getLinkTaskTodo(params).then((res: any) => {
      if (res.data == null) {
        return
      }
      taskName.value = res.data.taskName
      taskTodoId.value = res.data.taskTodoId
      for (let i = 0; i < res.data.children.length; i++) {
        if (res.data.children[i].flag == '0') {
          nextTick(() => {
            treeRef.value?.setCurrentKey(res.data.children[i].resultId);
            isVideoActive.value = i
          })
          break
        }
      }
      videoTree.value = JSON.parse(JSON.stringify(res.data.children))
      if (type == '1') {
        videoData.value = res.data.children
        for (let i = 0; i < res.data.children.length; i++) {
          res.data.children[i].isButton = false
          res.data.children[i].srcList = [userStore.webApiBaseUrl + "/previewimage?filename=" + encodeURI(res.data.children[i].defectFilePath)]
          res.data.children[i].defectFilePath = userStore.webApiBaseUrl + "/previewimage?filename=" + encodeURI(res.data.children[i].defectFilePath)
          axios.get(userStore.webApiMonitorUrl + '/api/play/start/' + res.data.children[i].deviceId + '/' + res.data.children[i].channelId, {}).then((ress: any) => {
            if (ress.data.data != undefined) {
              videoData.value[i].videoUrl = ress.data.data.ws_flv
              videoData.value[i].videofmp4 = ress.data.data.fmp4
            }
          }).catch(function (error: any) {
          })
        }
      } else {
        for (let j = 0; j < res.data.children.length; j++) {
          videoData.value[j].time = res.data.children[j].time
          videoData.value[j].analysisResult = res.data.children[j].analysisResult
          videoData.value[j].value = res.data.children[j].value
          videoData.value[j].unit = res.data.children[j].unit
        }
      }
    })
  }

}
// var source = new EventSource(userStore.webApiBaseUrl + "/sse/connect/taskresult_" + userStore.stationCode + "_" + userStore.userId,)
const ws1 = new WebSocket(userStore.wsApiBaseUrl + '/websocket/taskresult_' + userStore.stationCode + "_" + userStore.userId);
function setupWebSocket() {

  ws1.onopen = () => {
    
  };
  ws1.onerror = (error: any) => {
  };
  ws1.onmessage = (e: any) => {
    
    if (e.data != 0 && JSON.parse(e.data).taskType == "4") {
      isVideoActive.value = -1
      if (taskTodoId.value == JSON.parse(e.data).taskTodoId) {
        getIntelligentlinkage("0")
      } else {
        getIntelligentlinkage("1")
      }

    }
  }
  ws1.onclose = () => {

  };

}
onMounted(() => {
  getLinkTask()
  setupWebSocket()
  getIntelligentlinkage('1')
  getDict()
  getArea({ stationCode: userStore.stationCode }).then((res) => {
    areaIdType.value = res.data
  })

})
onBeforeUnmount(() => {
  if (ws1 != null) {
    ws1.close()
  }
})
const isVideo: any = ref(false)
const rowInfo: any = ref({})
const isVideoActive: any = ref(-1)
function switchImg(index: any) {
  videoData.value[index].isButton = true
}
</script>
<template>
  <div class="Intelligentlinkage-box">
    <div class="el-overlay" v-if="isCamera == true && isVideo == false">
      <div class="examination">
        <img style="position:absolute;top: 15px;right: 20px;cursor:pointer;" src="@/assets/MenuIcon/u523.png" alt=""
          @click="isCamera = false">
        <div class="examination-title">关联摄像机</div>
        <div style="padding: 20px;">
          <div style="display: flex;align-items: center;" class="screenHomepage">
            <el-input v-model="queryInfo.patrolDeviceName" clearable placeholder="请输入摄像机名称" @clear="getPublicData"
              @keyup.enter="getPublicData" style="margin-right:15px ;width: 180px;" />
            <el-select class="selType" :teleported="false" :popper-append-to-body="false" v-model="queryInfo.areaId"
              placeholder="区域" @change="getPublicData" clearable style="margin-right:15px ;">
              <el-option v-for="item in areaIdType" :key="item.id" :label="item.areaName" :value="item.areaId" />
            </el-select>
            <el-select class="selType" :teleported="false" :popper-append-to-body="false" v-model="queryInfo.type"
              placeholder="设备类型" style="margin-right:15px ;" @change="getPublicData" clearable>
              <el-option v-for="item in PatrolEquipmentData" :key="item.itemcode" :label="item.dictname"
                :value="item.itemcode" />
            </el-select>
            <el-button class="searchButton" @click="getPublicData">搜索</el-button>
            <el-button class="searchButton" @click="resetting">重置</el-button>
          </div>
          <div style="height:730px ;">
            <el-table row-key="id" :data="tableData" :row-class-name="tableRowClassName" class="PatrolMonitoring"
              v-loading="loading" element-loading-background="rgb(11, 40, 34)" highlight-current-row
              style="width: 100%;margin:auto;position: relative;margin-top: 15px; height:calc(68vh); overflow: auto "
              :header-cell-style="{ background: '#09513a', color: '#00F9A2', height: '43px' }">
              <el-table-column type="index" align="center" label="序号" width="60" />
              <el-table-column prop="areaName" label="区域" align="center" width="100" />
              <el-table-column prop="patroldeviceCode" label="设备编码" align="center" width="200" />
              <el-table-column prop="patroldeviceName" label="设备名称" align="center" />
              <el-table-column prop="type" label="设备类型" align="center" width="120">
                <template #default="scope">
                  <span v-for="i in PatrolEquipmentData" v-show="i.itemcode == scope.row.type">{{ i.dictname }}</span>
                </template>
              </el-table-column>
              <el-table-column prop="manufacturer" label="生产厂家" align="center" />
              <el-table-column prop="place" label="安装位置" align="center" />
              <el-table-column prop="online" label="实时状态" width="100">
                <template #default="scope">
                  <div v-show="scope.row.online == 0"> 离线 <img src="@/assets/3d/lx.png"
                      style="width:15px;height:15px;display:inline-block;margin-left: 5px;"></div>
                  <div style="display: flex;cursor: pointer;">
                    <div v-if="scope.row.channelList != null" v-show="scope.row.online == 1"
                      @click="viewClick(scope.row.channelList[0], scope.row.online)"> 在线 <img src="@/assets/3d/zx.png"
                        style="width:15px;height:15px;display:inline-block;margin-left: 5px;"></div>
                    <div v-if="scope.row.channelList != null && scope.row.channelList.length == 2"
                      v-show="scope.row.online == 1" @click="viewClick(scope.row.channelList[1], scope.row.online)"><img
                        src="@/assets/3d/zx.png" style="width:15px;height:15px;display:inline-block;margin-left: 5px;">
                    </div>
                  </div>

                </template>
              </el-table-column>
            </el-table>
          </div>

          <Page style="position: relative;z-index: 100;text-align: center;margin-top: 5px;" :total="total"
            v-model:size="queryInfo.size" :jumper="'hide'" v-model:current="queryInfo.current"
            @pagination="getPublicData"></Page>
        </div>

      </div>
    </div>
    <Eldialog v-if="isCamera == true && isVideo == true" :title="'查看摄像机'" :zIndex="2005" :width="'1200px'"
      @before-close="isVideo = false">
      <template v-slot:PopFrameContent>
        <Editvideo style="padding-top:10px ;" v-if="isVideo == true" :_uid="2000" :rowInfo="rowInfo" :online="online" />
      </template>
    </Eldialog>
    <div id="IntelligentlinkageLeft" class="Intelligentlinkage-left">
      <div class="Intelligentlinkage-box-title">
        <div class="imgname"> {{ taskName }}</div>
        <div style="display: flex;align-items: center;margin-right: 10px; position: relative;width: 20px;height: 10px;">
          <el-select style="position: relative;z-index: 99999;" class="m-2 selType" :teleported="false"
            :popper-append-to-body="false" v-model="taskTodoIdOne" placeholder=" " @change="getIntelligentlinkage('1')">
            <el-option v-for="item in options" :key="item.taskTodoId" :label="item.taskName" :value="item.taskTodoId" />
          </el-select>
          <img style="position: absolute;z-index: 9999;left: 10px;" src="@/assets/newimg/xsjk_ckxq.png" alt="">
        </div>
      </div>
      <el-scrollbar style="padding:0px 15px;" height="calc(100vh - 220px)">
        <el-tree ref="treeRef" :data="videoTree" :props="defaultprops" @node-click="handleNodeClick" default-expand-all
          node-key="resultId" :highlight-current="true">
          <template #default="{ node }">
            <span v-if="node.data.flag == '0'"> {{ node.label }} (未巡视)</span>
            <!-- <span v-if="node.data.flag == '6'"> {{ node.label }} <span style="color:#00F9A2;">(巡视中)</span></span> -->
            <span style="color:rgba(255, 255, 255, 0.5)" v-if="node.data.flag == '1'">{{ node.label }} (已巡视)</span>
            <span style="color:rgba(255, 255, 255, 0.5)" v-if="node.data.flag == '2'">{{ node.label }} (已完成)</span>
            <span style="color:rgba(255, 255, 255, 0.5)" v-if="node.data.flag == '3'">{{ node.label }} (设备检修中)</span>
            <span style="color:rgba(255, 255, 255, 0.5)" v-if="node.data.flag == '4'">{{ node.label }} (巡视失败)</span>
            <span style="color:rgba(255, 255, 255, 0.5)" v-if="node.data.flag == '5'">{{ node.label }} (已修正)</span>
            <span style="color:rgba(255, 255, 255, 0.5)" v-if="node.data.flag == '6'">{{ node.label }} (采集失败)</span>
          </template>
        </el-tree>
      </el-scrollbar>
      <!-- <div class="addCamerabox">
          <div class="addCamera" @click="addCamera">查看摄像头</div>
        </div> -->
    </div>
    <main class="IntelligentlinkageRight">
      <div class="boxAuto">
        <div v-for="(item, index) in videoData" :key="'Video' + index" class="videoLi"
          :class="{ 'videoActive': isVideoActive == index }">
          <div class="videoLiName">{{ index + 1 }}、{{ item.deviceName }}</div>
          <Videobox v-if="item.isButton == false" :_uid="index" :videoUrl="item.videoUrl" :videofmp4="item.videofmp4"
            :item="item" :videoIndex="index" @switchImg="switchImg" />
          <div style="width: 100%;height: 100%;" v-if="item.isButton == true">
            <el-image style="width: 100%;height: 100%;" :src="item.defectFilePath" :zoom-rate="1"
              :preview-src-list="item.srcList" :preview-teleported="true" fit="cover" />

            <div class="buttons-box">
              <div class="buttons-box-left" style="padding-left:10px">
                <div style="min-width: 150px;">巡视时间：{{ item.time.split(' ')[1] }}</div>
                <div style="min-width: 160px;">巡视结果：
                  <span v-if="item.analysisResult == '正常'" class="spanstyle1">
                    {{ item.value }} {{ item.unit }}</span>
                  <span v-if="item.analysisResult == '异常'" class="spanstyle2">{{ item.value }} {{ item.unit }}</span>
                </div>
                <div style="min-width: 120px;">巡视结论：
                  <span v-if="item.analysisResult == '正常'" class="spanstyle1">正常</span>
                  <span v-if="item.analysisResult == '异常'" class="spanstyle2">异常</span>
                </div>
              </div>
              <div class="buttons-box-right">
                <img src="@/assets/newimg/sp.png" class="iconfont jessibuca-btn" @click.stop="item.isButton = false">
              </div>
            </div>
          </div>
        </div>

      </div>
    </main>
  </div>
</template>
<style scoped lang="scss">
.moveBtn {
  height: 100%;
  width: 15px;
  padding: 0 6px;
  // opacity: 0;
  position: absolute;
  right: -15px;
  top: 0;
}

:deep(.el-scrollbar) {
  height: 85% !important;
}

.moveBtn-line {
  width: 100%;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  background: rgb(7, 162, 110) !important;
}

.moveBtn-line:hover {
  background: #ffffff !important;
}

.Intelligentlinkage-box {
  position: relative;
  display: flex;
  box-sizing: border-box;
  padding: 60px 15px;
  padding-bottom: 0;
  height: calc(100vh - 90px);
}

.Intelligentlinkage-left {
  position: relative;
  width: 321px;
  min-width: 261px;
  height: calc(100vh - 165px);
  background: url(@/assets/monitorsystem/spjk_lbbj.png) no-repeat center center;
  background-size: 100% 100%;

  .nav-box {
    padding-top: 10px;
    padding-left: 20px;
    display: flex;

    .nav-list {
      width: 65px;
      height: 30px;
      line-height: 30px;
      border: 1px solid rgb(95, 143, 125);
      font-family: 'MicrosoftYaHei Regular', 'MicrosoftYaHei';
      font-weight: 400;
      font-style: normal;
      font-size: 14px;
      color: #00F9A2;
      text-align: center;
      cursor: pointer;
      margin-right: 12px;
    }

    .nav-active {
      // font-weight: bold;
      // color: rgb(255, 255, 255);
      background: rgba(0, 249, 162, 0.2);
    }
  }

  .el-tree {
    background: transparent;
    color: #ffffff;
    --el-tree-node-hover-bg-color: transparent;
    --el-tree-text-color: rgb(0, 249, 162, 0.5);
    // --el-tree-expand-icon-color: var(--el-text-color-placeholder);

  }

}

.Intelligentlinkage-box-title {
  font-family: '阿里妈妈数黑体 Bold', '阿里妈妈数黑体';
  font-weight: 700;
  font-style: normal;
  font-size: 16px;
  color: #FFFFFF;
  line-height: 12px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 15px;
}

.IntelligentlinkageRight {
  flex: 1;
  position: relative;
  width: 100%;
  height: calc(100vh - 90px);
  margin-left: 15px;
  box-sizing: border-box;

  .boxAuto {
    width: 100%;
    height: 100%;
    overflow: auto;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;

    // padding-left: 10px;
    .videoLi {
      position: relative;
      width: 32.9%;
      margin-right: 0.4%;
      height: 310px;
      border: 2px solid #333;
      margin-bottom: 10px;

      .videoLiName {
        position: absolute;
        z-index: 1;
        width: 100%;
        height: 50px;
        line-height: 50px;
        background: rgba(0, 0, 0, 0.5);
        padding-left: 20px;
        color: #ffffff;
        ;
      }
    }
  }

  .buttons-box {
    width: 100%;
    height: 50px;
    background-color: rgba(43, 51, 63, 0.7);
    position: absolute;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    left: 0;
    bottom: 0;
    user-select: none;
    z-index: 10;

    .buttons-box-left {
      display: flex;
      align-items: center;
      font-family: 'Arial Normal', 'Arial';
      font-weight: 400;
      font-style: normal;
      font-size: 14px;
      color: #FFFFFF;
    }

    .buttons-box-right {
      position: absolute;
      right: 0;
      display: flex;
      align-items: center;
      height: 50px;
    }

    .jessibuca-container.jessibuca-controls-show {
      width: 100% !important;
      height: 100% !important;
    }

    .jessibuca-container.jessibuca-controls-show video {
      width: 100% !important;
      height: 100% !important;
    }

    .buttonsrescord-box {
      width: 100%;
      height: 60px;
      background-color: rgba(43, 51, 63, 0.7);
      position: absolute;
      display: -webkit-box;
      display: -ms-flexbox;
      display: flex;
      align-items: center;
      justify-content: space-between;
      left: 0;
      bottom: 0;
      user-select: none;
      z-index: 10;
      padding-left: 10px;
    }

    .buttondisplay-box {
      width: 100%;
      height: 60px;
      position: absolute;
      left: 0;
      bottom: 0;
      user-select: none;
      z-index: 10;
    }

    .spanstyle1 {
      font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
      font-weight: 700;
      font-size: 16px;
      color: #00F9A2;
    }

    .spanstyle2 {
      font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
      font-weight: 700;
      font-size: 16px;
      color: #FF3300;
    }
  }
}

:deep(.el-tree-node > .el-tree-node__content) {
  height: 40px;
  border: 2px solid transparent;
}



.addCamerabox {
  width: 100%;
  display: flex;
  justify-content: center;

  .addCamera {
    width: 240px;
    height: 50px;
    line-height: 50px;
    font-family: 'Arial Normal', 'Arial';
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    color: #00F9A2;
    text-align: center;
    cursor: pointer;
    background: url(@/assets/monitorsystem/Intelligentlinkage/xsri_an2.png);
    background-size: 100% 100%;
  }

  .addCamera:hover {
    background: url(@/assets/monitorsystem/Intelligentlinkage/xsri_an1.png);
    background-size: 100% 100%;
  }
}

.el-overlay {
  position: fixed;
  z-index: 2023;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2000;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: auto;

  .notification {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;

    margin: auto;
    /* background: url(/src/assets/monitorsystem/xsri_yltu.png); */
    background-size: 100% 100%;

    .notification-title {
      text-align: center;
      font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
      font-weight: 700;
      font-style: normal;
      font-size: 18px;
      color: #FFFFFF;
      height: 40px;
      line-height: 38px;
    }

    .notification-body {
      position: absolute;
      bottom: 15px;
      left: 0;
      right: 0;
    }
  }

  .examination {
    width: 1200px;
    height: 880px;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    margin: auto;
    background: url(@/assets/monitorsystem/ejectbg/glbj.png);
    background-size: 100% 100%;

    .examination-title {
      text-align: center;
      font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
      font-weight: 700;
      font-style: normal;
      font-size: 18px;
      color: #FFFFFF;
      height: 40px;
      line-height: 38px;
    }

    .examination-body {
      position: absolute;
      bottom: 15px;
      left: 0;
      right: 0;
    }
  }

  .examinationAll {
    width: 670px;
    height: 420px;
    position: absolute;
    top: 0px;
    right: 0;
    left: 0;
    bottom: 0;
    margin: auto;
    background: url(@/assets/monitorsystem/ejectbg/xsri_xz.png);
    background-size: 100% 100%;

    .examination-title {
      text-align: center;
      font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
      font-weight: 700;
      font-style: normal;
      font-size: 18px;
      color: #FFFFFF;
      height: 40px;
      line-height: 38px;
    }

    .examination-body {
      position: absolute;
      bottom: 15px;
      left: 0;
      right: 0;
    }
  }


  .details-line {
    width: 4px;
    height: 10px;
    background: inherit;
    background-color: rgba(255, 189, 0, 1);
    margin-right: 8px;
  }

  .details-title {
    font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
    font-weight: 700;
    font-style: normal;
    font-size: 14px;
    color: #00F9A2;
  }

  .details-conent {
    font-family: 'Arial Normal', 'Arial';
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    color: #FFFFFF;
    padding: 5px 0;
    display: flex;
  }

  .details-name {
    min-width: 80px;
    text-align: right;
  }

  :deep(.el-radio__inner) {
    border-color: rgb(0, 249, 162) !important;
    background: rgb(15, 51, 42) !important;
  }

  :deep(.is-checked .el-radio__inner) {
    border-color: rgb(0, 249, 162) !important;
    background: rgb(0, 249, 162) !important;
  }

  :deep(.el-radio__label) {
    color: rgba(255, 255, 255, 0.5);
  }

  :deep(.is-checked .el-radio__label) {
    color: rgba(255, 255, 255, 1) !important;
  }

  :deep(.is-checked .el-radio__inner::after) {
    width: 6px;
    height: 6px;
    border-radius: var(--el-radio-input-border-radius);
    background-color: rgb(15, 51, 42)
  }



  :deep(.el-input__wrapper) {
    background: transparent !important;
    // box-shadow: 0 0 0 1px rgba(0, 249, 162, 0.2) !important;
  }
}

.searchButton {
  border: #059a67 solid 1px;
  background-color: #08503a;
  color: #00F9A2;
  margin-left: 10px;
}

//控制行变色
// :deep(.warning-row) {
//   background-color: rgb(255 255 255 / 0%) !important;
// }

// :deep(.success-row) {
//   background-color: #17352d !important;
// }

:deep(.el-table__header-wrapper) {
  border-left: #00F9A2 3px solid;
  border-right: #00F9A2 3px solid;
}

:deep(.el-table__body-wrapper) {
  color: #fff;
}

:deep(.el-table) {
  --el-table-row-hover-bg-color: transparent !important;
  --el-table-border-color: transparent !important;
}

:deep(.el-table__empty-text) {
  color: #fff !important;
}

//暂无数据背景颜色
:deep(.el-table__empty-block) {
  background-color: #3b997d94;
  // display: none;
}

:deep(.el-table) {
  background-color: transparent;
  // display: none;
}





:deep(.el-input__wrapper) {
  background-color: transparent !important;
  box-shadow: none;
}

:deep(.el-input__inner) {
  color: #fff !important;
}

:deep(.el-select-dropdown__wrap) {
  // background-color: #0a2420 !important;
}

:deep(.el-date-editor .el-range-input) {
  color: #fff !important;
}

:deep(.searchButton.is-disabled) {
  background-color: #0a2320 !important;
  color: #07633e !important;
  border: 1px solid #07633e !important;
}

:deep(.el-table__body tr.current-row td) {
  background-color: transparent !important;
}

.PatrolMonitoring {
  :deep(.el-table__body tr.current-row td) {
    border: 1px solid springgreen !important;
    border-right: 0px solid transparent !important;
    border-left: 0px solid transparent !important;
  }

  :deep(.current-row.el-table__row td) {
    border-right: 1px solid springgreen;
  }

  :deep(.current-row.el-table__row td:first-child) {
    border-left: 1px solid springgreen !important;
  }

  :deep(.current-row.el-table__row td:last-child) {
    border-right: 1px solid springgreen !important;
  }

  :deep(.current-row.el-table__row :last-child td) {
    border-bottom: 1px solid springgreen !important;
  }
}

.videoActive {
  border-color: #0f5e91 !important;
}

:deep(.el-input__suffix) {
  display: none !important;
}

:deep(.el-input__wrapper) {
  box-shadow: none !important;
}

:deep(.el-select .el-input.is-focus .el-input__wrapper) {
  box-shadow: none !important;
}

:deep(.el-select-dropdown__empty) {
  width: 120px;
}

:deep(.el-input__wrapper.is-focus) {
  box-shadow: none !important;
}
</style>

