Compare commits
66 Commits
14f819795d
...
zjl
| Author | SHA1 | Date | |
|---|---|---|---|
| b812a8eb01 | |||
| 6378239090 | |||
| 3cbe02f50a | |||
| c113ad3588 | |||
| 29dfb47b4b | |||
| 6e6a0ce257 | |||
| 4cd6f748a9 | |||
| 3e10beb7a6 | |||
| 3964f8541e | |||
| 86a5d3737c | |||
| 8184ee8a6f | |||
| 70b47b1ec0 | |||
| fbe6cf41e4 | |||
| ff0bda0dba | |||
| 582ac98a52 | |||
| 7f79481a35 | |||
| 7c2aadc19a | |||
| f96854fa29 | |||
| 569dd81dd7 | |||
| 8667da0332 | |||
| f06bb38e48 | |||
| 6aa7afb555 | |||
| 0b9dfa27ab | |||
| 2f9f9f90bc | |||
| 71e6f2eb85 | |||
| 705da46633 | |||
| c943481826 | |||
| df8ffa3676 | |||
| e756b39e6c | |||
| 123cdd59a5 | |||
| be18358b9c | |||
| eb525fce24 | |||
| 899b9fa879 | |||
| 9e48b2103a | |||
| 3db6ac92fe | |||
| f37dfbb328 | |||
| 539235fcfb | |||
| 935943e33b | |||
| f21ea0bc99 | |||
| d8592611b6 | |||
| e9ac894a4a | |||
| 59b40fefe9 | |||
| 779a771bb5 | |||
| 97ee3a9a4c | |||
| aa1461c298 | |||
| 34c8b29348 | |||
| 2819cf2efc | |||
| fa2d99d43f | |||
| 22dc4ff1d7 | |||
| ec3e364117 | |||
| 7552e09aeb | |||
| 890a1be63c | |||
| cfcfdd35ea | |||
| 01cc292256 | |||
| 5e38ee38d6 | |||
| a699f99156 | |||
| 5ded44a5de | |||
| bf6ecba045 | |||
| 4055142b3c | |||
| 76ada17b63 | |||
| d2f875e487 | |||
| 4297d5c804 | |||
| 6df938da04 | |||
| 41fba93d47 | |||
| a75d632902 | |||
| d056f545b6 |
@@ -127,6 +127,14 @@ export function rateFormatter(rateObj) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function rateFormatter2(rateObj) {
|
||||||
|
if (rateObj) {
|
||||||
|
return rateObj + '%'
|
||||||
|
} else {
|
||||||
|
return '0.00%'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export function amountFormatter(param) {
|
export function amountFormatter(param) {
|
||||||
if (param) {
|
if (param) {
|
||||||
return parseFloat(param).toFixed(2)
|
return parseFloat(param).toFixed(2)
|
||||||
|
|||||||
@@ -5,92 +5,74 @@
|
|||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
import resize from '@/views/OperationalOverview/components/mixins/resize'
|
import resize from '@/views/OperationalOverview/components/mixins/resize'
|
||||||
|
import { Random } from 'mockjs'
|
||||||
|
|
||||||
export default {
|
class ChartOption {
|
||||||
name: 'DianLineChart',
|
constructor() {
|
||||||
mixins: [resize],
|
this.color = ['#E02094', '#F0D63C', '#1A99FF']
|
||||||
/** Fn.1: 保证全屏切换时也刷新图表 ,应该在每个父组件为flex:1的echarts组件里都加上,以确保能正确地伸缩 */
|
|
||||||
inject: ['resizeStatus'],
|
|
||||||
/** End Fn.1 */
|
|
||||||
props: {
|
|
||||||
id: {
|
|
||||||
type: String,
|
|
||||||
default: 'default-dian-id'
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
type: String,
|
|
||||||
default: 'default-title'
|
|
||||||
},
|
|
||||||
xData: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
},
|
|
||||||
seriesData: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
const colors = ['#E02094', '#F0D63C', '#1A99FF']
|
|
||||||
|
|
||||||
// const computeInterval = numArr => Math.floor(numArr.reduce((p, c) => p + c, 0) / numArr.length / 10) * 10
|
this.legend = {
|
||||||
let data = [
|
top: 11,
|
||||||
// 温度走势
|
right: 32,
|
||||||
[90, 93, 95, 96, 95, 90, 89, 84, 60, 77, 93, 93.5].map(_ => {
|
|
||||||
let v = Math.floor(Math.random() * 100)
|
|
||||||
while (v < 30) {
|
|
||||||
v = Math.floor(Math.random() * 100)
|
|
||||||
}
|
|
||||||
return v
|
|
||||||
}),
|
|
||||||
// 电流走势
|
|
||||||
[60, 72, 69, 77, 72, 70, 71, 69.5, 55, 60, 70.5, 71].map(_ => {
|
|
||||||
let v = Math.floor(Math.random() * 100)
|
|
||||||
while (v < 30) {
|
|
||||||
v = Math.floor(Math.random() * 100)
|
|
||||||
}
|
|
||||||
return v
|
|
||||||
}),
|
|
||||||
// 电压走势
|
|
||||||
[45, 50, 55, 60, 65, 78, 63, 66, 54, 62, 72, 73].map(_ => {
|
|
||||||
let v = Math.floor(Math.random() * 100)
|
|
||||||
while (v < 30) {
|
|
||||||
v = Math.floor(Math.random() * 100)
|
|
||||||
}
|
|
||||||
return v
|
|
||||||
})
|
|
||||||
]
|
|
||||||
let wendu = data[0]
|
|
||||||
let dianliu = data[1]
|
|
||||||
let dianya = data[2]
|
|
||||||
|
|
||||||
return {
|
|
||||||
chart: null,
|
|
||||||
option: {
|
|
||||||
color: colors,
|
|
||||||
legend: {
|
|
||||||
top: 4,
|
|
||||||
right: 50,
|
|
||||||
itemWidth: 8,
|
itemWidth: 8,
|
||||||
itemHeight: 8,
|
itemHeight: 8,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#fff9',
|
color: '#fff9',
|
||||||
fontSize: 8
|
fontSize: 10
|
||||||
}
|
}
|
||||||
// data: ['ABC三相电压/v', 'ABC三相电流/a', '电缆温度']
|
}
|
||||||
},
|
|
||||||
grid: {
|
this.grid = {
|
||||||
top: 32,
|
top: 36,
|
||||||
left: 64,
|
left: 64,
|
||||||
bottom: 28
|
bottom: 36
|
||||||
|
}
|
||||||
|
|
||||||
|
this.tooltip = {
|
||||||
|
show: true,
|
||||||
|
trigger: 'axis',
|
||||||
|
// position: [200,10],
|
||||||
|
// position: ['25%', '25%'],
|
||||||
|
position: pointer => {
|
||||||
|
return [pointer[1], 0]
|
||||||
},
|
},
|
||||||
xAxis: [
|
axisPointer: {
|
||||||
{
|
type: 'line',
|
||||||
|
axis: 'x',
|
||||||
|
lineStyle: {
|
||||||
|
color: '#7BFFFB',
|
||||||
|
type: 'dotted'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
padding: 10,
|
||||||
|
backgroundColor: 'rgba(13, 29, 53, 0.8)',
|
||||||
|
extraCssText: 'width: auto !important; height: auto !important;',
|
||||||
|
formatter: params => {
|
||||||
|
return `
|
||||||
|
<div style="display: flex; flex-direction: column; gap: calc(4px * var(--beilv));">
|
||||||
|
<h2 style="font-size: calc(14px * var(--beilv)); margin: 0 0 4px; font-weight: normal; color: white;">${params[0].axisValue}</h2>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.color[0]
|
||||||
|
}"></span><span>${params[0].seriesName}: ${params[0].value}</span></span>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.color[1]
|
||||||
|
}"></span><span>${params[1].seriesName}: ${params[1].value}</span></span>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.color[2]
|
||||||
|
}"></span><span>${params[2].seriesName}: ${params[2].value}</span></span>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.xAxis = {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#fff9'
|
color: '#fff9',
|
||||||
|
fontSize: 12,
|
||||||
|
margin: 10
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@@ -98,16 +80,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
|
||||||
yAxis: [
|
this.yAxis = [
|
||||||
{
|
{
|
||||||
name: '电流/A',
|
name: '电流/A ',
|
||||||
nameTextStyle: { align: 'right', fontSize: 9, color: '#fff9' },
|
nameTextStyle: { align: 'right', fontSize: 10, color: '#fff9' },
|
||||||
type: 'value',
|
type: 'value',
|
||||||
splitNumber: 3,
|
splitNumber: 4,
|
||||||
onZero: true,
|
onZero: true,
|
||||||
position: 'left',
|
position: 'left',
|
||||||
offset: 40,
|
offset: 28,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
@@ -121,17 +103,18 @@ export default {
|
|||||||
fontSize: 10
|
fontSize: 10
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: true,
|
||||||
// lineStyle: {
|
lineStyle: {
|
||||||
// color: '#fff3'
|
color: '#fff1',
|
||||||
// }
|
type: 'dotted'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '电压/V',
|
name: ' 电压/V ',
|
||||||
nameTextStyle: { align: 'right', fontSize: 9, color: '#fff9' },
|
nameTextStyle: { align: 'right', fontSize: 10, color: '#fff9' },
|
||||||
type: 'value',
|
type: 'value',
|
||||||
splitNumber: 3,
|
splitNumber: 4,
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
onZero: true,
|
onZero: true,
|
||||||
position: 'left',
|
position: 'left',
|
||||||
@@ -148,15 +131,16 @@ export default {
|
|||||||
fontSize: 10
|
fontSize: 10
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: true,
|
||||||
// lineStyle: {
|
lineStyle: {
|
||||||
// color: '#fff3'
|
color: '#fff1',
|
||||||
// }
|
type: 'dotted'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '温度',
|
name: ' 温度',
|
||||||
nameTextStyle: { align: 'left', color: '#fff9', fontSize: 9 },
|
nameTextStyle: { align: 'left', color: '#fff9', fontSize: 10 },
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: false,
|
show: false,
|
||||||
@@ -166,10 +150,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
type: 'value',
|
type: 'value',
|
||||||
splitNumber: 3,
|
splitNumber: 4,
|
||||||
splitLine: {
|
splitLine: {
|
||||||
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#fff3'
|
color: '#fff1',
|
||||||
|
type: 'dotted'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
@@ -177,8 +163,9 @@ export default {
|
|||||||
fontSize: 10
|
fontSize: 10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
series: [
|
|
||||||
|
this.series = [
|
||||||
{
|
{
|
||||||
name: 'ABC三相电压/v',
|
name: 'ABC三相电压/v',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
@@ -187,8 +174,12 @@ export default {
|
|||||||
emphasis: {
|
emphasis: {
|
||||||
focus: 'series'
|
focus: 'series'
|
||||||
},
|
},
|
||||||
data: dianliu,
|
data: Array(12)
|
||||||
symbol: 'none'
|
.fill(1)
|
||||||
|
.map(_ => Random.integer(30, 100)),
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 0.2,
|
||||||
|
showSymbol: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'ABC三相电流/a',
|
name: 'ABC三相电流/a',
|
||||||
@@ -198,8 +189,12 @@ export default {
|
|||||||
emphasis: {
|
emphasis: {
|
||||||
focus: 'series'
|
focus: 'series'
|
||||||
},
|
},
|
||||||
data: dianya,
|
data: Array(12)
|
||||||
symbol: 'none'
|
.fill(1)
|
||||||
|
.map(_ => Random.integer(30, 100)),
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 0.2,
|
||||||
|
showSymbol: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '电缆温度',
|
name: '电缆温度',
|
||||||
@@ -209,11 +204,63 @@ export default {
|
|||||||
emphasis: {
|
emphasis: {
|
||||||
focus: 'series'
|
focus: 'series'
|
||||||
},
|
},
|
||||||
data: wendu,
|
data: Array(12)
|
||||||
symbol: 'none'
|
.fill(1)
|
||||||
|
.map(_ => Random.integer(30, 100)),
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 0.2,
|
||||||
|
showSymbol: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get option() {
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
optionFilter(option, calcSize = () => {} /** callback */) {
|
||||||
|
let newOption
|
||||||
|
if (Array.isArray(option)) {
|
||||||
|
newOption = []
|
||||||
|
option.forEach(item => {
|
||||||
|
newOption.push(this.optionFilter(item, calcSize))
|
||||||
|
})
|
||||||
|
return newOption
|
||||||
|
} else if (typeof option === 'object') {
|
||||||
|
newOption = {}
|
||||||
|
for (const key in option) {
|
||||||
|
if (key === 'colorStops') newOption[key] = option[key]
|
||||||
|
else if (
|
||||||
|
typeof option[key] === 'number' /** 过滤不做变化的属性 */ &&
|
||||||
|
['splitNumber', 'x', 'x2', 'y', 'y2', 'yAxisIndex', 'xAxisIndex'].indexOf(key) === -1
|
||||||
|
) {
|
||||||
|
newOption[key] = calcSize(option[key])
|
||||||
|
} else newOption[key] = this.optionFilter(option[key], calcSize)
|
||||||
|
}
|
||||||
|
return newOption
|
||||||
|
} else {
|
||||||
|
newOption = calcSize(option)
|
||||||
|
return option
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DianLineChart',
|
||||||
|
mixins: [resize],
|
||||||
|
/** Fn.1: 保证全屏切换时也刷新图表 ,应该在每个父组件为flex:1的echarts组件里都加上,以确保能正确地伸缩 */
|
||||||
|
inject: ['resizeStatus'],
|
||||||
|
/** End Fn.1 */
|
||||||
|
props: {
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
default: 'default-dian-line-chart'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chart: null,
|
||||||
|
option: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -231,14 +278,23 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (!this.chart) this.chart = echarts.init(this.$refs['techy-line-chart'])
|
if (!this.chart) this.chart = echarts.init(this.$refs['techy-line-chart'])
|
||||||
this.chart.setOption(this.option)
|
this.setChartOption()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (this.chart) this.chart.dispose()
|
if (this.chart) this.chart.dispose()
|
||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {
|
||||||
|
calcSize(num) {
|
||||||
|
const beilv = document.documentElement.style.getPropertyValue('--beilv')
|
||||||
|
return num * beilv
|
||||||
|
},
|
||||||
|
setChartOption() {
|
||||||
|
let chartOption = new ChartOption()
|
||||||
|
this.chart.setOption(chartOption.optionFilter(chartOption.option, this.calcSize))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :id="id" ref="techy-line-chart" class="techy-chart" />
|
<div id="techy-line-chart" ref="techy-line-chart" class="techy-chart" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -13,22 +13,7 @@ export default {
|
|||||||
inject: ['resizeStatus'],
|
inject: ['resizeStatus'],
|
||||||
/** End Fn.1 */
|
/** End Fn.1 */
|
||||||
props: {
|
props: {
|
||||||
id: {
|
|
||||||
type: String,
|
|
||||||
default: 'default-fadian-id'
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
type: String,
|
|
||||||
default: 'default-title'
|
|
||||||
},
|
|
||||||
xData: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
},
|
|
||||||
seriesData: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -46,11 +31,20 @@ export default {
|
|||||||
color: ['#E02094', '#F0D63C', '#1A99FF'],
|
color: ['#E02094', '#F0D63C', '#1A99FF'],
|
||||||
grid: {
|
grid: {
|
||||||
top: '30%',
|
top: '30%',
|
||||||
left: 0,
|
left: '120%',
|
||||||
right: '5%',
|
right: '5%',
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
|
// tooltip: {
|
||||||
|
// show: true,
|
||||||
|
// trigger: 'axis',
|
||||||
|
// axisPointer: {
|
||||||
|
// type: 'line',
|
||||||
|
// axis: 'x'
|
||||||
|
// },
|
||||||
|
// extraCssText: 'position: absolute; width: 152px !important; height: 100px !important;'
|
||||||
|
// },
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
boundaryGap: false,
|
boundaryGap: false,
|
||||||
@@ -62,7 +56,7 @@ export default {
|
|||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: 8,
|
fontSize: 10,
|
||||||
color: '#fffa'
|
color: '#fffa'
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
@@ -83,14 +77,16 @@ export default {
|
|||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: 8,
|
fontSize: 10,
|
||||||
color: '#fffa'
|
color: '#fffa'
|
||||||
// formatter: '{value} %'
|
// formatter: '{value} %'
|
||||||
},
|
},
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
splitLine: {
|
splitLine: {
|
||||||
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#fff3'
|
color: '#fff1',
|
||||||
|
type: 'dotted'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -53,31 +53,31 @@ const PriorityComponent = {
|
|||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{ prop: 'eqName', label: '设备名称', align: 'center', 'min-width': 120 },
|
{ prop: 'eqName', label: '设备名称', align: 'center', 'min-width': 120 },
|
||||||
{ prop: 'pl', label: '所属产线', align: 'center', 'min-width': 100 },
|
// { prop: 'pl', label: '所属产线', align: 'center', 'min-width': 100 },
|
||||||
{ prop: 'warningLevel', label: '提示等级', align: 'center', 'min-width': 100, subcomponent: PriorityComponent },
|
{ prop: 'warningLevel', label: '提示等级', align: 'center', 'min-width': 70, subcomponent: PriorityComponent },
|
||||||
{ prop: 'checkContent', label: '巡检内容', align: 'center', 'min-width': 120 }
|
{ prop: 'checkContent', label: '巡检内容', align: 'center', 'min-width': 120 }
|
||||||
]
|
]
|
||||||
const tableData = [
|
const tableData = [
|
||||||
{ eqName: '钢化', pl: 'A', priority: 4, checkContent: '表面检测光源和相机的卫生' },
|
{ eqName: 'A1钢化', pl: 'A', priority: 1, checkContent: '表面检测光源和相机的卫生' },
|
||||||
{ eqName: '一镀', pl: 'A', priority: 1, checkContent: '辊道下方的碎玻璃清理' },
|
// { eqName: '一镀', pl: 'A', priority: 1, checkContent: '辊道下方的碎玻璃清理' },
|
||||||
{ eqName: '钢化', pl: 'B', priority: 3, checkContent: '边角检测设备水平的校正' },
|
{ eqName: 'B2钢化', pl: 'B', priority: 3, checkContent: '边角检测设备水平的校正' },
|
||||||
{ eqName: '冷却', pl: 'B', priority: 2, checkContent: '表面检测光源和相机的卫生' },
|
{ eqName: 'B1冷却机', pl: 'B', priority: 2, checkContent: '表面检测光源和相机的卫生' },
|
||||||
{ eqName: '预热', pl: 'A', priority: 1, checkContent: '辊道下方的碎玻璃清理' },
|
// { eqName: '预热', pl: 'A', priority: 1, checkContent: '辊道下方的碎玻璃清理' },
|
||||||
{ eqName: '钢后清洗机', pl: 'B', priority: 3, checkContent: '检查每日不良是否存在误检' },
|
{ eqName: 'B1钢后清洗机', pl: 'B', priority: 3, checkContent: '检查每日不良是否存在误检' },
|
||||||
{ eqName: '磨边', pl: 'B', priority: 3, checkContent: '设备表面的卫生' },
|
{ eqName: 'B2磨边', pl: 'B', priority: 3, checkContent: '设备表面的卫生' },
|
||||||
{ eqName: '打孔', pl: 'B', priority: 2, checkContent: '边角检测光源和相机的卫生' },
|
{ eqName: 'B1打孔', pl: 'B', priority: 2, checkContent: '边角检测光源和相机的卫生' },
|
||||||
{ eqName: '磨边后清洗机', pl: 'B', priority: 4, checkContent: '边角检测光源和相机的卫生' },
|
{ eqName: 'B1磨边后清洗机', pl: 'B', priority: 1, checkContent: '边角检测光源和相机的卫生' },
|
||||||
{ eqName: '冷却', pl: 'B', priority: 1, checkContent: '辊道下方的碎玻璃清理' },
|
// { eqName: '冷却', pl: 'B', priority: 1, checkContent: '辊道下方的碎玻璃清理' },
|
||||||
{ eqName: '丝印', pl: 'B', priority: 3, checkContent: '操作台保持整洁' },
|
// { eqName: '丝印', pl: 'B', priority: 3, checkContent: '操作台保持整洁' },
|
||||||
{ eqName: '丝印', pl: 'A', priority: 2, checkContent: '检查每日不良是否存在误检' },
|
// { eqName: '丝印', pl: 'A', priority: 2, checkContent: '检查每日不良是否存在误检' },
|
||||||
{ eqName: '钢化', pl: 'B', priority: 2, checkContent: '检查每日不良是否存在误检' },
|
{ eqName: 'B1钢化', pl: 'B', priority: 2, checkContent: '检查每日不良是否存在误检' },
|
||||||
{ eqName: '冷却', pl: 'A', priority: 2, checkContent: '辊道下方的碎玻璃清理' },
|
// { eqName: '冷却', pl: 'A', priority: 2, checkContent: '辊道下方的碎玻璃清理' },
|
||||||
{ eqName: '下片', pl: 'A', priority: 1, checkContent: '水冷机内水量充足并且清洁' },
|
{ eqName: 'A1下片', pl: 'A', priority: 1, checkContent: '水冷机内水量充足并且清洁' },
|
||||||
{ eqName: '钢化', pl: 'A', priority: 2, checkContent: '操作台保持整洁' },
|
{ eqName: 'A2钢化', pl: 'A', priority: 2, checkContent: '操作台保持整洁' },
|
||||||
{ eqName: '预热', pl: 'B', priority: 4, checkContent: '水冷机内水量充足并且清洁' },
|
// { eqName: '预热', pl: 'B', priority: 3, checkContent: '水冷机内水量充足并且清洁' },
|
||||||
{ eqName: '磨边后清洗机', pl: 'A', priority: 2, checkContent: '水冷机内水量充足并且清洁' },
|
{ eqName: 'A3磨边后清洗机', pl: 'A', priority: 2, checkContent: '水冷机内水量充足并且清洁' },
|
||||||
{ eqName: '上片', pl: 'B', priority: 3, checkContent: '边角检测光源和相机的卫生' },
|
{ eqName: 'B3上片', pl: 'B', priority: 3, checkContent: '边角检测光源和相机的卫生' },
|
||||||
{ eqName: '预热', pl: 'A', priority: 2, checkContent: '表面检测光源和相机的卫生' }
|
// { eqName: '预热', pl: 'A', priority: 2, checkContent: '表面检测光源和相机的卫生' }
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -100,7 +100,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.left-content-equipment-check {
|
.left-content-equipment-check {
|
||||||
height: calc(100% - 32px);
|
height: calc(100% - calc(32px * var(--beilv)));
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: calc(100vmin / 1920 * 36);
|
gap: calc(100vmin / 1920 * 36);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -130,7 +130,7 @@ export default {
|
|||||||
color: #fff9;
|
color: #fff9;
|
||||||
border: 0;
|
border: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: auto;
|
/* overflow-y: auto; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table-wrapper >>> .el-table th.is-leaf,
|
.el-table-wrapper >>> .el-table th.is-leaf,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default {
|
|||||||
.left-content-monitoring {
|
.left-content-monitoring {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 32px);
|
height: calc(100% - calc(32px * var(--beilv)));
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: calc(100vw / 1920 * 16);
|
gap: calc(100vw / 1920 * 16);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,24 +15,16 @@ const ProcessCircle = {
|
|||||||
default: () => ({})
|
default: () => ({})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
console.log('finished', this.injectData.finished)
|
|
||||||
},
|
|
||||||
methods: {},
|
methods: {},
|
||||||
render: function(h) {
|
render: function(h) {
|
||||||
return h('el-progress', {
|
return h('el-progress', {
|
||||||
class: {
|
|
||||||
'lb-progress-bar': true
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
type: 'circle',
|
type: 'circle',
|
||||||
percentage: this.injectData.finished,
|
percentage: this.injectData.finished,
|
||||||
width: 14,
|
width: 14,
|
||||||
'stroke-width': 2,
|
'stroke-width': 2,
|
||||||
color: '#47FF27'
|
color: '#47FF27',
|
||||||
},
|
'define-back-color': '#ffffff' // 背景色, 该选项不起作用,可能和 element ui 版本相关
|
||||||
style: {
|
|
||||||
color: 'blue'
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -99,4 +91,8 @@ export default {
|
|||||||
left: calc(-2px * var(--beilv));
|
left: calc(-2px * var(--beilv));
|
||||||
color: #ffffffb3 !important;
|
color: #ffffffb3 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.left-content-order >>> .el-progress-circle__track {
|
||||||
|
stroke: #283851;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -67,27 +67,27 @@
|
|||||||
</TechyBox>
|
</TechyBox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="min-height: calc(110px * var(--beilv)); flex: 1;">
|
<div style="min-height: calc(144px * var(--beilv)); flex: 1;">
|
||||||
<TechyBox class="dian-consume">
|
<TechyBox class="dian-consume">
|
||||||
<div class="header-part">
|
<div class="header-part">
|
||||||
<img src="./assets/consume/d.png" width="32" height="32" alt="dian" />
|
<img src="./assets/consume/d.png" width="32" height="32" alt="dian" />
|
||||||
<span>电</span>
|
<span>电</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 100%; flex: 1;">
|
<div style="height: 100%; flex: 1; overflow: hidden">
|
||||||
<DianChart />
|
<DianChart id="dian" key="dian" />
|
||||||
</div>
|
</div>
|
||||||
</TechyBox>
|
</TechyBox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="min-height: calc(110px * var(--beilv)); flex: 1;">
|
<div style="min-height: calc(144px * var(--beilv)); flex: 1;">
|
||||||
<TechyBox class="elec-consume">
|
<TechyBox class="elec-consume">
|
||||||
<div class="header-part">
|
<div class="header-part">
|
||||||
<img src="./assets/consume/fad.png" width="32" height="32" alt="fadian" />
|
<img src="./assets/consume/fad.png" width="32" height="32" alt="fadian" />
|
||||||
<span>发电</span>
|
<span>发电</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 100%; flex: 1; ">
|
<div style="height: 100%; flex: 1; overflow: hidden">
|
||||||
<!-- <FadianChart /> -->
|
<!-- <FadianChart /> -->
|
||||||
<DianChart />
|
<DianChart id="fa-dian" key="fa-dian" />
|
||||||
</div>
|
</div>
|
||||||
</TechyBox>
|
</TechyBox>
|
||||||
</div>
|
</div>
|
||||||
@@ -116,7 +116,7 @@ export default {
|
|||||||
.public-consume__inner {
|
.public-consume__inner {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
height: calc(100% - 32px);
|
height: calc(100% - calc(32px * var(--beilv)));
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -153,6 +153,7 @@ export default {
|
|||||||
.header-part > span {
|
.header-part > span {
|
||||||
color: #fffc;
|
color: #fffc;
|
||||||
font-size: calc(12px * var(--beilv));
|
font-size: calc(12px * var(--beilv));
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-part {
|
.content-part {
|
||||||
@@ -160,7 +161,7 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
font-size: calc(12px * var(--beilv));
|
font-size: calc(12px * var(--beilv));
|
||||||
color: #fff9;
|
color: #fff9;
|
||||||
height: 10px;
|
height: calc(48px * var(--beilv));
|
||||||
flex: 1 1;
|
flex: 1 1;
|
||||||
gap: calc(4px * var(--beilv));
|
gap: calc(4px * var(--beilv));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,45 +53,38 @@ const PriorityComponent = {
|
|||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{ prop: 'eqName', label: '设备名称', align: 'center', 'min-width': 90 },
|
{ prop: 'eqName', label: '设备名称', align: 'center', 'min-width': 90 },
|
||||||
{ prop: 'plName', label: '所属产线', align: 'center', 'min-width': 90 },
|
// { prop: 'plName', label: '所属产线', align: 'center', 'min-width': 90 },
|
||||||
{ prop: 'priority', label: '提示等级', align: 'center', 'min-width': 90, subcomponent: PriorityComponent },
|
{ prop: 'priority', label: '提示等级', align: 'center', 'min-width': 70, subcomponent: PriorityComponent },
|
||||||
{ prop: 'content', label: '巡检内容', align: 'center', 'min-width': 120 },
|
{ prop: 'content', label: '报警内容', align: 'center', 'min-width': 120 },
|
||||||
{ prop: 'duration', label: '累计时间(min)', align: 'center', 'min-width': 125 }
|
{ prop: 'duration', label: '累计时间(min)', align: 'center', 'min-width': 125 }
|
||||||
]
|
]
|
||||||
|
|
||||||
const tableData = [
|
const tableData = [
|
||||||
{ eqName: '磨边', plName: 'B', content: '表面检测光源和相机的卫生', priority: 4, duration: '30 min' },
|
{ eqName: 'B1磨边', plName: 'B', content: '磨轮过载', priority: 1, duration: '30 min' },
|
||||||
{ eqName: '冷却', plName: 'A', content: '辊道下方的碎玻璃清理', priority: 4, duration: '1 min' },
|
{ eqName: 'A2丝印', plName: 'A', content: '网版推出异常', priority: 2, duration: '57 min' },
|
||||||
{ eqName: '丝印', plName: 'A', content: '边角检测设备水平的校正', priority: 2, duration: '57 min' },
|
{ eqName: 'B1打孔后清洗', plName: 'B', content: '毛刷过载', priority: 3, duration: '17 min' },
|
||||||
{ eqName: '打孔后清洗机', plName: 'B', content: '设备表面的卫生', priority: 3, duration: '17 min' },
|
{ eqName: 'B1固化', plName: 'B', content: '传动变频器故障', priority: 2, duration: '22 min' },
|
||||||
{ eqName: '固化', plName: 'B', content: '操作台保持整洁', priority: 2, duration: '22 min' },
|
{ eqName: 'A钢化', plName: 'A', content: '加热炉体超温报警', priority: 2, duration: '23 min' },
|
||||||
{ eqName: '一镀', plName: 'B', content: '辊道下方的碎玻璃清理', priority: 3, duration: '2 min' },
|
{ eqName: 'B2磨边', plName: 'B', content: '磨轮过载', priority: 3, duration: '6 min' },
|
||||||
{ eqName: '钢化', plName: 'A', content: '检查每日不良是否存在误检', priority: 4, duration: '23 min' },
|
{ eqName: 'B1磨边', plName: 'B', content: '磨轮过载', priority: 2, duration: '23 min' },
|
||||||
{ eqName: '磨边', plName: 'B', content: '水冷机内水量充足并且清洁', priority: 3, duration: '6 min' },
|
|
||||||
{ eqName: '磨边', plName: 'B', content: '表面检测光源和相机的卫生', priority: 2, duration: '23 min' },
|
|
||||||
{
|
{
|
||||||
eqName: '磨边后清洗机',
|
eqName: 'A2磨边后清洗',
|
||||||
plName: 'A',
|
plName: 'A',
|
||||||
content: '马华部地般平感为转出形就特务把提存。',
|
content: '进料检测异常',
|
||||||
priority: 2,
|
priority: 2,
|
||||||
duration: '18 min'
|
duration: '18 min'
|
||||||
},
|
},
|
||||||
{ eqName: '预热', plName: 'B', content: '米织类劳约相查个而美五千老。', priority: 3, duration: '24 min' },
|
{ eqName: 'A3打孔后清洗', plName: 'A', content: '进料检测异常', priority: 1, duration: '48 min' },
|
||||||
{ eqName: '打孔后清洗机', plName: 'A', content: '历红群色务口史验话备必工少光。', priority: 1, duration: '48 min' },
|
{ eqName: 'A3磨边', plName: 'A', content: '磨轮过载', priority: 3, duration: '29 min' },
|
||||||
{ eqName: '磨边', plName: 'A', content: '三其由体管严能习使为已身月。', priority: 4, duration: '29 min' },
|
{ eqName: 'A2钢化后清洗', plName: 'A', content: '进料检测异常', priority: 1, duration: '47 min' },
|
||||||
{ eqName: '钢后清洗机', plName: 'A', content: '什近率期开构产府收由制期周。', priority: 4, duration: '47 min' },
|
{ eqName: 'A2下片', plName: 'A', content: '磨轮过载', priority: 2, duration: '49 min' },
|
||||||
{ eqName: '下片', plName: 'A', content: '花公建了办间话个做直志利更在于。', priority: 2, duration: '49 min' },
|
|
||||||
{ eqName: '一镀', plName: 'B', content: '术任该石代并战面广西处面住王规从他算。', priority: 3, duration: '42 min' },
|
|
||||||
{ eqName: '二镀', plName: 'A', content: '体才眼自造统六识进后历定因受国。', priority: 2, duration: '42 min' },
|
|
||||||
{
|
{
|
||||||
eqName: '钢后清洗机',
|
eqName: 'A3钢化后清洗',
|
||||||
plName: 'A',
|
plName: 'A',
|
||||||
content: '就门务程过志率难每维原就快没省为满候。',
|
content: '输送变频报警',
|
||||||
priority: 2,
|
priority: 2,
|
||||||
duration: '33 min'
|
duration: '33 min'
|
||||||
},
|
}
|
||||||
{ eqName: '预热', plName: 'A', content: '金单能信较生七族接处人门例图取之。', priority: 2, duration: '34 min' },
|
|
||||||
{ eqName: '预热', plName: 'B', content: '会带给山气己进相构位节采调而音集。', priority: 3, duration: '6 min' }
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -114,7 +107,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right-content-alert {
|
.right-content-alert {
|
||||||
height: calc(100% - 32px);
|
height: calc(100% - calc(32px * var(--beilv)));
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: calc(100vw / 1920 * 16);
|
gap: calc(100vw / 1920 * 16);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -144,7 +137,7 @@ export default {
|
|||||||
color: #fff9;
|
color: #fff9;
|
||||||
border: 0;
|
border: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: auto;
|
/* overflow-y: auto; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table-wrapper >>> .el-table th.is-leaf,
|
.el-table-wrapper >>> .el-table th.is-leaf,
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="right-content-quality-analysis">
|
<div
|
||||||
<div :id="id" ref="fault-pie-chart" class="fault-pie-chart" />
|
:id="id"
|
||||||
|
ref="fault-pie-chart"
|
||||||
|
class="right-content-quality-analysis"
|
||||||
|
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%"
|
||||||
|
>
|
||||||
|
<!-- <div :id="id" ref="fault-pie-chart" class="fault-pie-chart" /> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -101,8 +106,8 @@ export default {
|
|||||||
configs: {
|
configs: {
|
||||||
title: {
|
title: {
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
left: '63%',
|
left: '67%',
|
||||||
top: '35%',
|
top: '50%',
|
||||||
text: demoData.reduce((prev, curr) => prev + curr.value, 0),
|
text: demoData.reduce((prev, curr) => prev + curr.value, 0),
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
@@ -117,10 +122,12 @@ export default {
|
|||||||
fontWeight: 'lighter'
|
fontWeight: 'lighter'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
legend: {
|
legend: {
|
||||||
|
selectedMode: false,
|
||||||
top: 0,
|
top: 0,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
left: -15,
|
left: 0,
|
||||||
orient: 'vertical',
|
orient: 'vertical',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
itemGap: 8,
|
itemGap: 8,
|
||||||
@@ -202,10 +209,11 @@ export default {
|
|||||||
|
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
|
silent: true,
|
||||||
name: 'PieForm',
|
name: 'PieForm',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
center: ['65%', '50%'],
|
center: ['68%', '61%'],
|
||||||
radius: ['60%', '80%'],
|
radius: ['42%', '60%'],
|
||||||
avoidLabelOverlap: true,
|
avoidLabelOverlap: true,
|
||||||
label: {
|
label: {
|
||||||
formatter: params => {
|
formatter: params => {
|
||||||
@@ -231,7 +239,7 @@ export default {
|
|||||||
const colorGradient = colors[dataIndex]
|
const colorGradient = colors[dataIndex]
|
||||||
if (totalRate + percent < 25) {
|
if (totalRate + percent < 25) {
|
||||||
/** 也许这里需要完善,但目前工作良好 */
|
/** 也许这里需要完善,但目前工作良好 */
|
||||||
;(() => {})()
|
(() => {})()
|
||||||
} else if (totalRate + percent < 50) {
|
} else if (totalRate + percent < 50) {
|
||||||
colorGradient.x = 0
|
colorGradient.x = 0
|
||||||
colorGradient.y = 0
|
colorGradient.y = 0
|
||||||
@@ -244,7 +252,7 @@ export default {
|
|||||||
colorGradient.y2 = 0
|
colorGradient.y2 = 0
|
||||||
} else if (totalRate + percent < 100) {
|
} else if (totalRate + percent < 100) {
|
||||||
/** 也许这里需要完善,但目前工作良好 */
|
/** 也许这里需要完善,但目前工作良好 */
|
||||||
;(() => {})()
|
(() => {})()
|
||||||
}
|
}
|
||||||
|
|
||||||
totalRate += percent
|
totalRate += percent
|
||||||
@@ -282,24 +290,27 @@ export default {
|
|||||||
return beilv * baseSize
|
return beilv * baseSize
|
||||||
},
|
},
|
||||||
applyChartOption() {
|
applyChartOption() {
|
||||||
const fs1 = this.calcFontsize(1 /** px*/)
|
// const fs1 = this.calcFontsize(1 /** px*/)
|
||||||
const fs3 = this.calcFontsize(3 /** px*/)
|
// const fs3 = this.calcFontsize(3 /** px*/)
|
||||||
const fs5 = this.calcFontsize(5 /** px*/)
|
const fs5 = this.calcFontsize(5 /** px*/)
|
||||||
const fs8 = this.calcFontsize(8 /** px*/)
|
const fs8 = this.calcFontsize(8 /** px*/)
|
||||||
const fs10 = this.calcFontsize(10 /** px*/)
|
const fs10 = this.calcFontsize(10 /** px*/)
|
||||||
const fs14 = this.calcFontsize(14 /** px*/)
|
const fs12 = this.calcFontsize(12 /** px*/)
|
||||||
const fs16 = this.calcFontsize(16 /** px*/)
|
const fs16 = this.calcFontsize(16 /** px*/)
|
||||||
|
const titleSize = this.calcFontsize(22 /** px*/)
|
||||||
|
const subtitleSize = this.calcFontsize(14 /** px*/)
|
||||||
|
|
||||||
this.configs.title.textStyle.fontSize = fs14
|
this.configs.title.textStyle.fontSize = titleSize
|
||||||
this.configs.title.subtextStyle.fontSize = fs10
|
this.configs.title.subtextStyle.fontSize = subtitleSize
|
||||||
|
|
||||||
this.configs.legend.top = '10%'
|
this.configs.legend.top = '26%'
|
||||||
this.configs.legend.itemGap = 0
|
this.configs.legend.left = fs8
|
||||||
|
this.configs.legend.itemGap = fs8
|
||||||
this.configs.legend.itemWidth = fs8
|
this.configs.legend.itemWidth = fs8
|
||||||
|
|
||||||
this.configs.legend.textStyle.rich.a.fontSize = fs10
|
this.configs.legend.textStyle.rich.a.fontSize = fs12
|
||||||
this.configs.legend.textStyle.rich.a.lineHeight = fs16
|
this.configs.legend.textStyle.rich.a.lineHeight = fs16
|
||||||
this.configs.legend.textStyle.rich.b.fontSize = fs10
|
this.configs.legend.textStyle.rich.b.fontSize = fs12
|
||||||
// this.configs.legend.textStyle.rich.b.lineHeight = fs16
|
// this.configs.legend.textStyle.rich.b.lineHeight = fs16
|
||||||
this.configs.legend.textStyle.rich.c.width = fs8
|
this.configs.legend.textStyle.rich.c.width = fs8
|
||||||
this.configs.legend.textStyle.rich.c.height = fs8
|
this.configs.legend.textStyle.rich.c.height = fs8
|
||||||
@@ -330,9 +341,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.right-content-quality-analysis {
|
/* .right-content-quality-analysis {
|
||||||
height: calc(100% - 32px);
|
height: calc(100% - 32px);
|
||||||
}
|
} */
|
||||||
|
|
||||||
.fault-pie-chart {
|
.fault-pie-chart {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -1,68 +1,94 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="height: calc(100% - 36px); width: 100%; position: relative;">
|
<div ref="techy-line-chart" style="position: absolute; top: 0; left: 0; height: 100%; width: 100%; " />
|
||||||
<div :id="id" ref="techy-line-chart" class="techy-chart" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
import resize from '@/views/OperationalOverview/components/mixins/resize'
|
import resize from '@/views/OperationalOverview/components/mixins/resize'
|
||||||
|
import { Random } from 'mockjs'
|
||||||
|
|
||||||
export default {
|
class ChartOption {
|
||||||
name: 'ProductRateLineChart',
|
constructor() {
|
||||||
mixins: [resize],
|
// const wenduData = Array(12)
|
||||||
props: {
|
// .fill(1)
|
||||||
id: {
|
// .map(_ => Random.integer(30, 100))
|
||||||
type: String,
|
// const dianyaData = Array(12)
|
||||||
default: 'default-id'
|
// .fill(1)
|
||||||
},
|
// .map(_ => Random.integer(30, 100))
|
||||||
title: {
|
// const dianliuData = Array(12)
|
||||||
type: String,
|
// .fill(1)
|
||||||
default: 'default-title'
|
// .map(_ => Random.integer(30, 100))
|
||||||
},
|
|
||||||
xData: {
|
this.color = ['#1A99FF', '#E02094', '#F0D63C']
|
||||||
type: Array,
|
|
||||||
default: () => []
|
this.legend = {
|
||||||
},
|
top: 24,
|
||||||
seriesData: {
|
right: 40,
|
||||||
type: Array,
|
itemWidth: 18,
|
||||||
default: () => []
|
itemHeight: 12,
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
chart: null,
|
|
||||||
option: {
|
|
||||||
color: ['#59CBE8', '#E93CAC', '#FF7345', '#9452FF', '#6A6E87', '#52FFF1'],
|
|
||||||
grid: {
|
|
||||||
top: '45%',
|
|
||||||
left: 0,
|
|
||||||
right: 12,
|
|
||||||
bottom: '5%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
width: '72%',
|
|
||||||
top: '20%',
|
|
||||||
right: 12,
|
|
||||||
itemWidth: 12,
|
|
||||||
itemHeight: 8,
|
|
||||||
textStyle: {
|
textStyle: {
|
||||||
|
fontSize: 12,
|
||||||
color: '#fffc'
|
color: '#fffc'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.grid = {
|
||||||
|
top: 72,
|
||||||
|
left: 26,
|
||||||
|
right: 24,
|
||||||
|
bottom: 16,
|
||||||
|
containLabel: true
|
||||||
|
}
|
||||||
|
|
||||||
|
this.tooltip = {
|
||||||
|
show: true,
|
||||||
|
trigger: 'axis',
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 12
|
||||||
},
|
},
|
||||||
xAxis: {
|
axisPointer: {
|
||||||
|
type: 'line',
|
||||||
|
lineStyle: {
|
||||||
|
color: '#7BFFFB',
|
||||||
|
type: 'dotted'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
padding: 10,
|
||||||
|
backgroundColor: 'rgba(13, 29, 53, 0.8)',
|
||||||
|
// formatter: '{b}<br/>{a0}: {c}%<br />{a1}: {c1}%',
|
||||||
|
extraCssText: 'width: calc(100px*var(--beilv)) !important;',
|
||||||
|
formatter: params => {
|
||||||
|
return `
|
||||||
|
<div style="display: flex; flex-direction: column; gap: calc(4px * var(--beilv));">
|
||||||
|
<h2 style="font-size: calc(14px * var(--beilv)); margin: 0 0 4px; font-weight: normal; color: white;">${
|
||||||
|
params[0].axisValue
|
||||||
|
}</h2>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.color[0]
|
||||||
|
}"></span><span>${params[0].seriesName}: ${params[0].value}</span></span>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.color[1]
|
||||||
|
}"></span><span>${params[1].seriesName}: ${params[1].value}</span></span>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let d = new Date()
|
||||||
|
this.xAxis = {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
boundaryGap: false,
|
boundaryGap: false,
|
||||||
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||||
data: Array(12)
|
data: Array(7)
|
||||||
.fill(0)
|
.fill(0)
|
||||||
.map((_, idx) => (idx >= 10 ? idx : '0' + idx) + ':00'),
|
.map((_, idx) => {
|
||||||
|
return d.getMonth() + 1 + '-' + (d.getDate() + idx)
|
||||||
|
}),
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: 8,
|
fontSize: 12,
|
||||||
color: '#fffa'
|
color: '#fffa'
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
@@ -70,22 +96,22 @@ export default {
|
|||||||
color: '#fff3'
|
color: '#fff3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
yAxis: {
|
this.yAxis = {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: '成品率',
|
name: '成品率 ',
|
||||||
min: 'dataMin',
|
// min: 'dataMin',
|
||||||
splitNumber: 2,
|
min: 80,
|
||||||
|
splitNumber: 3,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: '#fffc',
|
color: '#fff9',
|
||||||
align: 'right',
|
fontSize: 12
|
||||||
fontSize: 8
|
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: 10,
|
fontSize: 12,
|
||||||
color: '#fffa',
|
color: '#fffa',
|
||||||
formatter: '{value} %'
|
formatter: '{value} %'
|
||||||
},
|
},
|
||||||
@@ -95,12 +121,15 @@ export default {
|
|||||||
color: '#fff3'
|
color: '#fff3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
series: [
|
|
||||||
|
this.series = [
|
||||||
{
|
{
|
||||||
name: 'A',
|
name: 'A',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'none',
|
symbol: 'circle',
|
||||||
|
symbolSize: 1,
|
||||||
|
showSymbol: false,
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: {
|
color: {
|
||||||
type: 'linear',
|
type: 'linear',
|
||||||
@@ -121,20 +150,16 @@ export default {
|
|||||||
global: false // 缺省为 false
|
global: false // 缺省为 false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: Array(12)
|
data: Array(7)
|
||||||
.fill(0)
|
.fill(0)
|
||||||
.map(_ => {
|
.map(_ => Random.integer(93, 98))
|
||||||
let v = Math.floor(Math.random() * 100)
|
|
||||||
while (v < 80) {
|
|
||||||
v = Math.floor(Math.random() * 100)
|
|
||||||
}
|
|
||||||
return v
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'B',
|
name: 'B',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'none',
|
symbol: 'circle',
|
||||||
|
symbolSize: 1,
|
||||||
|
showSymbol: false,
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: {
|
color: {
|
||||||
type: 'linear',
|
type: 'linear',
|
||||||
@@ -155,122 +180,81 @@ export default {
|
|||||||
global: false // 缺省为 false
|
global: false // 缺省为 false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: Array(12)
|
data: Array(7)
|
||||||
.fill(0)
|
.fill(0)
|
||||||
.map(_ => {
|
.map(_ => Random.integer(93, 98))
|
||||||
let v = Math.floor(Math.random() * 100)
|
|
||||||
while (v < 80) {
|
|
||||||
v = Math.floor(Math.random() * 100)
|
|
||||||
}
|
}
|
||||||
return v
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// {
|
|
||||||
// name: '产线3',
|
|
||||||
// type: 'line',
|
|
||||||
// symbol: 'none',
|
|
||||||
// areaStyle: {
|
|
||||||
// color: {
|
|
||||||
// type: 'linear',
|
|
||||||
// x: 0,
|
|
||||||
// y: 0,
|
|
||||||
// x2: 0,
|
|
||||||
// y2: 1,
|
|
||||||
// colorStops: [
|
|
||||||
// {
|
|
||||||
// offset: 0,
|
|
||||||
// color: '#FF734566' // 0% 处的颜色
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// offset: 1,
|
|
||||||
// color: 'transparent' // 100% 处的颜色
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// global: false // 缺省为 false
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// data: Array(12)
|
|
||||||
// .fill(0)
|
|
||||||
// .map(_ => Math.floor(Math.random() * 100))
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '产线4',
|
|
||||||
// type: 'line',
|
|
||||||
// symbol: 'none',
|
|
||||||
// areaStyle: {
|
|
||||||
// color: {
|
|
||||||
// type: 'linear',
|
|
||||||
// x: 0,
|
|
||||||
// y: 0,
|
|
||||||
// x2: 0,
|
|
||||||
// y2: 1,
|
|
||||||
// colorStops: [
|
|
||||||
// {
|
|
||||||
// offset: 0,
|
|
||||||
// color: '#9452FF66' // 0% 处的颜色
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// offset: 1,
|
|
||||||
// color: 'transparent' // 100% 处的颜色
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// global: false // 缺省为 false
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// data: Array(12)
|
|
||||||
// .fill(0)
|
|
||||||
// .map(_ => Math.floor(Math.random() * 100))
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '产线5',
|
|
||||||
// type: 'line',
|
|
||||||
// symbol: 'none',
|
|
||||||
// areaStyle: {
|
|
||||||
// color: {
|
|
||||||
// type: 'linear',
|
|
||||||
// x: 0,
|
|
||||||
// y: 0,
|
|
||||||
// x2: 0,
|
|
||||||
// y2: 1,
|
|
||||||
// colorStops: [
|
|
||||||
// {
|
|
||||||
// offset: 0,
|
|
||||||
// color: '#6A6E8766' // 0% 处的颜色
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// offset: 1,
|
|
||||||
// color: 'transparent' // 100% 处的颜色
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// global: false // 缺省为 false
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// data: Array(12)
|
|
||||||
// .fill(0)
|
|
||||||
// .map(_ => Math.floor(Math.random() * 100))
|
|
||||||
// }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get option() {
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
optionFilter(option, calcSize = () => {} /** callback */) {
|
||||||
|
let newOption
|
||||||
|
if (Array.isArray(option)) {
|
||||||
|
newOption = []
|
||||||
|
option.forEach(item => {
|
||||||
|
newOption.push(this.optionFilter(item, calcSize))
|
||||||
|
})
|
||||||
|
return newOption
|
||||||
|
} else if (typeof option === 'object') {
|
||||||
|
newOption = {}
|
||||||
|
for (const key in option) {
|
||||||
|
if (key === 'colorStops') newOption[key] = option[key]
|
||||||
|
else if (
|
||||||
|
typeof option[key] === 'number' /** 过滤不做变化的属性 */ &&
|
||||||
|
['splitNumber', 'x', 'x2', 'y', 'y2', 'min', 'max', 'yAxisIndex', 'xAxisIndex'].indexOf(key) === -1
|
||||||
|
) {
|
||||||
|
newOption[key] = calcSize(option[key])
|
||||||
|
} else newOption[key] = this.optionFilter(option[key], calcSize)
|
||||||
|
}
|
||||||
|
return newOption
|
||||||
|
} else {
|
||||||
|
newOption = calcSize(option)
|
||||||
|
return option
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ProductRateLineChart',
|
||||||
|
mixins: [resize],
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chart: null,
|
||||||
|
option: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (!this.chart) this.chart = echarts.init(this.$refs['techy-line-chart'])
|
if (!this.chart) this.chart = echarts.init(this.$refs['techy-line-chart'])
|
||||||
this.chart.setOption(this.option)
|
this.setChartOption()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (this.chart) this.chart.dispose()
|
if (this.chart) this.chart.dispose()
|
||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {
|
||||||
|
calcSize(num) {
|
||||||
|
const beilv = document.documentElement.style.getPropertyValue('--beilv')
|
||||||
|
return num * beilv
|
||||||
|
},
|
||||||
|
setChartOption() {
|
||||||
|
let chartOption = new ChartOption()
|
||||||
|
this.chart.setOption(chartOption.optionFilter(chartOption.option, this.calcSize))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.techy-chart {
|
.techy-chart {
|
||||||
/* background: #cccc; */
|
/* background: #cccc; */
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -36%;
|
|
||||||
height: 150%;
|
height: 150%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,16 +26,16 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
datalist: [
|
datalist: [
|
||||||
{ name: '热端', value: 2023233, color: '#0b88ff' },
|
{ name: '热端', value: 66, color: '#0b88ff' },
|
||||||
{ name: '丝印', value: 2023233, color: '#0bffa6' },
|
{ name: '丝印', value: 93, color: '#0bffa6' },
|
||||||
{ name: '原片', value: 20, color: '#0bffa6' },
|
{ name: '原片', value: 121, color: '#0bffa6' },
|
||||||
{ name: '钢化', value: 20, color: '#e3ff0b' },
|
{ name: '钢化', value: 2, color: '#e3ff0b' },
|
||||||
{ name: '上片磨边', value: 20, color: '#e3ff0b' },
|
{ name: '上片磨边', value: 211, color: '#e3ff0b' },
|
||||||
{ name: '下片铺纸', value: 202324, color: '#950bff' },
|
{ name: '下片铺纸', value: 27, color: '#950bff' },
|
||||||
{ name: '镀膜', value: 20, color: '#950bff' },
|
{ name: '镀膜', value: 44, color: '#950bff' },
|
||||||
{ name: '物流仓储', value: 202324, color: '#ff7d0b' },
|
{ name: '物流仓储', value: 3, color: '#ff7d0b' },
|
||||||
{ name: '清洗', value: 20, color: '#0bffa6' },
|
{ name: '清洗', value: 2, color: '#0bffa6' },
|
||||||
{ name: '包装', value: 2, color: '#ff0bc2' }
|
{ name: '包装', value: 22, color: '#ff0bc2' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -47,7 +47,7 @@ export default {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.right-content-quality-analysis {
|
.right-content-quality-analysis {
|
||||||
height: calc(100% - 32px);
|
height: calc(100% - calc(32px * var(--beilv)));
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-y: auto; /** 右边会有多的padding给滑道 */
|
overflow-y: auto; /** 右边会有多的padding给滑道 */
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -55,7 +55,7 @@ export default {
|
|||||||
grid-auto-rows: min-content;
|
grid-auto-rows: min-content;
|
||||||
gap: calc(4px * var(--beilv)) calc(6px * var(--beilv));
|
gap: calc(4px * var(--beilv)) calc(6px * var(--beilv));
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
align-content: center;
|
align-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.analysis-item {
|
.analysis-item {
|
||||||
|
|||||||
@@ -1,43 +1,394 @@
|
|||||||
<template>
|
<template>
|
||||||
<techy-box style="width: 100%; height: calc(100% - 36px);">
|
<!-- <techy-bar :extra-space-between-zero="16" :datainfo="[
|
||||||
<!-- <div :id="id" ref="techy-line-chart" class="techy-chart" /> -->
|
|
||||||
|
|
||||||
<new-bar
|
|
||||||
chart-name="realtime-cost-production"
|
|
||||||
:name-list="['A', 'B', 'C', 'D', 'E', 'F']"
|
|
||||||
:data-list="[
|
|
||||||
{
|
{
|
||||||
topColor: 'rgba(59, 76, 118, 0.2)',
|
|
||||||
bottomColor: '#49FBD6',
|
|
||||||
name: '产量',
|
name: '产量',
|
||||||
data: [64, 91, 55, 65, 37, 77]
|
list: [64, 91, 55, 65, 37, 77]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
topColor: 'rgba(59, 76, 118, 0.2)',
|
|
||||||
bottomColor: '#31A2FF',
|
|
||||||
name: '能耗',
|
name: '能耗',
|
||||||
data: [32, 65, 65, 54, 37, 77]
|
list: [32, 65, 65, 54, 37, 77]
|
||||||
}
|
}
|
||||||
]"
|
]" /> -->
|
||||||
/>
|
<div class="techy-chart" ref="realtimeLineChart"></div>
|
||||||
</techy-box>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TechyBox from './TechyBox.vue'
|
import echarts from 'echarts'
|
||||||
import newBar from './newBar.vue'
|
import resize from '@/views/OperationalOverview/components/mixins/resize'
|
||||||
|
import { Random } from 'mockjs'
|
||||||
|
|
||||||
|
class ChartOption {
|
||||||
|
constructor() {
|
||||||
|
this.color = ['#1A99FF', '#F0D63C', '#E02094', '#52FFF1']
|
||||||
|
|
||||||
|
this.legend = {
|
||||||
|
top: 28,
|
||||||
|
right: 40,
|
||||||
|
itemWidth: 10,
|
||||||
|
itemHeight: 10,
|
||||||
|
textStyle: {
|
||||||
|
color: '#fff9',
|
||||||
|
fontSize: 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.grid = {
|
||||||
|
top: 80,
|
||||||
|
left: 88,
|
||||||
|
right: 24,
|
||||||
|
bottom: 32
|
||||||
|
}
|
||||||
|
|
||||||
|
this.tooltip = {
|
||||||
|
show: true,
|
||||||
|
trigger: 'axis',
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 12
|
||||||
|
},
|
||||||
|
axisPointer: {
|
||||||
|
type: 'line',
|
||||||
|
axis: 'x',
|
||||||
|
lineStyle: {
|
||||||
|
color: '#7BFFFB',
|
||||||
|
type: 'dotted'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
padding: 10,
|
||||||
|
backgroundColor: 'rgba(13, 29, 53, 0.8)',
|
||||||
|
extraCssText: 'width: calc(100px*var(--beilv)) !important;',
|
||||||
|
formatter: params => {
|
||||||
|
return `
|
||||||
|
<div style="display: flex; flex-direction: column; gap: calc(4px * var(--beilv));">
|
||||||
|
<h2 style="font-size: calc(14px * var(--beilv)); margin: 0 0 4px; font-weight: normal; color: white;">${params[0].axisValue}</h2>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.color[0]
|
||||||
|
}"></span><span>${params[0].seriesName}: ${params[0].value}</span></span>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.color[1]
|
||||||
|
}"></span><span>${params[1].seriesName}: ${params[1].value}</span></span>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.color[2]
|
||||||
|
}"></span><span>${params[2].seriesName}: ${params[2].value}</span></span>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.color[3]
|
||||||
|
}"></span><span>${params[3].seriesName}: ${params[3].value}</span></span>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let d = new Date()
|
||||||
|
this.xAxis = {
|
||||||
|
type: 'category',
|
||||||
|
data: Array(7)
|
||||||
|
.fill(1)
|
||||||
|
.map((_, idx) => {
|
||||||
|
return d.getMonth() + 1 + '-' + (d.getDate() + idx)
|
||||||
|
}),
|
||||||
|
axisTick: { show: false },
|
||||||
|
axisLabel: {
|
||||||
|
color: '#fff9',
|
||||||
|
fontSize: 12
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: '#fff3'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.yAxis = [
|
||||||
|
{
|
||||||
|
name: '能耗 ',
|
||||||
|
nameTextStyle: { align: 'right', fontSize: 10, lineHeight: 14, color: '#fff9' },
|
||||||
|
type: 'value',
|
||||||
|
splitNumber: 4,
|
||||||
|
onZero: true,
|
||||||
|
position: 'left',
|
||||||
|
offset: 40,
|
||||||
|
axisTick: { show: false },
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#5982B2',
|
||||||
|
width: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#fff9',
|
||||||
|
fontSize: 10
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#fff1',
|
||||||
|
type: 'dotted'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '产量 ',
|
||||||
|
nameTextStyle: { align: 'right', fontSize: 10, lineHeight: 14, color: '#fff9' },
|
||||||
|
type: 'value',
|
||||||
|
splitNumber: 4,
|
||||||
|
axisTick: { show: false },
|
||||||
|
onZero: true,
|
||||||
|
position: 'left',
|
||||||
|
offset: 0,
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#5982B2',
|
||||||
|
width: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#fff9',
|
||||||
|
fontSize: 10
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#fff1',
|
||||||
|
type: 'dotted'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
this.series = [
|
||||||
|
{
|
||||||
|
name: 'A能耗',
|
||||||
|
type: 'line',
|
||||||
|
yAxisIndex: 0,
|
||||||
|
// symbol: 'none',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 1,
|
||||||
|
showSymbol: false,
|
||||||
|
// smooth: true,
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
data: Array(7)
|
||||||
|
.fill(0)
|
||||||
|
.map(_ => Random.integer(30, 100)),
|
||||||
|
areaStyle: {
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
x2: 0,
|
||||||
|
y2: 1,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: '#1A99FF66' // 0% 处的颜色
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: 'transparent' // 100% 处的颜色
|
||||||
|
}
|
||||||
|
],
|
||||||
|
global: false // 缺省为 false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'A产量',
|
||||||
|
type: 'line',
|
||||||
|
yAxisIndex: 1,
|
||||||
|
// smooth: true,
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
data: Array(7)
|
||||||
|
.fill(0)
|
||||||
|
.map(_ => Random.integer(30, 100)),
|
||||||
|
// symbol: 'none',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 1,
|
||||||
|
showSymbol: false,
|
||||||
|
areaStyle: {
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
x2: 0,
|
||||||
|
y2: 1,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: '#F0D63C66' // 0% 处的颜色
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: 'transparent' // 100% 处的颜色
|
||||||
|
}
|
||||||
|
],
|
||||||
|
global: false // 缺省为 false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'B能耗',
|
||||||
|
type: 'line',
|
||||||
|
yAxisIndex: 0,
|
||||||
|
// smooth: true,
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
data: Array(7)
|
||||||
|
.fill(0)
|
||||||
|
.map(_ => Random.integer(30, 100)),
|
||||||
|
// symbol: 'none',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 1,
|
||||||
|
showSymbol: false,
|
||||||
|
areaStyle: {
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
x2: 0,
|
||||||
|
y2: 1,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: '#E0209466' // 0% 处的颜色
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: 'transparent' // 100% 处的颜色
|
||||||
|
}
|
||||||
|
],
|
||||||
|
global: false // 缺省为 false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'B产量',
|
||||||
|
type: 'line',
|
||||||
|
yAxisIndex: 1,
|
||||||
|
// smooth: true,
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
data: Array(7)
|
||||||
|
.fill(0)
|
||||||
|
.map(_ => Random.integer(30, 100)),
|
||||||
|
// symbol: 'none',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 1,
|
||||||
|
showSymbol: false,
|
||||||
|
areaStyle: {
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
x2: 0,
|
||||||
|
y2: 1,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: '#52FFF166' // 0% 处的颜色
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: 'transparent' // 100% 处的颜色
|
||||||
|
}
|
||||||
|
],
|
||||||
|
global: false // 缺省为 false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
get option() {
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
optionFilter(option, calcSize = () => {} /** callback */) {
|
||||||
|
let newOption
|
||||||
|
if (Array.isArray(option)) {
|
||||||
|
newOption = []
|
||||||
|
option.forEach(item => {
|
||||||
|
newOption.push(this.optionFilter(item, calcSize))
|
||||||
|
})
|
||||||
|
return newOption
|
||||||
|
} else if (typeof option === 'object') {
|
||||||
|
newOption = {}
|
||||||
|
for (const key in option) {
|
||||||
|
if (key === 'colorStops') newOption[key] = option[key]
|
||||||
|
else if (
|
||||||
|
typeof option[key] === 'number' /** 过滤不做变化的属性 */ &&
|
||||||
|
['splitNumber', 'x', 'x2', 'y', 'y2', 'yAxisIndex', 'xAxisIndex'].indexOf(key) === -1
|
||||||
|
) {
|
||||||
|
newOption[key] = calcSize(option[key])
|
||||||
|
} else newOption[key] = this.optionFilter(option[key], calcSize)
|
||||||
|
}
|
||||||
|
return newOption
|
||||||
|
} else {
|
||||||
|
newOption = calcSize(option)
|
||||||
|
return option
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RealtimeProductionHorizontalBarChart',
|
name: 'RealtimeLineChart',
|
||||||
components: { TechyBox, newBar },
|
mixins: [resize],
|
||||||
|
/** Fn.1: 保证全屏切换时也刷新图表 ,应该在每个父组件为flex:1的echarts组件里都加上,以确保能正确地伸缩 */
|
||||||
|
inject: ['resizeStatus'],
|
||||||
|
/** End Fn.1 */
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
chart: null,
|
||||||
|
option: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
shouldResize() {
|
||||||
|
return this.resizeStatus()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
shouldResize(val, oldVal) {
|
||||||
|
console.log('fullscreen resize')
|
||||||
|
setTimeout(() => {
|
||||||
|
this.chart.resize()
|
||||||
|
}, 250)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (!this.chart) this.chart = echarts.init(this.$refs['realtimeLineChart'])
|
||||||
|
this.setChartOption()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (this.chart) this.chart.dispose()
|
||||||
|
this.chart = null
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
calcSize(num) {
|
||||||
|
const beilv = document.documentElement.style.getPropertyValue('--beilv')
|
||||||
|
return num * beilv
|
||||||
|
},
|
||||||
|
setChartOption() {
|
||||||
|
let chartOption = new ChartOption()
|
||||||
|
this.chart.setOption(chartOption.optionFilter(chartOption.option, this.calcSize))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.techy-chart {
|
.techy-chart {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
286
src/views/3DOverview/components/TechyBar.vue
Normal file
286
src/views/3DOverview/components/TechyBar.vue
Normal file
@@ -0,0 +1,286 @@
|
|||||||
|
<template>
|
||||||
|
<div ref="techyBar" class="techy-bar"></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import echarts from 'echarts' // echarts theme
|
||||||
|
import resize from '@/views/OperationalOverview/components/mixins/resize'
|
||||||
|
import * as BottomPic from './bottom.png'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TechyBarFor3DPage',
|
||||||
|
props: {
|
||||||
|
datainfo: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [
|
||||||
|
{
|
||||||
|
name: '产线A',
|
||||||
|
list: [100, 102, 104, 105, 100, 117]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '产线B',
|
||||||
|
list: [110, 92, 124, 85, 100, 120]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
unitName: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
extraSpaceBetweenZero: {
|
||||||
|
type: Number,
|
||||||
|
default: 25
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mixins: [resize],
|
||||||
|
data() {
|
||||||
|
const color_gradients = [
|
||||||
|
/** 蓝 */
|
||||||
|
{
|
||||||
|
direction: 'to top',
|
||||||
|
from: '#49B2FF', // * 0.6 是底部颜色和顶部颜色
|
||||||
|
to: '#49B2FF00',
|
||||||
|
topAndBottom: '#49B2FF9F'
|
||||||
|
},
|
||||||
|
/** 绿 */
|
||||||
|
{
|
||||||
|
direction: 'to top',
|
||||||
|
from: '#49FBD6', // * 0.6 是底部颜色和顶部颜色
|
||||||
|
to: '#49FBD600',
|
||||||
|
topAndBottom: '#49FBD69F'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
let result = []
|
||||||
|
|
||||||
|
this.datainfo.map((pl, index) => {
|
||||||
|
let topCircle = {
|
||||||
|
__position: 'top',
|
||||||
|
name: pl.name,
|
||||||
|
barGap: '10%',
|
||||||
|
barCategoryGap: '48%',
|
||||||
|
type: 'pictorialBar',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolPosition: 'end',
|
||||||
|
symbolOffset: ['25%', '-50%'],
|
||||||
|
// symbolSize: ['100%', 6],
|
||||||
|
symbolSize: ['200%', 6],
|
||||||
|
data: pl.list,
|
||||||
|
z: 10,
|
||||||
|
itemStyle: {
|
||||||
|
// color: color_gradients[index].topAndBottom
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 0,
|
||||||
|
y: 1,
|
||||||
|
x2: 0,
|
||||||
|
y2: 0,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: color_gradients[index].topAndBottom
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: color_gradients[index].to
|
||||||
|
}
|
||||||
|
],
|
||||||
|
global: false // 缺省为 false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let bottomCircle = {
|
||||||
|
__position: 'top',
|
||||||
|
name: pl.name,
|
||||||
|
barGap: '10%',
|
||||||
|
barCategoryGap: '48%',
|
||||||
|
type: 'pictorialBar',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolOffset: ['-25%', '50%'],
|
||||||
|
symbolSize: ['200%', 6],
|
||||||
|
data: pl.list,
|
||||||
|
z: 10,
|
||||||
|
itemStyle: {
|
||||||
|
color: color_gradients[index].from
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let mainBar = {
|
||||||
|
__position: 'main',
|
||||||
|
type: 'bar',
|
||||||
|
name: pl.name,
|
||||||
|
// barWidth: 20, // 不需要设置 barWidth
|
||||||
|
barGap: '10%',
|
||||||
|
barCategoryGap: '48%',
|
||||||
|
data: pl.list,
|
||||||
|
z: 0,
|
||||||
|
itemStyle: {
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 0,
|
||||||
|
y: 1,
|
||||||
|
x2: 0,
|
||||||
|
y2: 0,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: color_gradients[index].from
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 0.15,
|
||||||
|
color: color_gradients[index].topAndBottom
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: color_gradients[index].to
|
||||||
|
}
|
||||||
|
],
|
||||||
|
global: false // 缺省为 false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top',
|
||||||
|
color: '#fff8',
|
||||||
|
fontSize: 8,
|
||||||
|
offset: [0, 6]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result.push(topCircle)
|
||||||
|
result.push(mainBar)
|
||||||
|
result.push(bottomCircle)
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
BottomPic,
|
||||||
|
width: 0,
|
||||||
|
chart: null,
|
||||||
|
option: {
|
||||||
|
legend: {
|
||||||
|
icon: 'rect',
|
||||||
|
itemWidth: 8,
|
||||||
|
itemHeight: 8,
|
||||||
|
top: '2%',
|
||||||
|
right: '10%',
|
||||||
|
textStyle: {
|
||||||
|
color: '#fff8'
|
||||||
|
},
|
||||||
|
data: this.datainfo.map(item => item.name)
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: 24,
|
||||||
|
left: '8%',
|
||||||
|
bottom: 24
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
onZero: false,
|
||||||
|
show: false,
|
||||||
|
lineStyle: {}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#fff8',
|
||||||
|
fontSize: 10
|
||||||
|
},
|
||||||
|
data: ['产线A', '产线B', '产线C', '产线D', '产线E', '产线F']
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
// min: -25,
|
||||||
|
min: this.extraSpaceBetweenZero * -1,
|
||||||
|
name: this.unitName,
|
||||||
|
nameTextStyle: {
|
||||||
|
color: '#fff8',
|
||||||
|
fontSize: 8,
|
||||||
|
verticalAlign: 'top',
|
||||||
|
align: 'right'
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#31A2FF'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#fff8',
|
||||||
|
fontSize: 10,
|
||||||
|
/** y轴不从0开始,也可以用 xAxis 向下 offset 的方式模拟 **/
|
||||||
|
formatter: function(value, index) {
|
||||||
|
if (value < 0) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisTick: { show: false },
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: '#569acd',
|
||||||
|
type: 'dotted',
|
||||||
|
opacity: 0.2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
series: result,
|
||||||
|
|
||||||
|
graphic: [
|
||||||
|
{
|
||||||
|
type: 'image',
|
||||||
|
left: 0,
|
||||||
|
bottom: 0,
|
||||||
|
style: {
|
||||||
|
image: 'image url',
|
||||||
|
height: 0,
|
||||||
|
width: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
window.addEventListener('resize', this.refreshOption)
|
||||||
|
if (!this.chart) this.chart = echarts.init(this.$refs.techyBar)
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.updateOption(this.option)
|
||||||
|
this.chart.setOption(this.option)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
updateOption(option) {
|
||||||
|
// console.log('option', this.BottomPic.default)
|
||||||
|
let width = this.$refs.techyBar.querySelector('div').clientWidth
|
||||||
|
let height = this.$refs.techyBar.querySelector('div').clientHeight
|
||||||
|
option.graphic[0].style.width = width * 0.88
|
||||||
|
option.graphic[0].style.height = height * 0.3
|
||||||
|
option.graphic[0].style.image = this.BottomPic.default
|
||||||
|
option.graphic[0].left = '8%'
|
||||||
|
option.graphic[0].bottom = 24
|
||||||
|
},
|
||||||
|
refreshOption() {
|
||||||
|
this.updateOption(this.option)
|
||||||
|
this.chart.setOption(this.option)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.techy-bar {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.techy-bar >>> div {
|
||||||
|
width: 100% !important;
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -78,7 +78,7 @@ export default {
|
|||||||
border-image: linear-gradient(90deg, rgba(82, 255, 241, 0.6), rgba(95, 190, 249, 0), rgba(82, 255, 241, 0.6)) 2 2;
|
border-image: linear-gradient(90deg, rgba(82, 255, 241, 0.6), rgba(95, 190, 249, 0), rgba(82, 255, 241, 0.6)) 2 2;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: calc(24px * var(--beilv));
|
padding: calc(20px * var(--beilv));
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-shadow: inset 0px 0px 20px 0px rgba(255, 255, 255, 0.15);
|
box-shadow: inset 0px 0px 20px 0px rgba(255, 255, 255, 0.15);
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="techy-fake-table">
|
|
||||||
<div class="table-inner">
|
|
||||||
<section class="table-header" />
|
|
||||||
<section class="table-body" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: '',
|
|
||||||
props: {
|
|
||||||
tableProps: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
},
|
|
||||||
tableData: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
headMap: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
mounted() {
|
|
||||||
this.renderHeadRow().then(() => {
|
|
||||||
this.renderCommonRow()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
renderHeadRow() {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
// do something...
|
|
||||||
})
|
|
||||||
},
|
|
||||||
renderCommonRow() {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
// do something...
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.techy-fake-table {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 100px;
|
|
||||||
background: #3333;
|
|
||||||
overflow: hidden;
|
|
||||||
overflow-x: scroll;
|
|
||||||
}
|
|
||||||
.table-inner {
|
|
||||||
max-width: 10000px;
|
|
||||||
color: white;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
<img class="logo-img" src="./logo.png" alt="cnbm" />
|
<img class="logo-img" src="./logo.png" alt="cnbm" />
|
||||||
<span class="techy-header__title">{{ headTitle }}</span>
|
<span class="techy-header__title">{{ headTitle }}</span>
|
||||||
|
|
||||||
<div class="date">2022.10.14</div>
|
<div class="date">{{ now.format('yyyy.MM.DD') }}</div>
|
||||||
<div class="time">20:12:24</div>
|
<div class="time">{{ now.format('HH:mm:ss') }}</div>
|
||||||
|
|
||||||
<div class="fullscreen-btn">
|
<div class="fullscreen-btn">
|
||||||
<span @click="handleClick('home')" v-html="homeSvg" />
|
<span @click="handleClick('home')" v-html="homeSvg" />
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Cookie from 'js-cookie'
|
import Cookie from 'js-cookie'
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
// const homeSvg = `<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
// const homeSvg = `<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
const homeSvg = `<svg style="width: 100%; height: 100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
const homeSvg = `<svg style="width: 100%; height: 100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
@@ -63,7 +64,20 @@ export default {
|
|||||||
fullScreenSvg,
|
fullScreenSvg,
|
||||||
homeSvg,
|
homeSvg,
|
||||||
unfullScreenSvg,
|
unfullScreenSvg,
|
||||||
isFullScreen: false
|
isFullScreen: false,
|
||||||
|
now: moment(),
|
||||||
|
interval: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.interval = setInterval(() => {
|
||||||
|
this.now = moment()
|
||||||
|
}, 1000)
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (this.interval) {
|
||||||
|
clearInterval(this.interval)
|
||||||
|
this.interval = null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
BIN
src/views/3DOverview/components/assets/blue.png
Normal file
BIN
src/views/3DOverview/components/assets/blue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/views/3DOverview/components/assets/green.png
Normal file
BIN
src/views/3DOverview/components/assets/green.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
BIN
src/views/3DOverview/components/assets/orange.png
Normal file
BIN
src/views/3DOverview/components/assets/orange.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/views/3DOverview/components/assets/red.png
Normal file
BIN
src/views/3DOverview/components/assets/red.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/views/3DOverview/components/bottom.png
Normal file
BIN
src/views/3DOverview/components/bottom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="v3d-outter" ref="v3d-outter">
|
<div id="v3d-outter" ref="v3d-outter">
|
||||||
<div id="V3DData" style="position: fixed; top: 0; left: 0; display: hidden;" rel=""></div>
|
<div id="V3DData" style="position: fixed; top: 0; left: 0; display: hidden;" rel="" />
|
||||||
<V3DApp @3d-loaded="handle3DLoaded" @click.native="handle3DClick" />
|
<V3DApp @3d-loaded="handle3DLoaded" @click.native="handle3DClick" />
|
||||||
<div v-if="showPage" id="v3d-main-content">
|
<div v-if="showPage" id="v3d-main-content">
|
||||||
<!-- <div v-if="true" id="v3d-main-content"> -->
|
<!-- <div v-if="true" id="v3d-main-content"> -->
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</techy-container>
|
</techy-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="techy-body-part__middle" v-if="currentEquipment">
|
<div v-if="currentEquipment" class="techy-body-part__middle">
|
||||||
<TechyBox>
|
<TechyBox>
|
||||||
<div class="techy-body-part__middle__inner">
|
<div class="techy-body-part__middle__inner">
|
||||||
<p>
|
<p>
|
||||||
@@ -37,13 +37,15 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>通信状态 :</b>
|
<b>通信状态 :</b>
|
||||||
|
<span class="round-dot">
|
||||||
<span
|
<span
|
||||||
class="round-dot"
|
class="dot-icon"
|
||||||
:class="{
|
:class="{
|
||||||
'danger-dot': currentEquipment.status === '故障',
|
'green-dot': currentEquipment.status === '生产中',
|
||||||
'warning-dot': currentEquipment.status === '调试中'
|
'red-dot': currentEquipment.status === '故障',
|
||||||
|
'yellow-dot': currentEquipment.status === '调试中'
|
||||||
}"
|
}"
|
||||||
>
|
/>
|
||||||
{{ currentEquipment.status }}
|
{{ currentEquipment.status }}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -202,6 +204,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#v3d-outter *::-webkit-scrollbar-button {
|
#v3d-outter *::-webkit-scrollbar-button {
|
||||||
|
display: none;
|
||||||
width: calc(8px * var(--beilv));
|
width: calc(8px * var(--beilv));
|
||||||
height: calc(8px * var(--beilv));
|
height: calc(8px * var(--beilv));
|
||||||
background: #5bc4bf9f;
|
background: #5bc4bf9f;
|
||||||
@@ -255,16 +258,19 @@ export default {
|
|||||||
|
|
||||||
/* 实时产量和能耗 */
|
/* 实时产量和能耗 */
|
||||||
.realtime {
|
.realtime {
|
||||||
height: calc(256px * var(--beilv));
|
height: calc(240px * var(--beilv));
|
||||||
}
|
}
|
||||||
/* 工序质量分析 */
|
/* 工序质量分析 */
|
||||||
.ws-quality {
|
.ws-quality {
|
||||||
height: calc(228px * var(--beilv));
|
/* height: calc(228px * var(--beilv)); */
|
||||||
|
min-height: calc(136px * var(--beilv));
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
/* 产线成品率 */
|
/* 产线成品率 */
|
||||||
.production {
|
.production {
|
||||||
height: calc(195px * var(--beilv));
|
height: calc(200px * var(--beilv));
|
||||||
|
flex: 1 0;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-part {
|
.bottom-part {
|
||||||
@@ -280,19 +286,11 @@ export default {
|
|||||||
width: calc(472px * var(--beilv));
|
width: calc(472px * var(--beilv));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 现场实时监控 */
|
|
||||||
.ft-monitor {
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 缺陷分类分析 */
|
/* 缺陷分类分析 */
|
||||||
.fault-analysis {
|
.fault-analysis {
|
||||||
width: calc(290px * var(--beilv));
|
width: calc(290px * var(--beilv));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 设备报警提示 */
|
|
||||||
.eq-alert {
|
|
||||||
}
|
|
||||||
|
|
||||||
.techy-body-part__left,
|
.techy-body-part__left,
|
||||||
.techy-body-part__right {
|
.techy-body-part__right {
|
||||||
/* height: 100%; */
|
/* height: 100%; */
|
||||||
@@ -328,8 +326,8 @@ export default {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
height: calc(136px * var(--beilv));
|
height: calc(128px * var(--beilv));
|
||||||
width: calc(176px * var(--beilv));
|
width: calc(188px * var(--beilv));
|
||||||
}
|
}
|
||||||
|
|
||||||
.techy-body-part__middle__inner {
|
.techy-body-part__middle__inner {
|
||||||
@@ -338,6 +336,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
/* gap: calc(6px * var(--beilv)); */
|
||||||
}
|
}
|
||||||
|
|
||||||
.techy-body-part__middle__inner p {
|
.techy-body-part__middle__inner p {
|
||||||
@@ -346,6 +345,7 @@ export default {
|
|||||||
font-size: calc(12px * var(--beilv));
|
font-size: calc(12px * var(--beilv));
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.techy-body-part__middle__inner p > span {
|
.techy-body-part__middle__inner p > span {
|
||||||
@@ -354,19 +354,40 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.techy-body-part__middle__inner p > span.round-dot {
|
.techy-body-part__middle__inner p > span.round-dot {
|
||||||
padding-left: calc(28px * var(--beilv));
|
/* padding-left: calc(28px * var(--beilv)); */
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: calc(4px * var(--beilv));
|
||||||
}
|
}
|
||||||
|
|
||||||
.round-dot::before {
|
.dot-icon {
|
||||||
content: '';
|
height: calc(16px * var(--beilv));
|
||||||
position: absolute;
|
width: calc(16px * var(--beilv));
|
||||||
|
}
|
||||||
|
|
||||||
|
.red-dot {
|
||||||
|
background: url(./components/assets/red.png) 20% center / 100% no-repeat;
|
||||||
|
}
|
||||||
|
.green-dot {
|
||||||
|
background: url(./components/assets/green.png) 20% center / 100% no-repeat;
|
||||||
|
}
|
||||||
|
.yellow-dot {
|
||||||
|
background: url(./components/assets/orange.png) 20% center / 100% no-repeat;
|
||||||
|
}
|
||||||
|
.blue-dot {
|
||||||
|
background: url(./components/assets/blue.png) 20% center / 100% no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .round-dot::before {
|
||||||
|
content: ''; */
|
||||||
|
/* position: absolute;
|
||||||
top: calc(4px * var(--beilv));
|
top: calc(4px * var(--beilv));
|
||||||
left: calc(16px * var(--beilv));
|
left: calc(16px * var(--beilv)); */
|
||||||
width: calc(8px * var(--beilv));
|
/* width: calc(8px * var(--beilv));
|
||||||
height: calc(8px * var(--beilv));
|
height: calc(8px * var(--beilv));
|
||||||
background-color: rgb(82, 231, 82);
|
background-color: rgb(82, 231, 82);
|
||||||
border-radius: calc(4px * var(--beilv));
|
border-radius: calc(4px * var(--beilv));
|
||||||
}
|
} */
|
||||||
|
|
||||||
.danger-dot::before {
|
.danger-dot::before {
|
||||||
background-color: #e71837;
|
background-color: #e71837;
|
||||||
|
|||||||
@@ -1,73 +1,66 @@
|
|||||||
export default [
|
export default [
|
||||||
{ id: 'C1-0', pl: 'A', name: '上片', amount: 32, status: '生产中' },
|
{ id: 'C1-0', pl: 'A1', name: 'A1上片', amount: 32, status: '生产中' },
|
||||||
{ id: 'C1-1', pl: 'A', name: '磨边', amount: 32, status: '生产中' },
|
{ id: 'C1-1', pl: 'A1', name: 'A1磨边', amount: 32, status: '生产中' },
|
||||||
{ id: 'C1-2', pl: 'A', name: '磨边', amount: 32, status: '调试中' },
|
{ id: 'C1-2', pl: 'A1', name: 'A1磨边后清洗', amount: 32, status: '调试中' },
|
||||||
{ id: 'C1-3', pl: 'A', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C1-3', pl: 'A1', name: 'A1打孔', amount: 32, status: '生产中' },
|
||||||
{ id: 'C1-4', pl: 'A', name: '打孔', amount: 32, status: '生产中' },
|
{ id: 'C1-4', pl: 'A1', name: 'A1打孔后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C1-5', pl: 'A', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C1-5', pl: 'A1', name: 'A1丝印', amount: 32, status: '生产中' },
|
||||||
{ id: 'C1-6', pl: 'A', name: '丝印', amount: 32, status: '生产中' },
|
{ id: 'C1-6', pl: 'A1', name: 'A1固化', amount: 32, status: '生产中' },
|
||||||
{ id: 'C1-7', pl: 'A', name: '固化', amount: 32, status: '生产中' },
|
{ id: 'C1-7', pl: 'A1', name: 'A1储片', amount: 32, status: '生产中' },
|
||||||
{ id: 'C1-8', pl: 'A', name: '储片', amount: 32, status: '生产中' },
|
{ id: 'C1-8', pl: 'A1', name: 'A钢化', amount: 32, status: '生产中' },
|
||||||
{ id: 'C1-9', pl: 'A', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C1-9', pl: 'A1', name: 'A1钢化后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C1-10', pl: 'A', name: '下片', amount: 32, status: '生产中' },
|
{ id: 'C1-10', pl: 'A1', name: 'A1下片', amount: 32, status: '生产中' },
|
||||||
|
|
||||||
{ id: 'C2-0', pl: 'B', name: '上片', amount: 32, status: '调试中' },
|
{ id: 'C2-0', pl: 'A2', name: 'A2上片', amount: 32, status: '调试中' },
|
||||||
{ id: 'C2-1', pl: 'B', name: '磨边', amount: 32, status: '生产中' },
|
{ id: 'C2-1', pl: 'A2', name: 'A2磨边', amount: 32, status: '生产中' },
|
||||||
{ id: 'C2-2', pl: 'B', name: '磨边', amount: 32, status: '调试中' },
|
{ id: 'C2-2', pl: 'A2', name: 'A2磨边后清洗', amount: 32, status: '调试中' },
|
||||||
{ id: 'C2-3', pl: 'B', name: '清洗', amount: 32, status: '调试中' },
|
{ id: 'C2-3', pl: 'A2', name: 'A2打孔', amount: 32, status: '调试中' },
|
||||||
{ id: 'C2-4', pl: 'B', name: '打孔', amount: 32, status: '调试中' },
|
{ id: 'C2-4', pl: 'A2', name: 'A2打孔后清洗', amount: 32, status: '调试中' },
|
||||||
{ id: 'C2-5', pl: 'B', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C2-5', pl: 'A2', name: 'A2丝印', amount: 32, status: '生产中' },
|
||||||
{ id: 'C2-6', pl: 'B', name: '丝印', amount: 32, status: '生产中' },
|
{ id: 'C2-6', pl: 'A2', name: 'A2固化', amount: 32, status: '生产中' },
|
||||||
{ id: 'C2-7', pl: 'B', name: '固化', amount: 32, status: '生产中' },
|
{ id: 'C2-7', pl: 'A2', name: 'A2储片', amount: 32, status: '生产中' },
|
||||||
{ id: 'C2-8', pl: 'B', name: '储片', amount: 32, status: '生产中' },
|
{ id: 'C2-8', pl: 'A2', name: 'A2钢化后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C2-9', pl: 'B', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C2-9', pl: 'A2', name: 'A2下片', amount: 32, status: '生产中' },
|
||||||
{ id: 'C2-10', pl: 'B', name: '下片', amount: 32, status: '生产中' },
|
|
||||||
|
|
||||||
{ id: 'C3-0', pl: 'C', name: '上片', amount: 32, status: '生产中' },
|
{ id: 'C3-0', pl: 'A3', name: 'A3上片', amount: 32, status: '生产中' },
|
||||||
{ id: 'C3-1', pl: 'C', name: '磨边', amount: 32, status: '生产中' },
|
{ id: 'C3-1', pl: 'A3', name: 'A3磨边', amount: 32, status: '生产中' },
|
||||||
{ id: 'C3-2', pl: 'C', name: '磨边', amount: 32, status: '生产中' },
|
{ id: 'C3-2', pl: 'A3', name: 'A3磨边后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C3-3', pl: 'C', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C3-3', pl: 'A3', name: 'A3打孔', amount: 32, status: '生产中' },
|
||||||
{ id: 'C3-4', pl: 'C', name: '打孔', amount: 32, status: '生产中' },
|
{ id: 'C3-4', pl: 'A3', name: 'A3打孔后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C3-5', pl: 'C', name: '清洗', amount: 32, status: '故障' },
|
{ id: 'C3-5', pl: 'A3', name: 'A3丝印', amount: 32, status: '故障' },
|
||||||
{ id: 'C3-6', pl: 'C', name: '丝印', amount: 32, status: '生产中' },
|
{ id: 'C3-6', pl: 'A3', name: 'A3固化', amount: 32, status: '生产中' },
|
||||||
{ id: 'C3-7', pl: 'C', name: '固化', amount: 32, status: '生产中' },
|
{ id: 'C3-7', pl: 'A3', name: 'A3储片', amount: 32, status: '生产中' },
|
||||||
{ id: 'C3-8', pl: 'C', name: '储片', amount: 32, status: '生产中' },
|
{ id: 'C3-8', pl: 'A3', name: 'A3钢化后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C3-9', pl: 'C', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C3-9', pl: 'A3', name: 'A3下片', amount: 32, status: '生产中' },
|
||||||
{ id: 'C3-10', pl: 'C', name: '下片', amount: 32, status: '生产中' },
|
|
||||||
|
|
||||||
{ id: 'C4-0', pl: 'D', name: '上片', amount: 32, status: '故障' },
|
{ id: 'C4-0', pl: 'B1', name: 'B1上片', amount: 32, status: '故障' },
|
||||||
{ id: 'C4-1', pl: 'D', name: '磨边', amount: 32, status: '生产中' },
|
{ id: 'C4-1', pl: 'B1', name: 'B1磨边', amount: 32, status: '生产中' },
|
||||||
{ id: 'C4-2', pl: 'D', name: '磨边', amount: 32, status: '生产中' },
|
{ id: 'C4-2', pl: 'B1', name: 'B1磨边后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C4-3', pl: 'D', name: '清洗', amount: 32, status: '故障' },
|
{ id: 'C4-3', pl: 'B1', name: 'B1打孔', amount: 32, status: '故障' },
|
||||||
{ id: 'C4-4', pl: 'D', name: '打孔', amount: 32, status: '故障' },
|
{ id: 'C4-4', pl: 'B1', name: 'B1打孔后清洗', amount: 32, status: '故障' },
|
||||||
{ id: 'C4-5', pl: 'D', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C4-5', pl: 'B1', name: 'B1丝印', amount: 32, status: '生产中' },
|
||||||
{ id: 'C4-6', pl: 'D', name: '丝印', amount: 32, status: '生产中' },
|
{ id: 'C4-6', pl: 'B1', name: 'B1固化', amount: 32, status: '生产中' },
|
||||||
{ id: 'C4-7', pl: 'D', name: '固化', amount: 32, status: '生产中' },
|
{ id: 'C4-7', pl: 'B1', name: 'B1储片', amount: 32, status: '生产中' },
|
||||||
{ id: 'C4-8', pl: 'D', name: '储片', amount: 32, status: '生产中' },
|
{ id: 'C4-8', pl: 'B1', name: 'B钢化', amount: 32, status: '生产中' },
|
||||||
{ id: 'C4-9', pl: 'D', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C4-9', pl: 'B1', name: 'B1钢化后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C4-10', pl: 'D', name: '下片', amount: 32, status: '生产中' },
|
{ id: 'C4-10', pl: 'B1', name: 'B下片', amount: 32, status: '生产中' },
|
||||||
|
|
||||||
{ id: 'C5-0', pl: 'E', name: '上片', amount: 32, status: '生产中' },
|
{ id: 'C5-0', pl: 'B2', name: 'B2上片', amount: 32, status: '生产中' },
|
||||||
{ id: 'C5-1', pl: 'E', name: '磨边', amount: 32, status: '生产中' },
|
{ id: 'C5-1', pl: 'B2', name: 'B2磨边', amount: 32, status: '生产中' },
|
||||||
{ id: 'C5-2', pl: 'E', name: '磨边', amount: 32, status: '生产中' },
|
{ id: 'C5-2', pl: 'B2', name: 'B2磨边后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C5-3', pl: 'E', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C5-3', pl: 'B2', name: 'B2打孔', amount: 32, status: '生产中' },
|
||||||
{ id: 'C5-4', pl: 'E', name: '打孔', amount: 32, status: '生产中' },
|
{ id: 'C5-4', pl: 'B2', name: 'B2打孔后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C5-5', pl: 'E', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C5-5', pl: 'B2', name: 'B2丝印', amount: 32, status: '生产中' },
|
||||||
{ id: 'C5-6', pl: 'E', name: '丝印', amount: 32, status: '生产中' },
|
{ id: 'C5-6', pl: 'B2', name: 'B2固化', amount: 32, status: '生产中' },
|
||||||
{ id: 'C5-7', pl: 'E', name: '固化', amount: 32, status: '生产中' },
|
{ id: 'C5-7', pl: 'B2', name: 'B2储片', amount: 32, status: '生产中' },
|
||||||
{ id: 'C5-8', pl: 'E', name: '储片', amount: 32, status: '生产中' },
|
{ id: 'C5-8', pl: 'B2', name: 'B2钢化后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C5-9', pl: 'E', name: '清洗', amount: 32, status: '生产中' },
|
|
||||||
// { id: 'C5-10', pl: 'E', name: '下片', amount: 32, status: '生产中' },
|
|
||||||
|
|
||||||
{ id: 'C6-0', pl: 'F', name: '上片', amount: 32, status: '生产中' },
|
{ id: 'C6-0', pl: 'B3', name: 'B3上片', amount: 32, status: '生产中' },
|
||||||
{ id: 'C6-1', pl: 'F', name: '磨边', amount: 32, status: '生产中' },
|
{ id: 'C6-1', pl: 'B3', name: 'B3磨边', amount: 32, status: '生产中' },
|
||||||
{ id: 'C6-2', pl: 'F', name: '磨边', amount: 32, status: '生产中' },
|
{ id: 'C6-2', pl: 'B3', name: 'B3磨边后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C6-3', pl: 'F', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C6-3', pl: 'B3', name: 'B3打孔', amount: 32, status: '生产中' },
|
||||||
{ id: 'C6-4', pl: 'F', name: '打孔', amount: 32, status: '生产中' },
|
{ id: 'C6-4', pl: 'B3', name: 'B3打孔后清洗', amount: 32, status: '生产中' },
|
||||||
{ id: 'C6-5', pl: 'F', name: '清洗', amount: 32, status: '生产中' },
|
{ id: 'C6-5', pl: 'B3', name: 'B3丝印', amount: 32, status: '生产中' },
|
||||||
{ id: 'C6-6', pl: 'F', name: '丝印', amount: 32, status: '生产中' },
|
{ id: 'C6-6', pl: 'B3', name: 'B3固化', amount: 32, status: '生产中' },
|
||||||
{ id: 'C6-7', pl: 'F', name: '固化', amount: 32, status: '故障' },
|
{ id: 'C6-7', pl: 'B3', name: 'B3储片', amount: 32, status: '故障' },
|
||||||
{ id: 'C6-8', pl: 'F', name: '储片', amount: 32, status: '故障' },
|
|
||||||
// { id: 'C6-9', pl: 'F', name: '清洗', amount: 32, status: '生产中' },
|
|
||||||
// { id: 'C6-10', pl: 'F', name: '下片', amount: 32, status: '生产中' },
|
|
||||||
]
|
]
|
||||||
@@ -37,11 +37,27 @@
|
|||||||
<div class="row-2">
|
<div class="row-2">
|
||||||
<!-- 设备分析 -->
|
<!-- 设备分析 -->
|
||||||
<techy-container :title="'设备分析'" icon="趋势搜索">
|
<techy-container :title="'设备分析'" icon="趋势搜索">
|
||||||
<select id="productLine" name="productLine" class="product-line-selection">
|
<!-- <select id="productLine" name="productLine" class="product-line-selection">
|
||||||
<option value="1">产线一</option>
|
<option value="1">产线一</option>
|
||||||
<option value="2">产线二</option>
|
<option value="2">产线二</option>
|
||||||
<option value="3">产线三</option>
|
<option value="3">产线三</option>
|
||||||
</select>
|
</select> -->
|
||||||
|
|
||||||
|
<template v-slot:titleSelect>
|
||||||
|
<el-select
|
||||||
|
v-model="plSelect"
|
||||||
|
size="mini"
|
||||||
|
:popper-append-to-body="false"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择产线"
|
||||||
|
class="pl-select"
|
||||||
|
style="width: 140px; height: 100%; margin-left: 12px;"
|
||||||
|
>
|
||||||
|
<el-option label="产线A" value="1" />
|
||||||
|
<el-option label="产线B" value="2" />
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
|
||||||
<div class="equipment-analysis__inner">
|
<div class="equipment-analysis__inner">
|
||||||
<div>
|
<div>
|
||||||
<TechyBox class="pl-jdl">
|
<TechyBox class="pl-jdl">
|
||||||
@@ -169,6 +185,7 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
plSelect: null,
|
||||||
equipmentExceptionProps,
|
equipmentExceptionProps,
|
||||||
equipmentExceptionDatalist,
|
equipmentExceptionDatalist,
|
||||||
equipmentAlarmProps,
|
equipmentAlarmProps,
|
||||||
@@ -209,23 +226,22 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
::-webkit-scrollbar {
|
.visual-container >>> ::-webkit-scrollbar {
|
||||||
width: calc(8px * var(--beilv));
|
width: calc(8px * var(--beilv));
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-track {
|
.visual-container >>> ::-webkit-scrollbar-track {
|
||||||
background-color: #14243f;
|
background-color: #14243f;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-button {
|
.visual-container >>> ::-webkit-scrollbar-button {
|
||||||
width: calc(8px * var(--beilv));
|
display: none;
|
||||||
height: calc(8px * var(--beilv));
|
|
||||||
background: #5bc4bf9f;
|
background: #5bc4bf9f;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb {
|
.visual-container >>> ::-webkit-scrollbar-thumb {
|
||||||
border-radius: calc(8px * var(--beilv));
|
border-radius: calc(8px * var(--beilv));
|
||||||
background: #5bc4bf9f;
|
background: #5bc4bf9f;
|
||||||
}
|
}
|
||||||
@@ -376,4 +392,12 @@ export default {
|
|||||||
top: calc(24px * var(--beilv));
|
top: calc(24px * var(--beilv));
|
||||||
left: calc(140px * var(--beilv));
|
left: calc(140px * var(--beilv));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pl-select >>> input {
|
||||||
|
/* height: 100%; */
|
||||||
|
outline: none;
|
||||||
|
border: none;
|
||||||
|
background: #31878c45;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
<div class="container-title-wrapper">
|
<div class="container-title-wrapper">
|
||||||
<span class="container-icon" v-html="computeIcon" />
|
<span class="container-icon" v-html="computeIcon" />
|
||||||
<span class="container-title">{{ title }}</span>
|
<span class="container-title">{{ title }}</span>
|
||||||
|
|
||||||
|
<slot name="titleSelect" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
:inject-data="{ ...scope.row, ...item }"
|
:inject-data="{ ...scope.row, ...item }"
|
||||||
@emitData="emitData"
|
@emitData="emitData"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ scope.row[item.prop] | commonFilter(item.filter) }}</span>
|
<span v-else :title="scope.row[item.prop]">{{ scope.row[item.prop] | commonFilter(item.filter) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<slot name="content" />
|
<slot name="content" />
|
||||||
@@ -126,8 +126,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.visual-base-table-container >>> ::-webkit-scrollbar-button {
|
.visual-base-table-container >>> ::-webkit-scrollbar-button {
|
||||||
width: calc(8px * var(--beilv));
|
display: none;
|
||||||
height: calc(8px * var(--beilv));
|
/* width: calc(8px * var(--beilv));
|
||||||
|
height: calc(8px * var(--beilv)); */
|
||||||
background: #5bc4bf9f;
|
background: #5bc4bf9f;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="techy-vertical-table">
|
<div class="techy-vertical-table">
|
||||||
<div v-for="(row, index) in tableProps" :key="'row' + index" class="trow">
|
<div v-for="(row, index) in tableProps" :key="'row' + index" class="trow">
|
||||||
<span class="thead">{{ row.label }}</span>
|
<span class="thead">{{ row.label }}</span>
|
||||||
<span v-for="(item, idx) in dataList" :key="'item_' + index + idx" class="tbody">
|
<span v-for="(item, idx) in dataList" :key="'item_' + index + idx" class="tbody" :title="item[row.prop]">
|
||||||
<template v-if="!row.subcomponent">
|
<template v-if="!row.subcomponent">
|
||||||
{{ item[row.prop] }}
|
{{ item[row.prop] }}
|
||||||
</template>
|
</template>
|
||||||
@@ -45,6 +45,28 @@ export default {
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.techy-vertical-table >>> ::-webkit-scrollbar {
|
||||||
|
width: calc(8px * var(--beilv));
|
||||||
|
}
|
||||||
|
|
||||||
|
.techy-vertical-table >>> ::-webkit-scrollbar-track {
|
||||||
|
background-color: #14243f;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.techy-vertical-table >>> ::-webkit-scrollbar-button {
|
||||||
|
display: none;
|
||||||
|
/* width: calc(8px * var(--beilv));
|
||||||
|
height: calc(8px * var(--beilv)); */
|
||||||
|
background: #5bc4bf9f;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.techy-vertical-table >>> ::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: calc(8px * var(--beilv));
|
||||||
|
background: #5bc4bf9f;
|
||||||
|
}
|
||||||
|
|
||||||
.trow {
|
.trow {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|||||||
@@ -25,10 +25,14 @@ export default {
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
xAxis: [
|
tooltip: {
|
||||||
{
|
show: true,
|
||||||
|
type: 'shadow',
|
||||||
|
trigger: 'item'
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['A', 'B', 'C', 'D', 'E'],
|
data: ['A', 'B' ],
|
||||||
axisTick: {
|
axisTick: {
|
||||||
alignWithLabel: true
|
alignWithLabel: true
|
||||||
},
|
},
|
||||||
@@ -40,8 +44,7 @@ export default {
|
|||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#fff'
|
color: '#fff'
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
],
|
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
@@ -58,7 +61,7 @@ export default {
|
|||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#ffffff9d'
|
color: '#ffffff9d'
|
||||||
},
|
},
|
||||||
axisTick: { show : false }
|
axisTick: { show: false }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
@@ -113,75 +116,75 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
value: 200,
|
// value: 200,
|
||||||
itemStyle: {
|
// itemStyle: {
|
||||||
color: {
|
// color: {
|
||||||
type: 'linear',
|
// type: 'linear',
|
||||||
x: 0,
|
// x: 0,
|
||||||
y: 0,
|
// y: 0,
|
||||||
x2: 0,
|
// x2: 0,
|
||||||
y2: 1,
|
// y2: 1,
|
||||||
colorStops: [
|
// colorStops: [
|
||||||
{
|
// {
|
||||||
offset: 0,
|
// offset: 0,
|
||||||
color: '#85F6E9'
|
// color: '#85F6E9'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
offset: 1,
|
// offset: 1,
|
||||||
color: '#2EC6B4'
|
// color: '#2EC6B4'
|
||||||
}
|
// }
|
||||||
],
|
// ],
|
||||||
global: false
|
// global: false
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 320,
|
// value: 320,
|
||||||
itemStyle: {
|
// itemStyle: {
|
||||||
color: {
|
// color: {
|
||||||
type: 'linear',
|
// type: 'linear',
|
||||||
x: 0,
|
// x: 0,
|
||||||
y: 0,
|
// y: 0,
|
||||||
x2: 0,
|
// x2: 0,
|
||||||
y2: 1,
|
// y2: 1,
|
||||||
colorStops: [
|
// colorStops: [
|
||||||
{
|
// {
|
||||||
offset: 0,
|
// offset: 0,
|
||||||
color: '#C79DFF'
|
// color: '#C79DFF'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
offset: 1,
|
// offset: 1,
|
||||||
color: '#A490FF'
|
// color: '#A490FF'
|
||||||
}
|
// }
|
||||||
],
|
// ],
|
||||||
global: false
|
// global: false
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 95,
|
// value: 95,
|
||||||
itemStyle: {
|
// itemStyle: {
|
||||||
color: {
|
// color: {
|
||||||
type: 'linear',
|
// type: 'linear',
|
||||||
x: 0,
|
// x: 0,
|
||||||
y: 0,
|
// y: 0,
|
||||||
x2: 0,
|
// x2: 0,
|
||||||
y2: 1,
|
// y2: 1,
|
||||||
colorStops: [
|
// colorStops: [
|
||||||
{
|
// {
|
||||||
offset: 0,
|
// offset: 0,
|
||||||
color: '#FFE873'
|
// color: '#FFE873'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
offset: 1,
|
// offset: 1,
|
||||||
color: '#E7AE2A'
|
// color: '#E7AE2A'
|
||||||
}
|
// }
|
||||||
],
|
// ],
|
||||||
global: false
|
// global: false
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -185,7 +185,10 @@ export default {
|
|||||||
|
|
||||||
list({ ...this.listQuery, pdlId, name }).then(response => {
|
list({ ...this.listQuery, pdlId, name }).then(response => {
|
||||||
if (response.data.records) {
|
if (response.data.records) {
|
||||||
this.dataList = response.data.records
|
// this.dataList = response.data.records
|
||||||
|
// 11-mes 修改模拟数据
|
||||||
|
this.dataList = response.data.records.map(item => ({...item, error: '无故障'}))
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.dataList.splice(0)
|
this.dataList.splice(0)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- right -->
|
<!-- right -->
|
||||||
<div class="right-container">
|
<div class="right-container">
|
||||||
<top-title :base-title="this.$t('module.equipmentManager.inspectionManage.inspectionItem')" style="font-size: 14px; padding-bottom: 14px;" />
|
<top-title
|
||||||
|
:base-title="this.$t('module.equipmentManager.inspectionManage.inspectionItem')"
|
||||||
|
style="font-size: 14px; padding-bottom: 14px;"
|
||||||
|
/>
|
||||||
<base-table
|
<base-table
|
||||||
:page="1"
|
:page="1"
|
||||||
:limit="999"
|
:limit="999"
|
||||||
@@ -64,13 +67,22 @@ import BaseTable from '@/components/BaseTable'
|
|||||||
import Pagination from '@/components/Pagination'
|
import Pagination from '@/components/Pagination'
|
||||||
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
||||||
import { tableHeight } from '@/utils/index'
|
import { tableHeight } from '@/utils/index'
|
||||||
import { equipmentList, inspectionLog, einspectionLogD, einspectionItList, einspectionItemLogU } from '@/api/equipment/inspectionManager'
|
import {
|
||||||
|
equipmentList,
|
||||||
|
inspectionLog,
|
||||||
|
einspectionLogD,
|
||||||
|
einspectionItList,
|
||||||
|
einspectionItemLogU
|
||||||
|
} from '@/api/equipment/inspectionManager'
|
||||||
import einspectionitemAdd from './components/einspectionitemAdd.vue'
|
import einspectionitemAdd from './components/einspectionitemAdd.vue'
|
||||||
import einspectionitemlogAdd from './components/einspectionitemlogAdd.vue'
|
import einspectionitemlogAdd from './components/einspectionitemlogAdd.vue'
|
||||||
import { timeFormatter } from '@/filters'
|
import { timeFormatter } from '@/filters'
|
||||||
import StatusBtn from './components/statusBtn.vue'
|
import StatusBtn from './components/statusBtn.vue'
|
||||||
import statusTag from './components/statusTag.vue'
|
import statusTag from './components/statusTag.vue'
|
||||||
// import newBasicData from '@/filters/newBasicData'
|
// import newBasicData from '@/filters/newBasicData'
|
||||||
|
|
||||||
|
import { Random } from 'mockjs'
|
||||||
|
|
||||||
const topBtnConfig = [
|
const topBtnConfig = [
|
||||||
{
|
{
|
||||||
type: 'add',
|
type: 'add',
|
||||||
@@ -246,7 +258,8 @@ export default {
|
|||||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}
|
}
|
||||||
).then(() => {
|
)
|
||||||
|
.then(() => {
|
||||||
einspectionLogD({
|
einspectionLogD({
|
||||||
id: raw.data.id
|
id: raw.data.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -260,7 +273,8 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}).catch(() => { })
|
})
|
||||||
|
.catch(() => {})
|
||||||
} else if (raw.type === 'detail') {
|
} else if (raw.type === 'detail') {
|
||||||
this.addNew(raw.data.id, 'detail')
|
this.addNew(raw.data.id, 'detail')
|
||||||
} else if (raw.type === 'edit') {
|
} else if (raw.type === 'edit') {
|
||||||
@@ -274,8 +288,25 @@ export default {
|
|||||||
this.listQuery.endTime = this.headFormValue.searchTime ? this.headFormValue.searchTime[1] + 'T23:59:59' : ''
|
this.listQuery.endTime = this.headFormValue.searchTime ? this.headFormValue.searchTime[1] + 'T23:59:59' : ''
|
||||||
inspectionLog(this.listQuery).then(res => {
|
inspectionLog(this.listQuery).then(res => {
|
||||||
if (res.data.records) {
|
if (res.data.records) {
|
||||||
this.list = res.data.records
|
// this.list = res.data.records
|
||||||
|
// 11-mes 修改模拟时间
|
||||||
|
this.list = res.data.records.map(item => {
|
||||||
|
let startDate = 2022 + '-' + '11-' + Random.integer(1, 29)
|
||||||
|
let startHour = Random.integer(1, 22)
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
inspectionStartTime:
|
||||||
|
startDate + ' ' + (startHour < 10 ? '0' + startHour : '' + startHour) + Random.datetime(':mm:ss'),
|
||||||
|
inspectionEndTime:
|
||||||
|
startDate +
|
||||||
|
' ' +
|
||||||
|
(startHour + 1 < 10 ? +'0' + (startHour + 1) : 1 + startHour + '') +
|
||||||
|
Random.datetime(':mm:ss')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// console.log('list;', this.list)
|
||||||
this.equipmentInspectionId = this.list[0].id
|
this.equipmentInspectionId = this.list[0].id
|
||||||
|
|
||||||
this.getInspectionItem()
|
this.getInspectionItem()
|
||||||
} else {
|
} else {
|
||||||
this.list = []
|
this.list = []
|
||||||
@@ -299,7 +330,8 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectRow(val) { // 点击左侧列表
|
selectRow(val) {
|
||||||
|
// 点击左侧列表
|
||||||
this.equipmentInspectionId = val.id
|
this.equipmentInspectionId = val.id
|
||||||
this.getInspectionItem()
|
this.getInspectionItem()
|
||||||
},
|
},
|
||||||
@@ -340,7 +372,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleClickR(raw) {
|
handleClickR(raw) {
|
||||||
if ((raw.type === 'detail') || (raw.type === 'edit')) {
|
if (raw.type === 'detail' || raw.type === 'edit') {
|
||||||
this.addOrUpdateVisibleR = true
|
this.addOrUpdateVisibleR = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdateR.init(raw.data.id, raw.type)
|
this.$refs.addOrUpdateR.init(raw.data.id, raw.type)
|
||||||
@@ -351,7 +383,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.app-container {
|
.app-container {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
.left-container {
|
.left-container {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -369,5 +401,5 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
padding-top: 23px;
|
padding-top: 23px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const PriorityComponent = {
|
|||||||
|
|
||||||
export const equipmentExceptionProps = [
|
export const equipmentExceptionProps = [
|
||||||
{ label: '设备名称', prop: 'eqName', align: 'center', 'min-width': 55 },
|
{ label: '设备名称', prop: 'eqName', align: 'center', 'min-width': 55 },
|
||||||
{ label: '所属产线', prop: 'pl', align: 'center', 'min-width': 55 },
|
// { label: '所属产线', prop: 'pl', align: 'center', 'min-width': 55 },
|
||||||
{ label: '报修/异常内容', prop: 'content', align: 'center', 'min-width': 80 },
|
{ label: '报修/异常内容', prop: 'content', align: 'center', 'min-width': 80 },
|
||||||
{ label: '报修/发现人', prop: 'creator', align: 'center', 'min-width': 60 },
|
{ label: '报修/发现人', prop: 'creator', align: 'center', 'min-width': 60 },
|
||||||
{ label: '时间', prop: 'time', align: 'center', 'min-width': 80 },
|
{ label: '时间', prop: 'time', align: 'center', 'min-width': 80 },
|
||||||
@@ -42,26 +42,26 @@ export const equipmentExceptionProps = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export const equipmentExceptionDatalist = [
|
export const equipmentExceptionDatalist = [
|
||||||
{ "eqName": "冷却", "pl": "A", "content": "路因同义价带本知生联矿列。", "creator": "马磊", "time": "2021-04-15 22:00:34", "priority": 3 },
|
{ "eqName": "A1丝印", "pl": "A", "content": "网版推出异常", "creator": "马磊", "time": "2022-11-20 22:00:34", "priority": 3 },
|
||||||
{ "eqName": "固化", "pl": "B", "content": "将海构组过重开每活原总价着。", "creator": "贺刚", "time": "2021-03-15 06:30:01", "priority": 2 },
|
{ "eqName": "B1磨边后清洗", "pl": "B", "content": "毛刷过载", "creator": "贺刚", "time": "2022-11-20 06:30:01", "priority": 2 },
|
||||||
{ "eqName": "固化", "pl": "B", "content": "形管始会回从观且明确意主照根受步究。", "creator": "冯丽", "time": "2020-11-21 07:09:16", "priority": 2 },
|
{ "eqName": "B1磨边", "pl": "B", "content": "磨轮过载", "creator": "冯丽", "time": "2022-11-20 07:09:16", "priority": 2 },
|
||||||
{ "eqName": "磨边", "pl": "A", "content": "己由九保先造线后还单省于手。", "creator": "梁秀兰", "time": "2020-03-21 08:21:36", "priority": 3 },
|
// { "eqName": "镀膜", "pl": "A", "content": "胶辊变频异常", "creator": "梁秀兰", "time": "2022-11-20 08:21:36", "priority": 3 },
|
||||||
{ "eqName": "一镀", "pl": "B", "content": "变西列场展越备线活酸被究他压建院家。", "creator": "卢敏", "time": "2022-10-23 04:45:00", "priority": 2 },
|
{ "eqName": "B2丝印", "pl": "B", "content": "印刷轴异常", "creator": "卢敏", "time": "2022-11-20 04:45:00", "priority": 2 },
|
||||||
{ "eqName": "钢化", "pl": "A", "content": "解听共将取色照品起族西全日色。", "creator": "方勇", "time": "2020-12-11 06:41:06", "priority": 2 },
|
{ "eqName": "A3磨边", "pl": "A", "content": "磨轮过载", "creator": "方勇", "time": "2022-11-20 06:41:06", "priority": 2 },
|
||||||
{ "eqName": "打孔", "pl": "B", "content": "际从定接花她变人周而导总流西更观史。", "creator": "赵静", "time": "2021-01-20 03:36:47", "priority": 2 },
|
{ "eqName": "B2打孔后清洗", "pl": "B", "content": "毛刷过载", "creator": "赵静", "time": "2022-11-20 03:36:47", "priority": 2 },
|
||||||
{ "eqName": "下片", "pl": "A", "content": "厂积各克性型世型我地得圆与时速。", "creator": "姜洋", "time": "2021-11-30 07:56:26", "priority": 3 },
|
// { "eqName": "镀膜", "pl": "A", "content": "胶辊变频异常", "creator": "姜洋", "time": "2022-11-20 07:56:26", "priority": 3 },
|
||||||
{ "eqName": "钢化", "pl": "A", "content": "证法作无群只放科可少头生广水。", "creator": "赖艳", "time": "2022-10-10 12:01:14", "priority": 1 },
|
{ "eqName": "A2磨边", "pl": "A", "content": "磨轮过载", "creator": "赖艳", "time": "2022-11-20 12:01:14", "priority": 1 },
|
||||||
{ "eqName": "磨边", "pl": "A", "content": "极满具究极力入矿电适花军系象。", "creator": "熊静", "time": "2021-01-27 03:24:33", "priority": 1 },
|
{ "eqName": "A2丝印", "pl": "A", "content": "进气压力过低", "creator": "熊静", "time": "2022-11-20 03:24:33", "priority": 1 },
|
||||||
{ "eqName": "二镀", "pl": "B", "content": "科传军正战没题许青生面发用矿科。", "creator": "龚明", "time": "2022-02-28 16:26:11", "priority": 2 },
|
{ "eqName": "B1打孔后清洗", "pl": "B", "content": "进料检测异常", "creator": "龚明", "time": "2022-11-21 16:26:11", "priority": 2 },
|
||||||
{ "eqName": "磨边", "pl": "A", "content": "入以品切中算极同三那性当。", "creator": "万娟", "time": "2022-08-23 08:44:41", "priority": 2 },
|
{ "eqName": "A钢化", "pl": "A", "content": "传动变频器故障", "creator": "万娟", "time": "2022-11-21 08:44:41", "priority": 2 },
|
||||||
{ "eqName": "固化", "pl": "B", "content": "火音红建活先以它法对所重间量马斗将。", "creator": "徐丽", "time": "2021-07-30 21:15:10", "priority": 2 },
|
{ "eqName": "B3丝印", "pl": "B", "content": "进气压力过低", "creator": "徐丽", "time": "2022-11-21 21:15:10", "priority": 2 },
|
||||||
{ "eqName": "一镀", "pl": "A", "content": "位构命利整线两计统被约张以导理。", "creator": "叶娜", "time": "2022-05-05 22:45:13", "priority": 1 },
|
// { "eqName": "镀膜", "pl": "A", "content": "固化变频异常", "creator": "叶娜", "time": "2022-11-21 22:45:13", "priority": 1 },
|
||||||
{ "eqName": "冷却", "pl": "A", "content": "东改近装商了整标革并该青外育放般体。", "creator": "田磊", "time": "2021-12-01 07:24:59", "priority": 2 },
|
{ "eqName": "A钢化", "pl": "A", "content": "传动变频器故障", "creator": "田磊", "time": "2022-11-21 07:24:59", "priority": 2 },
|
||||||
{ "eqName": "打孔后清洗机", "pl": "A", "content": "查的分口眼约三委斯该的品通身式子听。", "creator": "邱平", "time": "2020-01-31 17:53:18", "priority": 2 },
|
{ "eqName": "A钢化", "pl": "A", "content": "加热炉体超温报警", "creator": "邱平", "time": "2022-11-21 17:53:18", "priority": 2 },
|
||||||
{ "eqName": "下片", "pl": "B", "content": "连程复而前置很不团数行三西较响运。", "creator": "赵艳", "time": "2021-09-20 18:10:32", "priority": 2 },
|
{ "eqName": "B2磨边后清洗", "pl": "B", "content": "磨轮过载", "creator": "赵艳", "time": "2022-11-21 18:10:32", "priority": 2 },
|
||||||
{ "eqName": "冷却", "pl": "B", "content": "育进品石完立行按效安标真。", "creator": "江伟", "time": "2022-08-05 17:29:44", "priority": 2 },
|
{ "eqName": "B钢化", "pl": "B", "content": "传动变频器故障", "creator": "江伟", "time": "2022-11-21 17:29:44", "priority": 2 },
|
||||||
{ "eqName": "钢后清洗机", "pl": "B", "content": "委且到示为位要强等住整县值八。", "creator": "周洋", "time": "2021-01-26 02:49:09", "priority": 3 },
|
{ "eqName": "B3磨边后清洗", "pl": "B", "content": "输送变频报警", "creator": "周洋", "time": "2022-11-21 02:49:09", "priority": 3 },
|
||||||
{ "eqName": "上片", "pl": "A", "content": "报据深广一统南车步约果龙值区识车深。", "creator": "邱超", "time": "2021-12-21 20:41:53", "priority": 1 },
|
{ "eqName": "A1磨边", "pl": "A", "content": "磨轮过载", "creator": "邱超", "time": "2022-11-21 20:41:53", "priority": 1 },
|
||||||
]
|
]
|
||||||
|
|
||||||
/** 设备异常报警 */
|
/** 设备异常报警 */
|
||||||
@@ -100,42 +100,42 @@ const LifeRemainComponent = {
|
|||||||
export const equipmentAlarmProps = [
|
export const equipmentAlarmProps = [
|
||||||
{ label: '设备名称', prop: 'eqName', align: 'center', 'min-width': 100 },
|
{ label: '设备名称', prop: 'eqName', align: 'center', 'min-width': 100 },
|
||||||
{ label: '设备编码', prop: 'eqCode', align: 'center', 'min-width': 100 },
|
{ label: '设备编码', prop: 'eqCode', align: 'center', 'min-width': 100 },
|
||||||
{ label: '所属产线', prop: 'pl', align: 'center' },
|
// { label: '所属产线', prop: 'pl', align: 'center' },
|
||||||
{ label: '报警级别', prop: 'priority', align: 'center', subcomponent: PriorityComponent, 'min-width': 85 },
|
{ label: '报警级别', prop: 'priority', align: 'center', subcomponent: PriorityComponent, 'min-width': 85 },
|
||||||
{ label: '报警内容', prop: 'content', align: 'center' }
|
{ label: '报警内容', prop: 'content', align: 'center' }
|
||||||
]
|
]
|
||||||
|
|
||||||
export const equipmentAlarmDatalist = [
|
export const equipmentAlarmDatalist = [
|
||||||
{
|
{
|
||||||
"pl": "B", "eqName": "丝印", "eqCode": "B5SP20200109025453", "content": "常下命般里究千么间龙该海战据运更。", "priority": 3
|
"pl": "B", "eqName": "B1丝印", "eqCode": "B5SP20200109025453", "content": "网版推出异常", "priority": 3
|
||||||
},
|
},
|
||||||
{ "pl": "A", "eqName": "下片", "eqCode": "A2UL20210605043851", "content": "而至收选查万众家除候包要意集。", "priority": 2 },
|
{ "pl": "A", "eqName": "A2磨边后清洗", "eqCode": "A2CAE20210605043851", "content": "输送变频报警", "priority": 2 },
|
||||||
{ "pl": "B", "eqName": "冷却", "eqCode": "B4CL20200328154356", "content": "石十求四指么放与程到置身技红。", "priority": 1 },
|
{ "pl": "B", "eqName": "B2磨边", "eqCode": "B4ED20200328154356", "content": "磨轮过载", "priority": 1 },
|
||||||
{ "pl": "B", "eqName": "一镀", "eqCode": "B5FC20220307070115", "content": "即计报做切除听见济共金然维走。", "priority": 2 },
|
// { "pl": "B", "eqName": "镀膜", "eqCode": "B5FC20220307070115", "content": "胶辊变频异常", "priority": 2 },
|
||||||
{ "pl": "B", "eqName": "固化", "eqCode": "B7CO20190927110003", "content": "应其得候解北运样价可强先们速。", "priority": 2 },
|
{ "pl": "B", "eqName": "B2丝印", "eqCode": "B7SP20190927110003", "content": "印刷轴异常", "priority": 2 },
|
||||||
{
|
{
|
||||||
"pl": "A", "eqName": "打孔后清洗机", "eqCode": "A3CAP20200727075125", "content": "员因江单话况质己家小展矿指到之组她。", "priority": 3
|
"pl": "A", "eqName": "A1磨边后清洗", "eqCode": "A3CAP20200727075125", "content": "进料检测异常", "priority": 3
|
||||||
},
|
},
|
||||||
{ "pl": "A", "eqName": "磨边", "eqCode": "A7ED20200512213432", "content": "观长因带至成为也越效飞约况面的。", "priority": 3 },
|
{ "pl": "A", "eqName": "A3丝印", "eqCode": "A7SP20200512213432", "content": "进气压力过低", "priority": 3 },
|
||||||
{
|
{
|
||||||
"pl": "A", "eqName": "固化", "eqCode": "A4CO20220608145053", "content": "回状边及族值强第手听存派治严农象江。", "priority": 2
|
"pl": "A", "eqName": "A2磨边", "eqCode": "A4ED20220608145053", "content": "磨轮过载", "priority": 2
|
||||||
},
|
},
|
||||||
{ "pl": "B", "eqName": "冷却", "eqCode": "B4CL20200526045602", "content": "采料这百他打体拉素但即面之。", "priority": 1 },
|
{ "pl": "B", "eqName": "B钢化", "eqCode": "B4CO20200526045602", "content": "传动变频器故障", "priority": 1 },
|
||||||
{
|
{
|
||||||
"pl": "B", "eqName": "打孔", "eqCode": "B6LP20220326162041", "content": "列保己问向九青保自济习后长而类月段斗。", "priority": 2
|
"pl": "B", "eqName": "B1磨边后清洗", "eqCode": "B6CAP20220326162041", "content": "毛刷过载", "priority": 2
|
||||||
},
|
},
|
||||||
{ "pl": "A", "eqName": "磨边", "eqCode": "A4ED20200325081934", "content": "产矿身断通者和意层价前就知头。", "priority": 2 },
|
{ "pl": "A", "eqName": "A1磨边", "eqCode": "A4ED20200325081934", "content": "磨轮过载", "priority": 2 },
|
||||||
{
|
{
|
||||||
"pl": "B", "eqName": "预热", "eqCode": "B1PR20201220183649", "content": "志收一支习于何况支于自原地书飞感。", "priority": 2
|
"pl": "B", "eqName": "B1丝印", "eqCode": "B1SP20201220183649", "content": "印刷轴异常", "priority": 2
|
||||||
},
|
},
|
||||||
{ "pl": "A", "eqName": "二镀", "eqCode": "A3SC20220414054819", "content": "义点做产往新以速结工情最六素难强干。", "priority": 2 },
|
// { "pl": "A", "eqName": "镀膜", "eqCode": "A3SC20220414054819", "content": "固化变频异常", "priority": 2 },
|
||||||
{ "pl": "A", "eqName": "固化", "eqCode": "A8CO20200704010549", "content": "例强起取南然任都来因山该收次代相。", "priority": 2 },
|
{ "pl": "A", "eqName": "A3磨边", "eqCode": "A8ED20200704010549", "content": "磨轮过载", "priority": 2 },
|
||||||
{ "pl": "B", "eqName": "预热", "eqCode": "B1PR20200323134700", "content": "消选们度周料革理观构平活组事件。", "priority": 3 },
|
{ "pl": "B", "eqName": "B3磨边后清洗", "eqCode": "B1CAT20200323134700", "content": "进料检测异常", "priority": 3 },
|
||||||
{ "pl": "A", "eqName": "打孔", "eqCode": "A1LP20200513020427", "content": "华家是可路议自商取半也五。", "priority": 1 },
|
{ "pl": "A", "eqName": "A3丝印", "eqCode": "A1SP20200513020427", "content": "网版推出异常", "priority": 1 },
|
||||||
{ "pl": "A", "eqName": "钢化", "eqCode": "A7TF20210928172616", "content": "点量都酸较此结同去写群论被千。", "priority": 2 },
|
{ "pl": "A", "eqName": "A钢化", "eqCode": "A7CO20210928172616", "content": "加热炉体超温报警", "priority": 2 },
|
||||||
{ "pl": "A", "eqName": "二镀", "eqCode": "A5SC20210104132647", "content": "切提个水铁外步油好连身相争外群儿此。", "priority": 1 },
|
// { "pl": "A", "eqName": "镀膜", "eqCode": "A5SC20210104132647", "content": "固化变频异常", "priority": 1 },
|
||||||
{ "pl": "A", "eqName": "磨边后清洗机", "eqCode": "A4CAE20210225140150", "content": "学七直以半去江内后上知往值质值。", "priority": 1 },
|
{ "pl": "A", "eqName": "A钢化", "eqCode": "A4ED20210225140150", "content": "加热炉体超温报警", "priority": 1 },
|
||||||
{ "pl": "B", "eqName": "打孔后清洗机", "eqCode": "B6CAP20200831083210", "content": "活小着许今取图国步成流海分就适转院容。", "priority": 2 },
|
{ "pl": "B", "eqName": "B2磨边后清洗", "eqCode": "B6CAP20200831083210", "content": "进料检测异常", "priority": 2 },
|
||||||
]
|
]
|
||||||
|
|
||||||
/** 设备分析 */
|
/** 设备分析 */
|
||||||
@@ -258,9 +258,9 @@ export const wwwOrderProps = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export const rightSideDatalist = [
|
export const rightSideDatalist = [
|
||||||
{ "orderId": "WOD20200807030135", "time": "2021-02-12 14:08:04", "eq": "磨边", "status": 3, "team": "白班", "duration": "26min" },
|
{ "orderId": "WOD20200807030135", "time": "2022-11-12 14:08:04", "eq": "A1磨边", "status": 3, "team": "白班", "duration": "26min" },
|
||||||
{ "orderId": "WOD20200413103728", "time": "2020-11-26 20:11:39", "eq": "固化", "status": 1, "team": "夜班", "duration": "24min" },
|
{ "orderId": "WOD20210217143647", "time": "2022-11-15 18:48:40", "eq": "A1打孔", "status": 2, "team": "白班", "duration": "27min" },
|
||||||
{ "orderId": "WOD20210217143647", "time": "2021-08-15 18:48:40", "eq": "预热", "status": 2, "team": "白班", "duration": "27min" },
|
{ "orderId": "WOD20200413103728", "time": "2022-11-26 20:11:39", "eq": "A1固化", "status": 1, "team": "夜班", "duration": "24min" },
|
||||||
]
|
]
|
||||||
export const rightSideDatalist2 = [
|
export const rightSideDatalist2 = [
|
||||||
{ "orderId": "WOD20220403013343", "pl": "A", "status": 3, "team": "白班", "duration": "24min" },
|
{ "orderId": "WOD20220403013343", "pl": "A", "status": 3, "team": "白班", "duration": "24min" },
|
||||||
@@ -268,14 +268,14 @@ export const rightSideDatalist2 = [
|
|||||||
{ "orderId": "WOD20210902180855", "pl": "A", "status": 2, "team": "夜班", "duration": "23min" },
|
{ "orderId": "WOD20210902180855", "pl": "A", "status": 2, "team": "夜班", "duration": "23min" },
|
||||||
]
|
]
|
||||||
export const rightSideDatalist3 = [
|
export const rightSideDatalist3 = [
|
||||||
{ "orderId": "WOD20210829073921", "eq": "钢后清洗机", "status": 2, "team": "白班", "duration": "29min" },
|
{ "orderId": "WOD20210829073921", "eq": "A3钢化后清洗", "status": 2, "team": "白班", "duration": "29min" },
|
||||||
{ "orderId": "WOD20220429180823", "eq": "丝印", "status": 2, "team": "夜班", "duration": "26min" },
|
{ "orderId": "WOD20220429180823", "eq": "A3丝印", "status": 2, "team": "夜班", "duration": "26min" },
|
||||||
{ "orderId": "WOD20220915050149", "eq": "磨边后清洗机", "status": 3, "team": "白班", "duration": "21min" },
|
{ "orderId": "WOD20220915050149", "eq": "A3磨边后清洗", "status": 3, "team": "白班", "duration": "21min" },
|
||||||
]
|
]
|
||||||
export const rightSideDatalist4 = [
|
export const rightSideDatalist4 = [
|
||||||
{ "orderId": "WOD20210522165229", "pl": "A", "status": 2, "team": "夜班", "time": "2021-12-17 13:31:24" },
|
{ "orderId": "WOD20210522165229", "pl": "A", "status": 2, "team": "夜班", "time": "2022-12-17 13:31:24" },
|
||||||
{ "orderId": "WOD20211205183921", "pl": "B", "status": 1, "team": "白班", "time": "2022-06-27 10:52:19" },
|
|
||||||
{ "orderId": "WOD20210114183705", "pl": "A", "status": 1, "team": "夜班", "time": "2022-11-22 02:59:50" },
|
{ "orderId": "WOD20210114183705", "pl": "A", "status": 1, "team": "夜班", "time": "2022-11-22 02:59:50" },
|
||||||
|
{ "orderId": "WOD20211205183921", "pl": "B", "status": 1, "team": "白班", "time": "2022-11-27 10:52:19" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -147,21 +147,22 @@ export default {
|
|||||||
fetchList('order').then(response => {
|
fetchList('order').then(response => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.dataList = response.data
|
this.dataList = response.data
|
||||||
this.dataList.push({
|
// 11-mes:
|
||||||
orderName: '22订单',
|
// this.dataList.push({
|
||||||
productName: 'xxx光伏玻璃2.0B',
|
// orderName: '22订单',
|
||||||
productSize: '2*1128*2272',
|
// productName: 'xxx光伏玻璃2.0B',
|
||||||
productionLine: 'C线 D线 A线',
|
// productSize: '2*1128*2272',
|
||||||
det: Array(3).fill({
|
// productionLine: 'C线 D线 A线',
|
||||||
inputNum: '-259730',
|
// det: Array(3).fill({
|
||||||
outputNum: '-772443',
|
// inputNum: '-259730',
|
||||||
passRate: 100,
|
// outputNum: '-772443',
|
||||||
recordTime: '2022-09-06T14:00:00',
|
// passRate: 100,
|
||||||
scrapNum: '0',
|
// recordTime: '2022-09-06T14:00:00',
|
||||||
sumInputNum: '259730',
|
// scrapNum: '0',
|
||||||
sumOutputNum: '772443'
|
// sumInputNum: '259730',
|
||||||
})
|
// sumOutputNum: '772443'
|
||||||
})
|
// })
|
||||||
|
// })
|
||||||
this.transformData()
|
this.transformData()
|
||||||
} else {
|
} else {
|
||||||
this.dataList.splice(0)
|
this.dataList.splice(0)
|
||||||
|
|||||||
@@ -8,10 +8,7 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<head-form
|
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
|
||||||
:form-config="headFormConfig"
|
|
||||||
@headBtnClick="btnClick"
|
|
||||||
/>
|
|
||||||
<base-table
|
<base-table
|
||||||
:top-btn-config="topBtnConfig"
|
:top-btn-config="topBtnConfig"
|
||||||
:page="listQuery.current"
|
:page="listQuery.current"
|
||||||
@@ -21,12 +18,7 @@
|
|||||||
:is-loading="listLoading"
|
:is-loading="listLoading"
|
||||||
@clickTopBtn="clickTopBtn"
|
@clickTopBtn="clickTopBtn"
|
||||||
>
|
>
|
||||||
<method-btn
|
<method-btn slot="handleBtn" :width="trueWidth" :method-list="tableBtn" @clickBtn="handleClick" />
|
||||||
slot="handleBtn"
|
|
||||||
:width="trueWidth"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick"
|
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
@@ -35,11 +27,7 @@
|
|||||||
:limit.sync="listQuery.size"
|
:limit.sync="listQuery.size"
|
||||||
@pagination="getList()"
|
@pagination="getList()"
|
||||||
/>
|
/>
|
||||||
<team-info-detail
|
<team-info-detail v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
|
||||||
v-if="addOrUpdateVisible"
|
|
||||||
ref="addOrUpdate"
|
|
||||||
@refreshDataList="getList"
|
|
||||||
/>
|
|
||||||
<team-info-add
|
<team-info-add
|
||||||
v-if="addVisible"
|
v-if="addVisible"
|
||||||
ref="addNew"
|
ref="addNew"
|
||||||
@@ -61,6 +49,7 @@ import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
|||||||
import { timeFormatter } from '@/filters'
|
import { timeFormatter } from '@/filters'
|
||||||
import i18n from '@/lang'
|
import i18n from '@/lang'
|
||||||
// import data from '../pdf/content'
|
// import data from '../pdf/content'
|
||||||
|
import { Random } from 'mockjs'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表格表头配置项 TypeScript接口注释
|
* 表格表头配置项 TypeScript接口注释
|
||||||
@@ -218,9 +207,31 @@ export default {
|
|||||||
this.listQuery.planHandoverEndTime = this.headFormValue.timeSlot ? this.headFormValue.timeSlot[1] : ''
|
this.listQuery.planHandoverEndTime = this.headFormValue.timeSlot ? this.headFormValue.timeSlot[1] : ''
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
list(this.listQuery).then((response) => {
|
list(this.listQuery).then(response => {
|
||||||
if (response.data.records) {
|
if (response.data.records) {
|
||||||
this.list = response.data.records
|
// this.list = response.data.records
|
||||||
|
// 11-mes 数据模拟修改
|
||||||
|
|
||||||
|
this.list = response.data.records.map(item => {
|
||||||
|
let startDate = 2022 + '-' + '11-' + Random.integer(1, 29)
|
||||||
|
let endDate = startDate.split('-')
|
||||||
|
endDate[2] = +endDate[2] + Random.integer(0, 3)
|
||||||
|
|
||||||
|
let startHour = Random.integer(1, 22)
|
||||||
|
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
planHandoverTime:
|
||||||
|
startDate + ' ' + (startHour < 10 ? '0' + startHour : '' + startHour) + Random.datetime(':mm:ss'),
|
||||||
|
planOfflineTime:
|
||||||
|
endDate.join('-') +
|
||||||
|
' ' +
|
||||||
|
(startHour + 1 < 10 ? +'0' + (startHour + 1) : 1 + startHour + '') +
|
||||||
|
Random.datetime(':mm:ss')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log("list;', ", this.list)
|
||||||
} else {
|
} else {
|
||||||
this.list.splice(0, this.list.length)
|
this.list.splice(0, this.list.length)
|
||||||
}
|
}
|
||||||
@@ -263,7 +274,7 @@ export default {
|
|||||||
const blob = new Blob([response.data])
|
const blob = new Blob([response.data])
|
||||||
const reader = new FileReader()
|
const reader = new FileReader()
|
||||||
reader.readAsDataURL(blob)
|
reader.readAsDataURL(blob)
|
||||||
reader.onload = (e) => {
|
reader.onload = e => {
|
||||||
const a = document.createElement('a')
|
const a = document.createElement('a')
|
||||||
a.download = fileName
|
a.download = fileName
|
||||||
a.href = e.target.result
|
a.href = e.target.result
|
||||||
@@ -285,7 +296,7 @@ export default {
|
|||||||
},
|
},
|
||||||
clickTopBtn(val) {
|
clickTopBtn(val) {
|
||||||
if (val === 'add') {
|
if (val === 'add') {
|
||||||
this.addNewInfo()// 新增
|
this.addNewInfo() // 新增
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,12 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$_resizeHandler = debounce(() => {
|
this.$_resizeHandler = debounce(() => {
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
|
if (this.setChartOption) {
|
||||||
|
this.setChartOption()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.chart.resize()
|
||||||
|
})
|
||||||
|
} else
|
||||||
this.chart.resize()
|
this.chart.resize()
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
|
|||||||
@@ -38,15 +38,15 @@
|
|||||||
<!-- 第一行 -->
|
<!-- 第一行 -->
|
||||||
<div class="quality-analysis__body__row-1">
|
<div class="quality-analysis__body__row-1">
|
||||||
<!-- 第一列 -->
|
<!-- 第一列 -->
|
||||||
<div class="flex gap-16">
|
<div class="flex gap-16" style="flex: 1;">
|
||||||
<div class="grow" style="max-width: 24vw;">
|
<div style="width: calc(400px * var(--beilv)); flex: 1;">
|
||||||
<techy-box class="" style="padding: calc(8px * var(--beilv));">
|
<techy-box class="" style="padding: calc(8px * var(--beilv));">
|
||||||
<techy-analysis-header type="special">产线缺陷日对比</techy-analysis-header>
|
<techy-analysis-header type="special">产线缺陷日对比</techy-analysis-header>
|
||||||
<div
|
<div
|
||||||
class="absolute top-0 left-0"
|
class="absolute top-0 left-0"
|
||||||
style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;"
|
style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;"
|
||||||
>
|
>
|
||||||
<new-bar
|
<!-- <new-bar
|
||||||
chart-name="realtime-cost-production"
|
chart-name="realtime-cost-production"
|
||||||
:name-list="['脏污', '破片', '崩边', '崩孔', '划擦伤', '其他']"
|
:name-list="['脏污', '破片', '崩边', '崩孔', '划擦伤', '其他']"
|
||||||
:data-list="[
|
:data-list="[
|
||||||
@@ -63,18 +63,31 @@
|
|||||||
data: [162, 172, 122, 15, 82, 74]
|
data: [162, 172, 122, 15, 82, 74]
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
|
/> -->
|
||||||
|
<techy-bar
|
||||||
|
unit-name="单位/片"
|
||||||
|
:datainfo="[
|
||||||
|
{
|
||||||
|
name: '产线A',
|
||||||
|
list: [163, 184, 110, 22, 96, 74]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '产线B',
|
||||||
|
list: [162, 172, 122, 15, 82, 74]
|
||||||
|
}
|
||||||
|
]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</techy-box>
|
</techy-box>
|
||||||
</div>
|
</div>
|
||||||
<div class="grow" style="max-width: 24vw;">
|
<div style="width: calc(400px * var(--beilv)); flex: 1;">
|
||||||
<techy-box class="" style="padding: calc(8px * var(--beilv));">
|
<techy-box class="" style="padding: calc(8px * var(--beilv));">
|
||||||
<techy-analysis-header type="special">产线缺陷月对比</techy-analysis-header>
|
<techy-analysis-header type="special">产线缺陷月对比</techy-analysis-header>
|
||||||
<div
|
<div
|
||||||
class="absolute top-0 left-0"
|
class="absolute top-0 left-0"
|
||||||
style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;"
|
style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;"
|
||||||
>
|
>
|
||||||
<new-bar
|
<!-- <new-bar
|
||||||
chart-name="realtime-cost-production"
|
chart-name="realtime-cost-production"
|
||||||
:name-list="['脏污', '破片', '崩边', '崩孔', '划擦伤', '其他']"
|
:name-list="['脏污', '破片', '崩边', '崩孔', '划擦伤', '其他']"
|
||||||
unit-name="单位: 千片"
|
unit-name="单位: 千片"
|
||||||
@@ -92,6 +105,20 @@
|
|||||||
data: [4.1, 4.34, 3.4, 0.32, 2.4, 2.14]
|
data: [4.1, 4.34, 3.4, 0.32, 2.4, 2.14]
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
|
/> -->
|
||||||
|
<techy-bar
|
||||||
|
unit-name="单位/千片"
|
||||||
|
:extra-space-between-zero="0.8"
|
||||||
|
:datainfo="[
|
||||||
|
{
|
||||||
|
name: '产线A',
|
||||||
|
list: [4.12, 5.21, 3.2, 0.96, 2.61, 2.2]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '产线B',
|
||||||
|
list: [4.1, 4.34, 3.4, 0.32, 2.4, 2.14]
|
||||||
|
}
|
||||||
|
]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</techy-box>
|
</techy-box>
|
||||||
@@ -99,24 +126,18 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 第二列 -->
|
<!-- 第二列 -->
|
||||||
<div class="grow flex gap-16">
|
<div class="flex gap-16" style="flex: 1; width: 1px;">
|
||||||
<div class="width-222">
|
<div class="" style="width: calc(380px * var(--beilv)); flex: 1;">
|
||||||
<techy-box class="" style="padding: calc(16px * var(--beilv));">
|
<techy-box class="" style="padding: calc(16px * var(--beilv));">
|
||||||
<techy-analysis-header :show-top-icon="false">产线缺陷分析</techy-analysis-header>
|
<techy-analysis-header :show-top-icon="false">
|
||||||
<div style="position: absolute; top: 0; left:0; width: 100%; height: 100%;">
|
产线缺陷分析
|
||||||
<span
|
<template v-slot:dateSelect>
|
||||||
style="display: inline-block; font-size: calc(10px * var(--beilv)); color: #fffc; position: absolute; top: calc(48px * var(--beilv)); left: calc(16px * var(--beilv));"
|
|
||||||
>
|
|
||||||
单位: 千片
|
|
||||||
</span>
|
|
||||||
<pl-fault-analysis-pie-chart :data-list="chosenDatalist" />
|
|
||||||
</div>
|
|
||||||
<div class="pl-select">
|
<div class="pl-select">
|
||||||
<span
|
<span
|
||||||
:class="{ 'pl-select__active': plMode === 'a' }"
|
:class="{ 'pl-select__active': plMode === 'a' }"
|
||||||
@click="
|
@click="
|
||||||
plMode = 'a'
|
plMode = 'a'
|
||||||
chosenDatalist = quexianDatalist[0]
|
chosenDatalist = getFaultDataList()
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
A
|
A
|
||||||
@@ -125,7 +146,7 @@
|
|||||||
:class="{ 'pl-select__active': plMode === 'b' }"
|
:class="{ 'pl-select__active': plMode === 'b' }"
|
||||||
@click="
|
@click="
|
||||||
plMode = 'b'
|
plMode = 'b'
|
||||||
chosenDatalist = quexianDatalist[1]
|
chosenDatalist = getFaultDataList()
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
B
|
B
|
||||||
@@ -136,7 +157,7 @@
|
|||||||
:class="{ 'date-select__active': dateMode === 'day' }"
|
:class="{ 'date-select__active': dateMode === 'day' }"
|
||||||
@click="
|
@click="
|
||||||
dateMode = 'day'
|
dateMode = 'day'
|
||||||
chosenDatalist = quexianDatalist[2]
|
chosenDatalist = getFaultDataList()
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
日
|
日
|
||||||
@@ -145,40 +166,76 @@
|
|||||||
:class="{ 'date-select__active': dateMode === 'month' }"
|
:class="{ 'date-select__active': dateMode === 'month' }"
|
||||||
@click="
|
@click="
|
||||||
dateMode = 'month'
|
dateMode = 'month'
|
||||||
chosenDatalist = quexianDatalist[3]
|
chosenDatalist = getFaultDataList()
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
月
|
月
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
</techy-analysis-header>
|
||||||
|
<div style="position: absolute; top: 0; left:0; width: 100%; height: 100%;">
|
||||||
|
<span
|
||||||
|
style="display: inline-block; font-size: calc(10px * var(--beilv)); color: #fffc; position: absolute; top: calc(48px * var(--beilv)); left: calc(28px * var(--beilv));"
|
||||||
|
>
|
||||||
|
<!--单位千片和单位片 -->
|
||||||
|
{{ unit }}
|
||||||
|
</span>
|
||||||
|
<!-- data-period 是指数据是月数据还是日数据 -->
|
||||||
|
<pl-fault-analysis-pie-chart :data-list="chosenDatalist" :data-period="dateMode" />
|
||||||
|
</div>
|
||||||
</techy-box>
|
</techy-box>
|
||||||
</div>
|
</div>
|
||||||
<div class="grow">
|
<div class="" style="width: calc(400px * var(--beilv)); flex: 1;">
|
||||||
<techy-box class="" style="padding: calc(16px * var(--beilv));">
|
<techy-box class="" style="padding: calc(16px * var(--beilv));">
|
||||||
<techy-analysis-header>产品成品率</techy-analysis-header>
|
<!-- <productionRateHeader
|
||||||
<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
|
@update-data="
|
||||||
<new-line-stack :data-update-token="dataUpdateToken" />
|
obj => {
|
||||||
</div>
|
dataUpdateToken = obj.str
|
||||||
<div class="date-select">
|
dateMode2 = obj.mode
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
产品成品率
|
||||||
|
</productionRateHeader> -->
|
||||||
|
|
||||||
|
<techy-analysis-header :show-top-icon="false">
|
||||||
|
产线成品率
|
||||||
|
<template v-slot:dateSelect>
|
||||||
|
<div class="pl-select">
|
||||||
<span
|
<span
|
||||||
:class="{ 'date-select__active': dateMode2 === 'day' }"
|
:class="{ 'pl-select__active': dateMode2 === 'day' }"
|
||||||
@click="
|
@click="
|
||||||
dateMode2 = 'day'
|
dateMode2 = 'day'
|
||||||
dataUpdateToken = '' + Math.random()
|
dataUpdateToken = Math.random() + ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
日
|
日
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
:class="{ 'date-select__active': dateMode2 === 'month' }"
|
:class="{ 'pl-select__active': dateMode2 === 'month' }"
|
||||||
@click="
|
@click="
|
||||||
dateMode2 = 'month'
|
dateMode2 = 'month'
|
||||||
dataUpdateToken = '' + Math.random()
|
dataUpdateToken = Math.random() + ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
月
|
月
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="date-select fake-legend">
|
||||||
|
<span>
|
||||||
|
<!-- 产线A -->
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<!-- 产线B -->
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</techy-analysis-header>
|
||||||
|
|
||||||
|
<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
|
||||||
|
<new-line-stack :data-update-token="dataUpdateToken" :mode="dateMode2" />
|
||||||
|
</div>
|
||||||
</techy-box>
|
</techy-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -250,11 +307,13 @@ import TechyBox from './components/TechyBox.vue'
|
|||||||
import TechyTable from './components/TechyTable.vue'
|
import TechyTable from './components/TechyTable.vue'
|
||||||
import TechyAnalysisBar from './components/TechyAnalysisBar.vue'
|
import TechyAnalysisBar from './components/TechyAnalysisBar.vue'
|
||||||
import TechyAnalysisHeader from './components/TechyAnalysisHeader.vue'
|
import TechyAnalysisHeader from './components/TechyAnalysisHeader.vue'
|
||||||
|
// import productionRateHeader from './components/productionRateHeader.vue'
|
||||||
// import FaultCategoryChart from './components/charts/FaultCategoryChart.vue'
|
// import FaultCategoryChart from './components/charts/FaultCategoryChart.vue'
|
||||||
import PlFaultAnalysisPieChart from './components/charts/PlFaultAnalysisPieChart.vue'
|
import PlFaultAnalysisPieChart from './components/charts/PlFaultAnalysisPieChart.vue'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import screenfull from 'screenfull'
|
import screenfull from 'screenfull'
|
||||||
import NewBar from './components/charts/newBar.vue'
|
|
||||||
|
import TechyBar from './components/charts/TechyBar.vue'
|
||||||
import NewLineStack from './components/charts/newLineStack.vue'
|
import NewLineStack from './components/charts/newLineStack.vue'
|
||||||
|
|
||||||
import { qualityDatalist, qualityTableProps, qualityExceptionDatalist, qualityExceptionTableProps } from './mockData'
|
import { qualityDatalist, qualityTableProps, qualityExceptionDatalist, qualityExceptionTableProps } from './mockData'
|
||||||
@@ -270,42 +329,47 @@ export default {
|
|||||||
TechyTable,
|
TechyTable,
|
||||||
// FaultCategoryChart,
|
// FaultCategoryChart,
|
||||||
PlFaultAnalysisPieChart,
|
PlFaultAnalysisPieChart,
|
||||||
NewBar,
|
TechyBar,
|
||||||
NewLineStack
|
NewLineStack
|
||||||
|
// productionRateHeader
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const quexianDatalist = [
|
const quexianDatalist = [
|
||||||
[
|
[
|
||||||
|
// 月a
|
||||||
|
{ value: 5.21, name: '破片' },
|
||||||
|
{ value: 3.2, name: '崩边' },
|
||||||
|
{ value: 4.12, name: '脏污' },
|
||||||
|
{ value: 2.61, name: '划擦伤' },
|
||||||
|
{ value: 0.96, name: '崩孔' },
|
||||||
|
{ value: 2.2, name: '其他' }
|
||||||
|
],
|
||||||
|
[
|
||||||
|
// 月b
|
||||||
{ value: 4.34, name: '破片' },
|
{ value: 4.34, name: '破片' },
|
||||||
{ value: 3.4, name: '崩边' },
|
{ value: 3.4, name: '崩边' },
|
||||||
{ value: 4.1, name: '脏污' },
|
{ value: 4.1, name: '脏污' },
|
||||||
{ value: 2.4, name: '划擦伤' },
|
{ value: 2.4, name: '划擦伤' },
|
||||||
{ value: 0.23, name: '崩孔' },
|
{ value: 0.32, name: '崩孔' },
|
||||||
{ value: 2.14, name: '其他' }
|
{ value: 2.14, name: '其他' }
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{ value: 4.17, name: '破片' },
|
// 日a
|
||||||
{ value: 3.6, name: '崩边' },
|
{ value: 184, name: '破片' },
|
||||||
{ value: 4, name: '脏污' },
|
{ value: 110, name: '崩边' },
|
||||||
{ value: 2.2, name: '划擦伤' },
|
{ value: 163, name: '脏污' },
|
||||||
{ value: 0.2, name: '崩孔' },
|
{ value: 96, name: '划擦伤' },
|
||||||
{ value: 1.9, name: '其他' }
|
{ value: 22, name: '崩孔' },
|
||||||
|
{ value: 74, name: '其他' }
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{ value: 3.33, name: '破片' },
|
// 日b
|
||||||
{ value: 3, name: '崩边' },
|
{ value: 172, name: '破片' },
|
||||||
{ value: 4.3, name: '脏污' },
|
{ value: 122, name: '崩边' },
|
||||||
{ value: 2.1, name: '划擦伤' },
|
{ value: 162, name: '脏污' },
|
||||||
{ value: 1, name: '崩孔' },
|
{ value: 82, name: '划擦伤' },
|
||||||
{ value: 1.8, name: '其他' }
|
{ value: 15, name: '崩孔' },
|
||||||
],
|
{ value: 74, name: '其他' }
|
||||||
[
|
|
||||||
{ value: 2.7, name: '破片' },
|
|
||||||
{ value: 1.56, name: '崩边' },
|
|
||||||
{ value: 2.3, name: '脏污' },
|
|
||||||
{ value: 1.2, name: '划擦伤' },
|
|
||||||
{ value: 0.23, name: '崩孔' },
|
|
||||||
{ value: 2, name: '其他' }
|
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -313,7 +377,7 @@ export default {
|
|||||||
dataUpdateToken: 'xx-token',
|
dataUpdateToken: 'xx-token',
|
||||||
plMode: 'a',
|
plMode: 'a',
|
||||||
dateMode: 'month',
|
dateMode: 'month',
|
||||||
dateMode2: 'month',
|
dateMode2: 'day',
|
||||||
qualityTableProps,
|
qualityTableProps,
|
||||||
qualityDatalist,
|
qualityDatalist,
|
||||||
qualityExceptionDatalist,
|
qualityExceptionDatalist,
|
||||||
@@ -371,7 +435,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['sidebar'])
|
...mapGetters(['sidebar']),
|
||||||
|
unit() {
|
||||||
|
return this.dateMode === 'month' ? '单位: 千片' : '单位: 片'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeFullScreen() {
|
changeFullScreen() {
|
||||||
@@ -383,29 +450,39 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
screenfull.toggle(this.$refs['cockpit-container-quality'])
|
screenfull.toggle(this.$refs['cockpit-container-quality'])
|
||||||
|
},
|
||||||
|
getFaultDataList() {
|
||||||
|
const { dateMode, plMode, quexianDatalist } = this
|
||||||
|
if (dateMode === 'month' && plMode === 'a') return quexianDatalist[0]
|
||||||
|
else if (dateMode === 'month' && plMode === 'b') return quexianDatalist[1]
|
||||||
|
else if (dateMode === 'day' && plMode === 'a') return quexianDatalist[2]
|
||||||
|
else if (dateMode === 'day' && plMode === 'b') return quexianDatalist[3]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
::-webkit-scrollbar {
|
.visual-container >>> ::-webkit-scrollbar {
|
||||||
width: calc(8px * var(--beilv));
|
width: calc(8px * var(--beilv));
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-track {
|
.visual-container >>> ::-webkit-scrollbar-track {
|
||||||
background-color: #14243f;
|
background-color: #14243f;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-button {
|
.visual-container >>> ::-webkit-scrollbar-button {
|
||||||
width: calc(8px * var(--beilv));
|
/* width: calc(8px * var(--beilv));
|
||||||
height: calc(8px * var(--beilv));
|
height: calc(8px * var(--beilv)); */
|
||||||
|
display: none;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
background: #5bc4bf9f;
|
background: #5bc4bf9f;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb {
|
.visual-container >>> ::-webkit-scrollbar-thumb {
|
||||||
border-radius: calc(8px * var(--beilv));
|
border-radius: calc(8px * var(--beilv));
|
||||||
background: #5bc4bf9f;
|
background: #5bc4bf9f;
|
||||||
}
|
}
|
||||||
@@ -553,17 +630,22 @@ export default {
|
|||||||
.pl-select,
|
.pl-select,
|
||||||
.date-select {
|
.date-select {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: calc(16px * var(--beilv));
|
top: 0;
|
||||||
right: calc(22px * var(--beilv));
|
right: 0;
|
||||||
|
/* top: calc(16px * var(--beilv)); */
|
||||||
|
/* right: calc(22px * var(--beilv)); */
|
||||||
border-radius: calc(2px * var(--beilv));
|
border-radius: calc(2px * var(--beilv));
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pl-select {
|
.pl-select {
|
||||||
right: unset;
|
right: unset;
|
||||||
left: calc(10px * var(--beilv));
|
left: 0;
|
||||||
|
/* left: calc(10px * var(--beilv)); */
|
||||||
}
|
}
|
||||||
|
|
||||||
.pl-select span,
|
.pl-select span,
|
||||||
@@ -585,4 +667,14 @@ export default {
|
|||||||
.width-222 {
|
.width-222 {
|
||||||
width: calc(375px * var(--beilv));
|
width: calc(375px * var(--beilv));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fake-legend {
|
||||||
|
cursor: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fake-legend span {
|
||||||
|
background: none;
|
||||||
|
cursor: none;
|
||||||
|
color: #dff1fe;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="techy-analysis-header">
|
<div class="techy-analysis-header">
|
||||||
<template v-if="type === 'special'">
|
<template v-if="type === 'special'">
|
||||||
<div
|
<div class="special-wrapper">
|
||||||
style="background: #ccc0; width: 100%; height: calc(22px * var(--beilv)); display: flex; justify-content: center; align-items: center;"
|
<div class="special-wrapper__left"></div>
|
||||||
>
|
<div class="special-wrapper__middle">
|
||||||
<div class="legend" style="background: #fff0; width: calc(126px * var(--beilv));"></div>
|
<div class="special-wrapper__middle--inner">
|
||||||
|
<div style="transform: translateX(12%)">
|
||||||
<div style="flex: 1; white-space: nowrap; overflow: hidden;">
|
|
||||||
<span class="top-icon">
|
<span class="top-icon">
|
||||||
<svg
|
<svg
|
||||||
width="100%"
|
width="100%"
|
||||||
@@ -26,7 +25,10 @@
|
|||||||
id="编组-2备份"
|
id="编组-2备份"
|
||||||
transform="translate(28.000000, 8.500000) scale(1, -1) translate(-28.000000, -8.500000) translate(0.000000, 2.000000)"
|
transform="translate(28.000000, 8.500000) scale(1, -1) translate(-28.000000, -8.500000) translate(0.000000, 2.000000)"
|
||||||
>
|
>
|
||||||
<polygon id="路径-11" points="47.1645736 7.79376563e-14 43 0 52.2664792 13 56 13"></polygon>
|
<polygon
|
||||||
|
id="路径-11"
|
||||||
|
points="47.1645736 7.79376563e-14 43 0 52.2664792 13 56 13"
|
||||||
|
></polygon>
|
||||||
<polygon
|
<polygon
|
||||||
id="路径-11备份"
|
id="路径-11备份"
|
||||||
opacity="0.8"
|
opacity="0.8"
|
||||||
@@ -77,7 +79,10 @@
|
|||||||
id="编组-2备份-2"
|
id="编组-2备份-2"
|
||||||
transform="translate(262.000000, 8.500000) scale(-1, -1) translate(-262.000000, -8.500000) translate(234.000000, 2.000000)"
|
transform="translate(262.000000, 8.500000) scale(-1, -1) translate(-262.000000, -8.500000) translate(234.000000, 2.000000)"
|
||||||
>
|
>
|
||||||
<polygon id="路径-11" points="47.1645736 7.79376563e-14 43 0 52.2664792 13 56 13"></polygon>
|
<polygon
|
||||||
|
id="路径-11"
|
||||||
|
points="47.1645736 7.79376563e-14 43 0 52.2664792 13 56 13"
|
||||||
|
></polygon>
|
||||||
<polygon
|
<polygon
|
||||||
id="路径-11备份"
|
id="路径-11备份"
|
||||||
opacity="0.8"
|
opacity="0.8"
|
||||||
@@ -107,10 +112,14 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="legend" style="background: #fff0; width: calc(126px * var(--beilv)); padding-left: calc(8px * var(--beilv));">
|
<div class="special-wrapper__right">
|
||||||
<div class="legend-item pla" style="margin-right: calc(8px * var(--beilv));">产线A</div>
|
<div class="special-wrapper__right--inner">
|
||||||
<div class="legend-item plb">产线B</div>
|
<div class="pla" style="margin-right: calc(2px * var(--beilv));">产线A</div>
|
||||||
|
<div class="plb">产线B</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -216,6 +225,8 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<slot name="dateSelect" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -242,6 +253,9 @@ export default {
|
|||||||
.techy-analysis-header {
|
.techy-analysis-header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: calc(16px * var(--beilv));
|
margin-bottom: calc(16px * var(--beilv));
|
||||||
|
position: relative;
|
||||||
|
white-space: nowrap;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.techy-analysis-header__title {
|
.techy-analysis-header__title {
|
||||||
@@ -257,11 +271,19 @@ export default {
|
|||||||
margin-bottom: calc(2px * var(--beilv));
|
margin-bottom: calc(2px * var(--beilv));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.legend-right {
|
||||||
|
display: flex;
|
||||||
|
gap: calc(8px * var(--beilv));
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.legend-item {
|
.legend-item {
|
||||||
font-size: calc(10px * var(--beilv));
|
font-size: calc(10px * var(--beilv));
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: #dff1fe;
|
color: #dff1fe;
|
||||||
display: inline-block;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.legend-item::before {
|
.legend-item::before {
|
||||||
@@ -270,13 +292,67 @@ export default {
|
|||||||
width: calc(8px * var(--beilv));
|
width: calc(8px * var(--beilv));
|
||||||
height: calc(8px * var(--beilv));
|
height: calc(8px * var(--beilv));
|
||||||
background: #fffc;
|
background: #fffc;
|
||||||
margin-right: calc(8px * var(--beilv));
|
margin-right: calc(4px * var(--beilv));
|
||||||
}
|
}
|
||||||
|
|
||||||
.pla::before {
|
.special-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
transform: skewX(35deg);
|
||||||
|
background: #fff0;
|
||||||
|
width: 100%;
|
||||||
|
height: calc(22px * var(--beilv));
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__left {
|
||||||
|
width: 1px;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.special-wrapper__middle {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__middle--inner {
|
||||||
|
transform: skewX(-35deg);
|
||||||
|
white-space: nowrap;
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__right {
|
||||||
|
padding-left: calc(8px * var(--beilv));
|
||||||
|
padding-right: calc(8px * var(--beilv));
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__right--inner {
|
||||||
|
transform: skewX(-35deg);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: calc(4px * var(--beilv));
|
||||||
|
height: 100%;
|
||||||
|
width: calc(100px * var(--beilv));
|
||||||
|
padding-left: calc(6px * var(--beilv));
|
||||||
|
font-size: calc(12px * var(--beilv));
|
||||||
|
color: #fff9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__right--inner > div::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: calc(2px * var(--beilv));
|
||||||
|
width: calc(8px * var(--beilv));
|
||||||
|
height: calc(8px * var(--beilv));
|
||||||
|
}
|
||||||
|
|
||||||
|
.plb::before {
|
||||||
background: linear-gradient(to top, #49fbd6, transparent);
|
background: linear-gradient(to top, #49fbd6, transparent);
|
||||||
}
|
}
|
||||||
.plb::before {
|
.pla::before {
|
||||||
background: linear-gradient(to top, #49b2ff, transparent);
|
background: linear-gradient(to top, #49b2ff, transparent);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -126,8 +126,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.visual-base-table-container >>> ::-webkit-scrollbar-button {
|
.visual-base-table-container >>> ::-webkit-scrollbar-button {
|
||||||
width: calc(8px * var(--beilv));
|
/* width: calc(8px * var(--beilv));
|
||||||
height: calc(8px * var(--beilv));
|
height: calc(8px * var(--beilv)); */
|
||||||
|
display: none;
|
||||||
background: #5bc4bf9f;
|
background: #5bc4bf9f;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@@ -137,15 +138,10 @@ export default {
|
|||||||
background: #5bc4bf9f;
|
background: #5bc4bf9f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .visual-base-table-container {
|
|
||||||
min-width: 30vw;
|
|
||||||
} */
|
|
||||||
.visual-base-table-container {
|
.visual-base-table-container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
/* .visual-base-table-container >>> .el-table {
|
|
||||||
min-width: 120%;
|
|
||||||
} */
|
|
||||||
/* 清除默认样式 */
|
/* 清除默认样式 */
|
||||||
.visual-base-table-container >>> th.gutter {
|
.visual-base-table-container >>> th.gutter {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ export default {
|
|||||||
dataList: {
|
dataList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
dataPeriod: {
|
||||||
|
type: String,
|
||||||
|
default: 'month'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -109,7 +113,7 @@ export default {
|
|||||||
title: {
|
title: {
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
textVerticalAlign: 'middle',
|
textVerticalAlign: 'middle',
|
||||||
left: '69%',
|
left: '65%',
|
||||||
top: '46%',
|
top: '46%',
|
||||||
text: '',
|
text: '',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
@@ -125,6 +129,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
|
selectedMode: false,
|
||||||
top: '12%',
|
top: '12%',
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
@@ -209,7 +214,8 @@ export default {
|
|||||||
{
|
{
|
||||||
name: 'PieForm',
|
name: 'PieForm',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
center: ['70%', '56%'],
|
silent: true,
|
||||||
|
center: ['66%', '56%'],
|
||||||
radius: ['45%', '65%'],
|
radius: ['45%', '65%'],
|
||||||
avoidLabelOverlap: true,
|
avoidLabelOverlap: true,
|
||||||
label: {
|
label: {
|
||||||
@@ -237,20 +243,20 @@ export default {
|
|||||||
const colorGradient = colors[dataIndex]
|
const colorGradient = colors[dataIndex]
|
||||||
if (totalRate + percent < 25) {
|
if (totalRate + percent < 25) {
|
||||||
/** 也许这里需要完善,但目前工作良好 */
|
/** 也许这里需要完善,但目前工作良好 */
|
||||||
;(() => {})()
|
(() => {})()
|
||||||
} else if (totalRate + percent < 50) {
|
} else if (totalRate + percent < 50) {
|
||||||
colorGradient.x = 0
|
colorGradient.x = 0
|
||||||
colorGradient.y = 0
|
colorGradient.y = 0
|
||||||
colorGradient.x2 = 1
|
colorGradient.x2 = 1
|
||||||
colorGradient.y2 = 1
|
colorGradient.y2 = 1
|
||||||
} else if (totalRate + percent >= 50 && dataIndex == 1) {
|
} else if (totalRate + percent >= 50 && dataIndex === 1) {
|
||||||
colorGradient.x = 1
|
colorGradient.x = 1
|
||||||
colorGradient.y = 1
|
colorGradient.y = 1
|
||||||
colorGradient.x2 = 0
|
colorGradient.x2 = 0
|
||||||
colorGradient.y2 = 0
|
colorGradient.y2 = 0
|
||||||
} else if (totalRate + percent < 100) {
|
} else if (totalRate + percent < 100) {
|
||||||
/** 也许这里需要完善,但目前工作良好 */
|
/** 也许这里需要完善,但目前工作良好 */
|
||||||
;(() => {})()
|
(() => {})()
|
||||||
}
|
}
|
||||||
|
|
||||||
totalRate += percent
|
totalRate += percent
|
||||||
@@ -300,22 +306,25 @@ export default {
|
|||||||
applyChartOption(datalist) {
|
applyChartOption(datalist) {
|
||||||
const fs5 = this.calcFontsize(5 /** px*/)
|
const fs5 = this.calcFontsize(5 /** px*/)
|
||||||
const fs8 = this.calcFontsize(8 /** px*/)
|
const fs8 = this.calcFontsize(8 /** px*/)
|
||||||
const fs10 = this.calcFontsize(10 /** px*/)
|
// const fs10 = this.calcFontsize(10 /** px*/)
|
||||||
const fs12 = this.calcFontsize(12 /** px*/)
|
const fs12 = this.calcFontsize(12 /** px*/)
|
||||||
const fs13 = this.calcFontsize(13 /** px*/)
|
const fs13 = this.calcFontsize(13 /** px*/)
|
||||||
const fs18 = this.calcFontsize(18 /** px*/)
|
// const fs18 = this.calcFontsize(18 /** px*/)
|
||||||
const fs20 = this.calcFontsize(20 /** px*/)
|
const fs20 = this.calcFontsize(20 /** px*/)
|
||||||
const legendTextFixWidth = this.calcFontsize(56 /** px*/)
|
const legendTextFixWidth = this.calcFontsize(48 /** px*/)
|
||||||
const legnedTop = this.calcFontsize(64 /** px*/)
|
const legnedTop = this.calcFontsize(72 /** px*/)
|
||||||
const legendTopRate = this.calcFontsize(30 /** % */)
|
// const legendTopRate = this.calcFontsize(30 /** % */)
|
||||||
|
|
||||||
this.configs.title.text = this.dataList.reduce((prev, curr) => prev + curr.value * 1000, 0)
|
this.configs.title.text =
|
||||||
|
this.dataPeriod === 'month'
|
||||||
|
? this.dataList.reduce((prev, curr) => prev + curr.value * 1000, 0) // 如果是月数据,单位为 千片
|
||||||
|
: this.dataList.reduce((prev, curr) => prev + curr.value, 0) // 如果是日数据,单位为 片
|
||||||
this.configs.title.textStyle.fontSize = fs20
|
this.configs.title.textStyle.fontSize = fs20
|
||||||
this.configs.title.subtextStyle.fontSize = fs13
|
this.configs.title.subtextStyle.fontSize = fs13
|
||||||
|
|
||||||
// this.configs.legend.top = legendTopRate + '%'
|
// this.configs.legend.top = legendTopRate + '%'
|
||||||
this.configs.legend.top = legnedTop
|
this.configs.legend.top = legnedTop
|
||||||
this.configs.legend.left = 0 + '%'
|
this.configs.legend.left = 3 + '%'
|
||||||
this.configs.legend.itemGap = fs8
|
this.configs.legend.itemGap = fs8
|
||||||
this.configs.legend.itemWidth = fs8
|
this.configs.legend.itemWidth = fs8
|
||||||
|
|
||||||
|
|||||||
323
src/views/QualityManager/components/charts/TechyBar.vue
Normal file
323
src/views/QualityManager/components/charts/TechyBar.vue
Normal file
@@ -0,0 +1,323 @@
|
|||||||
|
<template>
|
||||||
|
<div ref="techyBar" class="techy-bar"></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import echarts from 'echarts' // echarts theme
|
||||||
|
import resize from '@/views/OperationalOverview/components/mixins/resize'
|
||||||
|
import * as BottomPic from './bottom.png'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TechyBar',
|
||||||
|
props: {
|
||||||
|
datainfo: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [
|
||||||
|
{
|
||||||
|
name: '产线A',
|
||||||
|
list: [100, 102, 104, 105, 100, 117]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '产线B',
|
||||||
|
list: [110, 92, 124, 85, 100, 120]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
unitName: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
extraSpaceBetweenZero: {
|
||||||
|
type: Number,
|
||||||
|
default: 25
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mixins: [resize],
|
||||||
|
data() {
|
||||||
|
const color_gradients = [
|
||||||
|
/** 蓝 */
|
||||||
|
{
|
||||||
|
direction: 'to top',
|
||||||
|
from: '#49B2FF', // * 0.6 是底部颜色和顶部颜色
|
||||||
|
to: '#49B2FF00',
|
||||||
|
topAndBottom: '#49B2FF9F'
|
||||||
|
},
|
||||||
|
/** 绿 */
|
||||||
|
{
|
||||||
|
direction: 'to top',
|
||||||
|
from: '#49FBD6', // * 0.6 是底部颜色和顶部颜色
|
||||||
|
to: '#49FBD600',
|
||||||
|
topAndBottom: '#49FBD69F'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
let result = []
|
||||||
|
|
||||||
|
this.datainfo.map((pl, index) => {
|
||||||
|
let topCircle = {
|
||||||
|
__position: 'top',
|
||||||
|
name: pl.name,
|
||||||
|
barGap: '10%',
|
||||||
|
barCategoryGap: '48%',
|
||||||
|
type: 'pictorialBar',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolPosition: 'end',
|
||||||
|
symbolOffset: ['25%', '-50%'],
|
||||||
|
// symbolSize: ['100%', 6],
|
||||||
|
symbolSize: ['200%', 6],
|
||||||
|
data: pl.list,
|
||||||
|
z: 10,
|
||||||
|
itemStyle: {
|
||||||
|
// color: color_gradients[index].topAndBottom
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 0,
|
||||||
|
y: 1,
|
||||||
|
x2: 0,
|
||||||
|
y2: 0,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: color_gradients[index].topAndBottom
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: color_gradients[index].to
|
||||||
|
}
|
||||||
|
],
|
||||||
|
global: false // 缺省为 false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let bottomCircle = {
|
||||||
|
__position: 'top',
|
||||||
|
name: pl.name,
|
||||||
|
barGap: '10%',
|
||||||
|
barCategoryGap: '48%',
|
||||||
|
type: 'pictorialBar',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolOffset: ['-25%', '50%'],
|
||||||
|
symbolSize: ['200%', 6],
|
||||||
|
data: pl.list,
|
||||||
|
z: 10,
|
||||||
|
itemStyle: {
|
||||||
|
color: color_gradients[index].from
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let mainBar = {
|
||||||
|
__position: 'main',
|
||||||
|
type: 'bar',
|
||||||
|
name: pl.name,
|
||||||
|
// barWidth: 20, // 不需要设置 barWidth
|
||||||
|
barGap: '10%',
|
||||||
|
barCategoryGap: '48%',
|
||||||
|
data: pl.list,
|
||||||
|
z: 0,
|
||||||
|
itemStyle: {
|
||||||
|
color: {
|
||||||
|
type: 'linear',
|
||||||
|
x: 0,
|
||||||
|
y: 1,
|
||||||
|
x2: 0,
|
||||||
|
y2: 0,
|
||||||
|
colorStops: [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: color_gradients[index].from
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 0.15,
|
||||||
|
color: color_gradients[index].topAndBottom
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: color_gradients[index].to
|
||||||
|
}
|
||||||
|
],
|
||||||
|
global: false // 缺省为 false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top',
|
||||||
|
color: '#fff8',
|
||||||
|
fontSize: 10,
|
||||||
|
offset: [0, 6]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result.push(topCircle)
|
||||||
|
result.push(mainBar)
|
||||||
|
result.push(bottomCircle)
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
BottomPic,
|
||||||
|
width: 0,
|
||||||
|
chart: null,
|
||||||
|
option: {
|
||||||
|
grid: {
|
||||||
|
left: '10%',
|
||||||
|
top: 72,
|
||||||
|
bottom: 28
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
show: true,
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
type: 'shadow',
|
||||||
|
shadowStyle: {
|
||||||
|
color: 'rgba(255,255,255,0.1)'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
padding: 10,
|
||||||
|
backgroundColor: 'rgba(13, 29, 53, 0.8)',
|
||||||
|
extraCssText: 'width: 128px !important; height: auto !important;',
|
||||||
|
formatter: params => {
|
||||||
|
const [, a, , , b] = params
|
||||||
|
return `<div style="display: flex; flex-direction: column; gap: 2px; align-items: flex-start; ">
|
||||||
|
<h2 style="font-size: calc(14px * var(--beilv)); margin: 0 0 4px; font-weight: normal; color: white;">${
|
||||||
|
a.name
|
||||||
|
}</h2>
|
||||||
|
<div style="display: flex; align-items: center; gap: 8px;">
|
||||||
|
<span style="width: 12px; height: 12px; background: linear-gradient(to top, ${
|
||||||
|
a.color.colorStops[0].color
|
||||||
|
}, transparent);"></span>
|
||||||
|
<span style="font-size: calc(10px * var(--beilv));">${a.seriesName}: ${a.data}</span>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center; gap: 8px;">
|
||||||
|
<span style="width: 12px; height: 12px; background: linear-gradient(to top, ${
|
||||||
|
b.color.colorStops[0].color
|
||||||
|
}, transparent);"></span>
|
||||||
|
<span style="font-size: calc(10px * var(--beilv));">${b.seriesName}: ${b.data}</span>
|
||||||
|
</div>
|
||||||
|
</div>`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
onZero: false,
|
||||||
|
show: false,
|
||||||
|
lineStyle: {}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#fff8',
|
||||||
|
fontSize: 12
|
||||||
|
},
|
||||||
|
data: ['脏污', '破片', '崩边', '崩孔', '划擦伤', '其他']
|
||||||
|
// axisPointer: {
|
||||||
|
// show: true,
|
||||||
|
// type: 'shadow',
|
||||||
|
// label: {
|
||||||
|
// show: true,
|
||||||
|
// formatter: params => {
|
||||||
|
// let info_arr = params.seriesData.filter(item => item.seriesType === 'bar')
|
||||||
|
// let v = [`<${info_arr[0].name}>详细数据: \n`]
|
||||||
|
// info_arr.map(item => { v.push(`${item.seriesName}: ${item.data}`) })
|
||||||
|
// return v.join('\n')
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
// min: -25,
|
||||||
|
min: this.extraSpaceBetweenZero * -1,
|
||||||
|
name: this.unitName + ' ',
|
||||||
|
nameTextStyle: {
|
||||||
|
color: '#fff8',
|
||||||
|
fontSize: 12,
|
||||||
|
verticalAlign: 'top',
|
||||||
|
align: 'right'
|
||||||
|
},
|
||||||
|
nameGap: 20,
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#31A2FF'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#fff8',
|
||||||
|
fontSize: 12,
|
||||||
|
/** y轴不从0开始,也可以用 xAxis 向下 offset 的方式模拟 **/
|
||||||
|
formatter: function(value, index) {
|
||||||
|
if (value < 0) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisTick: { show: false },
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: '#569acd',
|
||||||
|
type: 'dotted',
|
||||||
|
opacity: 0.2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
series: result,
|
||||||
|
|
||||||
|
graphic: [
|
||||||
|
{
|
||||||
|
type: 'image',
|
||||||
|
left: 0,
|
||||||
|
bottom: 0,
|
||||||
|
scaleX: 0.8,
|
||||||
|
style: {
|
||||||
|
image: 'image url',
|
||||||
|
height: 0,
|
||||||
|
width: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
window.addEventListener('resize', this.refreshOption)
|
||||||
|
if (!this.chart) this.chart = echarts.init(this.$refs.techyBar)
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.updateOption(this.option)
|
||||||
|
this.chart.setOption(this.option)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
updateOption(option) {
|
||||||
|
// console.log('option', this.BottomPic.default)
|
||||||
|
let width = this.$refs.techyBar.querySelector('div').clientWidth
|
||||||
|
let height = this.$refs.techyBar.querySelector('div').clientHeight
|
||||||
|
option.graphic[0].style.width = width * 0.85
|
||||||
|
option.graphic[0].style.height = height * 0.25
|
||||||
|
option.graphic[0].style.image = this.BottomPic.default
|
||||||
|
option.graphic[0].left = '10%'
|
||||||
|
option.graphic[0].bottom = 28
|
||||||
|
},
|
||||||
|
refreshOption() {
|
||||||
|
this.updateOption(this.option)
|
||||||
|
this.chart.setOption(this.option)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.techy-bar {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.techy-bar >>> div {
|
||||||
|
width: 100% !important;
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
BIN
src/views/QualityManager/components/charts/bottom.png
Normal file
BIN
src/views/QualityManager/components/charts/bottom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
@@ -1,398 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div
|
|
||||||
ref="chartContainer"
|
|
||||||
class="chartContainer"
|
|
||||||
:class="bindClass"
|
|
||||||
style="position: relative; width: 100%; height:100%"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import echarts from 'echarts' // echarts theme
|
|
||||||
import resize from '@/views/OperationalOverview/components/mixins/resize'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'OverviewBar',
|
|
||||||
mixins: [resize],
|
|
||||||
props: {
|
|
||||||
unitName: {
|
|
||||||
type: String,
|
|
||||||
default: '单位: 片'
|
|
||||||
},
|
|
||||||
chartName: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
xlabelFontSize: {
|
|
||||||
type: Number,
|
|
||||||
default: 12
|
|
||||||
},
|
|
||||||
xlabelRotate: {
|
|
||||||
type: Number,
|
|
||||||
default: 0
|
|
||||||
},
|
|
||||||
nameList: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
},
|
|
||||||
dataList: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
chart: null,
|
|
||||||
series: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
bindClass() {
|
|
||||||
return {
|
|
||||||
'fault-category-chart': this.chartName === 'fault-category',
|
|
||||||
'process-fault-chart': this.chartName === 'process-fault',
|
|
||||||
'realtime-production-cost-chart': this.chartName === 'realtime-cost-production'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if (this.dataList.length > 1) {
|
|
||||||
this.series = [
|
|
||||||
{
|
|
||||||
// 柱体
|
|
||||||
name: this.dataList[0].name,
|
|
||||||
type: 'bar',
|
|
||||||
barWidth: 20,
|
|
||||||
itemStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: this.dataList[0].topColor },
|
|
||||||
{ offset: 1, color: this.dataList[0].bottomColor }
|
|
||||||
])
|
|
||||||
},
|
|
||||||
data: this.dataList[0].data
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// 柱顶
|
|
||||||
name: this.dataList[0].name,
|
|
||||||
type: 'pictorialBar',
|
|
||||||
barWidth: 20,
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolPosition: 'end',
|
|
||||||
symbolOffset: ['-70%', '-50%'],
|
|
||||||
symbolSize: [20, 6],
|
|
||||||
zlevel: 2,
|
|
||||||
itemStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'rgba(59, 76, 118, 0)' },
|
|
||||||
{ offset: 1, color: '#2c6e7d' }
|
|
||||||
])
|
|
||||||
},
|
|
||||||
data: this.dataList[0].data,
|
|
||||||
label: {
|
|
||||||
color:
|
|
||||||
this.chartName === 'process-fault'
|
|
||||||
? 'rgba(119, 255, 242, 1)'
|
|
||||||
: this.chartName === 'fault-category'
|
|
||||||
? '#31a2ff'
|
|
||||||
: '#fff9',
|
|
||||||
show: true,
|
|
||||||
offset: [-12, 10],
|
|
||||||
position: 'top',
|
|
||||||
vertialAlign: 'bottom'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// 柱底
|
|
||||||
name: this.dataList[0].name,
|
|
||||||
type: 'pictorialBar',
|
|
||||||
barWidth: 20,
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolOffset: ['-62%', '50%'],
|
|
||||||
symbolSize: [20, 6],
|
|
||||||
itemStyle: { color: this.dataList[0].bottomColor },
|
|
||||||
data: this.dataList[0].data
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// 柱体
|
|
||||||
name: this.dataList[1].name,
|
|
||||||
type: 'bar',
|
|
||||||
barWidth: 20,
|
|
||||||
itemStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: this.dataList[1].topColor },
|
|
||||||
{ offset: 1, color: this.dataList[1].bottomColor }
|
|
||||||
])
|
|
||||||
},
|
|
||||||
data: this.dataList[1].data
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// 柱顶
|
|
||||||
name: this.dataList[1].name,
|
|
||||||
type: 'pictorialBar',
|
|
||||||
barWidth: 20,
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolPosition: 'end',
|
|
||||||
symbolOffset: ['66%', '-50%'],
|
|
||||||
symbolSize: [20, 6],
|
|
||||||
zlevel: 2,
|
|
||||||
itemStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: this.dataList[1].topColor },
|
|
||||||
{ offset: 1, color: this.dataList[1].bottomColor }
|
|
||||||
])
|
|
||||||
},
|
|
||||||
data: this.dataList[1].data,
|
|
||||||
label: {
|
|
||||||
color:
|
|
||||||
this.chartName === 'process-fault'
|
|
||||||
? 'rgba(119, 255, 242, 1)'
|
|
||||||
: this.chartName === 'fault-category'
|
|
||||||
? '#31a2ff'
|
|
||||||
: '#fff9',
|
|
||||||
show: true,
|
|
||||||
offset: [12, 10],
|
|
||||||
position: 'top',
|
|
||||||
vertialAlign: 'bottom'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// 柱底
|
|
||||||
name: this.dataList[1].name,
|
|
||||||
type: 'pictorialBar',
|
|
||||||
barWidth: 20,
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolOffset: ['66%', '50%'],
|
|
||||||
symbolSize: [20, 6],
|
|
||||||
itemStyle: { color: this.dataList[1].bottomColor },
|
|
||||||
data: this.dataList[1].data
|
|
||||||
}
|
|
||||||
]
|
|
||||||
} else {
|
|
||||||
const barWidth = 400 / 2 / this.dataList[0].data.length
|
|
||||||
this.series = [
|
|
||||||
{
|
|
||||||
// 柱体
|
|
||||||
name: this.dataList[0].name,
|
|
||||||
type: 'bar',
|
|
||||||
barWidth: barWidth,
|
|
||||||
itemStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: this.dataList[0].topColor },
|
|
||||||
{ offset: 1, color: this.dataList[0].bottomColor }
|
|
||||||
])
|
|
||||||
},
|
|
||||||
data: this.dataList[0].data
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// 柱顶
|
|
||||||
name: this.dataList[0].name,
|
|
||||||
type: 'pictorialBar',
|
|
||||||
barWidth: barWidth,
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolPosition: 'end',
|
|
||||||
symbolOffset: [0, '-50%'],
|
|
||||||
symbolSize: [barWidth, 6],
|
|
||||||
zlevel: 2,
|
|
||||||
itemStyle: {
|
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
||||||
{ offset: 0, color: 'rgba(59, 76, 118, 0)' },
|
|
||||||
{ offset: 1, color: '#2c6e7d' }
|
|
||||||
])
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
color:
|
|
||||||
this.chartName === 'process-fault'
|
|
||||||
? 'rgba(119, 255, 242, 1)'
|
|
||||||
: this.chartName === 'fault-category'
|
|
||||||
? '#31a2ff'
|
|
||||||
: '#fff9',
|
|
||||||
show: true,
|
|
||||||
offset: [0, 10],
|
|
||||||
position: 'top',
|
|
||||||
vertialAlign: 'bottom'
|
|
||||||
},
|
|
||||||
data: this.dataList[0].data
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// 柱底
|
|
||||||
name: this.dataList[0].name,
|
|
||||||
type: 'pictorialBar',
|
|
||||||
barWidth: barWidth,
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolOffset: [0, '50%'],
|
|
||||||
symbolSize: [barWidth, 6],
|
|
||||||
itemStyle: { color: '#2c6e7d' },
|
|
||||||
data: this.dataList[0].data
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
|
||||||
console.log('on Mounted(): ')
|
|
||||||
this.initChart()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
if (!this.chart) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.chart.dispose()
|
|
||||||
this.chart = null
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initChart() {
|
|
||||||
this.chart = echarts.init(this.$refs.chartContainer)
|
|
||||||
this.chart.setOption({
|
|
||||||
grid: {
|
|
||||||
top: '24%',
|
|
||||||
left: '8%',
|
|
||||||
right: '5%',
|
|
||||||
bottom: '5%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
show: false,
|
|
||||||
itemWidth: 10,
|
|
||||||
itemHeight: 10,
|
|
||||||
selectedMode: false,
|
|
||||||
top: '7%',
|
|
||||||
right: '2%',
|
|
||||||
textStyle: {
|
|
||||||
color: '#fff9',
|
|
||||||
fontSize: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
axisLine: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
axisTick: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
margin: 16,
|
|
||||||
textStyle: {
|
|
||||||
fontSize: this.xlabelFontSize,
|
|
||||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
|
||||||
},
|
|
||||||
rotate: this.xlabelRotate
|
|
||||||
},
|
|
||||||
data: this.nameList
|
|
||||||
},
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
name: this.unitName, // '单位: 片',
|
|
||||||
nameTextStyle: { align: 'right', fontSize: 9, color: '#fff9' },
|
|
||||||
type: 'value',
|
|
||||||
splitNumber: 3,
|
|
||||||
axisTick: { show: false },
|
|
||||||
onZero: true,
|
|
||||||
position: 'left',
|
|
||||||
offset: 10,
|
|
||||||
axisLine: {
|
|
||||||
lineStyle: {
|
|
||||||
type: 'solid',
|
|
||||||
color: this.dataList[0].bottomColor,
|
|
||||||
// color: 'rgba(119, 255, 242, 0.6)', // 左边线的颜色
|
|
||||||
width: '1' // 坐标线的宽度
|
|
||||||
}
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
textStyle: {
|
|
||||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
|
||||||
}
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
lineStyle: {
|
|
||||||
type: 'dotted',
|
|
||||||
color: 'rgba(119, 255, 242, 0.2)'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
type: 'value'
|
|
||||||
}
|
|
||||||
// {
|
|
||||||
// name: '能耗kw/h',
|
|
||||||
// nameTextStyle: { align: 'right', fontSize: 9, color: '#fff9' },
|
|
||||||
// type: 'value',
|
|
||||||
// splitNumber: 3,
|
|
||||||
// axisTick: { show: false },
|
|
||||||
// onZero: true,
|
|
||||||
// position: 'left',
|
|
||||||
// offset: 48,
|
|
||||||
// axisLine: {
|
|
||||||
// lineStyle: {
|
|
||||||
// type: 'solid',
|
|
||||||
// color: this.dataList[1].bottomColor,
|
|
||||||
// width: '1' // 坐标线的宽度
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// axisLabel: {
|
|
||||||
// textStyle: {
|
|
||||||
// color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// splitLine: {
|
|
||||||
// show: false
|
|
||||||
// // lineStyle: {
|
|
||||||
// // type: 'dotted',
|
|
||||||
// // color: 'rgba(119, 255, 242, 0.2)'
|
|
||||||
// // }
|
|
||||||
// },
|
|
||||||
// type: 'value'
|
|
||||||
// }
|
|
||||||
],
|
|
||||||
series: this.series
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.chartContainer >>> div {
|
|
||||||
width: 100% !important;
|
|
||||||
height: 100% !important;
|
|
||||||
/* position: relative !important; */
|
|
||||||
}
|
|
||||||
|
|
||||||
.fault-category-chart >>> div::before {
|
|
||||||
/* .fault-category-chart::before { */
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
/* bottom: calc(100vh/1920 * 80);
|
|
||||||
left: calc(100vw/1920 * 48); */
|
|
||||||
/* bottom: calc(10% + 100vh/1920 * 28); */
|
|
||||||
bottom: 25px;
|
|
||||||
left: 9%;
|
|
||||||
height: 52px;
|
|
||||||
width: 90%;
|
|
||||||
background: linear-gradient(to top, #31a2ff6d, transparent);
|
|
||||||
transform: skew(-45deg);
|
|
||||||
z-index: 0;
|
|
||||||
}
|
|
||||||
.process-fault-chart >>> div::before {
|
|
||||||
/* .process-fault-chart::before { */
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
bottom: 26px;
|
|
||||||
left: 10%;
|
|
||||||
height: 48px;
|
|
||||||
width: 90%;
|
|
||||||
background: linear-gradient(to top, #49fbd789, transparent);
|
|
||||||
transform: skew(-45deg);
|
|
||||||
z-index: 0;
|
|
||||||
}
|
|
||||||
.realtime-production-cost-chart >>> div::before {
|
|
||||||
/* .fault-category-chart::before { */
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
bottom: 12%;
|
|
||||||
left: 6%;
|
|
||||||
height: 30px;
|
|
||||||
width: 90%;
|
|
||||||
border-radius: 3px;
|
|
||||||
/* border: 1px solid #49fbd7; */
|
|
||||||
background: linear-gradient(to top, #49fbd789 5%, transparent);
|
|
||||||
transform: skew(-35deg);
|
|
||||||
z-index: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -5,67 +5,95 @@
|
|||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
import resize from '@/views/OperationalOverview/components/mixins/resize'
|
import resize from '@/views/OperationalOverview/components/mixins/resize'
|
||||||
|
import { Random } from 'mockjs'
|
||||||
|
|
||||||
export default {
|
class ChartOption {
|
||||||
name: 'PlFaultAnalysisPieChart',
|
constructor() {
|
||||||
mixins: [resize],
|
this.color = ['#DDB112', '#1A99FF', '#FB418C', '#A691FF', '#49FBD6']
|
||||||
props: {
|
|
||||||
dataUpdateToken: {
|
this.legend = {
|
||||||
type: String,
|
top: 14,
|
||||||
default: 'default-token'
|
right: 22,
|
||||||
|
itemWidth: 6,
|
||||||
|
itemHeight: 8,
|
||||||
|
textStyle: {
|
||||||
|
color: '#DFF1FECC',
|
||||||
|
fontSize: 12
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
data() {
|
|
||||||
return {
|
this.grid = {
|
||||||
chart: null,
|
top: 72,
|
||||||
configs: {
|
left: 12,
|
||||||
color: ['#FB418C', '#DDB112', '#1A99FF', '#A691FF', '#49FBD6'],
|
right: 28,
|
||||||
tooltip: {
|
bottom: 20,
|
||||||
|
containLabel: true
|
||||||
|
}
|
||||||
|
|
||||||
|
this.tooltip = {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
padding: 10,
|
||||||
|
backgroundColor: 'rgba(13, 29, 53, 0.8)',
|
||||||
extraCssText: 'width: 180px !important; ',
|
extraCssText: 'width: 180px !important; ',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'cross',
|
type: 'line',
|
||||||
label: {
|
lineStyle: {
|
||||||
backgroundColor: '#6a7985'
|
type: 'dotted',
|
||||||
}
|
color: '#7BFFFB'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
formatter: params => {
|
||||||
top: '25%',
|
return `
|
||||||
left: '2%',
|
<div style="display: flex; flex-direction: column; gap: calc(4px * var(--beilv));">
|
||||||
right: '5%',
|
<h2 style="font-size: calc(14px * var(--beilv)); margin: 0 0 4px; font-weight: normal; color: white;">${params[0].axisValue}</h2>
|
||||||
bottom: '5%',
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
containLabel: true
|
this.color[0]
|
||||||
},
|
}"></span><span>${params[0].seriesName}: ${params[0].value}</span></span>
|
||||||
xAxis: [
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
{
|
this.color[1]
|
||||||
|
}"></span><span>${params[1].seriesName}: ${params[1].value}</span></span>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let today = new Date()
|
||||||
|
this.xAxis = {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
boundaryGap: false,
|
boundaryGap: false,
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#ffffff66'
|
color: '#fff3'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisTick: { show: false },
|
axisTick: { show: false },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: 'rgba(255,255,255,1)' //
|
fontSize: 12,
|
||||||
|
color: '#fff8' //
|
||||||
},
|
},
|
||||||
margin: 12
|
margin: 12
|
||||||
},
|
},
|
||||||
data: ['A', 'B', 'C', 'D', 'E', 'F', 'G']
|
data:
|
||||||
|
this.mode === 'month'
|
||||||
|
? Array(new Date(today.getFullYear(), today.getMonth() + 1, 0).getDate())
|
||||||
|
.fill(1)
|
||||||
|
.map((_, idx) => idx + 1)
|
||||||
|
: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
|
||||||
}
|
}
|
||||||
],
|
|
||||||
yAxis: [
|
this.yAxis = [
|
||||||
{
|
{
|
||||||
name: '成品率',
|
name: '成品率 ',
|
||||||
type: 'value',
|
type: 'value',
|
||||||
min: 'dataMin',
|
min: '80',
|
||||||
splitNumber: 4,
|
splitNumber: 4,
|
||||||
|
nameGap: 16,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: 'rgba(255,255,255,0.7)',
|
color: 'rgba(255,255,255,0.7)',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
align: 'right'
|
align: 'left',
|
||||||
|
verticalAlign: 'bottom'
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@@ -80,6 +108,7 @@ export default {
|
|||||||
axisLabel: {
|
axisLabel: {
|
||||||
formatter: '{value} %',
|
formatter: '{value} %',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
|
fontSize: 12,
|
||||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -90,49 +119,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
series: [
|
|
||||||
|
this.series = [
|
||||||
{
|
{
|
||||||
name: 'A1下片机',
|
name: 'A1下片机',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'none',
|
// symbol: 'none',
|
||||||
areaStyle: {
|
symbol: 'circle',
|
||||||
// color: 'rgba(50,145,152,0.5)'
|
symbolSize: 1,
|
||||||
color: {
|
showSymbol: false,
|
||||||
type: 'linear',
|
// smooth: true,
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
x2: 0,
|
|
||||||
y2: 1,
|
|
||||||
colorStops: [
|
|
||||||
{
|
|
||||||
offset: 0,
|
|
||||||
color: '#FB418C66' // 0% 处的颜色
|
|
||||||
},
|
|
||||||
{
|
|
||||||
offset: 1,
|
|
||||||
color: 'transparent' // 100% 处的颜色
|
|
||||||
}
|
|
||||||
],
|
|
||||||
global: false // 缺省为 false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
data: [11, 199, 140, 63, 185, 5, 78].map(_ => {
|
|
||||||
let v = Math.floor(Math.random() * 100)
|
|
||||||
while (v < 80) {
|
|
||||||
v = Math.floor(Math.random() * 100)
|
|
||||||
}
|
|
||||||
return v
|
|
||||||
})
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '磨边机',
|
|
||||||
type: 'line',
|
|
||||||
symbol: 'none',
|
|
||||||
|
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
// color: 'rgba(50,145,152,0.5)'
|
// color: 'rgba(50,145,152,0.5)'
|
||||||
color: {
|
color: {
|
||||||
@@ -155,21 +152,26 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
emphasis: {
|
emphasis: {
|
||||||
focus: 'series'
|
focus: 'series',
|
||||||
|
scale: 1.2
|
||||||
},
|
},
|
||||||
data: [151, 57, 31, 7, 77, 88, 119].map(_ => {
|
data:
|
||||||
let v = Math.floor(Math.random() * 100)
|
this.mode === 'month'
|
||||||
while (v < 80) {
|
? Array(30)
|
||||||
v = Math.floor(Math.random() * 100)
|
.fill(1)
|
||||||
}
|
.map(_ => Random.integer(94, 99))
|
||||||
return v
|
: Array(7)
|
||||||
})
|
.fill(1)
|
||||||
|
.map(_ => Random.integer(94, 99))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '镀膜机',
|
name: '磨边机',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'none',
|
// symbol: 'none',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 1,
|
||||||
|
showSymbol: false,
|
||||||
|
// smooth: true,
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
// color: 'rgba(50,145,152,0.5)'
|
// color: 'rgba(50,145,152,0.5)'
|
||||||
color: {
|
color: {
|
||||||
@@ -181,7 +183,7 @@ export default {
|
|||||||
colorStops: [
|
colorStops: [
|
||||||
{
|
{
|
||||||
offset: 0,
|
offset: 0,
|
||||||
color: '#1A99FF66' // 0% 处的颜色
|
color: '#1A99FFCC' // 0% 处的颜色
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
offset: 1,
|
offset: 1,
|
||||||
@@ -194,94 +196,67 @@ export default {
|
|||||||
emphasis: {
|
emphasis: {
|
||||||
focus: 'series'
|
focus: 'series'
|
||||||
},
|
},
|
||||||
data: [58, 3, 67, 100, 42, 96, 124].map(_ => {
|
data:
|
||||||
let v = Math.floor(Math.random() * 100)
|
this.mode === 'month'
|
||||||
while (v < 80) {
|
? Array(30)
|
||||||
v = Math.floor(Math.random() * 100)
|
.fill(1)
|
||||||
}
|
.map(_ => Random.integer(94, 99))
|
||||||
return v
|
: Array(7)
|
||||||
})
|
.fill(1)
|
||||||
},
|
.map(_ => Random.integer(94, 99))
|
||||||
{
|
|
||||||
name: '包装纸',
|
|
||||||
type: 'line',
|
|
||||||
symbol: 'none',
|
|
||||||
|
|
||||||
areaStyle: {
|
|
||||||
// color: 'rgba(50,145,152,0.5)'
|
|
||||||
color: {
|
|
||||||
type: 'linear',
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
x2: 0,
|
|
||||||
y2: 1,
|
|
||||||
colorStops: [
|
|
||||||
{
|
|
||||||
offset: 0,
|
|
||||||
color: '#A691FF66' // 0% 处的颜色
|
|
||||||
},
|
|
||||||
{
|
|
||||||
offset: 1,
|
|
||||||
color: 'transparent' // 100% 处的颜色
|
|
||||||
}
|
|
||||||
],
|
|
||||||
global: false // 缺省为 false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
data: [92, 88, 122, 169, 108, 130, 147].map(_ => {
|
|
||||||
let v = Math.floor(Math.random() * 100)
|
|
||||||
while (v < 80) {
|
|
||||||
v = Math.floor(Math.random() * 100)
|
|
||||||
}
|
|
||||||
return v
|
|
||||||
})
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '丝印',
|
|
||||||
type: 'line',
|
|
||||||
symbol: 'none',
|
|
||||||
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top'
|
|
||||||
},
|
|
||||||
areaStyle: {
|
|
||||||
// color: 'rgba(50,145,152,0.5)'
|
|
||||||
color: {
|
|
||||||
type: 'linear',
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
x2: 0,
|
|
||||||
y2: 1,
|
|
||||||
colorStops: [
|
|
||||||
{
|
|
||||||
offset: 0,
|
|
||||||
color: '#49FBD666' // 0% 处的颜色
|
|
||||||
},
|
|
||||||
{
|
|
||||||
offset: 1,
|
|
||||||
color: 'transparent' // 100% 处的颜色
|
|
||||||
}
|
|
||||||
],
|
|
||||||
global: false // 缺省为 false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
data: [44, 40, 118, 197, 123, 95, 96].map(_ => {
|
|
||||||
let v = Math.floor(Math.random() * 100)
|
|
||||||
while (v < 80) {
|
|
||||||
v = Math.floor(Math.random() * 100)
|
|
||||||
}
|
|
||||||
return v
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get option() {
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
optionFilter(option, calcSize = () => {} /** callback */) {
|
||||||
|
let newOption
|
||||||
|
if (Array.isArray(option)) {
|
||||||
|
newOption = []
|
||||||
|
option.forEach(item => {
|
||||||
|
newOption.push(this.optionFilter(item, calcSize))
|
||||||
|
})
|
||||||
|
return newOption
|
||||||
|
} else if (typeof option === 'object') {
|
||||||
|
newOption = {}
|
||||||
|
for (const key in option) {
|
||||||
|
if (key === 'colorStops') newOption[key] = option[key]
|
||||||
|
else if (
|
||||||
|
typeof option[key] === 'number' /** 过滤不做变化的属性 */ &&
|
||||||
|
['splitNumber', 'x', 'x2', 'y', 'y2', 'yAxisIndex', 'xAxisIndex'].indexOf(key) === -1
|
||||||
|
) {
|
||||||
|
newOption[key] = calcSize(option[key])
|
||||||
|
} else newOption[key] = this.optionFilter(option[key], calcSize)
|
||||||
|
}
|
||||||
|
return newOption
|
||||||
|
} else {
|
||||||
|
newOption = calcSize(option)
|
||||||
|
return option
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'PlFaultAnalysisPieChart',
|
||||||
|
mixins: [resize],
|
||||||
|
props: {
|
||||||
|
mode: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
validator: val => ['month', 'day'].indexOf(val) !== -1
|
||||||
|
},
|
||||||
|
dataUpdateToken: {
|
||||||
|
type: String,
|
||||||
|
default: 'default-token'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chart: null,
|
||||||
|
configs: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -292,32 +267,107 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener('resize', function() {
|
|
||||||
if (this.chart) {
|
|
||||||
this.chart.resize()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// if (!this.chart) this.chart = echarts.init(this.$refs.chartContainer, { width: '100%', height: '100%' })
|
|
||||||
if (!this.chart) this.chart = echarts.init(this.$refs.chartContainer)
|
if (!this.chart) this.chart = echarts.init(this.$refs.chartContainer)
|
||||||
|
this.setChartOption()
|
||||||
this.chart.setOption(this.configs)
|
|
||||||
this.chart.resize()
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refreshData() {
|
refreshData() {
|
||||||
this.configs.series.forEach(item => {
|
// update xaxis
|
||||||
item.data = [44, 40, 118, 197, 123, 95, 96].map(_ => {
|
let today = new Date()
|
||||||
let v = Math.floor(Math.random() * 100)
|
this.configs.xAxis.data =
|
||||||
while (v < 80) {
|
this.mode === 'month'
|
||||||
v = Math.floor(Math.random() * 100)
|
? Array(new Date(today.getFullYear(), today.getMonth() + 1, 0).getDate())
|
||||||
|
.fill(1)
|
||||||
|
.map((_, idx) => idx + 1)
|
||||||
|
: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
|
||||||
|
|
||||||
|
// update tooltip
|
||||||
|
if (this.mode === 'month') {
|
||||||
|
this.configs.tooltip = {
|
||||||
|
trigger: 'axis',
|
||||||
|
padding: 10,
|
||||||
|
backgroundColor: 'rgba(13, 29, 53, 0.8)',
|
||||||
|
extraCssText: 'width: 180px !important; ',
|
||||||
|
axisPointer: {
|
||||||
|
type: 'line',
|
||||||
|
lineStyle: {
|
||||||
|
type: 'dotted',
|
||||||
|
color: '#7BFFFB'
|
||||||
}
|
}
|
||||||
return v
|
},
|
||||||
})
|
formatter: params => {
|
||||||
|
const currentMonth = new Date().getMonth() + 1
|
||||||
|
return `
|
||||||
|
<div style="display: flex; flex-direction: column; gap: calc(4px * var(--beilv));">
|
||||||
|
<h2 style="font-size: calc(14px * var(--beilv)); margin: 0 0 4px; font-weight: normal; color: white;">${currentMonth}-${
|
||||||
|
params[0].axisValue
|
||||||
|
}</h2>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.configs.color[0]
|
||||||
|
}"></span><span>${params[0].seriesName}: ${params[0].value}</span></span>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.configs.color[1]
|
||||||
|
}"></span><span>${params[1].seriesName}: ${params[1].value}</span></span>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (this.mode === 'day') {
|
||||||
|
this.configs.tooltip = null
|
||||||
|
this.configs.tooltip = {
|
||||||
|
trigger: 'axis',
|
||||||
|
padding: 10,
|
||||||
|
backgroundColor: 'rgba(13, 29, 53, 0.8)',
|
||||||
|
extraCssText: 'width: 180px !important; ',
|
||||||
|
axisPointer: {
|
||||||
|
type: 'line',
|
||||||
|
lineStyle: {
|
||||||
|
type: 'dotted',
|
||||||
|
color: '#7BFFFB'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formatter: params => {
|
||||||
|
return `
|
||||||
|
<div style="display: flex; flex-direction: column; gap: calc(4px * var(--beilv));">
|
||||||
|
<h2 style="font-size: calc(14px * var(--beilv)); margin: 0 0 4px; font-weight: normal; color: white;">${
|
||||||
|
params[0].axisValue
|
||||||
|
}</h2>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.configs.color[0]
|
||||||
|
}"></span><span>${params[0].seriesName}: ${params[0].value}</span></span>
|
||||||
|
<span style="display: flex; align-items: center; gap: 8px;"><span style="width: 10px; height: 10px; border-radius: 5px; background: ${
|
||||||
|
this.configs.color[1]
|
||||||
|
}"></span><span>${params[1].seriesName}: ${params[1].value}</span></span>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// update series
|
||||||
|
this.configs.series.forEach(item => {
|
||||||
|
item.data =
|
||||||
|
this.mode === 'month'
|
||||||
|
? Array(30)
|
||||||
|
.fill(1)
|
||||||
|
.map(_ => Random.integer(94, 99))
|
||||||
|
: Array(7)
|
||||||
|
.fill(1)
|
||||||
|
.map(_ => Random.integer(94, 99))
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.chart) this.chart.setOption(this.configs)
|
if (this.chart) this.chart.setOption(this.configs)
|
||||||
|
},
|
||||||
|
calcSize(num) {
|
||||||
|
const beilv = document.documentElement.style.getPropertyValue('--beilv')
|
||||||
|
return num * beilv
|
||||||
|
},
|
||||||
|
setChartOption() {
|
||||||
|
let chartOption = new ChartOption()
|
||||||
|
this.configs = chartOption.optionFilter(chartOption.option, this.calcSize)
|
||||||
|
this.chart.setOption(this.configs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
243
src/views/QualityManager/components/productionRateHeader.vue
Normal file
243
src/views/QualityManager/components/productionRateHeader.vue
Normal file
@@ -0,0 +1,243 @@
|
|||||||
|
<template>
|
||||||
|
<div class="techy-analysis-header">
|
||||||
|
<div class="special-wrapper">
|
||||||
|
<div class="special-wrapper__left"></div>
|
||||||
|
<div class="special-wrapper__middle">
|
||||||
|
<div class="special-wrapper__middle--inner">
|
||||||
|
<div style="transform: translateX(4%)">
|
||||||
|
<span class="top-icon">
|
||||||
|
<svg
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
viewBox="0 0 56 13"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
>
|
||||||
|
<title>left</title>
|
||||||
|
<g id="2MES。2-6蓝底-7、8白底" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="2-5质量管理" transform="translate(-419.000000, -808.000000)" fill="#31A6AE">
|
||||||
|
<g id="编组-16备份-7" transform="translate(360.000000, 513.000000)">
|
||||||
|
<g id="编组-20备份" transform="translate(24.000000, 277.000000)">
|
||||||
|
<g id="编组-13备份" transform="translate(35.000000, 16.000000)">
|
||||||
|
<g
|
||||||
|
id="编组-2备份"
|
||||||
|
transform="translate(28.000000, 8.500000) scale(1, -1) translate(-28.000000, -8.500000) translate(0.000000, 2.000000)"
|
||||||
|
>
|
||||||
|
<polygon id="路径-11" points="47.1645736 7.79376563e-14 43 0 52.2664792 13 56 13"></polygon>
|
||||||
|
<polygon
|
||||||
|
id="路径-11备份"
|
||||||
|
opacity="0.8"
|
||||||
|
points="36.1645736 7.79376563e-14 32 0 41.2664792 13 45 13"
|
||||||
|
></polygon>
|
||||||
|
<polygon
|
||||||
|
id="路径-11备份-3"
|
||||||
|
opacity="0.4"
|
||||||
|
points="14.1645736 7.79376563e-14 10 0 19.2664792 13 23 13"
|
||||||
|
></polygon>
|
||||||
|
<polygon
|
||||||
|
id="路径-11备份-2"
|
||||||
|
opacity="0.601434"
|
||||||
|
points="25.1645736 7.79376563e-14 21 0 30.2664792 13 34 13"
|
||||||
|
></polygon>
|
||||||
|
<polygon
|
||||||
|
id="路径-11备份-4"
|
||||||
|
opacity="0.201434"
|
||||||
|
points="4.16457365 7.79376563e-14 5.06480115e-16 0 9.26647921 13 13 13"
|
||||||
|
></polygon>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<span class="techy-analysis-header__title">
|
||||||
|
<slot />
|
||||||
|
</span>
|
||||||
|
<span class="top-icon">
|
||||||
|
<svg
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
viewBox="0 0 56 13"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
>
|
||||||
|
<title>right</title>
|
||||||
|
<g id="2MES。2-6蓝底-7、8白底" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="2-5质量管理" transform="translate(-653.000000, -808.000000)" fill="#31A6AE">
|
||||||
|
<g id="编组-16备份-7" transform="translate(360.000000, 513.000000)">
|
||||||
|
<g id="编组-20备份" transform="translate(24.000000, 277.000000)">
|
||||||
|
<g id="编组-13备份" transform="translate(35.000000, 16.000000)">
|
||||||
|
<g
|
||||||
|
id="编组-2备份-2"
|
||||||
|
transform="translate(262.000000, 8.500000) scale(-1, -1) translate(-262.000000, -8.500000) translate(234.000000, 2.000000)"
|
||||||
|
>
|
||||||
|
<polygon id="路径-11" points="47.1645736 7.79376563e-14 43 0 52.2664792 13 56 13"></polygon>
|
||||||
|
<polygon
|
||||||
|
id="路径-11备份"
|
||||||
|
opacity="0.8"
|
||||||
|
points="36.1645736 7.79376563e-14 32 0 41.2664792 13 45 13"
|
||||||
|
></polygon>
|
||||||
|
<polygon
|
||||||
|
id="路径-11备份-3"
|
||||||
|
opacity="0.4"
|
||||||
|
points="14.1645736 7.79376563e-14 10 0 19.2664792 13 23 13"
|
||||||
|
></polygon>
|
||||||
|
<polygon
|
||||||
|
id="路径-11备份-2"
|
||||||
|
opacity="0.601434"
|
||||||
|
points="25.1645736 7.79376563e-14 21 0 30.2664792 13 34 13"
|
||||||
|
></polygon>
|
||||||
|
<polygon
|
||||||
|
id="路径-11备份-4"
|
||||||
|
opacity="0.201434"
|
||||||
|
points="4.16457365 7.79376563e-14 5.06480115e-16 0 9.26647921 13 13 13"
|
||||||
|
></polygon>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="special-wrapper__right">
|
||||||
|
<div class="special-wrapper__right--inner">
|
||||||
|
<span
|
||||||
|
:class="{ 'date-select__active': dateMode === 'day' }"
|
||||||
|
@click="
|
||||||
|
dateMode = 'day'
|
||||||
|
$emit('update-data', { str: '' + Math.random(), mode: dateMode })
|
||||||
|
"
|
||||||
|
>
|
||||||
|
日
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
:class="{ 'date-select__active': dateMode === 'month' }"
|
||||||
|
@click="
|
||||||
|
dateMode = 'month'
|
||||||
|
$emit('update-data', { str: '' + Math.random(), mode: dateMode })
|
||||||
|
"
|
||||||
|
>
|
||||||
|
月
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'TechyAnalysisHeader',
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: 'dafault-type'
|
||||||
|
},
|
||||||
|
showTopIcon: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dateMode: 'day'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.techy-analysis-header {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: calc(16px * var(--beilv));
|
||||||
|
position: relative;
|
||||||
|
white-space: nowrap;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.techy-analysis-header__title {
|
||||||
|
color: #01cfcc;
|
||||||
|
font-size: calc(15px * var(--beilv));
|
||||||
|
line-height: calc(18px * var(--beilv));
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-icon {
|
||||||
|
display: inline-block;
|
||||||
|
width: calc(56px * var(--beilv));
|
||||||
|
height: calc(12px * var(--beilv));
|
||||||
|
margin-bottom: calc(2px * var(--beilv));
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
top: calc(12px * var(--beilv));
|
||||||
|
left: 0;
|
||||||
|
transform: skewX(35deg);
|
||||||
|
background: #fff0;
|
||||||
|
width: 100%;
|
||||||
|
height: calc(22px * var(--beilv));
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__left {
|
||||||
|
flex: 1;
|
||||||
|
min-width: calc(56px * var(--beilv));
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__middle {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__middle--inner {
|
||||||
|
transform: skewX(-35deg);
|
||||||
|
white-space: nowrap;
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__right {
|
||||||
|
width: calc(100px * var(--beilv));
|
||||||
|
padding-left: calc(8px * var(--beilv));
|
||||||
|
padding-right: calc(8px * var(--beilv));
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__right--inner {
|
||||||
|
transform: skewX(-35deg);
|
||||||
|
border-radius: calc(2px * var(--beilv));
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__right--inner > span {
|
||||||
|
display: inline-block;
|
||||||
|
width: calc(40px * var(--beilv));
|
||||||
|
text-align: center;
|
||||||
|
font-size: calc(12px * var(--beilv));
|
||||||
|
line-height: calc(18px * var(--beilv));
|
||||||
|
color: white;
|
||||||
|
background-color: #31878c94;
|
||||||
|
}
|
||||||
|
|
||||||
|
.special-wrapper__right--inner span.pl-select__active,
|
||||||
|
.special-wrapper__right--inner span.date-select__active {
|
||||||
|
background-color: #42bbb7;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -27,7 +27,7 @@ const PriorityComponent = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.injectData.priority)
|
// console.log(this.injectData.priority)
|
||||||
},
|
},
|
||||||
methods: {},
|
methods: {},
|
||||||
render: function (h) {
|
render: function (h) {
|
||||||
@@ -35,38 +35,38 @@ const PriorityComponent = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('is component?', PriorityComponent)
|
// console.log('is component?', PriorityComponent)
|
||||||
|
|
||||||
export const qualityTableProps = [
|
export const qualityTableProps = [
|
||||||
{ label: '工序名称', prop: 'wsName', align: 'center', 'min-width': 55 },
|
{ label: '工序名称', prop: 'wsName', align: 'center', 'min-width': 55 },
|
||||||
{ label: '所属产线', prop: 'pl', align: 'center', 'min-width': 55 },
|
{ label: '所属产线', prop: 'pl', align: 'center', 'min-width': 50 },
|
||||||
{ label: '异常内容', align: 'center', prop: 'content', 'min-width': 50 },
|
{ label: '异常内容', align: 'center', prop: 'content', 'min-width': 50 },
|
||||||
{ label: '班组', prop: 'team', align: 'center', 'min-width': 45 },
|
{ label: '班组', prop: 'team', align: 'center', 'min-width': 45 },
|
||||||
{ label: '时间', prop: 'time', align: 'center' },
|
{ label: '时间', prop: 'time', align: 'center' },
|
||||||
{ label: '优先级', prop: 'priority', align: 'center', subcomponent: PriorityComponent, 'min-width': 55 }
|
{ label: '优先级', prop: 'priority', align: 'center', subcomponent: PriorityComponent, 'min-width': 50 }
|
||||||
]
|
]
|
||||||
|
|
||||||
export const qualityDatalist = [
|
export const qualityDatalist = [
|
||||||
{ 'wsName': '原片', 'pl': 'B', 'content': '透过率', 'team': '白班', 'time': '2022-11-18 13:36:26', 'priority': 3 },
|
{ 'wsName': '原片', 'pl': 'B', 'content': '透光率', 'team': '白班', 'time': '2022-11-18 13:36:26', 'priority': 3 },
|
||||||
{ 'wsName': '下片铺纸', 'pl': 'B', 'content': '完整性', 'team': '白班', 'time': '2022-11-18 11:35:02', 'priority': 2 },
|
{ 'wsName': '下片铺纸', 'pl': 'B', 'content': '抗压抗冲击测试', 'team': '白班', 'time': '2022-11-18 11:35:02', 'priority': 2 },
|
||||||
{ 'wsName': '镀膜', 'pl': 'A', 'content': '完整性', 'team': '夜班', 'time': '2022-11-18 13:10:02', 'priority': 1 },
|
{ 'wsName': '镀膜', 'pl': 'A', 'content': '抗压抗冲击测试', 'team': '夜班', 'time': '2022-11-18 13:10:02', 'priority': 1 },
|
||||||
{ 'wsName': '丝印', 'pl': 'A', 'content': '透过率', 'team': '白班', 'time': '2022-11-18 02:16:20', 'priority': 2 },
|
{ 'wsName': '丝印', 'pl': 'A', 'content': '透光率', 'team': '白班', 'time': '2022-11-18 02:16:20', 'priority': 2 },
|
||||||
{ 'wsName': '上片磨边', 'pl': 'A', 'content': '透过率', 'team': '夜班', 'time': '2022-11-18 00:03:54', 'priority': 3 },
|
{ 'wsName': '上片磨边', 'pl': 'A', 'content': '透光率', 'team': '夜班', 'time': '2022-11-18 00:03:54', 'priority': 3 },
|
||||||
{ 'wsName': '丝印', 'pl': 'B', 'content': '完整性', 'team': '夜班', 'time': '2022-11-18 09:25:49', 'priority': 1 },
|
{ 'wsName': '丝印', 'pl': 'B', 'content': '抗压抗冲击测试', 'team': '夜班', 'time': '2022-11-18 09:25:49', 'priority': 1 },
|
||||||
{ 'wsName': '上片磨边', 'pl': 'A', 'content': '完整性', 'team': '夜班', 'time': '2022-11-18 13:54:45', 'priority': 3 },
|
{ 'wsName': '上片磨边', 'pl': 'A', 'content': '抗压抗冲击测试', 'team': '夜班', 'time': '2022-11-18 13:54:45', 'priority': 3 },
|
||||||
{ 'wsName': '包装', 'pl': 'B', 'content': '完整性', 'team': '白班', 'time': '2022-11-18 03:47:23', 'priority': 1 },
|
{ 'wsName': '包装', 'pl': 'B', 'content': '抗压抗冲击测试', 'team': '白班', 'time': '2022-11-18 03:47:23', 'priority': 1 },
|
||||||
{ 'wsName': '包装', 'pl': 'B', 'content': '透过率', 'team': '夜班', 'time': '2022-11-18 02:46:21', 'priority': 1 },
|
{ 'wsName': '包装', 'pl': 'B', 'content': '透光率', 'team': '夜班', 'time': '2022-11-18 02:46:21', 'priority': 1 },
|
||||||
{ 'wsName': '上片磨边', 'pl': 'B', 'content': '完整性', 'team': '夜班', 'time': '2022-11-18 06:31:10', 'priority': 1 },
|
{ 'wsName': '上片磨边', 'pl': 'B', 'content': '抗压抗冲击测试', 'team': '夜班', 'time': '2022-11-18 06:31:10', 'priority': 1 },
|
||||||
{ 'wsName': '下片铺纸', 'pl': 'A', 'content': '完整性', 'team': '白班', 'time': '2022-11-18 10:22:55', 'priority': 3 },
|
{ 'wsName': '下片铺纸', 'pl': 'A', 'content': '抗压抗冲击测试', 'team': '白班', 'time': '2022-11-18 10:22:55', 'priority': 3 },
|
||||||
{ 'wsName': '原片', 'pl': 'A', 'content': '完整性', 'team': '白班', 'time': '2022-11-18 03:29:08', 'priority': 2 },
|
{ 'wsName': '原片', 'pl': 'A', 'content': '抗压抗冲击测试', 'team': '白班', 'time': '2022-11-18 03:29:08', 'priority': 2 },
|
||||||
{ 'wsName': '丝印', 'pl': 'B', 'content': '透过率', 'team': '白班', 'time': '2022-11-18 09:47:06', 'priority': 1 },
|
{ 'wsName': '丝印', 'pl': 'B', 'content': '透光率', 'team': '白班', 'time': '2022-11-18 09:47:06', 'priority': 1 },
|
||||||
{ 'wsName': '包装', 'pl': 'B', 'content': '完整性', 'team': '夜班', 'time': '2022-11-18 06:17:27', 'priority': 1 },
|
{ 'wsName': '包装', 'pl': 'B', 'content': '抗压抗冲击测试', 'team': '夜班', 'time': '2022-11-18 06:17:27', 'priority': 1 },
|
||||||
{ 'wsName': '原片', 'pl': 'A', 'content': '完整性', 'team': '夜班', 'time': '2022-11-18 00:29:26', 'priority': 2 },
|
{ 'wsName': '原片', 'pl': 'A', 'content': '抗压抗冲击测试', 'team': '夜班', 'time': '2022-11-18 00:29:26', 'priority': 2 },
|
||||||
{ 'wsName': '清洗', 'pl': 'B', 'content': '完整性', 'team': '白班', 'time': '2022-11-18 10:14:27', 'priority': 2 },
|
{ 'wsName': '清洗', 'pl': 'B', 'content': '抗压抗冲击测试', 'team': '白班', 'time': '2022-11-18 10:14:27', 'priority': 2 },
|
||||||
{ 'wsName': '包装', 'pl': 'A', 'content': '透过率', 'team': '白班', 'time': '2022-11-18 13:50:39', 'priority': 3 },
|
{ 'wsName': '包装', 'pl': 'A', 'content': '透光率', 'team': '白班', 'time': '2022-11-18 13:50:39', 'priority': 3 },
|
||||||
{ 'wsName': ' 物流仓储', 'pl': 'A', 'content': '完整性', 'team': '夜班', 'time': '2022-11-18 09:37:44', 'priority': 2 },
|
{ 'wsName': ' 物流仓储', 'pl': 'A', 'content': '抗压抗冲击测试', 'team': '夜班', 'time': '2022-11-18 09:37:44', 'priority': 2 },
|
||||||
{ 'wsName': '清洗', 'pl': 'A', 'content': '透过率', 'team': '白班', 'time': '2022-11-18 03:53:47', 'priority': 2 },
|
{ 'wsName': '清洗', 'pl': 'A', 'content': '透光率', 'team': '白班', 'time': '2022-11-18 03:53:47', 'priority': 2 },
|
||||||
{ 'wsName': '原片', 'pl': 'A', 'content': '透过率', 'team': '白班', 'time': '2022-11-18 08:01:02', 'priority': 3 }]
|
{ 'wsName': '原片', 'pl': 'A', 'content': '透光率', 'team': '白班', 'time': '2022-11-18 08:01:02', 'priority': 3 }]
|
||||||
|
|
||||||
/** 质量异常报警 */
|
/** 质量异常报警 */
|
||||||
|
|
||||||
@@ -115,22 +115,22 @@ export const qualityExceptionTableProps = [
|
|||||||
|
|
||||||
export const qualityExceptionDatalist = [
|
export const qualityExceptionDatalist = [
|
||||||
{ 'pl': 'A', 'eq': '打孔', 'wsName': '打孔', 'content': '完整性', 'time': '2022-11-18 11:30:01', 'priority': 3 },
|
{ 'pl': 'A', 'eq': '打孔', 'wsName': '打孔', 'content': '完整性', 'time': '2022-11-18 11:30:01', 'priority': 3 },
|
||||||
{ 'pl': 'B', 'eq': '固化', 'wsName': '固化', 'content': '透过率', 'time': '2022-11-18 07:20:35', 'priority': 1 },
|
{ 'pl': 'B', 'eq': '固化', 'wsName': '固化', 'content': '透光率', 'time': '2022-11-18 07:20:35', 'priority': 1 },
|
||||||
{ 'pl': 'B', 'eq': '钢后清洗机', 'wsName': '钢后清洗机', 'content': '透过率', 'time': '2022-11-18 09:16:21', 'priority': 2 },
|
{ 'pl': 'B', 'eq': '钢后清洗机', 'wsName': '钢后清洗机', 'content': '透光率', 'time': '2022-11-18 09:16:21', 'priority': 2 },
|
||||||
{ 'pl': 'A', 'eq': '一镀', 'wsName': '一镀', 'content': '透过率', 'time': '2022-11-18 04:57:10', 'priority': 3 },
|
{ 'pl': 'A', 'eq': '一镀', 'wsName': '一镀', 'content': '透光率', 'time': '2022-11-18 04:57:10', 'priority': 3 },
|
||||||
{ 'pl': 'B', 'eq': '固化', 'wsName': '固化', 'content': '完整性', 'time': '2022-11-18 08:26:43', 'priority': 2 },
|
{ 'pl': 'B', 'eq': '固化', 'wsName': '固化', 'content': '完整性', 'time': '2022-11-18 08:26:43', 'priority': 2 },
|
||||||
{ 'pl': 'B', 'eq': '磨边后清洗机', 'wsName': '磨边后清洗机', 'content': '完整性', 'time': '2022-11-18 04:09:39', 'priority': 2 },
|
{ 'pl': 'B', 'eq': '磨边后清洗机', 'wsName': '磨边后清洗机', 'content': '完整性', 'time': '2022-11-18 04:09:39', 'priority': 2 },
|
||||||
{ 'pl': 'B', 'eq': '下片', 'wsName': '下片', 'content': '透过率', 'time': '2022-11-18 01:06:05', 'priority': 2 },
|
{ 'pl': 'B', 'eq': '下片', 'wsName': '下片', 'content': '透光率', 'time': '2022-11-18 01:06:05', 'priority': 2 },
|
||||||
{ 'pl': 'A', 'eq': '一镀', 'wsName': '一镀', 'content': '透过率', 'time': '2022-11-18 05:06:36', 'priority': 1 },
|
{ 'pl': 'A', 'eq': '一镀', 'wsName': '一镀', 'content': '透光率', 'time': '2022-11-18 05:06:36', 'priority': 1 },
|
||||||
{ 'pl': 'B', 'eq': '冷却', 'wsName': '冷却', 'content': '完整性', 'time': '2022-11-18 07:11:45', 'priority': 3 },
|
{ 'pl': 'B', 'eq': '冷却', 'wsName': '冷却', 'content': '完整性', 'time': '2022-11-18 07:11:45', 'priority': 3 },
|
||||||
{ 'pl': 'A', 'eq': '磨边后清洗机', 'wsName': '磨边后清洗机', 'content': '完整性', 'time': '2022-11-18 11:40:37', 'priority': 3 },
|
{ 'pl': 'A', 'eq': '磨边后清洗机', 'wsName': '磨边后清洗机', 'content': '完整性', 'time': '2022-11-18 11:40:37', 'priority': 3 },
|
||||||
{ 'pl': 'A', 'eq': '冷却', 'wsName': '冷却', 'content': '完整性', 'time': '2022-11-18 10:41:54', 'priority': 1 },
|
{ 'pl': 'A', 'eq': '冷却', 'wsName': '冷却', 'content': '完整性', 'time': '2022-11-18 10:41:54', 'priority': 1 },
|
||||||
{ 'pl': 'B', 'eq': '预热', 'wsName': '预热', 'content': '透过率', 'time': '2022-11-18 04:10:00', 'priority': 1 },
|
{ 'pl': 'B', 'eq': '预热', 'wsName': '预热', 'content': '透光率', 'time': '2022-11-18 04:10:00', 'priority': 1 },
|
||||||
{ 'pl': 'B', 'eq': '钢化', 'wsName': '钢化', 'content': '完整性', 'time': '2022-11-18 09:23:40', 'priority': 1 },
|
{ 'pl': 'B', 'eq': '钢化', 'wsName': '钢化', 'content': '完整性', 'time': '2022-11-18 09:23:40', 'priority': 1 },
|
||||||
{ 'pl': 'A', 'eq': '冷却', 'wsName': '冷却', 'content': '透过率', 'time': '2022-11-18 05:28:05', 'priority': 2 },
|
{ 'pl': 'A', 'eq': '冷却', 'wsName': '冷却', 'content': '透光率', 'time': '2022-11-18 05:28:05', 'priority': 2 },
|
||||||
{ 'pl': 'B', 'eq': '上片', 'wsName': '上片', 'content': '完整性', 'time': '2022-11-18 06:24:57', 'priority': 3 },
|
{ 'pl': 'B', 'eq': '上片', 'wsName': '上片', 'content': '完整性', 'time': '2022-11-18 06:24:57', 'priority': 3 },
|
||||||
{ 'pl': 'B', 'eq': '固化', 'wsName': '固化', 'content': '完整性', 'time': '2022-11-18 02:48:28', 'priority': 3 },
|
{ 'pl': 'B', 'eq': '固化', 'wsName': '固化', 'content': '完整性', 'time': '2022-11-18 02:48:28', 'priority': 3 },
|
||||||
{ 'pl': 'B', 'eq': '磨边后清洗机', 'wsName': '磨边后清洗机', 'content': '完整性', 'time': '2022-11-18 13:06:35', 'priority': 1 },
|
{ 'pl': 'B', 'eq': '磨边后清洗机', 'wsName': '磨边后清洗机', 'content': '完整性', 'time': '2022-11-18 13:06:35', 'priority': 1 },
|
||||||
{ 'pl': 'B', 'eq': '打孔', 'wsName': '打孔', 'content': '透过率', 'time': '2022-11-18 11:49:59', 'priority': 1 },
|
{ 'pl': 'B', 'eq': '打孔', 'wsName': '打孔', 'content': '透光率', 'time': '2022-11-18 11:49:59', 'priority': 1 },
|
||||||
{ 'pl': 'B', 'eq': '一镀', 'wsName': '一镀', 'content': '透过率', 'time': '2022-11-18 12:32:20', 'priority': 2 },
|
{ 'pl': 'B', 'eq': '一镀', 'wsName': '一镀', 'content': '透光率', 'time': '2022-11-18 12:32:20', 'priority': 2 },
|
||||||
{ 'pl': 'B', 'eq': '丝印', 'wsName': '丝印', 'content': '完整性', 'time': '2022-11-18 12:45:49', 'priority': 3 }]
|
{ 'pl': 'B', 'eq': '丝印', 'wsName': '丝印', 'content': '完整性', 'time': '2022-11-18 12:45:49', 'priority': 3 }]
|
||||||
|
|||||||
@@ -1,19 +1,47 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="custom-container">
|
<div class="custom-container">
|
||||||
<el-row :gutter="20" style="height: calc(100vh - 150px)">
|
<el-row :gutter="8" style="height: calc(100vh - 150px)">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<aside class="custom-container__common left-side-container">
|
<aside class="custom-container__common left-side-container">
|
||||||
<section class="left-side-container__title">
|
<!-- <section class="left-side-container__title">
|
||||||
<span v-if="logoUrl" class="logo">
|
<span v-if="logoUrl" class="logo">
|
||||||
<img :src="logoUrl" alt="side container logo">
|
<img :src="logoUrl" alt="side container logo">
|
||||||
</span>
|
</span>
|
||||||
<span class="text-content">
|
<span class="text-content">
|
||||||
{{ factoryName }}
|
{{ factoryName }}
|
||||||
</span>
|
</span>
|
||||||
|
</section> -->
|
||||||
|
|
||||||
|
<section class="title-area">
|
||||||
|
<span class="title-icon">
|
||||||
|
<svg
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
>
|
||||||
|
<title>工厂</title>
|
||||||
|
<g id="系统管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="质量追溯_设备参数追溯" transform="translate(-376.000000, -152.000000)" fill-rule="nonzero">
|
||||||
|
<g id="工厂" transform="translate(376.000000, 152.000000)">
|
||||||
|
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="24" height="24" />
|
||||||
|
<path
|
||||||
|
id="形状"
|
||||||
|
d="M12.25,6.75 L12.25,10.25 L20.75,10.25 L20.75,21.25 L3.25000001,21.25 L3.25000001,6.75 L12.25,6.75 L12.25,6.75 Z M10.75,8.25 L4.75000001,8.25 L4.75000001,19.75 L19.25,19.75 L19.25,11.75 L10.75,11.75 L10.75,8.25 Z M17.5,16.5 L17.5,18 L16,18 L16,16.5 L17.5,16.5 Z M14,16.5 L14,18 L12.5,18 L12.5,16.5 L14,16.5 Z M17.5,13.5 L17.5,15 L16,15 L16,13.5 L17.5,13.5 Z M14,13.5 L14,15 L12.5,15 L12.5,13.5 L14,13.5 Z M8.99999999,10.256 L8.99999999,11.756 L6.49999999,11.756 L6.49999999,10.256 L8.99999999,10.256 Z M9.4755,2.82499999 C10.4715,2.63649998 11.0695,2.739 12.1845,3.291 L12.581,3.49000001 L12.7945,3.58999999 C13.2545,3.79899998 13.532,3.85899998 13.887,3.82849999 L13.9855,3.81850001 L14.1545,3.79249999 L14.2455,3.77650001 C14.8380746,3.66404309 15.3698683,3.34077505 15.7425,2.8665 L15.8205,2.763 L17.0405,3.636 L16.9485,3.76000001 C16.3504031,4.53742507 15.4872916,5.06774928 14.5235,5.25 C13.5275,5.43799999 12.9285,5.3355 11.814,4.7835 L11.4175,4.58500001 C10.781,4.27450001 10.4765,4.20100001 10.024,4.25599999 L9.9315,4.26850001 L9.7545,4.299 C9.16166181,4.41148918 8.62956287,4.73472685 8.25649999,5.20900001 L8.17849999,5.31199999 L6.95899999,4.43800001 L7.0515,4.31449999 C7.64947141,3.53774907 8.51191259,3.00768671 9.47500001,2.82499999 L9.4755,2.82499999 Z"
|
||||||
|
fill="#0B58FF"
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<span class="title-content">合肥新能源工厂</span>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="left-side-container__content">
|
|
||||||
<!-- 导航栏 -->
|
<!-- 导航栏 -->
|
||||||
|
<!-- <section class="left-side-container__content">
|
||||||
<el-tree
|
<el-tree
|
||||||
class="custom-tree"
|
class="custom-tree"
|
||||||
:icon-class="'el-icon-document-copy'"
|
:icon-class="'el-icon-document-copy'"
|
||||||
@@ -21,6 +49,15 @@
|
|||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
@node-click="handleNodeClick"
|
@node-click="handleNodeClick"
|
||||||
/>
|
/>
|
||||||
|
</section> -->
|
||||||
|
|
||||||
|
<section class="routes-area" v-if="showList">
|
||||||
|
<el-menu @select="handleSelect">
|
||||||
|
<!-- 此处假设了只有一个根节点 -->
|
||||||
|
<template v-for="(menuItem, index) in treeData">
|
||||||
|
<TestMenuItem :level="1" :key="index" :menuItem="menuItem" />
|
||||||
|
</template>
|
||||||
|
</el-menu>
|
||||||
</section>
|
</section>
|
||||||
</aside>
|
</aside>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -53,12 +90,15 @@ import HeadForm from '@/components/basicData/HeadForm'
|
|||||||
import testData from './parameter.test.data.js'
|
import testData from './parameter.test.data.js'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import writeXlsxFile from 'write-excel-file'
|
import writeXlsxFile from 'write-excel-file'
|
||||||
|
import TestMenuItem from './parameter/components/TestMenuItem.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EquipmentRetrospectParameter',
|
name: 'EquipmentRetrospectParameter',
|
||||||
components: { BaseTable, HeadForm },
|
components: { BaseTable, HeadForm, TestMenuItem },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showList: false,
|
||||||
|
menuListTrue: [],
|
||||||
factoryName: 'xxx工厂',
|
factoryName: 'xxx工厂',
|
||||||
logoUrl: require('../../../../assets/img/cnbm.png'),
|
logoUrl: require('../../../../assets/img/cnbm.png'),
|
||||||
treeData: null,
|
treeData: null,
|
||||||
@@ -117,26 +157,45 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.showList = false
|
||||||
|
|
||||||
this.init()
|
this.init()
|
||||||
|
|
||||||
this.fetchList('eq-tree').then(res => {
|
this.fetchList('eq-tree').then(res => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
const eqTree = res.data[0] // 只会返回一条工厂数据
|
const eqTree = res.data[0] // 只会返回一条工厂数据
|
||||||
this.factoryName = eqTree.name
|
this.factoryName = eqTree.name
|
||||||
// 构造tree展示的结构
|
this.treeData = this.preHandleList(eqTree)
|
||||||
eqTree.pdlList.forEach(item => {
|
this.showList = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
this.fetchList('work-order').then(res => {
|
||||||
|
if (res.data.records) {
|
||||||
|
this.headFormConfig[0].selectOptions = res.data.records.map(item => ({ id: item.id, name: item.name }))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
preHandleList(list) {
|
||||||
|
let result = []
|
||||||
|
|
||||||
|
list.pdlList.forEach(item => {
|
||||||
const treeItem = {}
|
const treeItem = {}
|
||||||
treeItem.label = item.name
|
treeItem.name = item.name
|
||||||
|
// 整理产线
|
||||||
if (item.wsList.length) {
|
if (item.wsList.length) {
|
||||||
treeItem.children = []
|
treeItem.children = []
|
||||||
item.wsList.forEach(workSection => {
|
item.wsList.forEach(workSection => {
|
||||||
const wsItem = {}
|
const wsItem = {}
|
||||||
wsItem.label = workSection.name
|
wsItem.name = workSection.name
|
||||||
|
// 整理设备
|
||||||
if (workSection.eqList.length) {
|
if (workSection.eqList.length) {
|
||||||
wsItem.children = []
|
wsItem.children = []
|
||||||
workSection.eqList.forEach(eq => {
|
workSection.eqList.forEach(eq => {
|
||||||
const eqItem = {}
|
const eqItem = {}
|
||||||
eqItem.label = eq.eqName
|
eqItem.name = eq.eqName
|
||||||
eqItem.id = eq.eqId
|
eqItem.id = eq.eqId
|
||||||
wsItem.children.push(eqItem)
|
wsItem.children.push(eqItem)
|
||||||
})
|
})
|
||||||
@@ -144,19 +203,13 @@ export default {
|
|||||||
treeItem.children.push(wsItem)
|
treeItem.children.push(wsItem)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 产线
|
// 产线
|
||||||
this.productLineList.push(treeItem)
|
result.push(treeItem)
|
||||||
})
|
|
||||||
this.treeData = this.productLineList
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.fetchList('work-order').then(res => {
|
|
||||||
if (res.data.records) {
|
|
||||||
this.headFormConfig[0].selectOptions = res.data.records.map(item => ({ id: item.id, name: item.name }))
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
return result
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
init() {
|
init() {
|
||||||
this.productLineList.splice(0)
|
this.productLineList.splice(0)
|
||||||
this.headFormConfig[0].selectOptions.splice(0)
|
this.headFormConfig[0].selectOptions.splice(0)
|
||||||
@@ -281,6 +334,10 @@ export default {
|
|||||||
if (data.id) {
|
if (data.id) {
|
||||||
this.selectedEquipmentId = data.id
|
this.selectedEquipmentId = data.id
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
handleSelect(index, indexPath) {
|
||||||
|
const [id, name] = index.split('$--$')
|
||||||
|
this.selectedEquipmentId = id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -295,14 +352,13 @@ export default {
|
|||||||
.custom-container__common {
|
.custom-container__common {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border-radius: 4px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-side-container {
|
.left-side-container {
|
||||||
height: calc(100vh - 147px);
|
height: calc(100vh - 147px);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background: #fafafa;
|
// background: #fafafa;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
@@ -320,7 +376,7 @@ export default {
|
|||||||
|
|
||||||
.left-side-container__content {
|
.left-side-container__content {
|
||||||
flex: 1 1;
|
flex: 1 1;
|
||||||
overflow-y: scroll;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,4 +412,25 @@ export default {
|
|||||||
.custom-tree >>> .is-current .el-tree-node__content {
|
.custom-tree >>> .is-current .el-tree-node__content {
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title-area {
|
||||||
|
height: 72px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 0 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.routes-area {
|
||||||
|
flex: 1;
|
||||||
|
height: 1px;
|
||||||
|
background-color: #fff;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-icon {
|
||||||
|
height: 24px;
|
||||||
|
width: 24px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,135 @@
|
|||||||
|
<template>
|
||||||
|
<el-submenu v-if="menuItem.children" :index="constructIndex(menuItem)">
|
||||||
|
<!-- 标题 -->
|
||||||
|
<template slot="title">
|
||||||
|
<!-- <i class="el-icon-menu"></i> -->
|
||||||
|
<i style="line-height: 1;">
|
||||||
|
<svg
|
||||||
|
width="16px"
|
||||||
|
height="16px"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
>
|
||||||
|
<title>菜单</title>
|
||||||
|
<g id="系统管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="质量追溯_设备参数追溯" transform="translate(-376.000000, -202.000000)" fill-rule="nonzero">
|
||||||
|
<g id="编组-7" transform="translate(376.000000, 200.000000)">
|
||||||
|
<g id="菜单" transform="translate(0.000000, 2.000000)">
|
||||||
|
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
|
||||||
|
<path
|
||||||
|
d="M3.00057813,4.49926562 L13.0025156,4.49926562 C13.2786563,4.49926562 13.5025156,4.27540625 13.5025156,3.99926563 C13.5025156,3.723125 13.2786563,3.49926563 13.0025156,3.49926563 L3.00057813,3.49926563 C2.7244375,3.49926563 2.50057813,3.723125 2.50057813,3.99926563 C2.50057813,4.27540625 2.7244375,4.49926562 3.00057813,4.49926562 Z M3.0004375,8.48703125 L12.9786875,8.48703125 C13.2548281,8.48703125 13.4786875,8.26317187 13.4786875,7.98703125 C13.4786875,7.71089062 13.2548281,7.48703125 12.9786875,7.48703125 L3.0004375,7.48703125 C2.72429687,7.48703125 2.5004375,7.71089062 2.5004375,7.98703125 C2.5004375,8.26317187 2.72429687,8.48703125 3.0004375,8.48703125 Z M13.0025156,11.4969063 L3.00057813,11.4969063 C2.7244375,11.4969063 2.50057813,11.7207656 2.50057813,11.9969063 C2.50057813,12.2730469 2.7244375,12.4969063 3.00057813,12.4969063 L13.0025156,12.4969063 C13.2786563,12.4969063 13.5025156,12.2730469 13.5025156,11.9969063 C13.5025156,11.7207656 13.2786563,11.4969063 13.0025156,11.4969063 L13.0025156,11.4969063 Z"
|
||||||
|
id="形状"
|
||||||
|
fill="currentColor"
|
||||||
|
></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</i>
|
||||||
|
<span>{{ menuItem.name }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 主体 -->
|
||||||
|
<template v-for="(submenuItem, idx) in menuItem.children">
|
||||||
|
<TestMenuItem :menuItem="submenuItem" :level="level + 1" />
|
||||||
|
</template>
|
||||||
|
</el-submenu>
|
||||||
|
|
||||||
|
<!-- 一级菜单 -->
|
||||||
|
<el-menu-item v-else :index="constructIndex(menuItem)">
|
||||||
|
<!-- <i v-if="level !== 1" class="el-icon-aim"></i>
|
||||||
|
<i v-else class="el-icon-menu"></i> -->
|
||||||
|
<i style="line-height: 1px" v-if="level !== 1">
|
||||||
|
<svg
|
||||||
|
width="8px"
|
||||||
|
height="8px"
|
||||||
|
viewBox="0 0 8 8"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
>
|
||||||
|
<title>椭圆形</title>
|
||||||
|
<g id="系统管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g
|
||||||
|
id="质量追溯_设备参数追溯"
|
||||||
|
transform="translate(-396.000000, -246.000000)"
|
||||||
|
fill="currentColor"
|
||||||
|
fill-rule="nonzero"
|
||||||
|
>
|
||||||
|
<g id="编组-3" transform="translate(396.000000, 240.000000)">
|
||||||
|
<path
|
||||||
|
d="M4,6 C6.209139,6 8,7.790861 8,10 C8,12.209139 6.209139,14 4,14 C1.790861,14 0,12.209139 0,10 C0,7.790861 1.790861,6 4,6 Z M4,7 C2.34314575,7 1,8.34314575 1,10 C1,11.6568542 2.34314575,13 4,13 C5.65685425,13 7,11.6568542 7,10 C7,8.34314575 5.65685425,7 4,7 Z"
|
||||||
|
id="椭圆形"
|
||||||
|
></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</i>
|
||||||
|
<i style="line-height: 1;" v-else>
|
||||||
|
<svg
|
||||||
|
width="16px"
|
||||||
|
height="16px"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
>
|
||||||
|
<title>菜单</title>
|
||||||
|
<g id="系统管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="质量追溯_设备参数追溯" transform="translate(-376.000000, -202.000000)" fill-rule="nonzero">
|
||||||
|
<g id="编组-7" transform="translate(376.000000, 200.000000)">
|
||||||
|
<g id="菜单" transform="translate(0.000000, 2.000000)">
|
||||||
|
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
|
||||||
|
<path
|
||||||
|
d="M3.00057813,4.49926562 L13.0025156,4.49926562 C13.2786563,4.49926562 13.5025156,4.27540625 13.5025156,3.99926563 C13.5025156,3.723125 13.2786563,3.49926563 13.0025156,3.49926563 L3.00057813,3.49926563 C2.7244375,3.49926563 2.50057813,3.723125 2.50057813,3.99926563 C2.50057813,4.27540625 2.7244375,4.49926562 3.00057813,4.49926562 Z M3.0004375,8.48703125 L12.9786875,8.48703125 C13.2548281,8.48703125 13.4786875,8.26317187 13.4786875,7.98703125 C13.4786875,7.71089062 13.2548281,7.48703125 12.9786875,7.48703125 L3.0004375,7.48703125 C2.72429687,7.48703125 2.5004375,7.71089062 2.5004375,7.98703125 C2.5004375,8.26317187 2.72429687,8.48703125 3.0004375,8.48703125 Z M13.0025156,11.4969063 L3.00057813,11.4969063 C2.7244375,11.4969063 2.50057813,11.7207656 2.50057813,11.9969063 C2.50057813,12.2730469 2.7244375,12.4969063 3.00057813,12.4969063 L13.0025156,12.4969063 C13.2786563,12.4969063 13.5025156,12.2730469 13.5025156,11.9969063 C13.5025156,11.7207656 13.2786563,11.4969063 13.0025156,11.4969063 L13.0025156,11.4969063 Z"
|
||||||
|
id="形状"
|
||||||
|
fill="currentColor"
|
||||||
|
></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</i>
|
||||||
|
<span slot="title">{{ menuItem.name }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'TestMenuItem',
|
||||||
|
props: {
|
||||||
|
level: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
},
|
||||||
|
index: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
menuItem: {
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
defaultActive: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
constructIndex(menuItem) {
|
||||||
|
return menuItem.id + '$--$' + menuItem.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -30,8 +30,8 @@
|
|||||||
<section class="routes-area" v-if="showList">
|
<section class="routes-area" v-if="showList">
|
||||||
<el-menu @select="handleSelect">
|
<el-menu @select="handleSelect">
|
||||||
<!-- 此处假设了只有一个根节点 -->
|
<!-- 此处假设了只有一个根节点 -->
|
||||||
<template v-for="(menuItem, index) in menuListTrue[0].children">
|
<template v-for="(menuItem, index) in menuListTrue[0].children" >
|
||||||
<TestMenuItem :level="1" :menuItem="menuItem" />
|
<TestMenuItem :level="1" :key="index" :menuItem="menuItem" />
|
||||||
</template>
|
</template>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -176,16 +176,21 @@ export default {
|
|||||||
const arr = []
|
const arr = []
|
||||||
const temp = []
|
const temp = []
|
||||||
const productList = ['2.0-1128*1716', '2.0-1128*2251', '2.0-1128*2272', '3.2-1128*1716', '3.2-1128*1718','3.2-1032*1747', '3.2-1033*2089']
|
const productList = ['2.0-1128*1716', '2.0-1128*2251', '2.0-1128*2272', '3.2-1128*1716', '3.2-1128*1718','3.2-1032*1747', '3.2-1033*2089']
|
||||||
|
let cnum = 1
|
||||||
for (let i = 0; i < 20; i++) {
|
for (let i = 0; i < 20; i++) {
|
||||||
const obj = {}
|
const obj = {}
|
||||||
const sj = parseInt(Math.random() * 15)
|
const sj = parseInt(Math.random() * 3 + 1)
|
||||||
obj.time = moment().subtract(sj, 'days').subtract(sj, 'hours').subtract(sj, 'minute').subtract(sj, 'second').format('YYYY-MM-DD HH:mm:ss')
|
cnum += sj
|
||||||
|
obj.time = moment('20221101 081002').add(cnum, 'days').add(cnum, 'hours').add(cnum, 'minute').add(cnum, 'second').format('YYYY-MM-DD HH:mm:ss')
|
||||||
obj.productLine = sj % 2 ? 'A' : 'B'
|
obj.productLine = sj % 2 ? 'A' : 'B'
|
||||||
obj.spec = productList[parseInt(Math.random() * (productList.length))]
|
obj.spec = productList[parseInt(Math.random() * (productList.length))]
|
||||||
obj.batch = moment().subtract(sj, 'days').format('YYYYMMDD')
|
obj.batch = moment('20221101 081002').add(cnum, 'days').add(cnum, 'hours').add(cnum, 'minute').add(cnum, 'second').format('YYYYMMDDHH')
|
||||||
obj.num = parseInt(Math.random() * 800 + 100) + ' (片)'
|
obj.num = parseInt(Math.random() * 800 + 100) + ' (片)'
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
}
|
}
|
||||||
|
arr.sort(function (a, b) {
|
||||||
|
return new Date(a.time) - new Date(b.time)
|
||||||
|
})
|
||||||
this.originalFilmList = arr
|
this.originalFilmList = arr
|
||||||
const eqList = [
|
const eqList = [
|
||||||
{name: '磨边机', fc: ''},
|
{name: '磨边机', fc: ''},
|
||||||
@@ -193,18 +198,23 @@ export default {
|
|||||||
{name: '镀膜机', fc: ['镀膜液', '异丙醇']},
|
{name: '镀膜机', fc: ['镀膜液', '异丙醇']},
|
||||||
{name: '包装机', fc: ['隔离纸', '包装辅材']}
|
{name: '包装机', fc: ['隔离纸', '包装辅材']}
|
||||||
]
|
]
|
||||||
|
let cnum2 = 1
|
||||||
for (let i = 0; i < 20; i++) {
|
for (let i = 0; i < 20; i++) {
|
||||||
const obj = {}
|
const obj = {}
|
||||||
const sj = parseInt(Math.random() * 15)
|
const sj = parseInt(Math.random() * 3 + 1)
|
||||||
const sj2 = parseInt(Math.random() * eqList.length)
|
const sj2 = parseInt(Math.random() * eqList.length)
|
||||||
const sj3 = sj % 2 ? 1 : 0
|
const sj3 = sj % 2 ? 1 : 0
|
||||||
obj.time = moment().subtract(sj, 'days').subtract(sj, 'hours').subtract(sj, 'minute').subtract(sj, 'second').format('YYYY-MM-DD HH:mm:ss')
|
cnum2 += sj
|
||||||
|
obj.time = moment('20221015 110314').add(cnum2, 'days').add(cnum2, 'hours').add(cnum2, 'minute').add(cnum2, 'second').format('YYYY-MM-DD HH:mm:ss')
|
||||||
obj.eqName = eqList[sj2].name
|
obj.eqName = eqList[sj2].name
|
||||||
obj.spec = eqList[sj2].fc ? (eqList[sj2].fc[sj3]) : ''
|
obj.spec = eqList[sj2].fc ? (eqList[sj2].fc[sj3]) : ''
|
||||||
obj.batch = moment().subtract(sj, 'days').format('YYYYMMDD')
|
obj.batch = moment('20221015 110314').add(cnum2, 'days').add(cnum2, 'hours').add(cnum2, 'minute').add(cnum2, 'second').format('YYYYMMDD')
|
||||||
obj.num = parseInt(Math.random() * 800 + 100)
|
obj.num = parseInt(Math.random() * 800 + 100)
|
||||||
temp.push(obj)
|
temp.push(obj)
|
||||||
}
|
}
|
||||||
|
temp.sort(function (a, b) {
|
||||||
|
return new Date(a.time) - new Date(b.time)
|
||||||
|
})
|
||||||
this.materialList = temp
|
this.materialList = temp
|
||||||
this.bomMsg = [
|
this.bomMsg = [
|
||||||
{ name: '2.0-1128*1716' },
|
{ name: '2.0-1128*1716' },
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ import screenfull from 'screenfull'
|
|||||||
import BaseTable from './components/baseTable.vue'
|
import BaseTable from './components/baseTable.vue'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import orderStatus from './components/orderStatus.vue'
|
import orderStatus from './components/orderStatus.vue'
|
||||||
|
import { rateFormatter2 } from '@/filters/index'
|
||||||
const orderPool = [
|
const orderPool = [
|
||||||
{
|
{
|
||||||
prop: 'customerName',
|
prop: 'customerName',
|
||||||
@@ -125,6 +126,7 @@ const orderMonitiring = [
|
|||||||
{
|
{
|
||||||
prop: 'completion',
|
prop: 'completion',
|
||||||
label: '完成率',
|
label: '完成率',
|
||||||
|
filter: rateFormatter2,
|
||||||
minWidth: 24.8
|
minWidth: 24.8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -224,6 +226,7 @@ export default {
|
|||||||
arr1.push(obj)
|
arr1.push(obj)
|
||||||
}
|
}
|
||||||
this.orderList = arr1
|
this.orderList = arr1
|
||||||
|
const timeArr = ["2022-10-01", "2022-10-03", "2022-10-04", "2022-10-07","2022-10-11", "2022-10-12", "2022-10-15", "2022-10-18", "2022-10-19", "2022-10-21", "2022-10-23", "2022-10-26", "2022-10-27"]
|
||||||
for (let i = 0; i < 20; i++) {
|
for (let i = 0; i < 20; i++) {
|
||||||
const obj = {}
|
const obj = {}
|
||||||
const sj = parseInt(Math.random() * 200)
|
const sj = parseInt(Math.random() * 200)
|
||||||
@@ -231,8 +234,7 @@ export default {
|
|||||||
obj.orderCode = 'ODFG' + moment().subtract(sj, 'days').subtract(sj, 'hours').subtract(sj, 'minute').subtract(sj, 'second').format('YYYYMMDDHHmmss')
|
obj.orderCode = 'ODFG' + moment().subtract(sj, 'days').subtract(sj, 'hours').subtract(sj, 'minute').subtract(sj, 'second').format('YYYYMMDDHHmmss')
|
||||||
obj.productName = productList[parseInt(Math.random() * (productList.length))]
|
obj.productName = productList[parseInt(Math.random() * (productList.length))]
|
||||||
obj.planNum = parseInt(Math.random() * 800 + 100) + '(m²)'
|
obj.planNum = parseInt(Math.random() * 800 + 100) + '(m²)'
|
||||||
obj.planDelivery = moment().add(sj, 'days').format('YYYY-MM-DD')
|
obj.planDelivery = timeArr[i]
|
||||||
// obj.status = parseInt(Math.random() * 3 + 1)
|
|
||||||
obj.status = 4
|
obj.status = 4
|
||||||
arr2.push(obj)
|
arr2.push(obj)
|
||||||
}
|
}
|
||||||
@@ -243,8 +245,8 @@ export default {
|
|||||||
obj.customerName = compList[parseInt(Math.random() * (compList.length))]
|
obj.customerName = compList[parseInt(Math.random() * (compList.length))]
|
||||||
obj.orderCode = 'ODFG' + moment().subtract(sj, 'days').subtract(sj, 'hours').subtract(sj, 'minute').subtract(sj, 'second').format('YYYYMMDDHHmmss')
|
obj.orderCode = 'ODFG' + moment().subtract(sj, 'days').subtract(sj, 'hours').subtract(sj, 'minute').subtract(sj, 'second').format('YYYYMMDDHHmmss')
|
||||||
obj.status = parseInt(Math.random() * 3 + 1)
|
obj.status = parseInt(Math.random() * 3 + 1)
|
||||||
obj.completion = obj.status === 1 ? '0.00%' : (obj.status === 3 ? '100%' : parseInt(Math.random() * 100) + '%')
|
obj.completion = obj.status === 1 ? 0.00 : (obj.status === 3 ? 100 : parseInt(Math.random() * 100))
|
||||||
obj.yield = parseInt(Math.random() * 50 + 50) + '%'
|
obj.yield = parseInt(Math.random() * 10 + 90) + '%'
|
||||||
// obj.shiftCosts = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2)
|
// obj.shiftCosts = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2)
|
||||||
// obj.energyCosts = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2)
|
// obj.energyCosts = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2)
|
||||||
// obj.equipmentCost = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2)
|
// obj.equipmentCost = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2)
|
||||||
@@ -257,6 +259,9 @@ export default {
|
|||||||
obj.totalCost = '0'
|
obj.totalCost = '0'
|
||||||
temp.push(obj)
|
temp.push(obj)
|
||||||
}
|
}
|
||||||
|
temp.sort(function (a, b) {
|
||||||
|
return new Date(a.completion) - new Date(b.completion)
|
||||||
|
})
|
||||||
this.orderMonitiringList = temp
|
this.orderMonitiringList = temp
|
||||||
},
|
},
|
||||||
change() {
|
change() {
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="state-box">
|
<div class="state-box">
|
||||||
<span v-if="this.injectData.status === 1">
|
<span v-if="this.injectData.status === 1">
|
||||||
<svg-icon icon-class="yellow_dot" style="font-size: 14px; position: relative; top: .08em" />
|
<svg-icon icon-class="yellow_dot" class="tip"/>
|
||||||
在途
|
在途
|
||||||
</span>
|
</span>
|
||||||
<span v-if="this.injectData.status === 2">
|
<span v-if="this.injectData.status === 2">
|
||||||
<svg-icon icon-class="blue_dot" style="font-size: 14px; position: relative; top: .08em" />
|
<svg-icon icon-class="blue_dot" class="tip"/>
|
||||||
已下发
|
已下发
|
||||||
</span>
|
</span>
|
||||||
<span v-if="this.injectData.status === 3">
|
<span v-if="this.injectData.status === 3">
|
||||||
<svg-icon icon-class="green_dot" style="font-size: 14px; position: relative; top: .08em" />
|
<svg-icon icon-class="green_dot" class="tip" />
|
||||||
已完成
|
已完成
|
||||||
</span>
|
</span>
|
||||||
<span v-if="this.injectData.status === 4">
|
<span v-if="this.injectData.status === 4">
|
||||||
<svg-icon icon-class="orange_dot" style="font-size: 14px; position: relative; top: .08em" />
|
<svg-icon icon-class="orange_dot" class="tip" />
|
||||||
待下发
|
待下发
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,8 +44,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
.state-box {
|
.state-box {
|
||||||
height: calc(15px * var(--beilv))
|
.tip {
|
||||||
|
font-size: calc(14px * var(--beilv));
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.box {
|
.box {
|
||||||
width: 49.5%;
|
width: 49.5%;
|
||||||
|
height: 49.5%;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
background-image: url('../../../../assets/img/cockpit/module-back.png');
|
background-image: url('../../../../assets/img/cockpit/module-back.png');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
@@ -92,6 +93,26 @@ export default {
|
|||||||
background: #366F5D;
|
background: #366F5D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: calc(8px * var(--beilv));
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background-color: #14243f;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-button {
|
||||||
|
width: calc(8px * var(--beilv));
|
||||||
|
height: calc(8px * var(--beilv));
|
||||||
|
background: #5bc4bf9f;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: calc(8px * var(--beilv));
|
||||||
|
background: #5bc4bf9f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.progress-box {
|
.progress-box {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|||||||
@@ -227,7 +227,10 @@ export default {
|
|||||||
return { ...item, reportNames: ['班组加工数量统计'] }
|
return { ...item, reportNames: ['班组加工数量统计'] }
|
||||||
} else if (item.name === '产线') {
|
} else if (item.name === '产线') {
|
||||||
return { ...item, reportNames: ['产线日产量统计', '产线历史产量记录'] }
|
return { ...item, reportNames: ['产线日产量统计', '产线历史产量记录'] }
|
||||||
|
} else if (item.name === '质量') {
|
||||||
|
return { ...item, quantity: 1, reportNames: ['质量缺陷分析'] }
|
||||||
} else {
|
} else {
|
||||||
|
// mock
|
||||||
return item
|
return item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user