hanbaoshan
2021-02-28 7712b788faf815e8e39d5bbbd61b5e4261eee7b2
朔黄首页更新
2个文件已修改
294 ■■■■ 已修改文件
src/pages/shuohuangMonitorAnalyze/components/charts/dataset.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/shuohuangMonitorAnalyze/components/guideIndex.vue 269 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/shuohuangMonitorAnalyze/components/charts/dataset.vue
@@ -19,7 +19,8 @@
    mockData () {
      var dimension = ['未鸣笛', '未手比', '未呼唤', '运行中睡觉', '未检查', '未应答'];
      var categoryCount = 30;
      var yDatas = [[4, 23, 13, 0, 1, 1], [2, 16, 16, 0, 1, 1], [5, 20, 20, 0, 2, 1], [4, 19, 15, 0, 1, 2], [3, 16, 14, 1, 0, 4], [1, 17, 13, 0, 1, 1], [2, 9, 9, 0, 1, 2]];
      var categoryCount = 7;
      var xAxisData = [];
      var customData = [];
      var legendData = [];
@@ -34,15 +35,15 @@
      }
      for (var i = 0; i < categoryCount; i++) {
        var val = Math.random() * 1000;
        //var val = yDatas[i];
        xAxisData.push('category' + i);
        var customVal = [i];
        customData.push(customVal);
        for (var j = 0; j < dataList.length; j++) {
          var value = j === 0
            ? this.$echarts.number.round(val, 2)
            : this.$echarts.number.round(Math.max(0, dataList[j - 1][i] + (Math.random() - 0.5) * 200), 2);
            ? this.$echarts.number.round(yDatas[i][j], 2)
            : yDatas[i][j]
          dataList[j].push(value);
          customVal.push(value);
        }
@@ -54,6 +55,7 @@
            fontSize: 14
          }
        },
        color: ['#3aa0ff', '#36cbcb', '#4dcb73', '#fad337', '#f2637b', '#975fe4'],
        grid: {
          top: 50,
          left: 30,
@@ -78,7 +80,7 @@
        }],
        xAxis: {
          //data: xAxisData
          data: ['02-22','02-23','02-24','02-25','02-26','02-27']
          data: ['02-22', '02-23', '02-24', '02-25', '02-26', '02-27','02-28']
        },
        yAxis: {},
        series: [{
@@ -95,18 +97,19 @@
          },
          data: customData,
          z: 1
        }].concat(this.$echarts.util.map(dataList, function (data, index) {
          return {
        }].concat(dataList.map(function (data, index) {
        return {
            type: 'bar',
            animation: false,
            name: legendData[index + 1],
            itemStyle: {
              opacity: 0.7
                opacity: 0.7
            },
            color: ['#3aa0ff', '#36cbcb', '#4dcb73', '#fad337', '#f2637b', '#975fe4'][index],
            data: data
          };
        }))
        };
    }))
      }
    },
    renderItem (params, api) {
src/pages/shuohuangMonitorAnalyze/components/guideIndex.vue
@@ -56,8 +56,10 @@
              <i class="el-icon-warning-outline"></i>
            </span>
          </div>
          <div class="val">1025</div>
          <div class="trend"></div>
          <div class="val">{{$numberFormat(1025)}}</div>
          <div class="trend">
            <Bar :options="optionsOfTransferSumBar" style="height: 70px;"></Bar>
          </div>
          <div class="devide"></div>
          <div class="detail">
            <div class="name">转换率</div>
@@ -72,7 +74,15 @@
            </span>
          </div>
          <div class="val">99%</div>
          <div class="trend"></div>
          <div class="trend">
            <el-progress
              :percentage="99"
              stroke-linecap="square"
              color="#1890ff"
              :stroke-width="14"
              :show-text="false"
            ></el-progress>
          </div>
          <div class="devide"></div>
          <div class="detail week-day-ratio">
            <div class="week-ratio">
@@ -90,7 +100,7 @@
      </div>
      <div class="part">
        <div class="header-width-tab">
          <el-tabs class="tab-menu" v-model="hidDangerTab">
          <el-tabs class="tab-menu" v-model="actHiddanderTab" @tab-click="initTabContent">
            <el-tab-pane label="隐患事件统计" name="hidDanderStatistic"></el-tab-pane>
            <el-tab-pane label="隐患事件趋势" name="hidDanderTrend"></el-tab-pane>
          </el-tabs>
@@ -109,19 +119,42 @@
        </div>
        <div class="statics">
          <div class="lt">
            <el-radio-group v-model="actHidDanderChart" size="mini">
              <el-radio-button label="bar">柱状图</el-radio-button>
              <el-radio-button label="pie">饼图</el-radio-button>
            </el-radio-group>
            <Bar :options="optionsOfHidDangerBar" v-show="actHidDanderChart=='bar'"></Bar>
            <Pie :options="optionsOfHidDangerPie" v-show="actHidDanderChart=='pie'"></Pie>
            <template v-if="actHiddanderTab == 'hidDanderStatistic'">
              <el-radio-group v-model="actHidDanderStatiscChart" size="mini">
                <el-radio-button label="bar">柱状图</el-radio-button>
                <el-radio-button label="pie">饼图</el-radio-button>
              </el-radio-group>
              <Bar
                :options="optionsOfHidDangerBar"
                v-if="actHidDanderStatiscChart=='bar'"
              ></Bar>
              <Pie
                :options="optionsOfHidDangerPie"
                v-if="actHidDanderStatiscChart=='pie'"
              ></Pie>
            </template>
            <template v-if="actHiddanderTab == 'hidDanderTrend'">
              <el-radio-group v-model="actHidDanderTrendChart" size="mini">
                <el-radio-button label="line">折线图</el-radio-button>
                <el-radio-button label="pie">饼图</el-radio-button>
              </el-radio-group>
              <line-chart
                :options="optionsOfHidDangerTrend"
                v-if="actHidDanderTrendChart=='line'"
                style="height:350px"
              ></line-chart>
              <Pie
                :options="optionsOfHidDangerTrendPie"
                v-if="actHidDanderTrendChart=='pie'"
              ></Pie>
            </template>
          </div>
          <div class="rt">
            <div class="header">
              <span class="title">部门隐患数量排名</span>
              <!-- <el-select v-if="hidDangerTab=='hidDanderStatistic'" size="small">
              <!-- <el-select v-if="actHiddanderTab=='hidDanderStatistic'" size="small">
                <el-option>中铁一局</el-option>
              </el-select> -->
              </el-select>-->
            </div>
            <div class="rank-list">
              <div class="rank-item" v-for="(rankItem,index) in rankList" :key="rankItem.id">
@@ -174,7 +207,7 @@
                  :page-sizes="pageSizes"
                  layout="total,sizes, prev, pager, next"
                  :total="tableTotal"
                ></el-pagination> -->
                ></el-pagination>-->
                <el-pagination
                  @size-change="handleTableSizeChange"
                  @current-change="renderIrregularMenTable"
@@ -336,7 +369,7 @@
                  :page-sizes="pageSizes"
                  layout="total,sizes, prev, pager, next"
                  :total="tableTotal"
                ></el-pagination> -->
                ></el-pagination>-->
                <el-pagination
                  @size-change="handleTableSizeChange"
                  @current-change="renderIrregularMenTable"
@@ -395,7 +428,7 @@
  data () {
    return {
      actCardTab: 'dataStatistic',
      hidDangerTab: 'hidDanderStatistic',
      //actHiddanderTab: 'hidDanderStatistic',
      optionsOfWeekAnalyze: {
        animation: false,
        grid: {
@@ -432,7 +465,7 @@
        },
        series: [
          {
            data: [820, 932, 901, 934, 1290, 1330, 1320],
            data: [100, 103, 101, 107, 104, 111, 109],
            type: 'line',
            smooth: true,
            areaStyle: {
@@ -442,8 +475,54 @@
          }
        ]
      },
      optionsOfTransferSumBar: {
        color: ['#3ba1ff'],
        grid: {
          top: 0,
          left: 10,
          right: 10,
          bottom: 30,
          //containLabel: true
        },
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'cross',
            label: {
              backgroundColor: '#6a7985'
            }
          }
        },
        xAxis: {
          show: false,
          type: 'category',
          boundaryGap: false,
          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
          label: {
            show: false
          }
        },
        yAxis: {
          type: 'value',
          show: false,
          boundaryGap: [0, '45%'],
          label: {
            show: false
          }
        },
        series: [
          {
            name: '数量',
            type: 'bar',
            barWidth: '24%',
            data: [123, 120, 157, 140, 147, 172, 166]
          }
        ]
      },
      searchHidDanderTime: [],
      actHidDanderChart: 'bar',
      actHiddanderTab: 'hidDanderStatistic',
      actHidDanderStatiscChart: 'bar',
      actHidDanderTrendChart: 'line',
      optionsOfHidDangerBar: {
        color: ['#9ed2f5'],
        tooltip: {
@@ -489,6 +568,101 @@
            type: 'bar',
            barWidth: '24%',
            data: [21, 102, 100, 1, 7, 14]
          }
        ]
      },
      optionsOfHidDangerTrend: {
        grid: {
          top: 40,
          left: 10,
          right: 10,
          containLabel: true,
        },
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'cross',
            label: {
              backgroundColor: '#6a7985'
            }
          }
        },
        xAxis: {
          type: 'category',
          boundaryGap: false,
          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
          label: {
            show: false
          }
        },
        yAxis: {
          type: 'value',
          axisLine: {
            show: false
          },
          label: {
            show: false
          }
        },
        series: [
          {
            data: [83, 83, 85, 85, 80, 40, 30],
            type: 'line',
            color: '#5dbafd',
            symbolSize: 10,
            symbol: 'circle',
            lineStyle: {
              color: '#61b4ff',
              width: 2,
            },
            itemStyle: {
              color: '#98d87d'
            }
          }
        ]
      },
      optionsOfHidDangerTrendPie: {
        tooltip: {
          trigger: 'item',
          formatter: '{a}<br>{b}:{c} ({d}%)'
        },
        legend: {
          orient: 'vertical',
          right: 10,
          y: 'center',
          data: ['未鸣笛', '未手比', '未呼唤', '运行中睡觉', '未检查', '未应答'],
        },
        series: [
          {
            name: '异常事件',
            type: 'pie',
            color: ['#3aa0ff', '#36cbcb', '#4dcb73', '#fad337', '#f2637b', '#975fe4'],
            radius: ['70%', '90%'],
            //center: ['40%','60%'],
            avoidLabelOverlap: false,
            label: {
              show: false,
              position: 'center',
              formatter: '{b}\n{c} '
            },
            emphasis: {
              label: {
                show: true,
                fontSize: '30',
                fontWeight: 'bold'
              }
            },
            labelLine: {
              show: false
            },
            data: [
              { value: 83, name: '未鸣笛' },
              { value: 83, name: '未手比' },
              { value: 85, name: '未呼唤' },
              { value: 80, name: '运行中睡觉' },
              { value: 40, name: '未检查' },
              { value: 30, name: '未应答' },
            ]
          }
        ]
      },
