ljlong_2630 8 months ago
parent
commit
ca242cbb69
  1. 2
      src/api/home/index.ts
  2. 6
      src/views/home/echarts-data.ts
  3. 14
      src/views/home/index.vue

2
src/api/home/index.ts

@ -2,7 +2,7 @@ import request from '@/config/axios'
// 首页获取设备停机状态/设备总数/月设备保养完成率/月汇总停机时间 // 首页获取设备停机状态/设备总数/月设备保养完成率/月汇总停机时间
export const getData = async () => { export const getData = async () => {
return await request.get({ url: `http://localhost:12080/admin-api/eam/home-page/select` }) return await request.get({ url: `/eam/home-page/select` })
} }

6
src/views/home/echarts-data.ts

@ -32,12 +32,12 @@ export const lineOptions: EChartsOption = {
} }
}, },
legend: { legend: {
data: ['销售','哈哈'], data: ['目标','实际'],
top: 20 top: 20
}, },
series: [ series: [
{ {
name: '销售', name: '目标',
smooth: true, smooth: true,
type: 'line', type: 'line',
data: [100, 120, 161, 134, 105, 160, 165, 114, 163, 185, 118, 123], data: [100, 120, 161, 134, 105, 160, 165, 114, 163, 185, 118, 123],
@ -45,7 +45,7 @@ export const lineOptions: EChartsOption = {
animationEasing: 'cubicInOut' animationEasing: 'cubicInOut'
}, },
{ {
name: '哈哈', name: '实际',
smooth: true, smooth: true,
type: 'line', type: 'line',
itemStyle: {}, itemStyle: {},

14
src/views/home/index.vue

@ -201,29 +201,29 @@
</div> </div>
<div class="two-row mt-14px"> <div class="two-row mt-14px">
<div class="data1"> <div class="data1">
<div class="title">注塑设备停机率</div> <div class="title">注塑平均故障恢复时间MTTR/min</div>
<Echart :options="lineOptions" :height="280" :key="lineIndex" /> <Echart :options="lineOptions" :height="280" :key="lineIndex" />
</div> </div>
<div class="data1 ml-14px"> <div class="data1 ml-14px">
<div class="title">装配设备停机率</div> <div class="title">装配平均故障恢复时间MTTR/min</div>
<Echart :options="lineOptions" :height="280" :key="lineIndex" /> <Echart :options="lineOptions" :height="280" :key="lineIndex" />
</div> </div>
<div class="data1 ml-14px"> <div class="data1 ml-14px">
<div class="title">涂装设备停机率</div> <div class="title">涂装平均故障恢复时间MTTR/min</div>
<Echart :options="lineOptions" :height="280" :key="lineIndex" /> <Echart :options="lineOptions" :height="280" :key="lineIndex" />
</div> </div>
</div> </div>
<div class="two-row mt-14px"> <div class="two-row mt-14px">
<div class="data1"> <div class="data1">
<div class="title">注塑设备停机率</div> <div class="title">注塑平均故障间隔时间MTBFH</div>
<Echart :options="lineOptions" :height="280" :key="lineIndex" /> <Echart :options="lineOptions" :height="280" :key="lineIndex" />
</div> </div>
<div class="data1 ml-14px"> <div class="data1 ml-14px">
<div class="title">装配设备停机率</div> <div class="title">装配平均故障间隔时间MTBFH</div>
<Echart :options="lineOptions" :height="280" :key="lineIndex" /> <Echart :options="lineOptions" :height="280" :key="lineIndex" />
</div> </div>
<div class="data1 ml-14px"> <div class="data1 ml-14px">
<div class="title">涂装设备停机率</div> <div class="title">涂装平均故障间隔时间MTBFH</div>
<Echart :options="lineOptions" :height="280" :key="lineIndex" /> <Echart :options="lineOptions" :height="280" :key="lineIndex" />
</div> </div>
</div> </div>
@ -245,7 +245,7 @@ const getInvoiceCharts = async () => {
// 'xAxis.data', // 'xAxis.data',
// supplierData.value.supplierdeliverMonthCount.map((v) => v.date) // supplierData.value.supplierdeliverMonthCount.map((v) => v.date)
// ) // )
set(lineOptionsData, 'legend.data',['销售','哈哈']) set(lineOptionsData, 'legend.data',['目标','实际'])
set(lineOptionsData, 'series', [ set(lineOptionsData, 'series', [
{ {
name: '注塑设备停机率', name: '注塑设备停机率',

Loading…
Cancel
Save