fuliqi
2024-09-24 b3be6406c8105376eef209af3bd6635cb95fa81d
增加部级考核标签
9个文件已修改
654 ■■■■■ 已修改文件
public/index.html 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/check/result/detail/detail.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/check/result/detail/index.vue 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/check/result/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/check/template/index.vue 251 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/monitor/car/index.vue 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/monitor/face/index.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/monitor/recovery/index.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/monitor/video/index.vue 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html
@@ -12,9 +12,7 @@
  </title>
  <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
  <style>
    html {
      font-size: 14px
    }
    html
    body,
    #app {
      height: 100%;
src/views/system/check/result/detail/detail.vue
@@ -5,6 +5,7 @@
               >
          <el-menu-item index="0">省厅考核</el-menu-item>
          <el-menu-item index="1">区县考核</el-menu-item>
          <el-menu-item index="2">公安部考核</el-menu-item>
        </el-menu>
      </div>
    <el-container>
@@ -133,7 +134,11 @@
            fixed
          >
            <template slot-scope="scope">
              {{ scope.row.examine_tag === 0 ? '省厅考核' : '区县考核' }}
              {{
                scope.row.examine_tag === 0 ? '省厅考核' :
                  scope.row.examine_tag === 1 ? '区县考核' :
                    scope.row.examine_tag === 2 ? '公安部考核' : '未知'
              }}
            </template>
          </el-table-column>
          <template v-for="item in tableData">
@@ -307,6 +312,7 @@
        date: null,
        quarter: null,
        examineTag: null,
        examineTags: [],
        deptId: null
      },
      // 表单校验
@@ -332,6 +338,7 @@
    let examineTag = this.$route.query.examineTag;
    this.activeIndex = examineTag;
    this.queryParams.examineTag = examineTag;
    this.queryParams.examineTags.push(examineTag);
    // 考核积分列表
    this.getList();
    this.areaSelect();
src/views/system/check/result/detail/index.vue
@@ -2,9 +2,10 @@
  <div style="padding: 0px 10px">
    <div>
      <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"
        style="margin-bottom: 10px">
               style="margin-bottom: 10px">
        <el-menu-item index="0">省厅考核</el-menu-item>
        <el-menu-item index="1">区县考核</el-menu-item>
        <el-menu-item index="2">公安部考核</el-menu-item>
      </el-menu>
    </div>
@@ -15,7 +16,7 @@
            <h1>考核成绩</h1>
            <div class="select-container">
              <el-date-picker v-model="date" format="yyyy-MM" value-format="yyyy-MM" type="month" placeholder="选择日期"
                @change="dateChange">
                              @change="dateChange">
              </el-date-picker>
            </div>
          </div>
@@ -37,12 +38,16 @@
        </el-table-column>
        <el-table-column label="标签" prop="examineTag" align="center">
          <template slot-scope="scope">
            {{ scope.row.examineTag == 0 ? '省厅考核' : '区县考核' }}
            {{
              scope.row.examineTag === 0 ? '省厅考核' :
                scope.row.examineTag === 1 ? '区县考核' :
                  scope.row.examineTag === 2 ? '公安部考核' : '未知'
            }}
          </template>
        </el-table-column>
        <el-table-column label="考核类型" prop="examineCategory" align="center">
          <template slot-scope="scope">
            <dict-tag :options="dict.type.platform_examine_category" :value="scope.row.examineCategory" />
            <dict-tag :options="dict.type.platform_examine_category" :value="scope.row.examineCategory"/>
          </template>
        </el-table-column>
@@ -51,32 +56,37 @@
        </el-table-column>
        <el-table-column label="状态" prop="publish" align="center">
          <template slot-scope="scope">
            <dict-tag :options="dict.type.platform_is_publish" :value="scope.row.publish" />
            <dict-tag :options="dict.type.platform_is_publish" :value="scope.row.publish"/>
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center">
          <template slot-scope="scope">
            <div style="display: flex;justify-content: center;">
            <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)" v-if="scope.row.publish === 'UNPUBLISHED'" >确认发布</el-button>
            <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)" v-if="scope.row.publish === 'PUBLISHED'">取消发布</el-button>
            <el-button
              size="mini"
              type="text"
              icon="el-icon-view"
              @click="handleDetail(scope.row.id)"
            >详细</el-button>
              <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)"
                         v-if="scope.row.publish === 'UNPUBLISHED'">确认发布
              </el-button>
              <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)"
                         v-if="scope.row.publish === 'PUBLISHED'">取消发布
              </el-button>
              <el-button
                size="mini"
                type="text"
                icon="el-icon-view"
                @click="handleDetail(scope.row.id)"
              >详细
              </el-button>
            </div>
          </template>
        </el-table-column>
      </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParamsList.pageNum"
      :limit.sync="queryParamsList.pageSize"
      @pagination="getList"
    />
      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="queryParamsList.pageNum"
        :limit.sync="queryParamsList.pageSize"
        @pagination="getList"
      />
    </div>
