智慧园区前端大屏
linwe
2024-11-19 626086d6f2106df7ff161ea66fe5a8d8a6863319
src/views/space/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-12 18:31:08
 * @LastEditTime: 2024-11-15 14:58:23
 * @FilePath: \bigScreen\src\views\space\components\box\dataContent.vue
 * @Description: 
 * 
@@ -45,7 +45,7 @@
  total: 0,
}
function positionColor() {
function positionColor () {
  return (row) => {
    if (
      (row.X && row.X != 0) ||
@@ -60,7 +60,7 @@
  }
}
function positionDisabled() {
function positionDisabled () {
  return (row) => {
    if (
      (row.X && row.X != 0) ||
@@ -112,28 +112,26 @@
// 行点击
function rowClick(row) {
function rowClick (row) {
  if (state.layer) {
    window.$viewer.removeLayer(state.layer)
  }
  let layer = new DC.HtmlLayer(`${row.id}`)
  state.layer = layer
  window.$viewer.addLayer(layer)
  let iconEl = `<div class="marsBlueGradientPnl">
                  <div>${row.name}</div>
                </div>`
  let divIcon = new DC.DivIcon(
    new DC.Position(row.lng, row.lat, 0),
    `<div class="public-map-popup">
                    ${iconEl}
                  </div>`
  )
  // divIcon.attrParams = row
  let incident = () => { }
  // if (item.incident) incident = item.incident
  divIcon.on(DC.MouseEventType.CLICK, incident)
  layer.addOverlay(divIcon)
  // if (state.layer) {
  //   window.$viewer.removeLayer(state.layer)
  // }
  // let layer = new DC.HtmlLayer(`${row.id}`)
  // state.layer = layer
  // window.$viewer.addLayer(layer)
  // let iconEl = `<div class="marsBlueGradientPnl">
  //                 <div>${row.name}</div>
  //               </div>`
  // let divIcon = new DC.DivIcon(
  //   new DC.Position(row.lng, row.lat, 0),
  //   `<div class="public-map-popup">
  //                   ${iconEl}
  //                 </div>`
  // )
  // let incident = () => { }
  // divIcon.on(DC.MouseEventType.CLICK, incident)
  // layer.addOverlay(divIcon)
  window.$viewer.flyToPosition(new DC.Position(row.lng, row.lat, 600, 0, -90, 0))
@@ -141,7 +139,7 @@
// 查看详情
function goDetail(row) { }
function goDetail (row) { }
const searchBtn = (params) => {
  resetPage()
@@ -183,10 +181,11 @@
<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="h0 flex-1 table-content" ref="TableContent">
      <el-table :data="tableData" :height="curTableHeight" style="width: 100%" v-loading="loading">
      <el-table border :data="tableData" :height="curTableHeight" style="width: 100%" v-loading="loading">
        <el-table-column prop="name" label="名称" />
        <el-table-column prop="emergencySpaceType" label="类型" width="70" />
        <el-table-column prop="mainFuncName" label="作用" width="60" />