|
|
|
@ -244,7 +244,7 @@ v-model="deviceOverviewRange" type="daterange" unlink-panels value-format="YYYY-
|
|
|
|
<el-card shadow="never">
|
|
|
|
<el-card shadow="never">
|
|
|
|
<template #header>
|
|
|
|
<template #header>
|
|
|
|
<div class="h-3 flex justify-between">
|
|
|
|
<div class="h-3 flex justify-between">
|
|
|
|
<span>模具分类统计</span>
|
|
|
|
<span>按模具分类统计,取模具数量最多的前10项</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<Echart :options="moldTypeBarOptionsData" :height="260" />
|
|
|
|
<Echart :options="moldTypeBarOptionsData" :height="260" />
|
|
|
|
@ -347,6 +347,18 @@ const loading = ref(true)
|
|
|
|
const avatar = userStore.getUser.avatar
|
|
|
|
const avatar = userStore.getUser.avatar
|
|
|
|
const username = userStore.getUser.nickname
|
|
|
|
const username = userStore.getUser.nickname
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getCssVar = (name: string, fallback: string) => {
|
|
|
|
|
|
|
|
if (typeof window === 'undefined') return fallback
|
|
|
|
|
|
|
|
const v = getComputedStyle(document.documentElement).getPropertyValue(name).trim()
|
|
|
|
|
|
|
|
return v || fallback
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const chartTitleColor = {
|
|
|
|
|
|
|
|
primary: getCssVar('--el-text-color-primary', '#303133'),
|
|
|
|
|
|
|
|
secondary: getCssVar('--el-text-color-secondary', '#909399'),
|
|
|
|
|
|
|
|
accent: getCssVar('--el-color-primary', '#409eff')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const productionOverviewRange = ref<string[]>([])
|
|
|
|
const productionOverviewRange = ref<string[]>([])
|
|
|
|
@ -393,18 +405,14 @@ const deviceStatusCards = ref<DeviceStatusVO[]>([])
|
|
|
|
const moldStatusCards = ref<DeviceStatusVO[]>([])
|
|
|
|
const moldStatusCards = ref<DeviceStatusVO[]>([])
|
|
|
|
const formData = ref<DeviceOperationStatus>()
|
|
|
|
const formData = ref<DeviceOperationStatus>()
|
|
|
|
const deviceRepairLineOptions = ref<EChartsOption>({
|
|
|
|
const deviceRepairLineOptions = ref<EChartsOption>({
|
|
|
|
title: {
|
|
|
|
|
|
|
|
text: '设备维修数量统计',
|
|
|
|
|
|
|
|
left: 'center'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
tooltip: {
|
|
|
|
tooltip: {
|
|
|
|
trigger: 'axis'
|
|
|
|
trigger: 'axis'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
grid: {
|
|
|
|
grid: {
|
|
|
|
left: 40,
|
|
|
|
left: 40,
|
|
|
|
right: 30,
|
|
|
|
right: 30,
|
|
|
|
bottom: 50,
|
|
|
|
bottom: 20,
|
|
|
|
top: 60,
|
|
|
|
top: 40,
|
|
|
|
containLabel: true
|
|
|
|
containLabel: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
xAxis: {
|
|
|
|
@ -425,10 +433,6 @@ const deviceRepairLineOptions = ref<EChartsOption>({
|
|
|
|
]
|
|
|
|
]
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const deviceCategoryPieOptionsData = ref<EChartsOption>({
|
|
|
|
const deviceCategoryPieOptionsData = ref<EChartsOption>({
|
|
|
|
title: {
|
|
|
|
|
|
|
|
text: '设备分类统计',
|
|
|
|
|
|
|
|
left: 'center'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
tooltip: {
|
|
|
|
tooltip: {
|
|
|
|
trigger: 'item',
|
|
|
|
trigger: 'item',
|
|
|
|
formatter: '{b}:{c}'
|
|
|
|
formatter: '{b}:{c}'
|
|
|
|
@ -441,8 +445,8 @@ const deviceCategoryPieOptionsData = ref<EChartsOption>({
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: '设备类别',
|
|
|
|
name: '设备类别',
|
|
|
|
type: 'pie',
|
|
|
|
type: 'pie',
|
|
|
|
radius: '55%',
|
|
|
|
radius: '65%',
|
|
|
|
center: ['50%', '60%'],
|
|
|
|
center: ['55%', '50%'],
|
|
|
|
label: {
|
|
|
|
label: {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
formatter: '{b}:{c}'
|
|
|
|
formatter: '{b}:{c}'
|
|
|
|
@ -453,8 +457,39 @@ const deviceCategoryPieOptionsData = ref<EChartsOption>({
|
|
|
|
|
|
|
|
|
|
|
|
const moldTypeBarOptionsData = ref<EChartsOption>({
|
|
|
|
const moldTypeBarOptionsData = ref<EChartsOption>({
|
|
|
|
title: {
|
|
|
|
title: {
|
|
|
|
text: '模具分类统计',
|
|
|
|
left: 18,
|
|
|
|
left: 'center'
|
|
|
|
top: 10,
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
rich: {
|
|
|
|
|
|
|
|
bar: {
|
|
|
|
|
|
|
|
width: 4,
|
|
|
|
|
|
|
|
height: 16,
|
|
|
|
|
|
|
|
backgroundColor: chartTitleColor.accent,
|
|
|
|
|
|
|
|
borderRadius: 2
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
title: {
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
fontWeight: 700,
|
|
|
|
|
|
|
|
lineHeight: 18,
|
|
|
|
|
|
|
|
color: chartTitleColor.primary
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
subtextStyle: {
|
|
|
|
|
|
|
|
rich: {
|
|
|
|
|
|
|
|
barSub: {
|
|
|
|
|
|
|
|
width: 4,
|
|
|
|
|
|
|
|
height: 12,
|
|
|
|
|
|
|
|
backgroundColor: chartTitleColor.accent,
|
|
|
|
|
|
|
|
borderRadius: 2
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
sub: {
|
|
|
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
|
|
|
lineHeight: 14,
|
|
|
|
|
|
|
|
color: chartTitleColor.secondary
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tooltip: {
|
|
|
|
tooltip: {
|
|
|
|
trigger: 'axis',
|
|
|
|
trigger: 'axis',
|
|
|
|
@ -465,8 +500,8 @@ title: {
|
|
|
|
grid: {
|
|
|
|
grid: {
|
|
|
|
left: 40,
|
|
|
|
left: 40,
|
|
|
|
right: 20,
|
|
|
|
right: 20,
|
|
|
|
bottom: 30,
|
|
|
|
bottom: 10,
|
|
|
|
top: 60,
|
|
|
|
top: 40,
|
|
|
|
containLabel: true
|
|
|
|
containLabel: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
xAxis: {
|
|
|
|
@ -474,6 +509,16 @@ title: {
|
|
|
|
// data: ['一车间', '二车间', '三车间', '四车间', '五车间'],
|
|
|
|
// data: ['一车间', '二车间', '三车间', '四车间', '五车间'],
|
|
|
|
axisTick: {
|
|
|
|
axisTick: {
|
|
|
|
alignWithLabel: true
|
|
|
|
alignWithLabel: true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
|
|
rotate: 35,
|
|
|
|
|
|
|
|
interval: 0,
|
|
|
|
|
|
|
|
margin: 14,
|
|
|
|
|
|
|
|
color: chartTitleColor.secondary,
|
|
|
|
|
|
|
|
formatter: (value: string) => {
|
|
|
|
|
|
|
|
const v = String(value ?? '')
|
|
|
|
|
|
|
|
return v.length > 10 ? `${v.slice(0, 10)}…` : v
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
yAxis: {
|
|
|
|
yAxis: {
|
|
|
|
|