2 天以前 1c829f9177eab675b22be4d20ef2761ed1bbb423
src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue
@@ -1,7 +1,7 @@
<template>
  <div>
    <PanelHeader title="生产核算分析" />
    <div class="main-panel panel-item-customers">
    <div class="main-panel panel-item-customers bi-panel">
      <div class="filters-row">
        <DateTypeSwitch v-model="dateType" @change="handleDateTypeChange" />
      </div>
@@ -14,7 +14,7 @@
        :tooltip="tooltip"
        :xAxis="xAxis1"
        :yAxis="yAxis1"
        :options="{ backgroundColor: 'transparent', textStyle: { color: '#B8C8E0' } }"
        :options="{ backgroundColor: 'transparent', textStyle: { color: BI_COLORS.text } }"
        style="height: 260px"
      />
    </div>
@@ -27,19 +27,20 @@
import PanelHeader from './PanelHeader.vue'
import DateTypeSwitch from './DateTypeSwitch.vue'
import Echarts from '@/components/Echarts/echarts.vue'
import { BI_COLORS, BI_TOOLTIP, barGradient } from '../theme.js'
const dateType = ref(1)
const dateType = ref(3) // 1=周 2=月 3=季度,默认季度
const chartStyle = {
  width: '100%',
  height: '140%',
  height: '100%',
}
const grid = { left: '3%', right: '4%', bottom: '3%', top: '10%', containLabel: true }
const barLegend = {
  show: true,
  textStyle: { color: '#B8C8E0' },
  textStyle: { color: BI_COLORS.text },
  data: ['完成数量', '工资金额', '合格率'],
}
@@ -51,17 +52,8 @@
    barGap: '40%',
    emphasis: { focus: 'series' },
    itemStyle: {
      color: {
        type: 'linear',
        x: 0,
        y: 0,
        x2: 0,
        y2: 1,
        colorStops: [
          { offset: 1, color: 'rgba(0, 164, 237, 0)' },
          { offset: 0, color: 'rgba(78, 228, 255, 1)' },
        ],
      },
      borderRadius: [3, 3, 0, 0],
      color: barGradient(BI_COLORS.primary),
    },
    data: [],
  },
@@ -72,17 +64,8 @@
    barWidth: 20,
    emphasis: { focus: 'series' },
    itemStyle: {
      color: {
        type: 'linear',
        x: 0,
        y: 0,
        x2: 0,
        y2: 1,
        colorStops: [
          { offset: 1, color: 'rgba(83, 126, 245, 0.19)' },
          { offset: 0, color: 'rgba(144, 97, 248, 1)' },
        ],
      },
      borderRadius: [3, 3, 0, 0],
      color: barGradient(BI_COLORS.violet),
    },
    data: [],
  },
@@ -90,42 +73,44 @@
    name: '合格率',
    type: 'line',
    yAxisIndex: 1,
    smooth: true,
    showSymbol: true,
    symbol: 'circle',
    symbolSize: 8,
    lineStyle: { color: 'rgba(90, 216, 166, 1)', width: 2 },
    itemStyle: { color: 'rgba(90, 216, 166, 1)' },
    symbolSize: 6,
    lineStyle: { color: BI_COLORS.amber, width: 2 },
    itemStyle: { color: BI_COLORS.amber },
    data: [],
    emphasis: { focus: 'series' },
  },
])
const xAxis1 = ref([
  { type: 'category', axisTick: { show: false }, axisLabel: { color: '#B8C8E0' }, data: [] },
  { type: 'category', axisTick: { show: false }, axisLine: { lineStyle: { color: BI_COLORS.axisLine } }, axisLabel: { color: BI_COLORS.text }, data: [] },
])
const yAxis1 = [
  {
    type: 'value',
    name: '数量/金额',
    axisLabel: { color: '#B8C8E0' },
    nameTextStyle: { color: '#B8C8E0' },
    // splitLine: { lineStyle: { color: 'rgba(184, 200, 224, 0.2)' } },
    axisLabel: { color: BI_COLORS.text },
    nameTextStyle: { color: BI_COLORS.text },
    splitLine: { lineStyle: { color: BI_COLORS.splitLine } },
  },
  {
    type: 'value',
    name: '合格率(%)',
    min: 0,
    max: 100,
    axisLabel: { color: '#B8C8E0', formatter: '{value}%' },
    nameTextStyle: { color: '#B8C8E0' },
    splitLine: { lineStyle: { color: 'rgba(184, 200, 224, 0.2)' } },
    axisLabel: { color: BI_COLORS.text, formatter: '{value}%' },
    nameTextStyle: { color: BI_COLORS.text },
    splitLine: { show: false },
  },
]
const tooltip = {
  trigger: 'axis',
  axisPointer: { type: 'cross' },
  ...BI_TOOLTIP,
  formatter(params) {
    let result = params[0].axisValueLabel + '<br/>'
    params.forEach((item) => {
@@ -178,7 +163,6 @@
}
.panel-item-customers {
  border: 1px solid #1a58b0;
  padding: 18px;
  width: 100%;
  height: 449px;