ZhangXianQiang
2024-04-10 1e891ef7bc8291562d27108e05196699d6229129
feat:工单图表
5个文件已修改
2个文件已添加
182 ■■■■■ 已修改文件
src/assets/icons/arrow.png 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-data/index.vue 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-examine/components/examine-chart.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-examine/components/examine-hola.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-examine/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-map/index.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/components/screen-wrapper/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/icons/arrow.png
src/views/screen/components/screen-data/index.vue
New file
@@ -0,0 +1,141 @@
<template>
  <div class="data-container">
    <wrapper-title :title="'工单数据'" :path="'/monitorServe/car'"></wrapper-title>
    <div class="data-content">
      <div class="data-panel">
      </div>
      <div class="data-panel">
        <div class="panel-title">
          <div class="icon">
            <img src="@/assets/icons/arrow.png" alt="">
          </div>
          <div class="title">
            分区工单数
          </div>
        </div>
        <div class="echart-container">
          <div id="barChart" ref="barChart"></div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import * as echarts from 'echarts';
import WrapperTitle from '../wrapper-title/index';
let chart = null;
export default {
  name: 'ScreenData',
  components: {
    WrapperTitle
  },
  data() {
    return {
      dataList: {
        name: ['富顺县', '荣县', '高新区', '自流井区', '贡井区', '大安区', '沿滩区'],
        data1: [210, 310, 40, 102, 111, 201, 123],
        data2: [20, 30, 10, 10, 11, 21, 5],
      },
    }
  },
  methods: {
    initEchart() {
      const option = {
        grid: {
          right: 0,
        },
        legend: {
          right: 0,
          textStyle: {
            color: '#447ED6'
          }
        },
        tooltip: {},
        xAxis: {
          type: 'category',
          axisLabel: {
            color: '#447ED6',
            rotate: 45
          },
          data: this.dataList.name
        },
        yAxis: {
          axisLabel: {
            color: '#4D76B0',
          },
        },
        series: [
          {
            type: 'bar',
            name: '已处理工单数',
            stack: 'total',
            itemStyle: {
              color: '#4ea8ff'
            },
            data: this.dataList.data1
          },
          {
            type: 'bar',
            name: '未处理工单数',
            stack: 'total',
            itemStyle: {
              color: '#dfc639'
            },
            data: this.dataList.data2
          },
        ]
      }
      chart.setOption(option, true);
    }
  },
  mounted() {
    chart = echarts.init(this.$refs.barChart);
    this.initEchart();
  }
}
</script>
<style lang="scss" scoped>
.data-container {
  width: 100%;
  height: 450px;
  display: flex;
  flex-direction: column;
  .data-content {
    flex: 1;
    background: rgba(67, 102, 155, 0.3);
    border: 1px solid rgba(47, 91, 157, 0.8);
    padding: 20px;
    box-sizing: border-box;
  }
}
.echart-container {
  width: 100%;
  height: 300px;
  #barChart {
    width: 100%;
    height: 100%;
  }
}
.panel-title {
  color: #b9b9b9;
  display: flex;
  align-items: center;
  .icon {
    width: 20px;
    margin-right: 5px;
    img {
      width: 100%;
      display: block;
    }
  }
}
</style>
src/views/screen/components/screen-examine/components/examine-chart.vue
@@ -25,10 +25,7 @@
        { id: 3, name: '档案考核比', value: 60, routerUrl: '/car/vehicle-data-monitor/index' },
        { id: 4, name: '点位在线率', value: 40, routerUrl: '/car/vehicle-data-monitor/index' },
        { id: 5, name: '录像可用率', value: 80, routerUrl: '/car/vehicle-data-monitor/index' },
        { id: 6, name: '重点点位录像可用率', value: 20, routerUrl: '/car/vehicle-data-monitor/index' },
        { id: 7, name: '信息采集准确率', value: 60, routerUrl: '/car/vehicle-data-monitor/index' },
        { id: 8, name: '车辆过卡口数据一致性', value: 40, routerUrl: '/car/vehicle-data-monitor/index' },
        { id: 6, name: '重点点位录像可用率', value: 20, routerUrl: '/car/vehicle-data-monitor/index' }
      ]
    }
  },
@@ -59,8 +56,8 @@
    .hola-item {
      flex-shrink: 0;
      width: 180px;
      height: 180px;
      width: 140px;
      height: 140px;
    }
  }
}
src/views/screen/components/screen-examine/components/examine-hola.vue
@@ -3,7 +3,7 @@
  <div class="progressChart">
    <div class="chart" id="progressChart" ref="chartRef"></div>
    <el-link class="bottom le-0-font" :underline="false" @click="handleDetail(routerPath)">
    <label >{{ bottomTitle }}</label>
    <label>{{ bottomTitle }}</label>
    </el-link>
  </div>
</template>
@@ -85,7 +85,7 @@
          detail: {
            // width: 50,
            // height: 14,
            fontSize: 14,
            fontSize: 20,
            color: 'auto'
          },
          data: [
@@ -162,7 +162,7 @@
    width: 100%;
    color: #01f8ff;
    text-align: center;
    font-size: 16px;
    font-size: 14px;
    margin-top: 10px;
  }
}
src/views/screen/components/screen-examine/index.vue
@@ -72,10 +72,11 @@
<style lang="scss" scoped>
.examine-container {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px
}
.examine-content {
src/views/screen/components/screen-map/index.vue
@@ -2,6 +2,7 @@
  <div class="map-container">
    <wrapper-title :title="'区域地图'"></wrapper-title>
    <div class="map-content">
      <div ref="map" class="map-style"></div>
    </div>
  </div>
@@ -13,6 +14,7 @@
import 'echarts-gl';
import mapData from '@/assets/map/zigong1.json';
import WrapperTitle from '../wrapper-title/index';
import ScreenData from '../screen-data/index';
echarts.registerMap('zigong', mapData);
let mapChart = null;
@@ -161,7 +163,8 @@
    }
  },
  components: {
    WrapperTitle
    WrapperTitle,
    ScreenData
  },
  methods: {
    filterData(name) {
@@ -236,6 +239,7 @@
  .map-content {
    flex: 1;
    position: relative;
    // background: rgba(67, 102, 155, 0.3);
    // border: 1px solid rgba(47, 91, 157, 0.8);
  }
@@ -245,4 +249,12 @@
    height: 100%;
  }
}
.data-container {
  width: 100%;
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
}
</style>
src/views/screen/components/screen-wrapper/index.vue
@@ -18,6 +18,7 @@
      </div>
      <div class="right-container wrapper">
        <screen-examine class="animate-enter-x enter-right"></screen-examine>
        <screen-data></screen-data>
      </div>
    </div>
  </div>
@@ -31,6 +32,7 @@
import ScreenCar from '../screen-car/index';
import ScreenMap from '../screen-map/index';
import ScreenTable from '../screen-table/index';
import ScreenData from '../screen-data/index';
export default {
  name: 'ScreenWrapper',
  components: {
@@ -40,7 +42,8 @@
    ScreenTable,
    ScreenFace,
    ScreenVideo,
    ScreenCar
    ScreenCar,
    ScreenData
  },
  methods: {
    returnPath() {
@@ -85,7 +88,7 @@
}
.wrapper {
  width: 23%;
  width: 25%;
  height: 100%;
  box-sizing: border-box;
  padding: 0 10px;
@@ -103,7 +106,7 @@
}
.center-wrapper {
  width: 54%;
  width: 50%;
  height: 100%;
  box-sizing: border-box;
  padding: 0 10px;