fuliqi
2024-03-19 967a6b721439c48f25ec20a270f23f4dfb1bdb7b
Merge remote-tracking branch 'origin/master'
6个文件已修改
4个文件已添加
1069 ■■■■ 已修改文件
src/api/platform/vehicle-data-monitor.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-car/index.vue 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-examine/components/examine-chart.vue 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-examine/components/examine-hola.vue 157 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-examine/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-face/index.vue 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-video/index.vue 206 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-wrapper/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/data-manage/index.vue 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/vehicle-data-monitor/index.vue 316 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/platform/vehicle-data-monitor.js
New file
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询卡口过车数据一致性列表
export function listPlatform(query) {
  return request({
    url: '/platform/platform/list',
    method: 'get',
    params: query
  })
}
// 查询卡口过车数据一致性详细
export function getPlatform(id) {
  return request({
    url: '/platform/platform/' + id,
    method: 'get'
  })
}
// 新增卡口过车数据一致性
export function addPlatform(data) {
  return request({
    url: '/platform/platform',
    method: 'post',
    data: data
  })
}
// 修改卡口过车数据一致性
export function updatePlatform(data) {
  return request({
    url: '/platform/platform',
    method: 'put',
    data: data
  })
}
// 删除卡口过车数据一致性
export function delPlatform(id) {
  return request({
    url: '/platform/platform/' + id,
    method: 'delete'
  })
}
src/views/screen/components/screen-car/index.vue
@@ -1,19 +1,130 @@
<template>
  <div class="car-container">
    <wrapper-title :title="'人脸数据趋势'"></wrapper-title>
    <wrapper-title :title="'车辆设备数据'"></wrapper-title>
    <div class="car-content">
      <div class="data-plane">
        <dv-border-box-13 class="plane">
          <div class="data-item">
            <div class="data-icon">
              <img src="@/assets/images/screen/icon/icon1.png" alt="" class="width-img">
            </div>
            <div class="data-info">
              <div class="data-lable">设备总数</div>
              <div class="data-num">{{ formatNumber(1123) }}</div>
            </div>
          </div>
        </dv-border-box-13>
        <dv-border-box-13 class="plane">
          <div class="data-item">
            <div class="data-icon">
              <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img">
            </div>
            <div class="data-info">
              <div class="data-lable">设备正常数</div>
              <div class="data-num">{{ formatNumber(200000) }}</div>
            </div>
          </div>
        </dv-border-box-13>
        <dv-border-box-13 class="plane">
          <div class="data-item">
            <div class="data-icon">
              <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img">
            </div>
            <div class="data-info">
              <div class="data-lable">设备异常数</div>
              <div class="data-num">{{ formatNumber(112313141111) }}</div>
            </div>
          </div>
        </dv-border-box-13>
      </div>
    </div>
  </div>
</template>
<script>
import WrapperTitle from '../wrapper-title/index';
export default {
  name: 'ScreenCar',
  components: {
    WrapperTitle
  },
  data() {
    return {
      dataList: {
        state: { '01:00': 1000, '02:00': 2131, '03:00': 1233, '04:00': 2132, '05:00': 3211, '06:00': 213, '07:00': 123, '08:00': 566 },
        state2: { '01:00': 900, '02:00': 1131, '03:00': 1533, '04:00': 2132, '05:00': 3011, '06:00': 13, '07:00': 113, '08:00': 566 },
      },
    }
  },
  methods: {
    formatNumber(value) {
      return new Intl.NumberFormat('en-US').format(value);
    }
  },
  mounted() {
  },
  beforeDestroy() {
  },
}
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.car-container {
  width: 100%;
  height: fit-content;
  display: flex;
  flex-direction: column;
}
.car-content {
  flex: 1;
  background: rgba(67, 102, 155, 0.3);
  border: 1px solid rgba(47, 91, 157, 0.8);
  .plane {
    margin-bottom: 10px;
  }
  .data-plane {
    .data-item {
      width: 100%;
      padding: 10px 20px;
      display: flex;
      align-items: center;
      .data-icon {
        width: 40px;
        margin: 0 20px;
      }
      .data-info {
        flex: 1;
        color: #5b83bd;
        font-size: 16px;
        .data-num {
          margin-top: 5px;
          font-size: 24px;
          color: #fff;
        }
      }
    }
  }
  #faceChart {
    width: 100%;
    height: 300px;
  }
}
.width-img {
  width: 100%;
}
</style>
src/views/screen/components/screen-examine/components/examine-chart.vue
@@ -1,61 +1,73 @@
<template>
  <div class="chart-container">
    <div class="rank-chart" ref="rankChart"></div>
    <div class="rank-chart">
      <div class="hola-item" v-for="item in dataList" :key="item.id">
        <examine-hola :startColor="'#02C77E'" :endColor="'#017770'" :centerValue="item.value"
          :bottomTitle="item.name"></examine-hola>
      </div>
    </div>
  </div>