@@ -84,14 +94,23 @@
</template>
<script>
import { chartScore, getScore, delScore, addScore, updateScore, publishScore, detailScore } from "@/api/platform/check-score";
import { areaSelect } from '@/api/system/dept';
import {
  chartScore,
  getScore,
  delScore,
  addScore,
  updateScore,
  publishScore,
  detailScore
} from "@/api/platform/check-score";
import {areaSelect} from '@/api/system/dept';
import * as echarts from 'echarts';
let lineChart = null;
let observer = null;
export default {
  name: 'index',
  dicts: ['platform_examine_category','platform_is_publish'],
  dicts: ['platform_examine_category', 'platform_is_publish'],
  data() {
    return {
      activeIndex: '0',
@@ -114,7 +133,7 @@
        pageNum: 1,
        pageSize: 10,
        deptId: null,
        examineTag:0
        examineTag: 0
      },
      tableData: [],
      tableLoading: false,
@@ -136,26 +155,32 @@
    this.date = year + '-' + month;
    this.queryParams.date = this.date;
    let examineTag = this.$route.query.examineTag;
    if (examineTag === '2') { examineTag = '0' }
    if (examineTag === '3') { examineTag = '1' }
    if (examineTag === '2') {
      examineTag = '0'
    }
    if (examineTag === '3') {
      examineTag = '1'
    }
    this.queryParams.examineTag = examineTag;
    this.queryParamsList.examineTag = examineTag;
    this.activeIndex = examineTag;
    this.areaSelect();
    this.getList(this.$route.query.index);
  },
  computed: {
  },
  computed: {},
  methods: {
    //发布
    handlePublish(row) {
      const getExamineCategoryText = category => {
        switch (category) {
          case 1: return '视频考核';
          case 2: return '车辆考核';
          case 3: return '人脸考核';
          default: return '未知';
          case 1:
            return '视频考核';
          case 2:
            return '车辆考核';
          case 3:
            return '人脸考核';
          default:
            return '未知';
        }
      };
@@ -293,7 +318,7 @@
      if (!data) return this.getAllDay().map((item) => [item, []]);
      const tempGroup = {};
      data.forEach((item) => {
        let { createTime } = item;
        let {createTime} = item;
        let tempTime = createTime.split('-');
        createTime = tempTime[1] + '-' + tempTime[2];
        if (!tempGroup[createTime]) {
src/views/system/check/result/index.vue
@@ -5,9 +5,11 @@
        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"
                 style="margin-bottom: 10px">
          <el-menu-item index="0">省厅月度</el-menu-item>
          <el-menu-item index="2">省厅季度</el-menu-item>
          <el-menu-item index="1">区县月度</el-menu-item>
          <el-menu-item index="1">省厅季度</el-menu-item>
          <el-menu-item index="2">区县月度</el-menu-item>
          <el-menu-item index="3">区县季度</el-menu-item>
          <el-menu-item index="4">公安部月度</el-menu-item>
          <el-menu-item index="5">公安部季度</el-menu-item>
        </el-menu>
      </div>
      <!-- 导出按钮 -->
@@ -128,7 +130,8 @@
    return {
      tagOptions: [
        {value: 0, label: '省厅'},
        {value: 1, label: '区县'}
        {value: 1, label: '区县'},
        {value: 2, label: '公安部'}
      ],
      pickerOptions: {
        shortcuts: [{
src/views/system/check/template/index.vue
@@ -1,16 +1,17 @@
<template>
  <div class="app-container">
    <el-form style="margin-left :20px" :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
    <el-form style="margin-left :20px" :model="queryParams" ref="queryForm" size="small" :inline="true"
             v-show="showSearch" label-width="68px">
      <el-form-item label="考核类型" prop="examineCategory">
          <el-select v-model="queryParams.examineCategory" placeholder="考核类型" clearable @keyup.enter.native="handleQuery">
            <el-option
              v-for="dict in dict.type.platform_examine_category"
              :key="dict.value"
              :label="dict.label"
              :value="parseInt(dict.value)"
            />
          </el-select>
        </el-form-item>
        <el-select v-model="queryParams.examineCategory" placeholder="考核类型" clearable @keyup.enter.native="handleQuery">
          <el-option
            v-for="dict in dict.type.platform_examine_category"
            :key="dict.value"
            :label="dict.label"
            :value="parseInt(dict.value)"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="考核标签" prop="examineTag">
        <el-select v-model="queryParams.examineTag" placeholder="考核标签" clearable @keyup.enter.native="handleQuery">
          <el-option
@@ -35,7 +36,8 @@
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
        >新增</el-button>
        >新增
        </el-button>
      </el-col>
      <!-- <el-col :span="1.5">
        <el-button
@@ -57,46 +59,51 @@
          @click="handleDelete"
        >删除</el-button>
      </el-col> -->
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="warning"-->
<!--          plain-->
<!--          icon="el-icon-download"-->
<!--          size="mini"-->
<!--          @click="handleExport"-->
<!--        >导出</el-button>-->
<!--      </el-col>-->
      <!--      <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"></right-toolbar>
    </el-row>
    <div class="card-container">
    <el-card class="box-card" v-for="item in checkTemplateList" :key="item">
      <div class="text item">模板名称:{{ item.templateName }}</div>
      <div class="text item">考核标签:{{ item.examineTag == 0 ? '省厅考核' : '市局考核' }}</div>
      <div class="text item" style="display: flex">
        <span>考核类型:</span>
        <dict-tag :options="dict.type.platform_examine_category" :value="item.examineCategory"/>
      </div>
      <!-- <div class="text item">考核频率:{{ item.frequency == 0 ? '月度考核' : '季度考核' }}</div> -->
      <div class="text item" style="display: flex">
        <span>考核对象:</span>
          <el-tooltip  effect="dark" :content="translateDeptIdList(item.deptId)" placement="top">
          <div class="item" style="margin-bottom: 0" v-for = "(deptId,index) in item.deptId" :key = index>
            {{ translateDeptIdList(item.deptId) }}
          </div>
      <el-card class="box-card" v-for="item in checkTemplateList" :key="item">
        <div class="text item">模板名称:{{ item.templateName }}</div>
        <div class="text item">考核标签:{{
            item.examineTag === 0 ? '省厅考核' :
              item.examineTag === 1 ? '区县考核' :
                item.examineTag === 2 ? '公安部考核' : '未知'
          }}
        </div>
        <div class="text item" style="display: flex">
          <span>考核类型:</span>
          <dict-tag :options="dict.type.platform_examine_category" :value="item.examineCategory"/>
        </div>
        <!-- <div class="text item">考核频率:{{ item.frequency == 0 ? '月度考核' : '季度考核' }}</div> -->
        <div class="text item" style="display: flex">
          <span>考核对象:</span>
          <el-tooltip effect="dark" :content="translateDeptIdList(item.deptId)" placement="top">
            <div class="item" style="margin-bottom: 0" v-for="(deptId,index) in item.deptId" :key=index>
              {{ translateDeptIdList(item.deptId) }}
            </div>
          </el-tooltip>
      </div>
      <div class="text item" style="display: flex">
        <span style="padding: 3px 0;">使用状态:</span>
        <dict-tag :options="dict.type.platform_use_state" :value="item.status"/>
      </div>
      <div class="bottom clearfix">
        <el-button type="text" class="button" @click="handleStatus(item)" v-show="item.status == 1" >启用</el-button>
        <el-button type="text" class="button" @click="handleStatus(item)" v-show="item.status == 0" >停用</el-button>
        <el-button type="text" class="button" @click="handleCopy(item)">复制</el-button>
        <el-button type="text" class="button" @click="handleUpdate(item)">修改</el-button>
        <el-button type="text" class="button" @click="handleDelete(item)">删除</el-button>
      </div>
    </el-card>
        </div>
        <div class="text item" style="display: flex">
          <span style="padding: 3px 0;">使用状态:</span>
          <dict-tag :options="dict.type.platform_use_state" :value="item.status"/>
        </div>
        <div class="bottom clearfix">
          <el-button type="text" class="button" @click="handleStatus(item)" v-show="item.status == 1">启用</el-button>
          <el-button type="text" class="button" @click="handleStatus(item)" v-show="item.status == 0">停用</el-button>
          <el-button type="text" class="button" @click="handleCopy(item)">复制</el-button>
          <el-button type="text" class="button" @click="handleUpdate(item)">修改</el-button>
          <el-button type="text" class="button" @click="handleDelete(item)">删除</el-button>
        </div>
      </el-card>
    </div>
    <pagination
@@ -111,7 +118,7 @@
    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="模板名称" prop="templateName">
          <el-input v-model="form.templateName" placeholder="请输入模板名称" />
          <el-input v-model="form.templateName" placeholder="请输入模板名称"/>
        </el-form-item>
        <el-form-item label="考核标签" prop="examineTag">
          <el-select v-model="form.examineTag" placeholder="考核类型">
@@ -123,16 +130,16 @@
            />
          </el-select>
        </el-form-item>
<!--        <el-form-item label="考核频率" prop="frequency">-->
<!--          <el-select v-model="form.frequency" placeholder="考核频率">-->
<!--            <el-option-->
<!--              v-for="dict in dict.type.platform_examine_frequency"-->
<!--              :key="dict.value"-->
<!--              :label="dict.label"-->
<!--              :value="parseInt(dict.value)"-->
<!--            />-->
<!--          </el-select>-->
<!--        </el-form-item>-->
        <!--        <el-form-item label="考核频率" prop="frequency">-->
        <!--          <el-select v-model="form.frequency" placeholder="考核频率">-->
        <!--            <el-option-->
        <!--              v-for="dict in dict.type.platform_examine_frequency"-->
        <!--              :key="dict.value"-->
        <!--              :label="dict.label"-->
        <!--              :value="parseInt(dict.value)"-->
        <!--            />-->
        <!--          </el-select>-->
        <!--        </el-form-item>-->
        <el-form-item label="考核对象" prop="deptId">
          <el-select v-model="form.deptId" multiple placeholder="请选择">
            <el-option
@@ -157,40 +164,40 @@
          <div class="row-warp">
            <div class="row" v-for="(form) in tempRuleFormList">
              <div class="row-left">
                  <div>规则</div>
                  <div class="margin-5">
                    <el-select v-model="form.ruleId" placeholder="请选择">
                      <el-option
                        v-for="item in currentRuleList"
                        :key="item.id"
                        :label="item.ruleName"
                        :value="item.id"
                        :disabled="isRuleDisabled(item.id, index)"
                        >
                      </el-option>
                    </el-select>
                <div>规则</div>
                <div class="margin-5">
                  <el-select v-model="form.ruleId" placeholder="请选择">
                    <el-option
                      v-for="item in currentRuleList"
                      :key="item.id"
                      :label="item.ruleName"
                      :value="item.id"
                      :disabled="isRuleDisabled(item.id, index)"
                    >
                    </el-option>
                  </el-select>
                </div>
              </div>
              <div class="row-right">
                  <div>权重</div>
                  <div class="margin-5">
                    <el-input type="number" v-model.number="form.weight" />
                  </div>
                <div>权重</div>
                <div class="margin-5">
                  <el-input type="number" v-model.number="form.weight"/>
                </div>
              </div>
              <div class="item-op">
                <el-button @click="removeRule(form)" type="danger" icon="el-icon-delete" circle></el-button>
              </div>
            </div>
            <div style="margin-top: 25px">
              <el-button type="success" @click="nextAdd()"  size="mini" plain>添加</el-button>
              <el-button type="success" @click="nextAdd()" size="mini" plain>添加</el-button>
            </div>
          </div>
        </el-form-item>
        <el-form-item label="报警分数" prop="alarmScore">
          <el-input v-model="form.alarmScore" placeholder="请输入报警分数" />
          <el-input v-model="form.alarmScore" placeholder="请输入报警分数"/>
        </el-form-item>
        <el-form-item label="调整系数" prop="adjustCoefficient">
          <el-input v-model="form.adjustCoefficient" placeholder="请输入系数值" />
          <el-input v-model="form.adjustCoefficient" placeholder="请输入系数值"/>
        </el-form-item>
        <el-form-item label="调整方式" prop="adjustWay">
          <el-select v-model="form.adjustWay" placeholder="请选择调整系数计算方式">
@@ -205,11 +212,12 @@
          </el-select>
        </el-form-item>
        <el-form-item label="规则描述" prop="description">
          <el-input v-model="form.description" type="textarea" :autosize="{ minRows: 4, maxRows: 6}" placeholder="请输入规则描述"/>
          <el-input v-model="form.description" type="textarea" :autosize="{ minRows: 4, maxRows: 6}"
                    placeholder="请输入规则描述"/>
        </el-form-item>
        <el-form-item label="状态" prop="status">
          <el-radio v-model="form.status" label="0" >启用</el-radio>
          <el-radio v-model="form.status" label="1" >停用</el-radio>
          <el-radio v-model="form.status" label="0">启用</el-radio>
          <el-radio v-model="form.status" label="1">停用</el-radio>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
@@ -221,18 +229,25 @@
</template>
<script>
import { listCheckTemplate, getCheckTemplate, delCheckTemplate, addCheckTemplate, updateCheckTemplate,copyCheckTemplate } from "@/api/platform/check-template";
import { areaSelect } from '@/api/system/dept'
import { listCheckRule } from "../../../../api/platform/check-rule";
import {
  listCheckTemplate,
  getCheckTemplate,
  delCheckTemplate,
  addCheckTemplate,
  updateCheckTemplate,
  copyCheckTemplate
} from "@/api/platform/check-template";
import {areaSelect} from '@/api/system/dept'
import {listCheckRule} from "../../../../api/platform/check-rule";
export default {
  name: "CheckTemplate",
  dicts: ['platform_use_state','platform_examine_category','platform_rule_category','platform_examine_frequency','platform_examine_tag'],
  dicts: ['platform_use_state', 'platform_examine_category', 'platform_rule_category', 'platform_examine_frequency', 'platform_examine_tag'],
  data() {
    return {
      props: { multiple: true },
      props: {multiple: true},
      value: [],
      areaList:[],
      areaList: [],
      ruleList: [],
      unitList: [],
      selectedRuleIds: [],
@@ -274,28 +289,28 @@
      // 表单校验
      rules: {
        templateName: [
          { required: true, message: "模板名称不能为空", trigger: "blur" }
          {required: true, message: "模板名称不能为空", trigger: "blur"}
        ],
        examineTag: [
          { required: true, message: "请选择考核标签", trigger: "change" }
          {required: true, message: "请选择考核标签", trigger: "change"}
        ],
        frequency: [
          { required: true, message: "请选择状态考核频率", trigger: "change" }
          {required: true, message: "请选择状态考核频率", trigger: "change"}
        ],
        deptId: [
          { required: true, message: "请至少选择一个考核对象", trigger: "change" }
          {required: true, message: "请至少选择一个考核对象", trigger: "change"}
        ],
        examineCategory: [
          { required: true, message: "请选择考核类型", trigger: "change" }
          {required: true, message: "请选择考核类型", trigger: "change"}
        ],
        adjustCoefficient: [
          { required: true, message: "调整系数不能为空", trigger: "blur" }
          {required: true, message: "调整系数不能为空", trigger: "blur"}
        ],
        adjustWay: [
          { required: true, message: "请选择调整方式", trigger: "change" }
          {required: true, message: "请选择调整方式", trigger: "change"}
        ],
        status: [
          { required: true, message: "请选择状态", trigger: "change" }
          {required: true, message: "请选择状态", trigger: "change"}
        ],
      },
    };
@@ -418,7 +433,7 @@
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
@@ -430,23 +445,24 @@
      this.title = "添加考核模板";
    },
    /** 复制按钮操作 */
    handleCopy(row){
    handleCopy(row) {
      copyCheckTemplate(row).then(response => {
        this.$modal.msgSuccess("复制成功");
        this.open = false;
        this.getList();
      });
    },
    handleStatus(row){
    handleStatus(row) {
      let text = row.status == 1 ? '启用' : '停用';
      const templateName = row.templateName;
      this.$modal.confirm('是否确认' + text + '考核名为"' + templateName + '"的数据项?').then(function() {
      this.$modal.confirm('是否确认' + text + '考核名为"' + templateName + '"的数据项?').then(function () {
        row.status = row.status == 1 ? "0" : "1";
        return updateCheckTemplate(row);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess(text + "成功");
      }).catch(() => {});
      }).catch(() => {
      });
    },
    /** 修改按钮操作 */
@@ -495,12 +511,13 @@
    /** 删除按钮操作 */
    handleDelete(row) {
      const id = row.id
      this.$modal.confirm('是否确认删除考核模板名为"' + row.templateName + '"的数据项?').then(function() {
      this.$modal.confirm('是否确认删除考核模板名为"' + row.templateName + '"的数据项?').then(function () {
        return delCheckTemplate(id);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
      }).catch(() => {
      });
    },
    /** 导出按钮操作 */
    handleExport() {
@@ -516,10 +533,12 @@
.margin-5 {
  margin-left: 5px;
}
.row-warp {
  display: flex;
  flex-direction: column;
}
.row {
  display: flex;
  flex-direction: row;
@@ -527,33 +546,37 @@
  justify-content: center;
  margin: 5px 0;
}
.row-left {
  flex: 1;
  display: flex;
  flex-direction: row;
}
.row-right {
  flex: 1;
  display: flex;
  flex-direction: row;
}
.text {
    font-size: 14px;
  }
  font-size: 14px;
}
  .item {
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
.item {
  margin-bottom: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
  .box-card {
    width: 20%;
.box-card {
  width: 20%;
    margin-right: 50px;
    margin-bottom: 30px;
  }
  margin-right: 50px;
  margin-bottom: 30px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
src/views/system/monitor/car/index.vue
@@ -1,16 +1,19 @@
<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"
      style="display: flex;flex-direction: row;min-width: 300px;max-width: 300px;margin-bottom: 5px;border-radius: 1px; user-select: none"
    >
      <div @click="clickTab(null)" class="tab"
           :class="{tabActive: null == queryParams.provinceTag, tabInactive: null != queryParams.provinceTag}">全部
           :class="{tabActive: !queryParams.provinceTag && !queryParams.deptTag, tabInactive: queryParams.provinceTag || queryParams.deptTag}">全部
      </div>
      <div @click="clickTab(0)" class="tab"
           :class="{tabActive: 0 === queryParams.provinceTag, tabInactive: 0 !== queryParams.provinceTag}">省厅考核
           :class="{tabActive: queryParams.provinceTag, tabInactive: !queryParams.provinceTag}">省厅考核
      </div>
      <div @click="clickTab(1)" class="tab"
           :class="{tabActive: queryParams.deptTag, tabInactive: !queryParams.deptTag}">公安部考核
      </div>
    </div>
    <el-card class="box-card" >
    <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">
@@ -21,19 +24,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>
@@ -56,7 +59,7 @@
          clearable
          @change="handleQuery"
        >
        <el-option
          <el-option
            v-for="dept in deptList"
            :key="dept.deptId"
            :label="dept.area"
@@ -71,12 +74,12 @@
          clearable
          style="width: 100px"
        >
        <el-option
          v-for="dict in dict.type.camera_state"
          :key="dict.value"
          :label="dict.label"
          :value="dict.value"
        />
          <el-option
            v-for="dict in dict.type.camera_state"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
@@ -93,16 +96,22 @@
      <el-table-column label="ip" align="center" prop="ip" 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>
          <div>
            {{
              (
                (scope.row.provinceTag ? '省厅、' : '') +
                (scope.row.deptTag ? '公安部、' : '')).replace(/、$/, '')
            }}
          </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="error" width="180" v-if="columns[3].visible"/>
      <el-table-column label="管理单位" align="center" prop="unitName" width="180" v-if="columns[4].visible"/>
      <el-table-column label="数据时间" align="center" prop="mongoCreateTime" width="180" v-if="columns[5].visible"/>
      <el-table-column label="一机一档状态" align="center" prop="monitorQualify" width="180" v-if="columns[6].visible">
@@ -125,19 +134,21 @@
      <el-table-column label="当日抓拍量" align="center" prop="snapCount" width="180" v-if="columns[9].visible"/>
      <el-table-column label="时钟准确率" align="center" prop="clockPercent" width="180" v-if="columns[10].visible"/>
      <el-table-column label="上传及时率" align="center" prop="uploadPercent" width="180" v-if="columns[11].visible"/>
      <el-table-column label="主要属性一致率" align="center" prop="importantConPercent" width="180" v-if="columns[12].visible"/>
      <el-table-column label="主要属性一致率" align="center" prop="importantConPercent" width="180"
                       v-if="columns[12].visible"/>
      <el-table-column label="全量属性一致率" align="center" prop="majorConPercent" width="180" v-if="columns[13].visible"/>
      <el-table-column label="大图可用率" align="center" prop="bigUsefulPercent" width="180" v-if="columns[14].visible"/>
      <el-table-column label="url可用率" align="center" prop="urlPercent" width="180" v-if="columns[15].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" 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>
@@ -156,7 +167,12 @@
          <el-form-item label="设备名称:">{{ form.name }}</el-form-item>
          <el-col :span="12">
            <el-form-item label="设备编码:">{{ form.serialNumber }}</el-form-item>
            <el-form-item label="标签:">{{ form.provinceTag == 0 ? '省厅' : '市局' }}</el-form-item>
            <el-form-item label="标签:">
              {{
                ((form.provinceTag ? '省厅、' : '') +
                  (form.deptTag ? '公安部、' : '')).replace(/、$/, '')
              }}
            </el-form-item>
            <el-form-item label="设备状态:">
              <div v-if="form.onState === 0">离线</div>
              <div v-else-if="form.onState === 1">在线</div>
@@ -216,32 +232,33 @@
</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: false },
        { key: 6, label: `一机一档状态`, visible: false },
        { key: 7, label: `是否为未注册设备`, visible: false },
        { key: 8, label: `抓拍数据量监测`, visible: false },
        { key: 9, label: `当日抓拍量`, visible: false },
        { key: 10, label: `时钟准确率`, visible: false },
        { key: 11, label: `上传及时率`, visible: false },
        { key: 12, label: `主要属性一致率`, visible: false },
        { key: 13, label: `全量属性一致率`, visible: false },
        { key: 14, label: `图片访问异常量`, visible: false },
        { key: 15, label: `大图不可用量`, visible: false }
        {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: false},
        {key: 6, label: `一机一档状态`, visible: false},
        {key: 7, label: `是否为未注册设备`, visible: false},
        {key: 8, label: `抓拍数据量监测`, visible: false},
        {key: 9, label: `当日抓拍量`, visible: false},
        {key: 10, label: `时钟准确率`, visible: false},
        {key: 11, label: `上传及时率`, visible: false},
        {key: 12, label: `主要属性一致率`, visible: false},
        {key: 13, label: `全量属性一致率`, visible: false},
        {key: 14, label: `图片访问异常量`, visible: false},
        {key: 15, label: `大图不可用量`, visible: false}
      ],
      count: {
        totalPosts: 0,
@@ -287,16 +304,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"}
        ],
      }
    };
@@ -304,13 +321,22 @@
  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
      if (active === 0) {
        this.queryParams.provinceTag = true
        this.queryParams.deptTag =null
      } else if (active === 1) {
        this.queryParams.provinceTag = null
        this.queryParams.deptTag = true
      }else {
        this.queryParams.provinceTag = null
        this.queryParams.deptTag = null
      }
      this.getList()
      this.getVideoCount()
    },
@@ -368,7 +394,7 @@
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
@@ -410,12 +436,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() {
@@ -454,13 +481,13 @@
}
.box-card {
  background-color: #ffffff;
  width: 100%;
  margin-bottom: 20px;
  height: 120px
}
.icon-container {
  display: flex;
  justify-content: center;
@@ -470,6 +497,7 @@
  height: 80px;
  margin-left: 5%;
}
.el-icon-truck {
  font-size: 50px;
  color: #FFFFFF;
src/views/system/monitor/face/index.vue
@@ -1,13 +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"
      style="display: flex;flex-direction: row;min-width: 300px;max-width: 300px;margin-bottom: 5px;border-radius: 1px; user-select: none"
    >
      <div @click="clickTab(null)" class="tab"
           :class="{tabActive: null == queryParams.provinceTag, tabInactive: null != queryParams.provinceTag}">全部
           :class="{tabActive: !queryParams.provinceTag && !queryParams.deptTag, tabInactive: queryParams.provinceTag || queryParams.deptTag}">全部
      </div>
      <div @click="clickTab(0)" class="tab"
           :class="{tabActive: 0 === queryParams.provinceTag, tabInactive: 0 !== queryParams.provinceTag}">省厅考核
           :class="{tabActive: queryParams.provinceTag, tabInactive: !queryParams.provinceTag}">省厅考核
      </div>
      <div @click="clickTab(1)" class="tab"
           :class="{tabActive: queryParams.deptTag, tabInactive: !queryParams.deptTag}">公安部考核
      </div>
    </div>
    <el-card class="box-card" >
@@ -92,7 +95,13 @@
      <el-table-column label="ip" align="center" prop="ip" 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>
          <div>
            {{
              (
                (scope.row.provinceTag ? '省厅、' : '') +
                (scope.row.deptTag ? '公安部、' : '')).replace(/、$/, '')
            }}
          </div>
        </template>
      </el-table-column>
      <el-table-column label="区域" align="center" prop="area" width="180" v-if="columns[1].visible"/>
@@ -197,7 +206,12 @@
          <el-form-item label="设备名称:">{{ form.name }}</el-form-item>
          <el-col :span="12">
            <el-form-item label="设备编码:">{{ form.serialNumber }}</el-form-item>
            <el-form-item label="标签:">{{ form.provinceTag == 0 ? '省厅' : '市局' }}</el-form-item>
            <el-form-item label="标签:">
              {{
                ((form.provinceTag ? '省厅、' : '') +
                  (form.deptTag ? '公安部、' : '')).replace(/、$/, '')
              }}
            </el-form-item>
            <el-form-item label="设备状态:">
              <div v-if="form.onState === 0">离线</div>
              <div v-else-if="form.onState === 1">在线</div>
@@ -350,7 +364,16 @@
  },
  methods: {
    clickTab(active) {
      this.queryParams.provinceTag = active
      if (active === 0) {
        this.queryParams.provinceTag = true
        this.queryParams.deptTag =null
      } else if (active === 1) {
        this.queryParams.provinceTag = null
        this.queryParams.deptTag = true
      }else {
        this.queryParams.provinceTag = null
        this.queryParams.deptTag = null
      }
      this.getList()
      this.getVideoCount()
    },
src/views/system/monitor/recovery/index.vue
@@ -1,13 +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"
      style="display: flex;flex-direction: row;min-width: 300px;max-width: 300px;margin-bottom: 5px;border-radius: 1px; user-select: none"
    >
      <div @click="clickTab(null)" class="tab"
           :class="{tabActive: null == queryParams.provinceTag, tabInactive: null != queryParams.provinceTag}">全部
           :class="{tabActive: !queryParams.provinceTag && !queryParams.deptTag, tabInactive: queryParams.provinceTag || queryParams.deptTag}">全部
      </div>
      <div @click="clickTab(0)" class="tab"
           :class="{tabActive: 0 === queryParams.provinceTag, tabInactive: 0 !== queryParams.provinceTag}">省厅考核
           :class="{tabActive: queryParams.provinceTag, tabInactive: !queryParams.provinceTag}">省厅考核
      </div>
      <div @click="clickTab(1)" class="tab"
           :class="{tabActive: queryParams.deptTag, tabInactive: !queryParams.deptTag}">公安部考核
      </div>
    </div>
    <el-card class="box-card">
@@ -94,7 +97,13 @@
      </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>
          <div>
            {{
              (
                (scope.row.provinceTag ? '省厅、' : '') +
                (scope.row.deptTag ? '公安部、' : '')).replace(/、$/, '')
            }}
          </div>
        </template>
      </el-table-column>
      <el-table-column label="区域" align="center" prop="area" v-if="columns[1].visible"/>
@@ -140,7 +149,12 @@
          <el-form-item label="设备名称:">{{ form.name }}</el-form-item>
          <el-col :span="12">
            <el-form-item label="设备编码:">{{ form.serialNumber }}</el-form-item>
            <el-form-item label="标签:">{{ form.provinceTag == 0 ? '省厅' : '市局' }}</el-form-item>
            <el-form-item label="标签:">
              {{
                ((form.provinceTag ? '省厅、' : '') +
                  (form.deptTag ? '公安部、' : '')).replace(/、$/, '')
              }}
            </el-form-item>
            <el-form-item label="设备状态:">
              <div v-if="form.onState === 0">异常</div>
              <div v-else-if="form.onState === 1">正常</div>
@@ -313,7 +327,16 @@
      return translatedTypes.join(', ');
    },
    clickTab(active) {
      this.queryParams.provinceTag = active
      if (active === 0) {
        this.queryParams.provinceTag = true
        this.queryParams.deptTag =null
      } else if (active === 1) {
        this.queryParams.provinceTag = null
        this.queryParams.deptTag = true
      }else {
        this.queryParams.provinceTag = null
        this.queryParams.deptTag = null
      }
      this.getList()
      this.getVideoCount()
    },
src/views/system/monitor/video/index.vue
@@ -2,13 +2,17 @@
  <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"
      style="display: flex;flex-direction: row;min-width: 300px;max-width: 300px;margin-bottom: 5px;border-radius: 1px; user-select: none"
    >
      <div @click="clickTab(null)" class="tab"
           :class="{tabActive: null == queryParams.provinceTag, tabInactive: null != queryParams.provinceTag}">全部
           :class="{tabActive: !queryParams.provinceTag && !queryParams.deptTag, tabInactive: queryParams.provinceTag || queryParams.deptTag}">
        全部
      </div>
      <div @click="clickTab(0)" class="tab"
           :class="{tabActive: 0 === queryParams.provinceTag, tabInactive: 0 !== queryParams.provinceTag}">省厅考核
           :class="{tabActive: queryParams.provinceTag, tabInactive: !queryParams.provinceTag}">省厅考核
      </div>
      <div @click="clickTab(1)" class="tab"
           :class="{tabActive: queryParams.deptTag, tabInactive: !queryParams.deptTag}">公安部考核
      </div>
    </div>
    <el-card class="box-card">
@@ -127,22 +131,22 @@
              </el-form-item>
              <el-form-item label="数据类型" prop="dataType" required>
                <el-radio-group v-model="exportForm.dataType">
<!--                  <div style="display: flex;margin-bottom: 10px;">-->
<!--                    <div style="width: 48%">-->
                      <el-radio :label="0">总量数据</el-radio>
<!--                    </div>-->
<!--                    <div style="width: 48%">-->
                      <el-radio :label="1">每日在线情况</el-radio>
<!--                    </div>-->
<!--                  </div>-->
<!--                  <div style="display: flex;">-->
<!--                    <div style="width: 48%">-->
                      <el-radio :label="2">每日录像情况</el-radio>
<!--                    </div>-->
<!--                    <div style="width: 48%">-->
                      <el-radio :label="3">每日录像缺失时长</el-radio>
<!--                    </div>-->
<!--                  </div>-->
                  <!--                  <div style="display: flex;margin-bottom: 10px;">-->
                  <!--                    <div style="width: 48%">-->
                  <el-radio :label="0">总量数据</el-radio>
                  <!--                    </div>-->
                  <!--                    <div style="width: 48%">-->
                  <el-radio :label="1">每日在线情况</el-radio>
                  <!--                    </div>-->
                  <!--                  </div>-->
                  <!--                  <div style="display: flex;">-->
                  <!--                    <div style="width: 48%">-->
                  <el-radio :label="2">每日录像情况</el-radio>
                  <!--                    </div>-->
                  <!--                    <div style="width: 48%">-->
                  <el-radio :label="3">每日录像缺失时长</el-radio>
                  <!--                    </div>-->
                  <!--                  </div>-->
                </el-radio-group>
              </el-form-item>
              <el-button type="primary" size="small" style="width: 400px" @click="handleExport">导出</el-button>
@@ -161,7 +165,13 @@
      <el-table-column label="ip" align="center" prop="ip" 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>
          <div>
            {{
              (
                (scope.row.provinceTag ? '省厅、' : '') +
                (scope.row.deptTag ? '公安部、' : '')).replace(/、$/, '')
            }}
          </div>
        </template>
      </el-table-column>
      <el-table-column label="区域" align="center" prop="area" width="180" v-if="columns[1].visible"/>
@@ -237,7 +247,12 @@
          <el-form-item label="设备名称:">{{ form.name }}</el-form-item>
          <el-col :span="12">
            <el-form-item label="设备编码:">{{ form.serialNumber }}</el-form-item>
            <el-form-item label="标签:">{{ form.provinceTag == 0 ? '省厅' : '市局' }}</el-form-item>
            <el-form-item label="标签:">
              {{
                ((form.provinceTag ? '省厅、' : '') +
                (form.deptTag ? '公安部、' : '')).replace(/、$/, '')
              }}
            </el-form-item>
            <el-form-item label="设备状态:">
              <div v-if="form.onState === 0">离线</div>
              <div v-else-if="form.onState === 1">在线</div>
@@ -414,7 +429,16 @@
  },
  methods: {
    clickTab(active) {
      this.queryParams.provinceTag = active
      if (active === 0) {
        this.queryParams.provinceTag = true
        this.queryParams.deptTag = null
      } else if (active === 1) {
        this.queryParams.provinceTag = null
        this.queryParams.deptTag = true
      } else {
        this.queryParams.provinceTag = null
        this.queryParams.deptTag = null
      }
      this.getList()
      this.getVideoCount()
    },