智慧园区前端大屏
linwe
2024-11-11 5c86125ac72746d7b2ad46c01700f6d74ca07160
企业详情优化
5 files modified
94 ■■■■■ changed files
package.json 1 ●●●● patch | view | raw | blame | history
src/views/companyInfo/components/box/fireTrend.vue 41 ●●●● patch | view | raw | blame | history
src/views/companyInfo/components/mainMenu.vue 32 ●●●● patch | view | raw | blame | history
src/views/companyInfo/index.vue 4 ●●●● patch | view | raw | blame | history
src/views/layout/components/scomponents/layersControl.vue 16 ●●●● patch | view | raw | blame | history
package.json
@@ -31,6 +31,7 @@
    "vue-router": "^4.4.5"
  },
  "devDependencies": {
    "@dvgis/types": "^1.2.0",
    "@vitejs/plugin-basic-ssl": "^1.1.0",
    "@vitejs/plugin-vue": "^5.1.4",
    "sass": "^1.80.4",
src/views/companyInfo/components/box/fireTrend.vue
@@ -18,7 +18,7 @@
const tableData = ref([])
const pages = {
  page: 1,
  pageSize: 13,
  pageSize: 1000,
  total: 0,
}
@@ -50,7 +50,7 @@
// 提交查询
const onSubmit = () => {
  pages.page = 1
  pages.pageSize = 13
  pages.pageSize = 1000
  pages.total = 0
  console.log("submit!")
  getLists(formInline)
@@ -71,13 +71,13 @@
  formInline.name = ''
  formInline.ownership = ''
  pages.page = 1
  pages.pageSize = 13
  pages.pageSize = 1000
  pages.total = 0
  getLists(formInline)
}
// 查询分页数据
function getLists (param = {}) {
function getLists(param = {}) {
  param.current = pages.page
  param.size = pages.pageSize
  param.firmId = data.companyInfo.id
@@ -109,28 +109,24 @@
      <el-form-item label="" class="form-item-input">
        <el-input v-model="formInline.name" placeholder="请输入名称" clearable style="width: 120px" />
      </el-form-item>
      <!-- <el-form-item label="归属">
                        <el-select v-model="formInline.ownership" placeholder="请选择" clearable style="width: 120px">
                            <el-option label="园区" value="1" />
                            <el-option label="企业" value="2" />
                        </el-select>
                    </el-form-item> -->
      <el-form-item class="search-btn">
        <el-button type="primary" @click="onSubmit">查询</el-button>
        <el-button type="primary" @click="clearBtn">重置</el-button>
      </el-form-item>
    </el-form>
    <el-table :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle" :cell-style="tableCellStyle"
      v-loading="loading" element-loading-background="rgba(122, 122, 122, 0.1)">
      <el-table-column fixed prop="name" label="名称" />
      <el-table-column prop="numUnit" label="数量" width="100" />
      <!-- <el-table-column prop="firmName" label="单位名称" /> -->
      <el-table-column prop="personInCha" label="负责人" width="100" />
    </el-table>
    <div class="el-page">
    <div class="table-box">
      <el-table :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle" :cell-style="tableCellStyle"
        v-loading="loading" element-loading-background="rgba(122, 122, 122, 0.1)">
        <el-table-column fixed prop="name" label="名称" />
        <el-table-column prop="numUnit" label="数量" width="100" />
        <!-- <el-table-column prop="firmName" label="单位名称" /> -->
        <el-table-column prop="personInCha" label="负责人" width="100" />
      </el-table>
    </div>
    <!-- <div class="el-page">
      <el-pagination background layout="prev, pager, next" :page-size="pages.pageSize" :total="pages.total"
        @size-change="handleSizeChange" @current-change="handleCurrentChange" />
    </div>
    </div> -->
  </div>
</template>
@@ -147,6 +143,13 @@
  }
}
.search-box .table-box {
  height: 700px;
  overflow: scroll;
  // 隐藏滚动条
  scrollbar-width: none;
}
/* 当表格没有数据时,修改表格的背景颜色 */
.el-table--empty .el-table__body {
  background-color: rgba(135, 158, 199, 0.3) !important;
src/views/companyInfo/components/mainMenu.vue
@@ -1,6 +1,6 @@
<template>
  <div class="page-mode">
    <div @mouseenter="item.childrenFlag = true" :class="{ active: currentUrl.indexOf(item.path) != -1 }"
    <div @mouseenter="item.childrenFlag = true" :class="{ active: buttonIndex == item.value }"
      @mouseleave="item.childrenFlag = false" @click="goToPath(item)" v-for="(item, index) in menuList" :key="index">
      {{ item.menuName }}
    </div>
@@ -19,20 +19,44 @@
  [
    {
      menuName: '企业信息',
      path: '/layout/sub/companyInfo'
      path: '/layout/sub/companyInfo',
      value: 1,
    },
    {
      menuName: '应急物质',
      path: '/layout/sub/',
      value: 2,
    },
    {
      menuName: '应急空间',
      path: '/layout/ws'
      path: '/layout/ws',
      value: 3,
    },
    {
      menuName: '三道防线',
      path: '/layout/sj'
      path: '/layout/sj',
      value: 4,
    }
  ]
)
let { buttonIndex } = defineProps({
  buttonIndex: Number
})
// 父级方法
const emit = defineEmits(['childEvent'])
const goToPath = (params) => {
  if (params.value == 1) {
    emit('childEvent', params.value)
    return
  } else if (params.value == 2) {
    emit('childEvent', params.value)
    return
  }
  emit('childEvent', params.value)
  if (params.children && params.children.length > 0) return
  if (params.path) {
src/views/companyInfo/index.vue
@@ -63,10 +63,10 @@
      <centerContainer :button-index="buttonIndex" @childEvent="handleChildEvent"></centerContainer>
    </div>
    <div class="main-container">
    <div class="main-container" v-if="buttonIndex <= 2">
      <right-container :button-index="buttonIndex"></right-container>
    </div>
    <main-menu-vue></main-menu-vue>
    <main-menu-vue :button-index="buttonIndex" @childEvent="handleChildEvent"></main-menu-vue>
  </div>
</template>
src/views/layout/components/scomponents/layersControl.vue
@@ -222,7 +222,7 @@
        layerName: 'gsgw',
        source: gsgw,
        color: DC.Color.BLUE,
        height: 1,
        height: 5,
      },
      {
        id: '6-2',
@@ -232,7 +232,7 @@
        layerName: 'wsgw',
        source: wsgw,
        color: DC.Color.BLACK,
        height: 2,
        height: 10,
      },
      {
        id: '6-3',
@@ -242,7 +242,7 @@
        layerName: 'rqgw',
        source: rqgw,
        color: DC.Color.RED,
        height: 3,
        height: 15,
      },
      {
        id: '6-4',
@@ -252,7 +252,7 @@
        layerName: 'ysgw',
        source: ysgw,
        color: DC.Color.CYAN,
        height: 4,
        height: 20,
      },
    ]
@@ -399,7 +399,7 @@
          item.source.features.forEach(i => {
            let polylineVolume = new DC.PolylineVolume(
              i.geometry.coordinates.map(d => [d[0], d[1], 0.0].join(',')).join(';'),
              i.geometry.coordinates.map(d => [d[0], d[1], item.height].join(',')).join(';'),
              computeCircle(0.3)
            )
@@ -429,9 +429,9 @@
}
onMounted(() => {
  // handleCheckChange(data.filter(i => i.id == '1'), {
  //   checkedKeys: ['1']
  // })
  handleCheckChange(data.filter(i => i.id == '1'), {
    checkedKeys: ['1']
  })
})
onUnmounted(() => {