</template>
<script>
import * as echarts from 'echarts';
import ExamineHola from './examine-hola.vue';
let barChart = null;
export default {
  name: 'ExamineChart',
  components: {
    ExamineHola
  },
  data() {
    return {
      dataList: [
        {id: 1,name: '平台在线率', value: 60},
        {id: 2,name: '一机一档合格率', value: 20},
        {id: 3,name: '档案考核比', value: 60},
        {id: 4,name: '点位在线率', value: 40},
        {id: 5,name: '录像可用率', value: 80},
        {id: 6,name: '重点点位录像可用率', value: 20},
        {id: 7,name: '标注正确率', value: 24},
        {id: 8,name: '视图库对接稳定性', value: 25},
        {id: 9,name: '信息采集准确率', value: 75},
        {id: 10,name: '车辆卡口设备时钟准确性', value: 12},
        {id: 11,name: '设备抓拍图片时钟准确性', value: 82},
        {id: 12,name: '人脸卡口信息采集准确率', value: 13},
        {id: 13,name: '设备抓拍图片合格性', value: 91},
        {id: 14,name: '设备抓拍图片时钟准确性', value: 12},
        {id: 15,name: '平台在线率', value: 42},
      ]
    }
  },
  methods: {
    initChart() {
      const options = {
        xAxis: {
          type: 'category',
          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
          type: 'value'
        },
        series: [
          {
            data: [120, 200, 150, 80, 70, 110, 130],
            type: 'bar'
          }
        ]
      }
      barChart.setOption(options,true);
    }
  },
  mounted() {
    barChart = echarts.init(this.$refs.rankChart);
    this.initChart();
  },
  beforeDestroy() {
    if (lineChart) {
      barChart.dispose();
    }
  },
  }
}
</script>
<style lang="scss" scoped>
.chart-container {
  width: 100%;
  height: 400px;
  height: 100%;
  .rank-chart {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-content: space-between;
    .hola-item {
      flex-shrink: 0;
      width: 180px;
      height: 150px;
      color: #008000
    }
  }
}
</style>
src/views/screen/components/screen-examine/components/examine-hola.vue
New file
@@ -0,0 +1,157 @@
<template>
  <!-- 进度条类型组件 -->
  <div class="progressChart">
    <div class="chart" id="progressChart" ref="chartRef"></div>
    <label class="bottom le-0-font">{{ bottomTitle }}</label>
  </div>
