xiangpei
2024-09-03 16eb67ab6b103663d30cad9ba74360f982e131cb
src/views/system/monitor/recovery/index.vue
@@ -22,10 +22,6 @@
              <p>异常数</p >
            </div>
            <div class="dashboard-item">
              <h3>{{ count.totalViews }}</h3>
              <p>生成异常工单数</p >
            </div>
            <div class="dashboard-item">
              <h3>{{ count.viewsPercentage }}%</h3>
              <p>设备运行率</p >
            </div>
@@ -48,15 +44,14 @@
          v-model="queryParams.address"
          placeholder="请选择区域"
          clearable
          @change="handleQuery"
        >
          <el-option label="自贡市" value="自贡市"/>
          <el-option label="沿滩区" value="沿滩区"/>
          <el-option label="大安区" value="大安区"/>
          <el-option label="贡井区" value="贡井区"/>
          <el-option label="自流井区" value="自流井区"/>
          <el-option label="高新区" value="高新区"/>
          <el-option label="荣县" value="荣县"/>
          <el-option label="富顺县" value="富顺县"/>
        <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">
@@ -72,13 +67,13 @@
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        <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-col :span="1.5">
        <el-button
          type="warning"
          plain
@@ -86,30 +81,29 @@
          size="mini"
          @click="handleExport"
        >导出</el-button>
      </el-col>
      </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 type="selection" width="55" align="center" />
      <el-table-column label="设备名称" align="center" prop="name" />
      <el-table-column label="设备编码" align="center" prop="serialNumber" width="180px" />
      <el-table-column label="标签" align="center" prop="publicSecurity" v-if="columns[0].visible" />
      <el-table-column label="区域" align="center" prop="address" v-if="columns[1].visible"/>
      <el-table-column label="标签" align="center" 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>
      <el-table-column label="是否生成异常工单" align="center" prop="defaultOrder" v-if="columns[3].visible">
      <template slot-scope="scope">
        <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.defaultOrder"/>
      </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>
      <el-table-column label="管理单位" align="center" prop="managementUnit" v-if="columns[6].visible" />
      <el-table-column label="管理单位" align="center" prop="unitName" v-if="columns[6].visible" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
@@ -170,12 +164,13 @@
<script>
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'],
  data() {
    return {
      deptList: [],
      // 列信息
      columns: [
        { key: 0, label: `标签`, visible: true },
@@ -248,6 +243,9 @@
  created() {
    this.getList();
    this.getVideoCount();
    listDept({ status: 0 }).then(response => {
      this.deptList = response.data.filter(item => item.area);
    });
  },
  methods: {
    /** 查询设备资产列表 */
@@ -297,6 +295,7 @@
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.queryParams.address = '';
      this.resetForm("queryForm");
      this.handleQuery();
    },
@@ -374,7 +373,7 @@
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  border-radius: 10px;
  width: 130px;
  height: 80px;
  margin-left: 5%;