@@ -572,12 +746,12 @@
              show: false
            },
            data: [
              { value: 270, name: '张磊' },
              { value: 500, name: '李四' },
              { value: 300, name: '王丽' },
              { value: 430, name: '马宏宇' },
              { value: 620, name: '刘乃超' },
              { value: 540, name: '何光宗' },
              { value: 127, name: '张磊' },
              { value: 130, name: '李四' },
              { value: 128, name: '王丽' },
              { value: 129, name: '马宏宇' },
              { value: 126, name: '刘乃超' },
              { value: 112, name: '何光宗' },
            ]
          }
        ]
@@ -590,31 +764,31 @@
        id: 'ztyj',
        name: '中铁一局',
        val: 52
      },{
      }, {
        id: 'ztsj',
        name: '中铁四局',
        val: 40
      },{
      }, {
        id: 'ztsanj',
        name: '中铁三局',
        val: 38
      },{
      }, {
        id: 'ztswj',
        name: '中铁十五局',
        val: 36
      },{
      }, {
        id: 'ztslj',
        name: '中铁十六局',
        val: 33
      },{
      }, {
        id: 'jtjw',
        name: '京铁机务',
        val: 24
      },{
      }, {
        id: 'lhjw',
        name: '路华机务',
        val: 15
      },{
      }, {
        id: 'nhjw',
        name: '南环机务',
        val: 14
@@ -710,7 +884,7 @@
          }
        ]
      },
      irregularTableData: [{name:'吴国梁',wg:2},{name:'王仁兴',wg:1},{name:'罗元发',wg:1}],
      irregularTableData: [{ name: '吴国梁', wg: 2 }, { name: '王仁兴', wg: 1 }, { name: '罗元发', wg: 1 }],
      PageIndex: 1,
      PageSize: 5,
      pageSizes: [5, 10],