</template>
<script>
import * as echarts from 'echarts';
export default {
  data() {
    return {
      series: [
        {
          type: 'gauge', // 仪表盘类型
          name: '系列名称', // 用于tooltip的显示
          startAngle: 90, // 仪表盘开始角度(设置背景圆的角度)
          endAngle: -270, // 仪表盘结束角度
          center: ['50%', '50%'], // 中心点(圆心坐标)
          radius: '100%', // 圆大小(仪表盘半径)
          clockwise: true, // 仪表盘刻度是否是顺时针增长
          // 仪表盘轴线相关配置
          axisLine: {
            show: true,
            roundCap: false, // 两端显示成圆形(背景环)
            clip: false, // 是否裁剪超出部分
            // 设置背景圆环样式
            lineStyle: {
              width: 10, // 圆环宽度
              color: [[1, '#002865']] // 圆环背景色
            }
          },
          // 仪表盘指针
          pointer: {
            show: false
          },
          // 进度设置
          progress: {
            show: true,
            overlap: false, // 多组数据时进度条是否重叠
            roundCap: true, // 是否在两端显示成圆形
            clip: false, // 是否裁掉超出部分
            // 进度条样式
            itemStyle: {
              borderWidth: 0,
              shadowColor: '',
              color: {
                type: 'linear',
                x: 0,
                y: 0,
                x2: 0,
                y2: 1,
                colorStops: [
                  {
                    offset: 0,
                    color: this.startColor // 0% 处的颜色  '#02C77E'
                  },
                  {
                    offset: 1,
                    color: this.endColor // 100% 处的颜色  '#017770'
                  }
                ],
                global: false // 缺省为 false
              }
            }
          },
          // 仪表盘分割线
          splitLine: {
            show: false
          },
          // 刻度样式
          axisTick: {
            show: false
          },
          // 刻度标签
          axisLabel: {
            show: false
          },
          title: {
            show: false,
            fontSize: 24
          },
          detail: {
            // width: 50,
            // height: 14,
            fontSize: 14,
            color: 'auto'
          },
          data: [
            {
              value: this.centerValue,
              name: '345',
              title: {},
              detail: {
                // 中心title设置
                offsetCenter: ['0%', '0%'],
                color: '#01F8FF',
                formatter: '{value}%'
                // borderColor: '#01F8FF',
                // borderRadius: 20,
                // borderWidth: 1,
              }
            }
          ],
        }
      ]
    }
  },
  setup() { },
  props: {
    startColor: {
      type: String,
      default: ''
    },
    endColor: {
      type: String,
      default: ''
    },
    centerValue: {
      type: [Number, String],
      default: 0
    },
    bottomTitle: {
      type: String,
      default: ''
    }
  },
  methods: {},
  created() { },
  mounted() {
    let myChart = echarts.init(this.$refs['chartRef']) // 使用Id无法实现
    myChart.setOption({
      series: this.series
    })
  }
}
</script>
<style lang="scss" scoped>
.progressChart {
  width: 100%;
  height: 100%;
  .chart {
    width: 100%;
    height: 75%;
  }
  .bottom {
    display: inline-block;
    width: 100%;
    color: #01f8ff;
    text-align: center;
    font-size: 16px;
    margin-top: 10px;
  }
}
</style>
src/views/screen/components/screen-examine/index.vue
@@ -1,10 +1,10 @@
<template>
  <div class="examine-container">
    <wrapper-title :title="'考核成绩数据'"></wrapper-title>
    <wrapper-title :title="'考核数据'"></wrapper-title>
    <div class="examine-content">
      <div class="examine-wrapper">
        <examine-table class="wrapper-item"></examine-table>
        <examine-chart class="wrapper-item"></examine-chart>
        <!-- <examine-table class="wrapper-item"></examine-table> -->
      </div>
    </div>
  </div>
@@ -39,6 +39,7 @@
  position: relative;
  .examine-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
src/views/screen/components/screen-face/index.vue
@@ -1,6 +1,6 @@
<template>
  <div class="face-container">
    <wrapper-title :title="'人脸数据趋势'"></wrapper-title>
    <wrapper-title :title="'人脸设备数据'"></wrapper-title>
    <div class="face-content">
      <div class="data-plane">
@@ -10,8 +10,8 @@
              <img src="@/assets/images/screen/icon/icon1.png" alt="" class="width-img">
            </div>
            <div class="data-info">
              <div class="data-lable">昨日人脸采集设备总数</div>
              <div class="data-num">{{formatNumber(1123)}}</div>
              <div class="data-lable">设备总数</div>
              <div class="data-num">{{ formatNumber(1123) }}</div>
            </div>
          </div>
        </dv-border-box-13>
