智慧园区前端大屏
shuishen
2024-12-18 9a37c5e1b2190c3f6ec71483923922189091dd52
src/views/companyInfo/components/box/fireTrend.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-13 14:54:26
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-11-28 19:28:35
 * @LastEditTime: 2024-12-03 00:22:00
 * @FilePath: \bigScreen\src\views\companyInfo\components\box\fireTrend.vue
 * @Description:
 *
@@ -17,7 +17,11 @@
let image = ref(VITE_APP_BASE + 'img/mapicon/yjwz.png')
const panoramaShow = ref(false)
const panoramaTitle = ref('')
const panoramaUrl = ref('')
const TableContent = ref(null)
const curTableHeight = ref(0)
const loading = ref(false)
const tableData = ref([])
@@ -32,20 +36,11 @@
})
onMounted(() => {
  curTableHeight.value = TableContent.value.offsetHeight
  data.companyInfo = JSON.parse(localStorage.getItem('companyInfo'))
  getLists()
})
// 表格样式
const tableCellStyle = ({ row, column }) => {
  return { background: "#152851", color: "#fff" }
}
// 表格表头样式
const headerCellStyle = ({ }) => {
  return {
    background: "#152851",
    color: "#fff",
  }
}
// 搜索条件
const formInline = reactive({
  name: "",
@@ -130,6 +125,27 @@
    divIcon.attrParams = row
    let incident = (e) => {
      const { attrParams } = e.overlay
      console.log(attrParams, 894654)
      if (
        attrParams.panoramicUrl && attrParams.panoramicUrl.length > 0 &&
        attrParams.panoramicUrl.indexOf("http://vr.jxpskj.com:180") != -1
      ) {
        let panoramicUrl = attrParams.panoramicUrl.replace(
          "http://vr.jxpskj.com:180",
          "/panorama"
        )
        panoramaTitle.value = attrParams.name
        panoramaUrl.value = panoramicUrl
        panoramaShow.value = true
        return
      }
      // 删除
      destroyPupoLayers()
      if (picList.value.length == 0) {
@@ -138,7 +154,6 @@
      addPupoLayers['企业应急物资'] = new DC.HtmlLayer('企业应急物资')
      window.$viewer.addLayer(addPupoLayers['企业应急物资'])
      let iconEl = `<div class="marsBlueGradientPnl">
            <div>${attrParams.firmName}</div>
            <img src="${picList.value[0].link}" />
                </div>`
      let divIcon = new DC.DivIcon(
@@ -189,10 +204,14 @@
  addPupoLayers = null
})
import { Search, Refresh } from '@element-plus/icons-vue'
const closePanoramaPopup = () => {
  panoramaShow.value = false
}
</script>
<template>
  <div class="search-box w100 h100">
  <div class="search-box w100 h100 flex f-d-c">
    <el-form :inline="true" :model="formInline" class="demo-form-inline">
      <el-form-item label="" class="form-item-input">
        <el-input v-model="formInline.name" placeholder="请输入名称" clearable style="width: 120px" />
@@ -202,11 +221,11 @@
        <el-button class="reset-btn" :icon="Refresh" @click="clearBtn">重 置</el-button>
      </el-form-item>
    </el-form>
    <!-- <global-search :options="options" @searchBtn="searchBtn" @resetBtn="resetBtn" ref="SeachBarCondition"></global-search> -->
    <div class="table-box">
    <div class="table-box h0 flex-1" ref="TableContent">
      <el-table empty-text="暂无数据" border :data="tableData" @row-click="rowClick" style="width: 100%"
        :header-cell-style="headerCellStyle" :cell-style="tableCellStyle"
        element-loading-background="rgba(122, 122, 122, 0.1)">
        element-loading-background="rgba(122, 122, 122, 0.1)" :height="curTableHeight">
        <el-table-column prop="name" label="名称" width="240" />
        <el-table-column prop="numUnit" label="数量" />
        <el-table-column prop="personInCha" label="负责人" />
@@ -218,6 +237,9 @@
</el-table-column> -->
      </el-table>
    </div>
    <panorama v-show="panoramaShow" :title="panoramaTitle" :url="panoramaUrl" @closePanoramaPopup="closePanoramaPopup">
    </panorama>
  </div>
</template>
@@ -226,25 +248,10 @@
  color: #fff !important;
}
.search-box {
  padding: 10px;
  ::v-deep .el-table__body-wrapper {
    background-color: #152851;
  }
}
.reset-btn {
  color: #D4E8F8;
  background: #43779B;
  border-color: #43779B;
}
.search-box .table-box {
  height: 700px;
  overflow: scroll;
  // 隐藏滚动条
  scrollbar-width: none;
}
/* 当表格没有数据时,修改表格的背景颜色 */