@@ -751,12 +925,12 @@
              show: false
            },
            data: [
              { value: 270, name: '防护地段' },
              { value: 500, name: '进出站' },
              { value: 300, name: '过分相' },
              { value: 430, name: '会车' },
              { value: 620, name: '临时慢行' },
              { value: 32, name: '防护地段' },
              { value: 55, name: '进出站' },
              { value: 42, name: '过分相' },
              { value: 96, name: '会车' },
              { value: 20, name: '临时慢行' },
            ]
          }
        ]
@@ -807,7 +981,7 @@
          }
        ]
      },
      searchTaskAnalyzeTime: [new Date(2021,1,22),new Date(2021,2,1)],
      searchTaskAnalyzeTime: [new Date(2021, 1, 22), new Date(2021, 2, 1)],
      optionsOfTaskAnalyzeBar: {
        color: ['#fbd438', '#4fcb74'],
        dataset: {
@@ -884,16 +1058,23 @@
        { name: '王丽', rwl: 128, fxl: 127, pdwgl: 43, pdwglv: '33.86%', wcl: '99.22%' },
        { name: '马宏宇', rwl: 129, fxl: 125, pdwgl: 44, pdwglv: '35.2%', wcl: '96.90%' },
        { name: '刘乃超', rwl: 126, fxl: 126, pdwgl: 46, pdwglv: '33.50%', wcl: '100%' },
        { name: '何光宗', rwl: 112, fxl: 112, pdwgl: 12, pdwglv: '10.71%', wcl: '100%'}],
        { name: '何光宗', rwl: 112, fxl: 112, pdwgl: 12, pdwglv: '10.71%', wcl: '100%' }],
      jsTreeNodes: [],
    }
  },
  methods: {
    initTabContent(tab){
      if(tab.name == "hidDanderStatistic"){
        this.actHidDanderStatiscChart = 'bar'
      }else{
        this.actHidDanderTrendChart = 'line'
      }
    },
    checkTabInSwipe (tab) {
      debugger
    },
    checkIrregularEventType (type) {
      debugger
    },
    taskAnalyzeCase (time) {
@@ -929,6 +1110,12 @@
<style lang="scss">
.guide-index {
  .el-progress-bar__outer {
    border-radius: 5px;
  }
  .el-progress-bar__inner {
    border-radius: 5px;
  }
  .triangle {
    width: 0;
    height: 0;