@@ -22,7 +22,7 @@
              <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img">
            </div>
            <div class="data-info">
              <div class="data-lable">昨日抓拍数据量</div>
              <div class="data-lable">设备正常数</div>
              <div class="data-num">{{ formatNumber(200000) }}</div>
            </div>
          </div>
@@ -34,13 +34,12 @@
              <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img">
            </div>
            <div class="data-info">
              <div class="data-lable">历史抓拍数据量</div>
              <div class="data-lable">设备异常数</div>
              <div class="data-num">{{ formatNumber(112313141111) }}</div>
            </div>
          </div>
        </dv-border-box-13>
      </div>
      <div id="faceChart" ref="faceChart"></div>
    </div>
  </div>
@@ -48,8 +47,6 @@
<script>
import WrapperTitle from '../wrapper-title/index';
import * as echarts from 'echarts';
let lineChart = null;
export default {
  name: 'ScreenFace',
  components: {
@@ -65,62 +62,6 @@
  },
  methods: {
    initChart() {
      const option = {
        legend: {
          right: 'right',
          top: 'top',
          orient: "vertical",
          icon: 'rect',
          data: [
            {
              name: '正常数',
              itemStyle: {
                color: 'rgba(62, 144, 247, 1)'
              }
            },
            {
              name: '异常数',
              itemStyle: {
                color: 'rgba(85, 192, 191, 1)'
              }
            },
          ],
        },
        grid: {
          left: '2%',
          right: '5%',
          bottom: '5%',
          top: '8%',
          containLabel: true
        },
        tooltip: {},
        xAxis: {
          type: 'category',
          data: Object.keys(this.dataList.state),
        },
        yAxis: {},
        series: [
          {
            name: '今日',
            data: Object.entries(this.dataList.state).map(([key, value]) => value),
            type: 'line',
            itemStyle: {
              color: 'rgba(62, 144, 247, 1)'
            }
          },
          {
            name: '昨日',
            data: Object.entries(this.dataList.state2).map(([key, value]) => value),
            type: 'line',
            itemStyle: {
              color: 'rgba(85, 192, 191, 1)'
            }
          }
        ]
      };
      lineChart.setOption(option, true);
    },
    formatNumber(value) {
      return new Intl.NumberFormat('en-US').format(value);
@@ -128,19 +69,21 @@
  },
  mounted() {
    lineChart = echarts.init(this.$refs.faceChart);
    this.initChart();
  },
  beforeDestroy() {
    if (lineChart) {
      lineChart.dispose();
    }
  },
}
</script>
<style lang="scss" scoped>
.face-container {
  width: 100%;
  height: fit-content;
  display: flex;
  flex-direction: column;
}
.face-content {
  flex: 1;
  background: rgba(67, 102, 155, 0.3);
  border: 1px solid rgba(47, 91, 157, 0.8);
@@ -151,7 +94,7 @@
  .data-plane {
    .data-item {
      width: 100%;
      padding: 20px 20px;
      padding: 10px 20px;
      display: flex;
      align-items: center;
src/views/screen/components/screen-video/index.vue
@@ -1,149 +1,129 @@
<template>
  <div class="video-container">
    <wrapper-title :title="'视频设备'"></wrapper-title>
    <wrapper-title :title="'视频设备数据'"></wrapper-title>
    <div class="video-content">
      <div class="video-plane">
        <dv-border-box-13 class="panel">
          <div class="panel-container">
            <div class="top-container">
              <div class="data-item">
                <dv-decoration-9 style="width:120px;height:120px;">
                  <div class="data-num type1">1156</div>
                </dv-decoration-9>
                <div class="data-label">设备总数</div>
              </div>
              <div class="data-item">
                <dv-decoration-9 style="width:120px;height:120px;">
                  <div class="data-num type2">1000</div>
                </dv-decoration-9>
                <div class="data-label">正常数</div>
              </div>
      <div class="data-plane">
        <dv-border-box-13 class="plane">
          <div class="data-item">
            <div class="data-icon">
              <img src="@/assets/images/screen/icon/icon1.png" alt="" class="width-img">
            </div>
            <div class="bottom-container">
              <div class="data-item">
                <dv-decoration-9 style="width:120px;height:120px;">
                  <div class="data-num type3">156</div>
                </dv-decoration-9>
                <div class="data-label">异常数</div>
              </div>
              <div class="data-item">
                <dv-decoration-9 style="width:120px;height:120px;">
                  <div class="data-num type4">75</div>
                </dv-decoration-9>
                <div class="data-label">生成异常工单数</div>
              </div>
              <div class="data-item">
                <dv-decoration-9 style="width:120px;height:120px;">
                  <div class="data-num type5">91.36%</div>
                </dv-decoration-9>
                <div class="data-label">设备运行率</div>
              </div>
            <div class="data-info">
              <div class="data-lable">设备总数</div>
              <div class="data-num">{{ formatNumber(1123) }}</div>
            </div>
          </div>
        </dv-border-box-13>
        <dv-border-box-13 class="plane">
          <div class="data-item">
            <div class="data-icon">
              <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img">
            </div>
            <div class="data-info">
              <div class="data-lable">设备正常数</div>
              <div class="data-num">{{ formatNumber(200000) }}</div>
            </div>
          </div>
        </dv-border-box-13>
        <dv-border-box-13 class="plane">
          <div class="data-item">
            <div class="data-icon">
              <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img">
            </div>
            <div class="data-info">
              <div class="data-lable">设备异常数</div>
              <div class="data-num">{{ formatNumber(112313141111) }}</div>
            </div>
          </div>
        </dv-border-box-13>
      </div>
    </div>
  </div>
</template>
<script>
import WrapperTitle from '../wrapper-title/index';
export default {
  name: 'ScreenVideo',
  name: 'ScreenFace',
  components: {
    WrapperTitle
  }
  },
  data() {
    return {
      dataList: {
        state: { '01:00': 1000, '02:00': 2131, '03:00': 1233, '04:00': 2132, '05:00': 3211, '06:00': 213, '07:00': 123, '08:00': 566 },
        state2: { '01:00': 900, '02:00': 1131, '03:00': 1533, '04:00': 2132, '05:00': 3011, '06:00': 13, '07:00': 113, '08:00': 566 },
      },
    }
  },
  methods: {
    formatNumber(value) {
      return new Intl.NumberFormat('en-US').format(value);
    }
  },
  mounted() {
  },
}
</script>
<style lang="scss" scoped>
.video-container {
  flex: 1;
  width: 100%;
  height: fit-content;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}
.video-content {
  flex: 1;
  background: rgba(67, 102, 155, 0.3);
  border: 1px solid rgba(47, 91, 157, 0.8);
}
.panel {
  width: 100%;
  height: 100%;
}
.video-plane {
  width: 100%;
  .panel-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-sizing: border;
    padding: 20px;
    .top-container,
    .bottom-container {
      width: 100%;
      display: flex;
    }
    .top-container {
      justify-content: center;
      .data-item {
        margin: 0 30px;
      }
    }
    .bottom-container {
      justify-content: space-around;
    }
    .data-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      font-size: 20px;
      color: #fff;
      .data-num {
        font-weight: bold;
        font-size: 22px;
      }
    }
    .type1 {
      color: #0883d4;
    }
    .type2 {
      color: #08b108;
    }
    .type3 {
      color: #ff0000;
    }
    .type4 {
      color: #d82a64;
    }
    .type5 {
      color: #08b108;
    }
  .plane {
    margin-bottom: 10px;
  }
  .data-plane {
    .data-item {
      width: 100%;
      padding: 10px 20px;
      display: flex;
      align-items: center;
      .data-icon {
        width: 40px;
        margin: 0 20px;
      }
      .data-info {
        flex: 1;
        color: #5b83bd;
        font-size: 16px;
        .data-num {
          margin-top: 5px;
          font-size: 24px;
          color: #fff;
        }
      }
    }
  }
  #faceChart {
    width: 100%;
    height: 300px;
  }
}
.width-img {
  width: 100%;
}
</style>
src/views/screen/components/screen-wrapper/index.vue
@@ -4,10 +4,11 @@
    <div class="wrapper-content">
      <div class="left-container wrapper">
        <screen-face></screen-face>
        <screen-car></screen-car>
        <screen-video></screen-video>
      </div>
      <div class="center-container wrapper">
        <screen-detection></screen-detection>
        <screen-video></screen-video>
      </div>
      <div class="right-container wrapper">
@@ -22,13 +23,15 @@
import ScreenDetection from '../screen-detection/index';
import ScreenExamine from '../screen-examine/index';
import ScreenVideo from '../screen-video/index';
import ScreenCar from '../screen-car/index';
export default {
  name: 'ScreenWrapper',
  components: {
    ScreenFace,
    ScreenDetection,
    ScreenExamine,
    ScreenVideo
    ScreenVideo,
    ScreenCar
  },
}
</script>
@@ -72,5 +75,4 @@
    padding-right: 0;
  }
}
</style>
src/views/system/data-manage/index.vue
New file
@@ -0,0 +1,55 @@
<template>
    <div class="container">
        <el-row type="flex" justify="center">
            <el-col :span="24">
                <h3 style="color: rgb(104,104,103);padding-top: 20px;padding-bottom: 20px;">人脸数据异常检测</h3>
            </el-col>
        </el-row>
        <el-row type="flex" justify="center">
            <el-col :span="6" v-for="(item, index) in faceData" :key="index">
                <el-link @click="handleDetail(item)">
                    <el-card style="width:150px;height: 150px;text-align: center;">
                        <i style="font-size: 40px;padding: 15px;" :class="item.icon"></i>
                        <div>{{ item.name }}</div>
                    </el-card>
                </el-link>
            </el-col>
        </el-row>
    </div>
