智慧园区前端大屏
shuishen
2024-12-02 b67f46b4a768b4cd72d4e463c5dffefe977ddeb7
src/views/rs/components/box/dataContent.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-20 18:50:27
 * @LastEditTime: 2024-11-27 14:26:33
 * @FilePath: \bigScreen\src\views\rs\components\box\dataContent.vue
 * @Description: 
 * 
@@ -56,7 +56,7 @@
  total: 0,
}
function positionColor() {
function positionColor () {
  return (row) => {
    if (
      (row.X && row.X != 0) ||
@@ -71,7 +71,7 @@
  }
}
function positionDisabled() {
function positionDisabled () {
  return (row) => {
    if (
      (row.X && row.X != 0) ||
@@ -99,6 +99,7 @@
// 查询分页数据
const getLists = (param = {}) => {
  tableData.value = []
  param.current = pages.page
  param.size = pages.pageSize
  loading.value = true
@@ -123,7 +124,7 @@
})
let addPupoLayers = {}
// 行点击
function rowClick(row, column, event) {
function rowClick (row, column, event) {
  if (row.lng && row.lat) {
    window.$viewer.flyToPosition(new DC.Position(row.lng, row.lat, 600, 0, -90, 0))
    // 显示企业信息
@@ -132,11 +133,10 @@
    addPupoLayers[row.firmName] = new DC.HtmlLayer(row.firmName)
    window.$viewer.addLayer(addPupoLayers[row.firmName])
    let iconEl = `<div class="marsBlueGradientPnl">
            <li>${row.firmName || ''}</li>
            <li>${row.riskLevelName || ''}</li>
            <li>${row.name || ''}</li>
            </div>`
    let divIcon = new DC.DivIcon(
      new DC.Position(row.lng, row.lat, 64),
      new DC.Position(row.lng, row.lat, row.ele || 64),
      `<div class="public-map-popup-three">
                    ${iconEl}
                  </div>`
@@ -151,7 +151,7 @@
// 查看详情
function goDetail(row) { }
function goDetail (row) { }
const searchBtn = (params) => {
  resetPage()
@@ -185,7 +185,6 @@
}
const tabClick = (item) => {
  console.log(item, 12312)
  if (curSelect.value) EventBus.emit('restHandleDelChange', `4-${curSelect.value}`)
  curSelect.value = item.value
  EventBus.emit('restHandleCheckChange', `4`)
@@ -210,13 +209,16 @@
  EventBus.off('rsTabChange', spaceTabChange)
  if (curSelect.value) EventBus.emit('restHandleDelChange', `4`)
  destroyPupoLayers()
  addPupoLayers = null
})
// 销毁
function destroyPupoLayers() {
function destroyPupoLayers () {
  let arr = Object.keys(addPupoLayers)
  arr.forEach(i => {
    addPupoLayers[i] && window.$viewer.removeLayer(addPupoLayers[i])
    addPupoLayers[i] && window.$viewer && window.$viewer.removeLayer(addPupoLayers[i])
    addPupoLayers[i] = null
    delete addPupoLayers[i]
  })
  addPupoLayers = {}
}
@@ -224,7 +226,8 @@
<template>
  <div class="w100 h0 flex-1 flex f-d-c">
    <global-search :options="options" @searchBtn="searchBtn" @resetBtn="resetBtn" ref="SeachBarCondition"></global-search>
    <global-search :options="options" @searchBtn="searchBtn" @resetBtn="resetBtn"
      ref="SeachBarCondition"></global-search>
    <!-- <div class="cur-container">
      <div class="tablist">
        <div class="cursor-p" :class="{ on: showOn(item) }" v-for="item, index in resData.data" :key="index"
@@ -237,7 +240,8 @@
    </div> -->
    <div class="h0 flex-1 table-content" ref="TableContent" v-loading="loading"
      element-loading-background="rgba(46, 81, 136, 0.9)">
      <el-table @row-click="rowClick" border :data="tableData" :height="curTableHeight" style="width: 100%">
      <el-table empty-text="暂无数据" @row-click="rowClick" border :data="tableData" :height="curTableHeight"
        style="width: 100%">
        <el-table-column align="center" label="ID" width="42" prop="rank">
          <template #default="{ $index, row }">
            {{ (pages.page - 1) * pages.pageSize + $index + 1 }}