fuliqi
2024-09-13 e80067335467ca48cb94f03de3794ad93a45ad5d
src/views/system/monitor/video/index.vue
@@ -1,7 +1,16 @@
<template>
  <div class="app-container">
    <div
      style="display: flex;flex-direction: row;min-width: 158px;max-width: 158px;margin-bottom: 5px;border-radius: 1px; user-select: none"
    >
      <div @click="clickTab(null)" class="tab"
           :class="{tabActive: null == queryParams.provinceTag, tabInactive: null != queryParams.provinceTag}">全部
      </div>
      <div @click="clickTab(0)" class="tab"
           :class="{tabActive: 0 === queryParams.provinceTag, tabInactive: 0 !== queryParams.provinceTag}">省厅考核
      </div>
    </div>
    <el-card class="box-card" >
      <el-row type="flex" align="middle" justify="space-between" style="width: 100%;">
        <el-col :span="4">
@@ -31,7 +40,8 @@
        </el-col>
      </el-row>
    </el-card>
    <el-row type="flex">
      <el-col :span="20">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
      <el-form-item label="关键字" prop="name">
        <el-input
@@ -77,21 +87,11 @@
        <el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <!-- <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['system:monitor:export']"
        >导出</el-button>
      </el-col> -->
      </el-col>
      <el-col span="4">
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
      </el-col>
    </el-row>
    <el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange">
      <el-table-column label="设备名称" align="center" prop="name" width="280" fixed show-overflow-tooltip/>
      <el-table-column label="设备编码" align="center" prop="serialNumber" width="180" />
@@ -107,8 +107,8 @@
      </template>
      </el-table-column>
      <el-table-column label="是否生成异常工单" align="center" prop="error" width="180" v-if="columns[3].visible" />
      <el-table-column label="数据时间" align="center" prop="mongoCreateTime" width="180" v-if="columns[4].visible" />
      <el-table-column label="管理单位" align="center" prop="unitName" width="180" v-if="columns[5].visible" />
      <el-table-column label="数据时间" align="center" prop="mongoCreateTime" width="180" v-if="columns[4].visible"/>
      <el-table-column label="信令时延(ms)" align="center" prop="sipDelay" width="180" v-if="columns[6].visible" />
      <el-table-column label="视频时延(ms)" align="center" prop="videoDelay" width="180" v-if="columns[7].visible" />
      <el-table-column label="关键帧时延(ms)" align="center" prop="ifmDelay" width="180" v-if="columns[8].visible" />
@@ -119,7 +119,8 @@
              type="text"
              icon="el-icon-view"
              @click="handleView(scope.row,scope.index)"
            >详细</el-button>
          >详细
          </el-button>
          </template>
      </el-table-column>
    </el-table>
@@ -180,6 +181,7 @@
<script>
import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor";
import { listDept } from "@/api/system/dept";
export default {
  name: "Monitor",
  dicts: ['sys_normal_disable', 'platform_yes_no','camera_state'],
@@ -265,6 +267,11 @@
    });
  },
  methods: {
    clickTab(active) {
      this.queryParams.provinceTag = active
      this.getList()
      this.getVideoCount()
    },
    /** 查询设备资产列表 */
    getList() {
      this.loading = true;
@@ -276,7 +283,7 @@
    },
     /** 查询设备资产统计数 */
     getVideoCount() {
      videoCount('1').then(response => {
      videoCount(this.queryParams).then(response => {
        this.count = response.data;
      });
    },
@@ -368,7 +375,8 @@
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
      }).catch(() => {
      });
    },
    /** 导出按钮操作 */
    handleExport() {
@@ -380,6 +388,30 @@
};
</script>
<style lang="scss" scoped>
.tab {
  padding: 5px 15px;
}
.tab:hover {
  cursor: pointer;
  user-select: none;
}
.tabActive {
  color: white;
  background-color: #409eff;
  border: none;
  border-radius: 1px;
}
.tabInactive {
  background-color: #edf2f6;
  color: #409eff;
}
.tabInactive:hover {
  background-color: #edf2f6;
}
.box-card {
  background-color: hsl(0, 0%, 100%);
@@ -387,6 +419,7 @@
  margin-bottom: 20px;
  height: 120px;
}
.icon-container {
  display: flex;
  justify-content: center;
@@ -396,6 +429,7 @@
  height: 80px;
  margin-left: 5%;
}
.el-icon-video-camera {
  font-size: 50px;
  color: #FFFFFF;