</template>
<script>
export default {
    data() {
        return {
            faceData: [
                { name: '人脸识别时钟准确性', icon: 'el-icon-alarm-clock', description: '描述信息', routerUrl: 'vehicle-data-monitor' },
                { name: '人脸抓拍数据监测', icon: 'el-icon-user', description: '描述信息', routerUrl: '/face/faceClock' },
                { name: '人脸数据趋势分析', icon: 'el-icon-data-line', description: '描述信息', routerUrl: '/face/faceClock' },
                { name: '人脸抓拍设备活跃性', icon: 'el-icon-timer', description: '描述信息', routerUrl: '/face/faceClock' },
                { name: '人脸抓拍上传及时性', icon: 'el-icon-money', description: '描述信息', routerUrl: '/face/faceClock' },
                { name: '人脸抓拍大图可用性', icon: 'el-icon-data-analysis', description: '描述信息', routerUrl: '/face/faceClock' },
            ]
        }
    },
    methods: {
        handleDetail(item) {
            this.$router.push({
                name: item.routerUrl,
                params: {
                    id: item.id
                }
            })
        }
    }
}
</script>
<style scoped>
.container {
    margin-left: 100px;
    margin-right: 100px;
    margin-top: 10px;
}
</style>
src/views/system/vehicle-data-monitor/index.vue
New file
@@ -0,0 +1,316 @@
<template>
  <div class="app-container">
    <div class="top">
      <el-row type="flex" justify="space-between" style="width: 60%;">
        <el-col :span="6">
          <el-card class="card">
            <i style="font-size: 40px;padding: 15px;" class="el-icon-wind-power"></i>
          </el-card>
        </el-col>
        <el-col :span="6" class="mod">
          <div class="number">{{ totalKiosks }}</div>
          <div>卡口总数</div>
        </el-col>
        <el-col :span="6" class="mod">
          <div class="numberTwo">{{ uniqueKiosks }}</div>
          <div>不唯一卡口数</div>
        </el-col>
        <div style="width: 1px;height: 60px;border: 1px solid #D7EBFA;margin: 40px;"></div>
        <el-col :span="6">
          <el-card class="card">
            <i style="font-size: 40px;padding: 15px;" class="el-icon-truck"></i>
          </el-card>
        </el-col>
        <el-col :span="6" class="mod">
          <div class="number">{{ totalCarData }}</div>
          <div>过车数据总量</div>
        </el-col>
        <el-col :span="6" class="mod">
          <div class="numberTwo">{{ uniqueCarData }}</div>
          <div>不唯一数据量</div>
        </el-col>
      </el-row>
    </div>
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="卡口编号" prop="bayonetNumber">
        <el-input v-model="queryParams.bayonetNumber" placeholder="请输入卡口编号" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="卡口名称" prop="bayonetName">
        <el-input v-model="queryParams.bayonetName" placeholder="请输入卡口名称" clearable @keyup.enter.native="handleQuery" />
      </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-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-table v-loading="loading" :data="platformList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="卡口名称" align="center" prop="bayonetName" />
      <el-table-column label="卡口编号" align="center" prop="bayonetNumber" />
      <el-table-column label="过车数据量" align="center" prop="vehicleDataNumber" />
      <el-table-column label="不唯一数据 " align="center" prop="notUniqueData" />
      <el-table-column label="不唯一数据量" align="center" prop="notUniqueDataNumber" />
      <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="handleUpdate(scope.row)"
            v-hasPermi="['platform:platform:edit']">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
            v-hasPermi="['platform:platform:remove']">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
    <!-- 添加或修改卡口过车数据一致性对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="卡口名称" prop="bayonetName">
          <el-input v-model="form.bayonetName" placeholder="请输入卡口名称" />
        </el-form-item>
        <el-form-item label="卡口编号" prop="bayonetNumber">
          <el-input v-model="form.bayonetNumber" placeholder="请输入卡口编号" />
        </el-form-item>
        <el-form-item label="过车数据量" prop="vehicleDataNumber">
          <el-input v-model="form.vehicleDataNumber" placeholder="请输入过车数据量" />
        </el-form-item>
        <el-form-item label="不唯一数据 " prop="notUniqueData">
          <el-input v-model="form.notUniqueData" placeholder="请输入不唯一数据 " />
        </el-form-item>
        <el-form-item label="不唯一数据量" prop="notUniqueDataNumber">
          <el-input v-model="form.notUniqueDataNumber" placeholder="请输入不唯一数据量" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listPlatform, getPlatform, delPlatform, addPlatform, updatePlatform } from "@/api/platform/vehicle-data-monitor";
