| | |
| | | <ChartTitle name="车间正品率"></ChartTitle> |
| | | <div class="bar-contents"> |
| | | <div class="bar-total"> |
| | | <div class="bar-item">当日合计生产:{{ chartData.total }}</div> |
| | | <div class="bar-item">正品率:{{ chartData.rate }}</div> |
| | | <div class="bar-item">7日合计生产:{{ chartData.total }}</div> |
| | | <div class="bar-item">正品率:{{ chartData.rate }}%</div> |
| | | </div> |
| | | <div class="chart" ref="chart"></div> |
| | | </div> |
| | |
| | | myChart = echarts.init(chartDom); |
| | | let option; |
| | | let lineColor = "#35ddc74d"; |
| | | let spirit = "/cockpitPage/order-bg.png"; |
| | | if (data) { |
| | | option = { |
| | | color: ["#dcb018", "#00FFFF"], |
| | | color: ["#fccd1d", "#00FFFF"], |
| | | tooltip: { |
| | | trigger: "axis", |
| | | axisPointer: { |
| | |
| | | '<span style=width:70px;display:inline-block">' + |
| | | "正品率" + |
| | | "</span> " + |
| | | data.rate; |
| | | data.rate + |
| | | "%"; |
| | | list.push(lastString); |
| | | listItem = list.join("<br>"); |
| | | return '<div class="showBox">' + listItem + "</div>"; |
| | |
| | | show: false, |
| | | startValue: that.startValue, // 从头开始 |
| | | endValue: that.endValue, // 一次性展示几个 |
| | | zoomOnMouseWheel: false, |
| | | moveOnMouseWheel: true, |
| | | moveOnMouseMove: true, |
| | | }, |
| | | ], |
| | | legend: { |
| | |
| | | name: "正品数量", |
| | | icon: "circle", |
| | | textStyle: { |
| | | color: "#dcb018", |
| | | color: "#fccd1d", |
| | | }, |
| | | }, |
| | | { |
| | |
| | | ], |
| | | series: [ |
| | | { |
| | | type: "bar", |
| | | type: "pictorialBar", |
| | | name: "正品数量", |
| | | barWidth: "15", |
| | | itemStyle: { |
| | | normal: { |
| | | //柱形图圆角,初始化效果 |
| | | barBorderRadius: [4, 4, 0, 0], |
| | | }, |
| | | }, |
| | | symbol: spirit, |
| | | symbolRepeat: true, |
| | | symbolMargin: "25%", |
| | | symbolClip: true, |
| | | symbolSize: [17, 4], |
| | | barCategoryGap: "40%", |
| | | data: data.datay, |
| | | }, |
| | | { |
| | | type: "bar", |
| | | type: "pictorialBar", |
| | | barGap: "10%", |
| | | name: "次品数量", |
| | | barWidth: "15", |
| | | itemStyle: { |
| | | normal: { |
| | | //柱形图圆角,初始化效果 |
| | | barBorderRadius: [4, 4, 0, 0], |
| | | }, |
| | | }, |
| | | symbol: spirit, |
| | | symbolRepeat: true, |
| | | symbolMargin: "25%", |
| | | symbolClip: true, |
| | | symbolSize: [17, 4], |
| | | data: data.datay2, |
| | | }, |
| | | ], |