ll
liukangdong
2024-10-25 f9fd7c038b6405a69c5d070febebab0a59eb821b
screen/src/views/LogisticsEfficiency.vue
@@ -1,9 +1,8 @@
<template>
  <v-scale-screen width="1920" height="960" :fullScreen="true">
  <v-scale-screen width="1920" height="960">
    <div class="main_app">
      <img src="@/assets/images/energy_ef/bg@2x.png" class="main_bg" alt="" />
      <div class="main_header">
        <!-- <img src="@/assets/images/maintitle.gif" class="main_header_bg" alt="" /> -->
        <img src="@/assets/images/maintitle@2x.png" class="main_header_bg" alt="" />
        <div class="title">安泰智慧物流园区-调度能效跟踪</div>
        <div class="time_wrap">
@@ -183,24 +182,57 @@
              </div>
              <div class="list">
                <div class="item">
                  <div class="icon"></div>
                  <div class="text">合肥厂</div>
                  <div class="num">100万支 | 55%</div>
                  <div class="line">
                    <div :style="{ background: colors[0] }" class="icon"></div>
                    <div class="text">合肥厂</div>
                  </div>
                  <div :style="{ color: colors[0] }" class="num">100万支 | 55%</div>
                </div>
                <div class="item">
                  <div :style="{ background: colors[0] }" class="icon"></div>
                  <div class="text">集散中心</div>
                  <div class="num">100万支 | 55%</div>
                  <div class="line">
                    <div :style="{ background: colors[1] }" class="icon"></div>
                    <div class="text">集散中心</div>
                  </div>
                  <div :style="{ color: colors[1] }" class="num">100万支 | 55%</div>
                </div>
                <div class="item">
                  <div :style="{ background: colors[1] }" class="icon"></div>
                  <div class="text">市公司</div>
                  <div class="num">100万支 | 55%</div>
                  <div class="line">
                    <div :style="{ background: colors[2] }" class="icon"></div>
                    <div class="text">市公司</div>
                  </div>
                  <div :style="{ color: colors[2] }" class="num">100万支 | 55%</div>
                </div>
              </div>
            </div>
          </div>
          <div class="right_box_three"></div>
          <div class="right_box_three">
            <div class="com_header">
              <div class="title">
                <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" />
                <div>库存情况</div>
              </div>
              <img src="@/assets/images/title@2x.png" class="bg" alt="" />
            </div>
            <div class="repertory">
              <div class="use_ratio">
                <div class="header">
                  <div>库存量 <span class="num">80/100</span></div>
                  <div>利用率 88%</div>
                </div>
                <Percent :rate="80" />
              </div>
              <div class="list">
                <div class="item">
                  <div class="la">黄山(新制皖烟)</div>
                  <div class="val">400万支</div>
                </div>
                <div class="item">
                  <div class="la">黄山(新制皖烟)</div>
                  <div class="val">400万支</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