export default {
  name: "Platform",
  data() {
    return {
      totalKiosks: 1157,
      uniqueKiosks: 580,
      totalCarData: 77422,
      uniqueCarData: 431163,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 卡口过车数据一致性表格数据
      platformList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        regionCode: null,
        bayonetName: null,
        bayonetNumber: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        bayonetName: [
          { required: true, message: "卡口名称不能为空", trigger: "blur" }
        ],
        bayonetNumber: [
          { required: true, message: "卡口编号不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询卡口过车数据一致性列表 */
    getList() {
      this.loading = true;
      listPlatform(this.queryParams).then(response => {
        this.platformList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        regionCode: null,
        bayonetName: null,
        bayonetNumber: null,
        vehicleDataNumber: null,
        notUniqueData: null,
        notUniqueDataNumber: null,
        createTime: null,
        updateTime: null,
        deleted: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加卡口过车数据一致性";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getPlatform(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改卡口过车数据一致性";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updatePlatform(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addPlatform(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除卡口过车数据一致性编号为"' + ids + '"的数据项?').then(function () {
        return delPlatform(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => { });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('platform/platform/export', {
        ...this.queryParams
      }, `platform_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
<style scoped>
.top {
  height: 150px;
  margin-bottom: 20px;
  background-color: #F2F9FF;
  border: 1px solid #77befd;
}
.container {
  max-width: 1000px;
  margin: auto;
}
.number {
  font-size: 36px;
  font-weight: bold;
  color: #00A5FE;
}
.numberTwo {
  font-size: 36px;
  font-weight: bold;
  color: #505051;
}
.card {
  width: 100px;
  height: 100px;
  text-align: center;
  background-color: #00A5FE;
  color: aliceblue;
  border-radius: 10%;
  margin: 25px;
}
.mod {
  margin-top: 40px;
}
</style>