fuliqi
2024-09-13 e80067335467ca48cb94f03de3794ad93a45ad5d
运行监控
8个文件已修改
787 ■■■■■ 已修改文件
src/api/platform/monitor.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/check/result/detail/detail.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/data-manage/data-detail/index.vue 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/monitor/car/index.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/monitor/face/index.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/monitor/platform/index.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/monitor/recovery/index.vue 174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/monitor/video/index.vue 262 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/platform/monitor.js
@@ -10,18 +10,20 @@
}
// 查询设备资产统计数
export function videoCount(type) {
export function videoCount(query) {
  return request({
    url: '/system/monitor/getVideoCount/' + type,
    method: 'get'
    url: '/system/monitor/getVideoCount',
    method: 'get',
    params: query
  })
}
// 查询异常恢复设备资产统计数
export function recoveryException() {
export function recoveryException(query) {
  return request({
    url: '/system/monitor/recoveryException',
    method: 'get'
    method: 'get',
    params: query
  })
}
src/views/system/check/result/detail/detail.vue
@@ -46,35 +46,6 @@
            </el-card>
          </el-col>
        </el-row>
        <!-- <div></div>
        <el-table
          v-loading="loading"
          :data="checkRuleList"
          @selection-change="handleSelectionChange"
        >
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column
            label="规则名称"
            align="center"
            prop="checkRuleName"
          />
          <el-table-column label="规则权重" align="center" prop="weight" />
          <el-table-column
            label="操作"
            align="center"
            class-name="small-padding fixed-width"
          >
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleRuleUpdate(scope.row)"
                >修改
              </el-button>
            </template>
          </el-table-column>
        </el-table> -->
      </el-main>
    </el-container>
@@ -100,17 +71,6 @@
            :inline="true"
            v-show="showSearch"
          >
<!--            <el-form-item label="考核月度" prop="name">-->
<!--              <el-date-picker-->
<!--                v-model="queryParams.date"-->
<!--                format="yyyy-MM"-->
<!--                value-format="yyyy-MM"-->
<!--                type="month"-->
<!--                placeholder="选择日期"-->
<!--                @change="dateChange"-->
<!--              >-->
<!--              </el-date-picker>-->
<!--            </el-form-item>-->
            <el-form-item label="考核时间">
              <el-date-picker
                :clearable="false"
src/views/system/data-manage/data-detail/index.vue
@@ -1,13 +1,22 @@
<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(0)" class="tab" :class="{tabActive: 0 === queryParams.dataType, tabInactive: 0 !== queryParams.dataType}">全部</div>
      <div @click="clickTab(1)" class="tab" :class="{tabActive: 1 === queryParams.dataType, tabInactive: 1 !== queryParams.dataType}">省厅考核</div>
    <div
      style="display: flex;flex-direction: row;min-width: 158px;max-width: 158px;margin-bottom: 5px;border-radius: 1px; user-select: none"
      v-show="index !== 'image_resource_security'">
      <div @click="clickTab(0)" class="tab"
           :class="{tabActive: 0 === queryParams.dataType, tabInactive: 0 !== queryParams.dataType}">全部
      </div>
      <div @click="clickTab(1)" class="tab"
           :class="{tabActive: 1 === queryParams.dataType, tabInactive: 1 !== queryParams.dataType}">省厅考核
      </div>
    </div>
    <el-card class="box-card" v-show="index !== 'image_resource_security'">
      <el-row style="display: flex; flex-direction: row; align-items: center" justify="space-between">
        <div style="font-size: 18px;min-width: 200px;height: 80px;display: flex;align-items: center">{{ruleName}}</div>
        <div v-if="cardList && cardList.length > 0" v-for="card in cardList" style="display: flex;flex-direction: row; margin-right: 50px;margin-left: 20px;align-items: center" :key="card.label">
        <div style="font-size: 18px;min-width: 200px;height: 80px;display: flex;align-items: center">{{ ruleName }}
        </div>
        <div v-if="cardList && cardList.length > 0" v-for="card in cardList"
             style="display: flex;flex-direction: row; margin-right: 50px;margin-left: 20px;align-items: center"
             :key="card.label">
          <div>
            <div class="icon-container">
              <i :class="card.icon"></i>
@@ -29,37 +38,15 @@
        <el-col :span="8"></el-col>
      </el-row>
    </el-card>
    <div style="display: flex;position: relative">
      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
        <el-form-item label="关键词" prop="bayonetNumber">
          <el-input v-model="queryParams.keyword" placeholder="关键词搜索" clearable @input="handleQuery"/>
        </el-form-item>
        <el-form-item label="时间范围" prop="timeRange">
          <el-date-picker
            v-model="queryParams.timeRange"
            type="daterange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
          <el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
      <right-toolbar style="position: absolute;right: 0px" v-show="index !== 'image_resource_security'" :showSearch.sync="showSearch" @queryTable="handleQuery" :columns="showList"></right-toolbar>
    </div>
    <el-row :gutter="10" class="mb8" v-show="index === 'image_resource_security'">
      <el-container>
        <el-main>
          <h2>视频图像资源安全管理</h2>
          <el-row :gutter="20">
            <el-col :xl="3" :lg="3" :md="6" :sm="6" :xs="12" v-if="imageResourceSecurity && imageResourceSecurity.length > 0" v-for="(item, index) in imageResourceSecurity" :key="index"
              class="col-margin">
            <el-col :xl="3" :lg="3" :md="6" :sm="6" :xs="12"
                    v-if="imageResourceSecurity && imageResourceSecurity.length > 0"
                    v-for="(item, index) in imageResourceSecurity" :key="index"
                    class="col-margin">
              <el-card style="
                min-width: 150px;
                width: 100%;
@@ -82,28 +69,53 @@
          </el-row>
        </el-main>
      </el-container>
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-upload" size="mini" @click="handleExport"
          v-hasPermi="['platform:platform:export']">导入
        </el-button>
      </el-col>
      <right-toolbar  :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <div style="display: flex;position: relative">
      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
        <el-form-item label="关键词" prop="bayonetNumber">
          <el-input v-model="queryParams.keyword" placeholder="关键词搜索" clearable @input="handleQuery"/>
        </el-form-item>
        <el-form-item label="时间范围" prop="timeRange">
          <el-date-picker
            v-model="queryParams.timeRange"
            type="daterange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
          <el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
      <right-toolbar style="position: absolute;right: 0px" v-show="index !== 'image_resource_security'"  :showSearch.sync="showSearch" @queryTable="handleQuery"
                     :columns="showList"></right-toolbar>
    </div>
    <div v-show="index === 'image_resource_security'" style="margin-bottom: 5px">
        <el-button type="primary" plain icon="el-icon-upload" size="mini" @click="handleExport"
                   v-hasPermi="['platform:platform:export']">导入
        </el-button>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </div>
    <div>
      <el-table v-loading="loading" :data="tableData.list">
        <el-table-column :prop="item.prop" :label="item.label" :width="item.width" v-for="(item, index) in tableHead" :key="index" v-if="showListPD(item)"/>
        <el-table-column :prop="item.prop" :label="item.label" :width="item.width" v-for="(item, index) in tableHead"
                         :key="index" v-if="showListPD(item)"/>
      </el-table>
    </div>
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
                @pagination="getList"/>
    <!-- 修改视频图像资源安全管理对话框 -->
    <el-dialog title="修改视频图像资源安全管理" :visible.sync="resourceOpen" width="600px" append-to-body>
      <el-form ref="form" :model="resourceForm" :rules="rules" label-width="250px">
        <el-form-item label="部门名称" prop="deptName">
          <el-input v-model="resourceForm.deptName" disabled />
          <el-input v-model="resourceForm.deptName" disabled/>
        </el-form-item>
        <el-form-item label="平台运行率" prop="platformOnline">
          <el-input-number v-model="resourceForm.platformOnline" :precision="2" :step="0.1" :min="0" :max="1"/>
@@ -117,7 +129,8 @@
        <el-form-item label="视频传输网危险资产比例" prop="riskProperty">
          <el-input-number v-model="resourceForm.riskProperty" :precision="2" :step="0.1" :min="0" :max="1"/>
        </el-form-item>
        <el-tooltip class="item" effect="dark" content="违规连接互联网扣减20个百分点/次,违规无线AP接入、随身wifi接入、共享网络各扣减5个百分点/次,直至此项指标扣完为止。" placement="top-start">
        <el-tooltip class="item" effect="dark" content="违规连接互联网扣减20个百分点/次,违规无线AP接入、随身wifi接入、共享网络各扣减5个百分点/次,直至此项指标扣完为止。"
                    placement="top-start">
          <el-form-item label="视频传输网边界完整性检测扣分项" prop="boundaryIntegrity">
            <el-input-number v-model="resourceForm.boundaryIntegrity" :precision="2" :step="0.1" :min="0" :max="1"/>
          </el-form-item>
@@ -133,14 +146,15 @@
    <!-- 导入对话框 -->
    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
      <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url"
        :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess"
        :auto-upload="false" drag>
                 :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess"
                 :auto-upload="false" drag>
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
        <div class="el-upload__tip text-center" slot="tip">
          <span>仅允许导入xls、xlsx格式文件。</span>
          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
            @click="importTemplate">下载模板</el-link>
                   @click="importTemplate">下载模板
          </el-link>
        </div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
@@ -153,10 +167,11 @@
</template>
<script>
import { dataCenter } from "@/api/platform/data-center";
import { videoData, carData, faceData, equipment } from "./list";
import { listSecurity, updateSecurity } from '@/api/platform/resource-security';
import { getToken } from "@/utils/auth";
import {dataCenter} from "@/api/platform/data-center";
import {videoData, carData, faceData, equipment} from "./list";
import {listSecurity, updateSecurity} from '@/api/platform/resource-security';
import {getToken} from "@/utils/auth";
export default {
  name: "Platform",
  computed: {
@@ -175,7 +190,7 @@
        // 是否禁用上传
        isUploading: false,
        // 设置上传的请求头部
        headers: { Authorization: "Bearer " + getToken() },
        headers: {Authorization: "Bearer " + getToken()},
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/platform/resourceSecurity/importData"
      },
@@ -218,20 +233,20 @@
      // 表单校验
      rules: {
        platformOnline: [
          { required: true, message: "请输入平台运行率", trigger: "blur" },
          { type: "number", message: "平台运行率必须为数字", trigger: "blur" }
          {required: true, message: "请输入平台运行率", trigger: "blur"},
          {type: "number", message: "平台运行率必须为数字", trigger: "blur"}
        ],
        propertyAccuracy: [
          { required: true, message: "请输入视频传输网资产准确率", trigger: "blur" },
          { type: "number", message: "视频传输网资产准确率必须为数字", trigger: "blur" }
          {required: true, message: "请输入视频传输网资产准确率", trigger: "blur"},
          {type: "number", message: "视频传输网资产准确率必须为数字", trigger: "blur"}
        ],
        riskProperty: [
          { required: true, message: "请输入弱口令得分", trigger: "blur" },
          { type: "number", message: "弱口令得分必须为数字", trigger: "blur" }
          {required: true, message: "请输入弱口令得分", trigger: "blur"},
          {type: "number", message: "弱口令得分必须为数字", trigger: "blur"}
        ],
        boundaryIntegrity: [
          { required: true, message: "请输入视频传输网危险资产比例", trigger: "blur" },
          { type: "number", message: "视频传输网危险资产比例必须为数字", trigger: "blur" }
          {required: true, message: "请输入视频传输网危险资产比例", trigger: "blur"},
          {type: "number", message: "视频传输网危险资产比例必须为数字", trigger: "blur"}
        ],
      },
@@ -254,7 +269,7 @@
    let day = yesterday.getDate().toString().padStart(2, '0');
    // 拼接成 yyyy-MM-dd 格式
    let yesterday1 =  `${year}-${month}-${day}`;
    let yesterday1 = `${year}-${month}-${day}`;
    this.queryParams.timeRange = [yesterday1, yesterday1]
    this.index = this.$route.query.index;
    if (this.$route.query.type === '1') {
@@ -293,7 +308,7 @@
        return true
      }
      let arr = this.showList.filter(d => d.label === item.label)
      if (item && (!arr || arr.length <1)) {
      if (item && (!arr || arr.length < 1)) {
        return true;
      } else {
        return item && arr && arr.length > 0 && arr[0].visible
@@ -343,7 +358,7 @@
        this.queryParams.endTime = this.queryParams.timeRange[1]
      }
      dataCenter(url, this.queryParams).then(response => {
        response.data.list = response.data.list && response.data.list.length >0 ? response.data.list : []
        response.data.list = response.data.list && response.data.list.length > 0 ? response.data.list : []
        this.tableData = response.data;
        this.total = response.total;
        this.loading = false;
@@ -413,23 +428,28 @@
.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: #F5F9FE;
  width: 100%;
src/views/system/monitor/car/index.vue
@@ -1,5 +1,15 @@
<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">
        <el-col :span="4">
@@ -74,21 +84,10 @@
        <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
      </el-form-item>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
    </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> -->
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
    </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/>
@@ -264,6 +263,11 @@
    });
  },
  methods: {
    clickTab(active) {
      this.queryParams.provinceTag = active
      this.getList()
      this.getVideoCount()
    },
    /** 查询设备资产列表 */
    getList() {
      this.loading = true;
@@ -275,7 +279,7 @@
    },
    /** 查询设备资产统计数 */
    getVideoCount() {
      videoCount('2').then(response => {
      videoCount(this.queryParams).then(response => {
        this.count = response.data;
      });
    },
@@ -378,7 +382,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: #ffffff;
  width: 100%;
src/views/system/monitor/face/index.vue
@@ -1,5 +1,15 @@
<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">
        <el-col :span="4">
@@ -73,21 +83,8 @@
        <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
        <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> -->
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
    </el-row>
    </el-form>
    <el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange">
      <el-table-column label="设备名称" align="center" prop="name" width="280" fixed show-overflow-tooltip/>
@@ -302,6 +299,11 @@
    });
  },
  methods: {
    clickTab(active) {
      this.queryParams.provinceTag = active
      this.getList()
      this.getVideoCount()
    },
    /** 查询设备资产列表 */
    getList() {
      this.loading = true;
@@ -313,7 +315,7 @@
    },
    /** 查询设备资产统计数 */
    getVideoCount() {
      videoCount('3').then(response => {
      videoCount(this.queryParams).then(response => {
        this.count = response.data;
      });
    },
@@ -416,7 +418,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: #ffffff;
  width: 100%;
src/views/system/monitor/platform/index.vue
@@ -62,53 +62,8 @@
        <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
        <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="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['platform:platform:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['platform:platform:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['platform:platform:remove']"
        >删除</el-button>
      </el-col> -->
      <el-col :span="1.5">
        <!-- <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['platform:platform:export']"
        >导出</el-button> -->
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    </el-form>
    <el-table v-loading="loading" :data="platformList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
@@ -258,7 +213,7 @@
    },
    /** 查询设备资产统计数 */
    getVideoCount() {
      videoCount('1').then(response => {
      videoCount().then(response => {
        this.count = response.data;
      });
    },
src/views/system/monitor/recovery/index.vue
@@ -1,6 +1,16 @@
<template>
  <div class="app-container">
    <el-card class="box-card" >
    <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">
        <el-col :span="4">
          <div class="icon-container" style="background-color: #1890FF">
@@ -11,19 +21,19 @@
          <div class="dashboard">
            <div class="dashboard-item">
              <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3>
              <p>设备总数</p >
              <p>设备总数</p>
            </div>
            <div class="dashboard-item">
              <h3 style="color: #3eba45">{{ count.totalMembers }}</h3>
              <p>正常数</p >
              <p>正常数</p>
            </div>
            <div class="dashboard-item">
              <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3>
              <p>异常数</p >
              <p>异常数</p>
            </div>
            <div class="dashboard-item">
              <h3>{{ count.viewsPercentage }}%</h3>
              <p>设备运行率</p >
              <p>设备运行率</p>
            </div>
          </div>
        </el-col>
@@ -46,7 +56,7 @@
          clearable
          @change="handleQuery"
        >
        <el-option
          <el-option
            v-for="dept in deptList"
            :key="dept.deptId"
            :label="dept.area"
@@ -54,7 +64,7 @@
          />
        </el-select>
      </el-form-item>
      <el-form-item label="监控类型" prop="onState">
      <el-form-item label="监控类型" prop="cameraFunType">
        <el-select
          v-model="queryParams.cameraFunType"
          placeholder="请选择监控类型"
@@ -70,40 +80,33 @@
        <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
      </el-form-item>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
    </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"
        >导出</el-button>
      </el-col> -->
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange">
      <el-table-column label="设备名称" align="center" prop="name" />
      <el-table-column label="设备编码" align="center" prop="serialNumber" width="180px" />
      <el-table-column label="标签" align="center" v-if="columns[0].visible">
      <el-table-column label="设备名称" align="center" prop="name" width="280" fixed show-overflow-tooltip/>
      <el-table-column label="设备编码" align="center" prop="serialNumber" width="180px"/>
      <el-table-column label="设备类型" align="center" prop="cameraFunType" width="180px">
        <template slot-scope="scope">
          {{ translateCameraFunType(scope.row.cameraFunType) }}
        </template>
      </el-table-column>
      <el-table-column label="标签" align="center" width="180px" v-if="columns[0].visible">
        <template slot-scope="scope">
          <div>{{ scope.row.provinceTag == 0 ? "省厅" : "市局" }}</div>
        </template>
      </el-table-column>
      <el-table-column label="区域" align="center" prop="area" v-if="columns[1].visible"/>
      <el-table-column label="设备状态" align="center" prop="onState" v-if="columns[2].visible">
      <template slot-scope="scope">
        <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/>
      </template>
      <el-table-column label="设备状态" align="center" width="180px" prop="onState" v-if="columns[2].visible">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.camera_state" width="180px" :value="scope.row.onState"/>
        </template>
      </el-table-column>
      <el-table-column label="是否生成异常工单" align="center" prop="error" v-if="columns[3].visible" />
      <el-table-column label="异常原因" align="center" prop="reason" v-if="columns[4].visible" />
      <el-table-column label="异常恢复时间" align="center" prop="recoveryTime" width="180" v-if="columns[5].visible">
      <el-table-column label="是否生成异常工单" align="center" prop="error" width="180px" v-if="columns[3].visible"/>
      <el-table-column label="异常原因" align="center" prop="reason" width="180px" v-if="columns[4].visible"/>
      <el-table-column label="异常恢复时间" align="center" prop="recoveryTime" width="180px" v-if="columns[5].visible">
      </el-table-column>
      <el-table-column label="管理单位" align="center" prop="unitName" v-if="columns[6].visible" />
      <el-table-column label="管理单位" align="center" prop="unitName" width="180px" v-if="columns[6].visible"/>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
@@ -111,7 +114,8 @@
            type="text"
            icon="el-icon-view"
            @click="handleView(scope.row,scope.index)"
          >详细</el-button>
          >详细
          </el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -130,8 +134,8 @@
        <el-row>
          <el-col :span="12">
            <el-form-item label="设备编码:">{{ form.serialNumber }}</el-form-item>
            <el-form-item label="设备名称:">{{ form.name }} </el-form-item>
            <el-form-item label="标签:">{{ form.deptName }} </el-form-item>
            <el-form-item label="设备名称:">{{ form.name }}</el-form-item>
            <el-form-item label="标签:">{{ form.deptName }}</el-form-item>
            <el-form-item label="设备状态:">
              <div v-if="form.onState === 1">可用</div>
              <div v-else-if="form.onState === 2">不可用</div>
@@ -163,23 +167,31 @@
</template>
<script>
import { recoveryException, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor";
import { listDept } from "@/api/system/dept";
import {
  recoveryException,
  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'],
  dicts: ['sys_normal_disable', 'platform_yes_no', 'camera_state'],
  data() {
    return {
      deptList: [],
      // 列信息
      columns: [
        { key: 0, label: `标签`, visible: true },
        { key: 1, label: `区域`, visible: true },
        { key: 2, label: `设备状态`, visible: true },
        { key: 3, label: `是否生成异常工单`, visible: true },
        { key: 4, label: `异常原因`, visible: true },
        { key: 5, label: `异常恢复时间`, visible: true },
        { key: 6, label: `管理单位`, visible: true },
        {key: 0, label: `标签`, visible: true},
        {key: 1, label: `区域`, visible: true},
        {key: 2, label: `设备状态`, visible: true},
        {key: 3, label: `是否生成异常工单`, visible: true},
        {key: 4, label: `异常原因`, visible: true},
        {key: 5, label: `异常恢复时间`, visible: true},
        {key: 6, label: `管理单位`, visible: true},
      ],
      count: {
        totalPosts: 0,
@@ -226,16 +238,16 @@
      // 表单校验
      rules: {
        serialNumber: [
          { required: true, message: "设备编码不能为空", trigger: "blur" }
          {required: true, message: "设备编码不能为空", trigger: "blur"}
        ],
        name: [
          { required: true, message: "设备名称不能为空", trigger: "blur" }
          {required: true, message: "设备名称不能为空", trigger: "blur"}
        ],
        onState: [
          { required: true, message: "设备状态", trigger: "blur" }
          {required: true, message: "设备状态", trigger: "blur"}
        ],
        address: [
          { required: true, message: "地址不能为空", trigger: "blur" }
          {required: true, message: "地址不能为空", trigger: "blur"}
        ],
      }
    };
@@ -243,11 +255,40 @@
  created() {
    this.getList();
    this.getVideoCount();
    listDept({ status: 0 }).then(response => {
    listDept({status: 0}).then(response => {
      this.deptList = response.data.filter(item => item.area);
    });
  },
  methods: {
    translateCameraFunType(cameraFunType) {
      // 校验输入是否为字符串
      if (typeof cameraFunType !== 'string') {
        return "";
      }
      // 分割字符串为数组,并去除空字符串
      const types = cameraFunType.split('/').filter(type => type);
      // 校验并转换每个类型
      const translatedTypes = types.map(type => {
        switch (type) {
          case '1':
            return '视频';
          case '2':
            return '车辆';
          case '3':
            return '人脸';
          default:
            return ''
        }
      });
      return translatedTypes.join(', ');
    },
    clickTab(active) {
      this.queryParams.provinceTag = active
      this.getList()
      this.getVideoCount()
    },
    /** 查询设备资产列表 */
    getList() {
      this.loading = true;
@@ -259,7 +300,7 @@
    },
    /** 查询异常恢复设备统计数 */
    getVideoCount() {
      recoveryException().then(response => {
      recoveryException(this.queryParams).then(response => {
        this.count = response.data;
      });
    },
@@ -302,7 +343,7 @@
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
@@ -344,12 +385,13 @@
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除设备资产编号为"' + ids + '"的数据项?').then(function() {
      this.$modal.confirm('是否确认删除设备资产编号为"' + ids + '"的数据项?').then(function () {
        return delMonitor(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
      }).catch(() => {
      });
    },
    /** 导出按钮操作 */
    handleExport() {
@@ -362,6 +404,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: #ffffff;
@@ -369,6 +435,7 @@
  margin-bottom: 20px;
  height: 120px
}
.icon-container {
  display: flex;
  justify-content: center;
@@ -378,6 +445,7 @@
  height: 80px;
  margin-left: 5%;
}
.el-icon-refresh-left {
  font-size: 50px;
  color: #FFFFFF;
src/views/system/monitor/video/index.vue
@@ -1,126 +1,127 @@
<template>
  <div class="app-container">
    <el-card class="box-card" >
    <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">
        <div class="icon-container" style="background-color: #1890FF">
          <i class="el-icon-video-camera"></i>
        </div>
          <div class="icon-container" style="background-color: #1890FF">
            <i class="el-icon-video-camera"></i>
          </div>
        </el-col>
        <el-col :span="20">
          <div class="dashboard">
            <div class="dashboard-item">
              <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3>
              <p>设备总数</p >
              <p>设备总数</p>
            </div>
            <div class="dashboard-item">
              <h3 style="color: #3eba45">{{ count.totalMembers }}</h3>
              <p>正常数</p >
              <p>正常数</p>
            </div>
            <div class="dashboard-item">
              <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3>
              <p>异常数</p >
              <p>异常数</p>
            </div>
            <div class="dashboard-item">
              <h3>{{ count.viewsPercentage }}%</h3>
              <p>设备运行率</p >
              <p>设备运行率</p>
            </div>
          </div>
        </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
              v-model="queryParams.name"
              placeholder="请输入关键字"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="区域" prop="onState">
            <el-select
              v-model="queryParams.address"
              placeholder="请选择区域"
              clearable
              @change="handleQuery"
            >
              <el-option
                v-for="dept in deptList"
                :key="dept.deptId"
                :label="dept.area"
                :value="dept.deptId"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="设备状态" prop="onState">
            <el-select
              v-model="queryParams.onState"
              placeholder="设备状态"
              clearable
              style="width: 100px"
            >
              <el-option
                v-for="dict in dict.type.camera_state"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
      <el-form-item label="关键字" prop="name">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入关键字"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="区域" prop="onState">
        <el-select
          v-model="queryParams.address"
          placeholder="请选择区域"
          clearable
          @change="handleQuery"
        >
          <el-option
            v-for="dept in deptList"
            :key="dept.deptId"
            :label="dept.area"
            :value="dept.deptId"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="设备状态" prop="onState">
        <el-select
          v-model="queryParams.onState"
          placeholder="设备状态"
          clearable
          style="width: 100px"
        >
        <el-option
          v-for="dict in dict.type.camera_state"
          :key="dict.value"
          :label="dict.label"
          :value="dict.value"
        />
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
        <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> -->
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>
      </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" />
      <el-table-column label="设备编码" align="center" prop="serialNumber" width="180"/>
      <el-table-column label="标签" align="center" width="180" v-if="columns[0].visible">
        <template slot-scope="scope">
          <div>{{ scope.row.provinceTag == 0 ? "省厅" : "市局" }}</div>
        </template>
      </el-table-column>
      <el-table-column label="区域" align="center" prop="area" width="180" v-if="columns[1].visible" />
      <el-table-column label="区域" align="center" prop="area" width="180" v-if="columns[1].visible"/>
      <el-table-column label="设备状态" align="center" prop="onState" v-if="columns[2].visible">
      <template slot-scope="scope">
        <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/>
      </template>
        <template slot-scope="scope">
          <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/>
        </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="信令时延(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" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width"  fixed="right">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              icon="el-icon-view"
              @click="handleView(scope.row,scope.index)"
            >详细</el-button>
          </template>
      <el-table-column label="是否生成异常工单" align="center" prop="error" width="180" v-if="columns[3].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"/>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-view"
            @click="handleView(scope.row,scope.index)"
          >详细
          </el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -138,9 +139,9 @@
        <el-row>
          <el-col :span="12">
            <el-form-item label="设备编码:">{{ form.serialNumber }}</el-form-item>
            <el-form-item label="设备名称:">{{ form.name }} </el-form-item>
            <el-form-item label="地区:">{{ form.address }} </el-form-item>
            <el-form-item label="上报部门:">{{ form.deptName }} </el-form-item>
            <el-form-item label="设备名称:">{{ form.name }}</el-form-item>
            <el-form-item label="地区:">{{ form.address }}</el-form-item>
            <el-form-item label="上报部门:">{{ form.deptName }}</el-form-item>
            <el-form-item label="设备状态:">
              <div v-if="form.onState === 1">可用</div>
              <div v-else-if="form.onState === 2">不可用</div>
@@ -178,25 +179,26 @@
</template>
<script>
import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor";
import { listDept } from "@/api/system/dept";
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'],
  dicts: ['sys_normal_disable', 'platform_yes_no', 'camera_state'],
  data() {
    return {
      deptList: [],
      // 列信息
      columns: [
        { key: 0, label: `标签`, visible: true },
        { key: 1, label: `区域`, visible: true },
        { key: 2, label: `设备状态`, visible: true },
        { key: 3, label: `是否生成异常工单`, visible: true },
        { key: 4, label: `数据时间`, visible: true },
        { key: 5, label: `管理单位`, visible: true },
        { key: 6, label: `信令时延`, visible: true },
        { key: 7, label: `视频时延`, visible: true },
        { key: 8, label: `关键帧时延`, visible: true }
        {key: 0, label: `标签`, visible: true},
        {key: 1, label: `区域`, visible: true},
        {key: 2, label: `设备状态`, visible: true},
        {key: 3, label: `是否生成异常工单`, visible: true},
        {key: 4, label: `数据时间`, visible: true},
        {key: 5, label: `管理单位`, visible: true},
        {key: 6, label: `信令时延`, visible: true},
        {key: 7, label: `视频时延`, visible: true},
        {key: 8, label: `关键帧时延`, visible: true}
      ],
      count: {
        totalPosts: 0,
@@ -243,16 +245,16 @@
      // 表单校验
      rules: {
        serialNumber: [
          { required: true, message: "设备编码不能为空", trigger: "blur" }
          {required: true, message: "设备编码不能为空", trigger: "blur"}
        ],
        name: [
          { required: true, message: "设备名称不能为空", trigger: "blur" }
          {required: true, message: "设备名称不能为空", trigger: "blur"}
        ],
        onState: [
          { required: true, message: "设备状态", trigger: "blur" }
          {required: true, message: "设备状态", trigger: "blur"}
        ],
        address: [
          { required: true, message: "地址不能为空", trigger: "blur" }
          {required: true, message: "地址不能为空", trigger: "blur"}
        ],
      }
    };
@@ -260,11 +262,16 @@
  created() {
    this.getVideoCount();
    this.getList();
    listDept({ status: 0 }).then(response => {
    listDept({status: 0}).then(response => {
      this.deptList = response.data.filter(item => item.area);
    });
  },
  methods: {
    clickTab(active) {
      this.queryParams.provinceTag = active
      this.getList()
      this.getVideoCount()
    },
    /** 查询设备资产列表 */
    getList() {
      this.loading = true;
@@ -274,9 +281,9 @@
        this.loading = false;
      });
    },
     /** 查询设备资产统计数 */
     getVideoCount() {
      videoCount('1').then(response => {
    /** 查询设备资产统计数 */
    getVideoCount() {
      videoCount(this.queryParams).then(response => {
        this.count = response.data;
      });
    },
@@ -316,7 +323,7 @@
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
@@ -363,12 +370,13 @@
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除设备资产编号为"' + ids + '"的数据项?').then(function() {
      this.$modal.confirm('是否确认删除设备资产编号为"' + ids + '"的数据项?').then(function () {
        return delMonitor(ids);
      }).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;