@@ -210,7 +242,9 @@
<script setup>
import { ref, onMounted } from 'vue'
import VScaleScreen from 'v-scale-screen'
import Percent from '@/components/percent.vue'
import dayjs from 'dayjs'
import * as echarts from 'echarts'
const colors = ['#FEAF01', '#01ABFE', '#51F9E4']
const weekMap = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六',]
@@ -228,59 +262,161 @@
const initEnergy = () => {
  var myChart = echarts.init(document.querySelector('.energyRef'))
  // 绘制图表
  const arr = ['#68e2e3', '#50afd3', '#377cdb', '#d5ae3a']
  myChart.setOption({
    legend: {
      itemGap: 12,
      // icon: 'circle',
      right: '12px',
      top: '0',
      data: ['总库存', '当前库存', '库存利用率'],
      itemWidth: 20,
      itemHeight: 10,
      textStyle: {
        color: '#fff',
        borderColor: '#fff'
      },
    },
    grid: {
      top: '20%',
      left: '2%',
      right: '2%',
      bottom: '4%',
      left: '3%',
      right: '4%',
      bottom: '3%',
      top: '16%',
      containLabel: true
    },
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'line'
      },
      trigger: 'axis'
    },
    xAxis: {
    xAxis: [{
      nameGap: 5,
      type: 'category',
      data: [1, 2, 3, 4, 4, 5]
    },
    yAxis: {
      type: 'value',
      name: 'kw·h',
      nameTextStyle: {
        padding: [0, 0, 4, -30]    // 四个数字分别为上右下左与原位置距离
      },
      splitLine: {
      axisLine: {
        show: true,
        lineStyle: {
          //这里输入线条的样式
          color: 'rgba(255,255,255,0.14)',
        }
          color: '#999'
        },
      },
      axisLabel: {
        color: '#869CC9'
        // fontSize: 24,
      },
      axisTick: {
        show: false,
      },
      data: ['7.1', '7.1', '7.1', '7.1', '7.1'],
    }],
    yAxis: [
      {
        nameTextStyle: {
          color: '#869CC9',
        },
        offset: 0,
        name: '万支',
        type: 'value',
        axisLabel: {
          show: true,
          color: "#869CC9",
        },
        axisLine: {
          show: true,
        },
        splitLine: {
          show: true,
          lineStyle: {
            width: 1,
            color: "rgba(49,105,129,0.4)",
            type: 'dashed'
          }
        },
      },
      {
        type: 'value',
        name: '%',
        min: 0,
        max: 100,
        // interval: 5,
        axisLabel: {
          formatter: '{value}%'
        },
        splitLine: false
      }
    },
    ],
    series: [
      {
        data: [1, 2, 3, 4, 5],
        name: '计划完成数量',
        type: 'bar',
        barWidth: 10,
        barGap: '60%',
        label: {
          show: false,
          position: 'top',
          color: '#fff',
        },
        itemStyle: {
          normal: {
            color: new echarts.graphic.LinearGradient(
              0, 0, 0, 1,
              [
                { offset: 0, color: arr[1] },
                { offset: 1, color: '#080807' }
              ]
            ),
            barBorderRadius: [10, 10, 0, 0]
          }
        }
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            {
              offset: 0,
              color: '#5bc7d5'
            },
            {
              offset: 1,
              color: '#1a3f55'
            }
          ], false),
          lineStyle: {
            width: 1,
            type: 'solid'
          },
          barBorderRadius: [3, 3, 0, 0],
        },
        data: [900, 438, 485, 631, 689]
      },
      {
        name: '任务完成量',
        type: 'bar',
        barWidth: 10,
        label: {
          show: false,
          position: 'top',
          color: '#fff',
        },
        itemStyle: {
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            {
              offset: 0,
              color: '#edaf3d'
            },
            {
              offset: 1,
              color: '#323522'
            }
          ], false),
          lineStyle: {
            width: 1,
            type: 'solid'
          },
          barBorderRadius: [3, 3, 0, 0],
        },
        data: [438, 485, 631, 689, 900]
      },
      {
        name: '计划任务数',
        type: 'line',
        smooth: false,
        showAllSymbol: true,
        symbol: 'none',
        lineStyle: {
          color: "#1a43bc"
        },
        label: {
          show: false,
          position: 'top',
          color: '#fff',
        },
        data: [485, 631, 389, 224, 287]
      }
    ]
  })
  window.addEventListener('resize', function () {//执行
    myChart.resize()
  })
@@ -666,13 +802,14 @@
        .echart_wrap {
          position: relative;
          .pie_text {
            width: 104px;
            height: 104px;
            border: 1px dashed;
            border-radius: 50%;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
@@ -682,7 +819,8 @@
            justify-content: center;
            align-items: center;
            font-size: 14px;
            .fs30{
            .fs30 {
              font-size: 30px;
            }
          }
@@ -697,20 +835,73 @@
          margin-left: 36px;
          .item {
            display: flex;
            align-items: center;
            margin: 8px 0;
            margin-bottom: 14px;
            font-size: 14px;
            .icon {
              width: 16px;
              height: 16px;
              border-radius: 50%;
              margin-right: 6px;
              background: linear-gradient(270deg, #29aeff 0%, #207ff7 100%);
            &:nth-last-child(1) {
              margin: 0;
            }
            .text {
              margin-right: 6px;
            .line {
              display: flex;
              align-items: center;
              margin-bottom: 6px;
              .icon {
                width: 12px;
                height: 12px;
                border-radius: 50%;
                margin-right: 10px;
                background: linear-gradient(270deg, #29aeff 0%, #207ff7 100%);
              }
            }
            .num {
              margin-left: 20px;
            }
          }
        }
      }
    }
    .right_box_three {
      .repertory {
        .header {
          padding: 15px;
          display: flex;
          justify-content: space-between;
          align-items: center;
          font-size: 14px;
          color: #D2E0FF;
          margin-bottom: 11px;
          .num {
            font-weight: 500;
            font-size: 16px;
            color: #FFFFFF;
          }
        }
        .list {
          margin-top: 22px;
          .item {
            width: 100%;
            height: 36px;
            display: flex;
            align-items: center;
            &:nth-of-type(2n+1) {
              background: rgba(0, 152, 255, 0.13);
            }
            .la {
              flex: 5;
              padding-left: 20px;
            }
            .val {
              flex: 2;
            }
          }
        }
@@ -753,15 +944,14 @@
    align-items: center;
    .time {
      width: 180px;
      width: 130px;
      display: flex;
      justify-content: flex-end;
      padding-bottom: 10px;
      font-size: 36px;
      font-size: 30px;
    }
    .week {
      margin-left: 36px;
      margin-left: 20px;
    }
  }
@@ -832,6 +1022,7 @@
  color: #FFFFFF;
  position: relative;
  z-index: -2;
  font-size: 14px;
  .main_bg {
    position: absolute;