Browse Source

首页

master
zhang_li 8 months ago
parent
commit
f81f998478
  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 () => {
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: {
data: ['销售','哈哈'],
data: ['目标','实际'],
top: 20
},
series: [
{
name: '销售',
name: '目标',
smooth: true,
type: 'line',
data: [100, 120, 161, 134, 105, 160, 165, 114, 163, 185, 118, 123],
@ -45,7 +45,7 @@ export const lineOptions: EChartsOption = {
animationEasing: 'cubicInOut'
},
{
name: '哈哈',
name: '实际',
smooth: true,
type: 'line',
itemStyle: {},

14
src/views/home/index.vue

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

Loading…
Cancel
Save