Compare commits

..

No commits in common. "6b031d6e066f7c00168bec4606a0896182229093" and "4f4453045a18387fbba414b263902c00b5582072" have entirely different histories.

22 changed files with 439 additions and 711 deletions

View File

@ -36,29 +36,11 @@ export default {
// const computeInterval = numArr => Math.floor(numArr.reduce((p, c) => p + c, 0) / numArr.length / 10) * 10
let data = [
//
[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
}),
[90, 93, 95, 96, 95, 90, 89, 84, 60, 77, 93, 93.5],
//
[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
}),
[60, 72, 69, 77, 72, 70, 71, 69.5, 55, 60, 70.5, 71],
//
[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
})
[45, 50, 55, 60, 65, 78, 63, 66, 54, 62, 72, 73]
]
let wendu = data[0]
let dianliu = data[1]
@ -70,7 +52,6 @@ export default {
color: colors,
legend: {
top: 4,
right: 50,
itemWidth: 8,
itemHeight: 8,
textStyle: {
@ -104,10 +85,10 @@ export default {
name: '电流/A',
nameTextStyle: { align: 'right', fontSize: 9, color: '#fff9' },
type: 'value',
splitNumber: 3,
splitNumber: 4,
onZero: true,
position: 'left',
offset: 40,
offset: 42,
axisTick: { show: false },
axisLine: {
show: true,
@ -131,7 +112,7 @@ export default {
name: '电压/V',
nameTextStyle: { align: 'right', fontSize: 9, color: '#fff9' },
type: 'value',
splitNumber: 3,
splitNumber: 4,
axisTick: { show: false },
onZero: true,
position: 'left',
@ -166,7 +147,7 @@ export default {
}
},
type: 'value',
splitNumber: 3,
splitNumber: 4,
splitLine: {
lineStyle: {
color: '#fff3'

View File

@ -58,26 +58,26 @@ const tableProps = [
{ prop: 'checkContent', label: '巡检内容', align: 'center', 'min-width': 120 }
]
const tableData = [
{ eqName: '钢化', pl: 'A', priority: 4, checkContent: '表面检测光源和相机的卫生' },
{ eqName: '一镀', pl: 'A', priority: 1, checkContent: '辊道下方的碎玻璃清理' },
{ eqName: '钢化', pl: 'B', priority: 3, checkContent: '边角检测设备水平的校正' },
{ eqName: '冷却', pl: 'B', priority: 2, checkContent: '表面检测光源和相机的卫生' },
{ eqName: '预热', pl: 'A', priority: 1, checkContent: '辊道下方的碎玻璃清理' },
{ eqName: '钢后清洗机', pl: 'B', priority: 3, checkContent: '检查每日不良是否存在误检' },
{ eqName: '磨边', pl: 'B', priority: 3, checkContent: '设备表面的卫生' },
{ eqName: '打孔', pl: 'B', priority: 2, checkContent: '边角检测光源和相机的卫生' },
{ eqName: '磨边后清洗机', pl: 'B', priority: 4, checkContent: '边角检测光源和相机的卫生' },
{ eqName: '冷却', pl: 'B', priority: 1, checkContent: '辊道下方的碎玻璃清理' },
{ eqName: '丝印', pl: 'B', priority: 3, checkContent: '操作台保持整洁' },
{ eqName: '丝印', pl: 'A', priority: 2, checkContent: '检查每日不良是否存在误检' },
{ eqName: '钢化', pl: 'B', priority: 2, checkContent: '检查每日不良是否存在误检' },
{ eqName: '冷却', pl: 'A', priority: 2, checkContent: '辊道下方的碎玻璃清理' },
{ eqName: '下片', pl: 'A', priority: 1, checkContent: '水冷机内水量充足并且清洁' },
{ eqName: '钢化', pl: 'A', priority: 2, checkContent: '操作台保持整洁' },
{ eqName: '预热', pl: 'B', priority: 4, checkContent: '水冷机内水量充足并且清洁' },
{ eqName: '磨边后清洗机', pl: 'A', priority: 2, checkContent: '水冷机内水量充足并且清洁' },
{ eqName: '上片', pl: 'B', priority: 3, checkContent: '边角检测光源和相机的卫生' },
{ eqName: '预热', pl: 'A', priority: 2, checkContent: '表面检测光源和相机的卫生' }
{ eqName: '磨边', pl: 'B', priority: 3, checkContent: '火中山为华证低军线少真及容南一用别。' },
{ eqName: '固化', pl: 'A', priority: 3, checkContent: '油报往目亲没己话构这题家感。' },
{ eqName: '下片', pl: 'B', priority: 1, checkContent: '不决系入几切斗回史亲和全自管。' },
{ eqName: '冷却', pl: 'B', priority: 2, checkContent: '近温志用建将面连机次些民石变分教集加。' },
{ eqName: '钢化', pl: 'B', priority: 4, checkContent: '家地派众几又斯管把来资活听是强。' },
{ eqName: '二镀', pl: 'B', priority: 1, checkContent: '全是治群况布这越新划回路一量根步到料。' },
{ eqName: '打孔', pl: 'B', priority: 3, checkContent: '西心往各产有矿及红构更往术路外光参因。' },
{ eqName: '磨边', pl: 'A', priority: 1, checkContent: '严音五今通住包作世不如半志。' },
{ eqName: '一镀', pl: 'A', priority: 3, checkContent: '相史亲运界工按越清引具产。' },
{ eqName: '钢后清洗机', pl: 'A', priority: 1, checkContent: '合题基则关大大边听律安来革号其干。' },
{ eqName: '丝印', pl: 'A', priority: 1, checkContent: '身米识可见报求起放之过影。' },
{ eqName: '磨边后清洗机', pl: 'B', priority: 4, checkContent: '始单方实度构斯手研习任压识。' },
{ eqName: '打孔', pl: 'B', priority: 3, checkContent: '共特场新收关式往劳极段前步产角至高。' },
{ eqName: '钢后清洗机', pl: 'A', priority: 3, checkContent: '消理几包山教满得五期那改计。' },
{ eqName: '一镀', pl: 'B', priority: 4, checkContent: '而能研区有关点回劳之直近际她处而基步。' },
{ eqName: '二镀', pl: 'A', priority: 3, checkContent: '状复思式样要热间王才整金确。' },
{ eqName: '打孔', pl: 'B', priority: 2, checkContent: '即组明对省队内难军领把完六论技。' },
{ eqName: '打孔后清洗机', pl: 'A', priority: 2, checkContent: '度些心万则它书专干又分因直政论九。' },
{ eqName: '丝印', pl: 'A', priority: 1, checkContent: '加示队酸得如生改及效车流王西高阶面。' },
{ eqName: '打孔后清洗机', pl: 'B', priority: 2, checkContent: '期十参比边题完选油导将程安走以样。' }
]
export default {

View File

@ -25,7 +25,6 @@ export default {
<style scoped>
.left-content-monitoring {
flex: 1;
width: 100%;
height: calc(100% - 32px);
display: flex;

View File

@ -9,7 +9,7 @@
<div class="content-part">
<div class="row">
<span class="name"> &nbsp;&nbsp;&nbsp;</span>
<span class="diy-process-bar bar-width-1 color-1" />
<span class="diy-process-bar color-1" />
<span class="amount">
39m
<sup>3</sup>
@ -17,17 +17,17 @@
</div>
<div class="row">
<span class="name">循环水</span>
<span class="diy-process-bar bar-width-2 color-2" />
<span class="diy-process-bar color-2" />
<span class="amount">
23m
239m
<sup>3</sup>
</span>
</div>
<div class="row">
<span class="name">自来水</span>
<span class="diy-process-bar bar-width-3 color-3" />
<span class="diy-process-bar color-3" />
<span class="amount">
239m
23m
<sup>3</sup>
</span>
</div>
@ -44,25 +44,25 @@
<div class="content-part">
<div class="row">
<span class="name">&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span class="diy-process-bar bar-width-4 color-1" />
<span class="amount">
23Pa
</span>
</div>
<div class="row">
<span class="name">CDA</span>
<span class="diy-process-bar bar-width-5 color-2" />
<span class="diy-process-bar color-1" />
<span class="amount">
39Pa
</span>
</div>
<div class="row">
<span class="name">天然气</span>
<span class="diy-process-bar bar-width-6 color-3" />
<span class="name">CDA</span>
<span class="diy-process-bar color-2" />
<span class="amount">
239pa
</span>
</div>
<div class="row">
<span class="name">天然气</span>
<span class="diy-process-bar color-3" />
<span class="amount">
23Pa
</span>
</div>
</div>
</TechyBox>
</div>
@ -85,9 +85,8 @@
<img src="./assets/consume/fad.png" width="32" height="32" alt="fadian" />
<span>发电</span>
</div>
<div style="height: 100%; flex: 1; ">
<!-- <FadianChart /> -->
<DianChart />
<div style="height: 100%; flex: 1; padding: calc(8px * var(--beilv))">
<FadianChart />
</div>
</TechyBox>
</div>
@ -200,25 +199,6 @@ export default {
height: 100%;
}
.bar-width-1::after {
width: 60%;
}
.bar-width-2::after {
width: 34%;
}
.bar-width-3::after {
width: 99%;
}
.bar-width-4::after {
width: 20%;
}
.bar-width-5::after {
width: 29%;
}
.bar-width-6::after {
width: 79%;
}
.diy-process-bar.color-1::after {
background: linear-gradient(to right, #178be9, #67b3f2);
}

View File

@ -52,23 +52,23 @@ const PriorityComponent = {
}
const tableProps = [
{ prop: 'eqName', 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: 'eqName', label: '设备名称', align: 'center', 'min-width': 100 },
{ prop: 'plName', label: '所属产线', align: 'center', 'min-width': 100 },
{ prop: 'priority', label: '提示等级', align: 'center', 'min-width': 100, subcomponent: PriorityComponent },
{ 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': 128 }
]
const tableData = [
{ eqName: '磨边', plName: 'B', content: '表面检测光源和相机的卫生', priority: 4, duration: '30 min' },
{ eqName: '冷却', plName: 'A', content: '辊道下方的碎玻璃清理', priority: 4, duration: '1 min' },
{ eqName: '丝印', plName: 'A', content: '边角检测设备水平的校正', priority: 2, duration: '57 min' },
{ eqName: '打孔后清洗机', plName: 'B', content: '设备表面的卫生', priority: 3, duration: '17 min' },
{ eqName: '固化', plName: 'B', content: '操作台保持整洁', priority: 2, duration: '22 min' },
{ eqName: '一镀', plName: 'B', content: '辊道下方的碎玻璃清理', priority: 3, duration: '2 min' },
{ eqName: '钢化', plName: 'A', content: '检查每日不良是否存在误检', priority: 4, duration: '23 min' },
{ eqName: '磨边', plName: 'B', content: '水冷机内水量充足并且清洁', priority: 3, duration: '6 min' },
{ eqName: '磨边', plName: 'B', content: '表面检测光源和相机的卫生', priority: 2, duration: '23 min' },
{ eqName: '磨边', plName: 'B', content: '所受第按政酸南角写作给还些。', priority: 4, duration: '30 min' },
{ eqName: '冷却', plName: 'A', content: '自变流门行极声将通确为用目很导处种。', priority: 4, duration: '1 min' },
{ eqName: '丝印', plName: 'A', content: '从小定需间太则选下上又原。', priority: 2, duration: '57 min' },
{ eqName: '打孔后清洗机', plName: 'B', content: '表新和新总我音层采示道产当列。', priority: 3, duration: '17 min' },
{ eqName: '固化', plName: 'B', content: '义往历安日况整家小心什会。', priority: 2, duration: '22 min' },
{ eqName: '一镀', plName: 'B', content: '收直素新要府收强而着明速省。', priority: 3, duration: '2 min' },
{ eqName: '钢化', plName: 'A', content: '它养土党把采商发活门没千联同设和。', priority: 4, duration: '23 min' },
{ eqName: '磨边', plName: 'B', content: '拉养必型制规想科得价向别任。', priority: 3, duration: '6 min' },
{ eqName: '磨边', plName: 'B', content: '确验效五什第也片什八装所红。', priority: 2, duration: '23 min' },
{
eqName: '磨边后清洗机',
plName: 'A',

View File

@ -48,7 +48,7 @@ export default {
},
{
type: 'linear',
x: 0.5,
x: 1,
y: 1,
x2: 0,
y2: 0,
@ -61,7 +61,7 @@ export default {
},
{
type: 'linear',
x: 0.5,
x: 1,
y: 1,
x2: 0,
y2: 0,
@ -75,9 +75,9 @@ export default {
{
type: 'linear',
x: 0,
y: 0.5,
x2: 1,
y2: 0.5,
y: 1,
x2: 0,
y2: 0,
colorStops: [
{ color: '#FFFFFF00', offset: 0 },
{ color: '#49FBD600', offset: 0.1 },
@ -88,11 +88,11 @@ export default {
]
const demoData = [
{ value: 107, name: '破片' },
{ value: 146, name: '崩边' },
{ value: 43, name: '脏污' },
{ value: 83, name: '划擦伤' },
{ value: 20, name: '崩孔' }
{ value: 55, name: 'A' },
{ value: 33, name: 'B' },
{ value: 22, name: 'C' },
{ value: 11, name: 'D' },
{ value: 32, name: 'E' }
]
return {
@ -103,7 +103,7 @@ export default {
textAlign: 'center',
left: '63%',
top: '35%',
text: demoData.reduce((prev, curr) => prev + curr.value, 0),
text: '33039',
textStyle: {
color: '#fff',
fontSize: 16,
@ -120,10 +120,10 @@ export default {
legend: {
top: 0,
bottom: 0,
left: -15,
left: -10,
orient: 'vertical',
icon: 'none',
itemGap: 8,
itemGap: 5,
itemWidth: 10,
formatter: function(name) {
// test data - dynamic
@ -163,6 +163,7 @@ export default {
borderRadius: 5,
height: 10,
backgroundColor: '#FB418C'
// backgroundColor: '#1A99FF'
},
d: {
// verticalAlign: 'top',
@ -171,6 +172,7 @@ export default {
borderRadius: 5,
height: 10,
backgroundColor: '#DDB112'
// backgroundColor: '#A691FF'
},
e: {
// verticalAlign: 'top',
@ -179,6 +181,7 @@ export default {
borderRadius: 5,
height: 10,
backgroundColor: '#1A99FF'
// backgroundColor: '#FB418C'
},
f: {
// verticalAlign: 'top',
@ -187,6 +190,7 @@ export default {
borderRadius: 5,
height: 10,
backgroundColor: '#A691FF'
// backgroundColor: '#49FBD6'
},
g: {
// verticalAlign: 'top',
@ -195,6 +199,7 @@ export default {
borderRadius: 5,
height: 10,
backgroundColor: '#49FBD6'
// backgroundColor: '#DDB112'
}
}
}
@ -231,7 +236,7 @@ export default {
const colorGradient = colors[dataIndex]
if (totalRate + percent < 25) {
/** 也许这里需要完善,但目前工作良好 */
;(() => {})()
(() => {})()
} else if (totalRate + percent < 50) {
colorGradient.x = 0
colorGradient.y = 0
@ -244,7 +249,7 @@ export default {
colorGradient.y2 = 0
} else if (totalRate + percent < 100) {
/** 也许这里需要完善,但目前工作良好 */
;(() => {})()
(() => {})()
}
totalRate += percent

View File

@ -1,5 +1,5 @@
<template>
<div style="height: calc(100% - 36px); width: 100%; position: relative;">
<div style="height: calc(100% - 36px); width: 100%;">
<div :id="id" ref="techy-line-chart" class="techy-chart" />
</div>
</template>
@ -35,15 +35,14 @@ export default {
option: {
color: ['#59CBE8', '#E93CAC', '#FF7345', '#9452FF', '#6A6E87', '#52FFF1'],
grid: {
top: '45%',
top: '20%',
left: 0,
right: 12,
bottom: '5%',
bottom: 0,
containLabel: true
},
legend: {
width: '72%',
top: '20%',
right: 12,
itemWidth: 12,
itemHeight: 8,
@ -74,8 +73,6 @@ export default {
yAxis: {
type: 'value',
name: '成品率',
min: 'dataMin',
splitNumber: 2,
nameTextStyle: {
color: '#fffc',
align: 'right',
@ -98,10 +95,11 @@ export default {
},
series: [
{
name: 'A',
name: '产线1',
type: 'line',
symbol: 'none',
areaStyle: {
// color: 'rgba(50,145,152,0.5)'
color: {
type: 'linear',
x: 0,
@ -123,19 +121,14 @@ export default {
},
data: Array(12)
.fill(0)
.map(_ => {
let v = Math.floor(Math.random() * 100)
while (v < 80) {
v = Math.floor(Math.random() * 100)
}
return v
})
.map(_ => Math.floor(Math.random() * 100))
},
{
name: 'B',
name: '产线2',
type: 'line',
symbol: 'none',
areaStyle: {
// color: 'rgba(50,145,152,0.5)'
color: {
type: 'linear',
x: 0,
@ -157,98 +150,95 @@ export default {
},
data: Array(12)
.fill(0)
.map(_ => {
let v = Math.floor(Math.random() * 100)
while (v < 80) {
v = Math.floor(Math.random() * 100)
}
return v
})
.map(_ => Math.floor(Math.random() * 100))
},
{
name: '产线3',
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: '#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: 'rgba(50,145,152,0.5)'
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: 'rgba(50,145,152,0.5)'
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))
}
// {
// 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))
// }
]
}
}
@ -268,10 +258,7 @@ export default {
</script>
<style scoped>
.techy-chart {
/* background: #cccc; */
position: absolute;
top: -36%;
height: 150%;
height: 100%;
width: 100%;
}

View File

@ -26,16 +26,16 @@ export default {
data() {
return {
datalist: [
{ name: '热端', value: 2023233, color: '#0b88ff' },
{ name: '丝印', value: 2023233, color: '#0bffa6' },
{ name: '原片', value: 20, color: '#0bffa6' },
{ name: '钢化', value: 20, color: '#e3ff0b' },
{ name: '上片磨边', value: 20, color: '#e3ff0b' },
{ name: '下片铺纸', value: 202324, color: '#950bff' },
{ name: '镀膜', value: 20, color: '#950bff' },
{ name: '物流仓储', value: 202324, color: '#ff7d0b' },
{ name: '清洗', value: 20, color: '#0bffa6' },
{ name: '包装', value: 2, color: '#ff0bc2' }
{ name: '热端', value: 2332039120, color: '#0b88ff' },
{ name: '原片上片', value: 30, color: '#0bffa6' },
{ name: '上片', value: 27, color: '#e3ff0b' },
{ name: '磨边', value: 23, color: '#950bff' },
{ name: '原片磨边', value: 30, color: '#0bffa6' },
{ name: '原片', value: 30, color: '#0bffa6' },
{ name: '上片', value: 27, color: '#e3ff0b' },
{ name: '磨边镀膜膜', value: 23, color: '#950bff' },
{ name: '镀膜', value: 10, color: '#ff0bc2' },
{ name: '清晰', value: 66, color: '#ff7d0b' }
]
}
},
@ -55,7 +55,6 @@ export default {
grid-auto-rows: min-content;
gap: calc(4px * var(--beilv)) calc(6px * var(--beilv));
justify-content: end;
align-content: center;
}
.analysis-item {

View File

@ -1,5 +1,5 @@
<template>
<techy-box style="width: 100%; height: calc(100% - 36px);">
<techy-box style="width: 100%; height: calc(100% - 36px); padding: calc(100vmin / 1920 * 16)">
<!-- <div :id="id" ref="techy-line-chart" class="techy-chart" /> -->
<new-bar
@ -24,16 +24,116 @@
</template>
<script>
import echarts from 'echarts'
import TechyBox from './TechyBox.vue'
import newBar from './newBar.vue'
import resize from '@/views/OperationalOverview/components/mixins/resize'
export default {
name: 'RealtimeProductionHorizontalBarChart',
components: { TechyBox, newBar },
props: {},
mixins: [resize],
props: {
id: {
type: String,
default: 'default-linechart-id'
},
title: {
type: String,
default: 'default-title'
},
xData: {
type: Array,
default: () => []
},
seriesData: {
type: Array,
default: () => []
}
},
data() {
return {}
}
return {
chart: null,
option: {
color: ['#FF7345', '#52FFF1', '#6A6E87', '#9452FFA6'],
grid: {
top: 0,
left: 0,
right: '5%',
bottom: 0,
containLabel: true
},
xAxis: {
type: 'value',
boundaryGap: [0, 0.001],
axisTick: {
show: false
},
axisLabel: {
fontSize: 8
// rotate: 10
},
axisLine: {
show: false,
lineStyle: {
color: '#fffa'
}
},
splitLine: {
lineStyle: {
color: '#fff3'
}
}
},
yAxis: {
type: 'category',
data: ['产线1', '产线2', '产线3', '产线4', '产线5', '产线6'],
axisLine: {
show: false
},
axisLabel: {
fontSize: 10,
color: '#fffa'
},
axisTick: { show: false },
splitLine: {
lineStyle: {
color: '#fffa'
}
}
},
series: [
{
name: '2011',
type: 'bar',
barWidth: 5,
data: Array(6)
.fill(0)
.map(value => Math.floor(Math.random() * 1000))
},
{
name: '2012',
type: 'bar',
barWidth: 5,
data: Array(6)
.fill(0)
.map(value => Math.floor(Math.random() * 1000))
}
]
}
}
},
mounted() {
this.$nextTick(() => {
if (!this.chart) this.chart = echarts.init(this.$refs['techy-line-chart'])
this.chart.setOption(this.option)
})
},
beforeDestroy() {
if (this.chart) this.chart.dispose()
this.chart = null
},
methods: {}
}
</script>
<style scoped>

View File

@ -12,9 +12,7 @@
<span class="quality-analysis-bar__name">
{{ name }}
</span>
<span class="quality-analysis-bar__amount" :title="'数量:' + amount">
{{ amount | amountFilter }}
</span>
<span class="quality-analysis-bar__amount" :title="'数量:' + amount">{{ amount | amountFilter }}</span>
</div>
</template>
@ -24,7 +22,7 @@ export default {
filters: {
amountFilter: val => {
const sVal = val.toString()
return sVal.length > 9 ? sVal.slice(0, 8) + '...' : sVal
return sVal.length > 7 ? sVal.slice(0, 6) + '...' : sVal
}
},
props: {
@ -99,17 +97,17 @@ export default {
}
.block-green-5 {
background: linear-gradient(to left, #35abad, hsla(181, 53%, 44%, 0.75));
background: linear-gradient(to left, #35abad, hsla(181, 53%, 44%, 0.65));
/* margin-left: 4px; */
}
.block-green-4 {
background: linear-gradient(to left, hsla(181, 53%, 44%, 0.75), hsla(181, 53%, 44%, 0.44));
background: linear-gradient(to left, hsla(181, 53%, 44%, 0.65), hsla(181, 53%, 44%, 0.4));
}
.block-green-3 {
background: linear-gradient(to left, hsla(181, 53%, 44%, 0.44), hsla(181, 53%, 44%, 0.15));
background: linear-gradient(to left, hsla(181, 53%, 44%, 0.4), hsla(181, 53%, 44%, 0.2));
}
.block-green-2 {
background: linear-gradient(to left, hsla(181, 53%, 44%, 0.15), hsla(181, 53%, 44%, 0));
background: linear-gradient(to left, hsla(181, 53%, 44%, 0.2), hsla(181, 53%, 44%, 0));
}
.block-green-1 {
/* background: linear-gradient(to left, hsla(181, 53%, 44%, 0.2), hsla(181, 53%, 44%, 0)); */
@ -189,10 +187,10 @@ export default {
color: rgba(255, 255, 255, 0.725);
display: inline-block;
/* min-width: 35%; */
width: 45%;
width: 35%;
text-align: left;
padding: calc(3px * var(--beilv)) 0;
font-size: calc(14px * var(--beilv));
line-height: calc(12px * var(--beilv));
font-size: calc(14px * var(--beilv));;
line-height: calc(12px * var(--beilv));;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 KiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 KiB

View File

@ -89,8 +89,8 @@ export default {
this.chartName === 'process-fault'
? 'rgba(119, 255, 242, 1)'
: this.chartName === 'fault-category'
? '#31a2ff'
: '#fff9',
? '#31a2ff'
: '#fff9',
show: true,
offset: [-12, 10],
position: 'top',
@ -113,7 +113,6 @@ export default {
name: this.dataList[1].name,
type: 'bar',
barWidth: 20,
yAxisIndex: 1,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: this.dataList[1].topColor },
@ -125,7 +124,6 @@ export default {
{
//
name: this.dataList[1].name,
yAxisIndex: 1,
type: 'pictorialBar',
barWidth: 20,
symbol: 'circle',
@ -145,8 +143,8 @@ export default {
this.chartName === 'process-fault'
? 'rgba(119, 255, 242, 1)'
: this.chartName === 'fault-category'
? '#31a2ff'
: '#fff9',
? '#31a2ff'
: '#fff9',
show: true,
offset: [12, 10],
position: 'top',
@ -156,7 +154,6 @@ export default {
{
//
name: this.dataList[1].name,
yAxisIndex: 1,
type: 'pictorialBar',
barWidth: 20,
symbol: 'circle',
@ -173,6 +170,7 @@ export default {
//
name: this.dataList[0].name,
type: 'bar',
// barWidth: 26,
barWidth: barWidth,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
@ -193,6 +191,7 @@ export default {
//
name: this.dataList[0].name,
type: 'pictorialBar',
// barWidth: 26,
barWidth: barWidth,
symbol: 'circle',
symbolPosition: 'end',
@ -210,8 +209,8 @@ export default {
this.chartName === 'process-fault'
? 'rgba(119, 255, 242, 1)'
: this.chartName === 'fault-category'
? '#31a2ff'
: '#fff9',
? '#31a2ff'
: '#fff9',
show: true,
offset: [0, 10],
position: 'top',
@ -223,6 +222,7 @@ export default {
//
name: this.dataList[0].name,
type: 'pictorialBar',
// barWidth: 26,
barWidth: barWidth,
symbol: 'circle',
symbolOffset: [0, '50%'],
@ -249,16 +249,15 @@ export default {
this.chart = echarts.init(this.$refs.chartContainer)
this.chart.setOption({
grid: {
top: '24%',
left: '8%',
right: '5%',
top: '16%',
left: '2%',
right: '2%',
bottom: '3%',
containLabel: true
},
legend: {
itemWidth: 8,
itemHeight: 8,
top: '2%',
right: '2%',
textStyle: {
color: '#fff9'
@ -282,68 +281,31 @@ export default {
},
data: this.nameList
},
yAxis: [
{
name: '产量/m²',
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'
yAxis: {
axisLine: {
lineStyle: {
type: 'solid',
color: this.dataList[0].bottomColor,
// color: 'rgba(119, 255, 242, 0.6)', // 线
width: '1' // 线
}
},
{
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'
}
],
axisTick: {
show: false
},
axisLabel: {
textStyle: {
color: 'rgba(255,255,255,0.5)' //
}
},
splitLine: {
lineStyle: {
type: 'dotted',
color: 'rgba(119, 255, 242, 0.2)'
}
},
type: 'value'
},
series: this.series
})
}
@ -392,12 +354,10 @@ export default {
left: calc(100vw/1920 * 48); */
/* bottom: calc(10% + 100vh/1920 * 28); */
bottom: 20px;
left: 6%;
left: 9%;
height: 30px;
width: 90%;
border-radius: 3px;
/* border: 1px solid #49fbd7; */
background: linear-gradient(to top, #49fbd789 5%, transparent);
background: linear-gradient(to top, #49fbd789, transparent);
transform: skew(-35deg);
z-index: 0;
}

View File

@ -1,9 +1,8 @@
<template>
<div id="v3d-outter" ref="v3d-outter">
<div id="V3DData" style="position: fixed; top: 0; left: 0; display: hidden;" rel=""></div>
<V3DApp @3d-loaded="handle3DLoaded" @click.native="handle3DClick" />
<div v-if="showPage" id="v3d-main-content">
<!-- <div v-if="true" id="v3d-main-content"> -->
<!-- <V3DApp @3d-loaded="handle3DLoaded" />
<div v-if="showPage" id="v3d-main-content"> -->
<div v-if="true" id="v3d-main-content">
<techy-header :head-title="'合肥新能源数字工厂总览'" @toggle-full-screen="toggleFullScreen" />
<section id="techy-body-part">
@ -20,38 +19,31 @@
</techy-container>
</div>
<div class="techy-body-part__middle" v-if="currentEquipment">
<div class="techy-body-part__middle">
<TechyBox>
<div class="techy-body-part__middle__inner">
<p>
<b>产线名称 :</b>
<span>{{ currentEquipment.pl }}</span>
<span>A产线</span>
</p>
<p>
<b>设备名称 :</b>
<span>{{ currentEquipment.name }}</span>
<span>清洗机</span>
</p>
<p>
<b>累计加工 :</b>
<span>{{ currentEquipment.amount }}</span>
<span>20</span>
</p>
<p>
<b>通信状态 :</b>
<span
class="round-dot"
:class="{
'danger-dot': currentEquipment.status === '故障',
'warning-dot': currentEquipment.status === '调试中'
}"
>
{{ currentEquipment.status }}
</span>
<span class="round-dot">运行中</span>
</p>
</div>
</TechyBox>
</div>
</div>
<div class="techy-body-part__right">
<div class="realtime">
<techy-container title="实时产量和能耗" icon="折角的菜单图标">
@ -81,7 +73,7 @@
</techy-container>
</div>
<div class="ft-monitor" style="flex: 1;">
<techy-container title="现场实时监控" icon="安全帽图标" style="display: flex; flex-direction: column;">
<techy-container title="现场实时监控" icon="安全帽图标">
<LeftContentMonitor />
</techy-container>
</div>
@ -118,8 +110,6 @@ import TechyBox from './components/TechyBox.vue'
import screenfull from 'screenfull'
import eqList from './v3dApp/data'
export default {
name: '',
components: {
@ -139,8 +129,6 @@ export default {
},
data() {
return {
eqId: null,
currentEquipment: null,
showPage: false,
toggleResize: 'toggle-1' // <=== no need to worry this
}
@ -165,12 +153,6 @@ export default {
},
handle3DLoaded() {
this.showPage = true
},
handle3DClick() {
this.eqId = document.getElementById('V3DData').rel
if (this.eqId) {
this.currentEquipment = eqList.find(item => item.id === this.eqId)
}
}
}
}
@ -367,12 +349,4 @@ export default {
background-color: rgb(82, 231, 82);
border-radius: calc(4px * var(--beilv));
}
.danger-dot::before {
background-color: #e71837;
}
.warning-dot::before {
background-color: #d6961f;
}
</style>

View File

@ -1,73 +0,0 @@
export default [
{ id: 'C1-0', pl: 'A', name: '上片', amount: 32, status: '生产中' },
{ id: 'C1-1', pl: 'A', name: '磨边', amount: 32, status: '生产中' },
{ id: 'C1-2', pl: 'A', name: '磨边', amount: 32, status: '调试中' },
{ id: 'C1-3', pl: 'A', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C1-4', pl: 'A', name: '打孔', amount: 32, status: '生产中' },
{ id: 'C1-5', pl: 'A', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C1-6', pl: 'A', name: '丝印', amount: 32, status: '生产中' },
{ id: 'C1-7', pl: 'A', name: '固化', amount: 32, status: '生产中' },
{ id: 'C1-8', pl: 'A', name: '储片', amount: 32, status: '生产中' },
{ id: 'C1-9', pl: 'A', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C1-10', pl: 'A', name: '下片', amount: 32, status: '生产中' },
{ id: 'C2-0', pl: 'B', name: '上片', amount: 32, status: '调试中' },
{ id: 'C2-1', pl: 'B', name: '磨边', amount: 32, status: '生产中' },
{ id: 'C2-2', pl: 'B', name: '磨边', amount: 32, status: '调试中' },
{ id: 'C2-3', pl: 'B', name: '清洗', amount: 32, status: '调试中' },
{ id: 'C2-4', pl: 'B', name: '打孔', amount: 32, status: '调试中' },
{ id: 'C2-5', pl: 'B', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C2-6', pl: 'B', name: '丝印', amount: 32, status: '生产中' },
{ id: 'C2-7', pl: 'B', name: '固化', amount: 32, status: '生产中' },
{ id: 'C2-8', pl: 'B', name: '储片', amount: 32, status: '生产中' },
{ id: 'C2-9', pl: 'B', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C2-10', pl: 'B', name: '下片', amount: 32, status: '生产中' },
{ id: 'C3-0', pl: 'C', name: '上片', amount: 32, status: '生产中' },
{ id: 'C3-1', pl: 'C', name: '磨边', amount: 32, status: '生产中' },
{ id: 'C3-2', pl: 'C', name: '磨边', amount: 32, status: '生产中' },
{ id: 'C3-3', pl: 'C', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C3-4', pl: 'C', name: '打孔', amount: 32, status: '生产中' },
{ id: 'C3-5', pl: 'C', name: '清洗', amount: 32, status: '故障' },
{ id: 'C3-6', pl: 'C', name: '丝印', amount: 32, status: '生产中' },
{ id: 'C3-7', pl: 'C', name: '固化', amount: 32, status: '生产中' },
{ id: 'C3-8', pl: 'C', name: '储片', amount: 32, status: '生产中' },
{ id: 'C3-9', pl: 'C', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C3-10', pl: 'C', name: '下片', amount: 32, status: '生产中' },
{ id: 'C4-0', pl: 'D', name: '上片', amount: 32, status: '故障' },
{ id: 'C4-1', pl: 'D', name: '磨边', amount: 32, status: '生产中' },
{ id: 'C4-2', pl: 'D', name: '磨边', amount: 32, status: '生产中' },
{ id: 'C4-3', pl: 'D', name: '清洗', amount: 32, status: '故障' },
{ id: 'C4-4', pl: 'D', name: '打孔', amount: 32, status: '故障' },
{ id: 'C4-5', pl: 'D', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C4-6', pl: 'D', name: '丝印', amount: 32, status: '生产中' },
{ id: 'C4-7', pl: 'D', name: '固化', amount: 32, status: '生产中' },
{ id: 'C4-8', pl: 'D', name: '储片', amount: 32, status: '生产中' },
{ id: 'C4-9', pl: 'D', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C4-10', pl: 'D', name: '下片', amount: 32, status: '生产中' },
{ id: 'C5-0', pl: 'E', name: '上片', amount: 32, status: '生产中' },
{ id: 'C5-1', pl: 'E', name: '磨边', amount: 32, status: '生产中' },
{ id: 'C5-2', pl: 'E', name: '磨边', amount: 32, status: '生产中' },
{ id: 'C5-3', pl: 'E', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C5-4', pl: 'E', name: '打孔', amount: 32, status: '生产中' },
{ id: 'C5-5', pl: 'E', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C5-6', pl: 'E', name: '丝印', amount: 32, status: '生产中' },
{ id: 'C5-7', pl: 'E', name: '固化', amount: 32, status: '生产中' },
{ id: 'C5-8', pl: 'E', name: '储片', 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-1', pl: 'F', name: '磨边', amount: 32, status: '生产中' },
{ id: 'C6-2', pl: 'F', name: '磨边', amount: 32, status: '生产中' },
{ id: 'C6-3', pl: 'F', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C6-4', pl: 'F', name: '打孔', amount: 32, status: '生产中' },
{ id: 'C6-5', pl: 'F', name: '清洗', amount: 32, status: '生产中' },
{ id: 'C6-6', pl: 'F', name: '丝印', amount: 32, status: '生产中' },
{ id: 'C6-7', pl: 'F', name: '固化', 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: '生产中' },
]

View File

@ -73,9 +73,9 @@ const LifeRemainComponent = {
computed: {
statusColor() {
const colors = [
'rgba(255,84,76,0.6)', // red < 10%
'#FFBD43', // yellow < 20%
'rgba(142,254,83,0.6)' // green
'rgba(255,84,76,0.6)', // red < 0
'#FFBD43', // yellow < 10
'rgba(142,254,83,0.6)' // green >= 10
]
return this.injectData.remain < 0 ? colors[0] : this.injectData.remain < 10 ? colors[1] : colors[2]
}
@ -160,8 +160,6 @@ export const sparepartsProps = [
{ prop: 'location', label: '库位', align: 'center' }
]
// TODO: 2022.11.17 修改数据和剩余寿命组件
export const sparepartsDatalist = [
{ 'name': '激光打孔', 'eq': 'A2一次固化机', 'pl': 'C线', 'update_time': '2007-08-31 09:15:24', 'remain': -32, 'stock': 457, 'location': '库位74' },
{ 'name': '磨边单元', 'eq': 'B1一次冷却机', 'pl': 'C线', 'update_time': '2016-10-02 22:23:09', 'remain': -95, 'stock': 5600, 'location': '库位10' },

View File

@ -94,52 +94,11 @@
<div class="grow-6 flex gap-16">
<div class="width-222">
<techy-box class="" style="padding: calc(16px * var(--beilv));">
<techy-analysis-header :show-top-icon="false">产线缺陷分析</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(16px * var(--beilv));"
>
单位: 千片
</span>
<pl-fault-analysis-pie-chart :data-list="chosenDatalist" />
</div>
<div class="pl-select">
<span
:class="{ 'pl-select__active': plMode === 'a' }"
@click="
plMode = 'a'
chosenDatalist = quexianDatalist[0]
"
>
A
</span>
<span
:class="{ 'pl-select__active': plMode === 'b' }"
@click="
plMode = 'b'
chosenDatalist = quexianDatalist[1]
"
>
B
</span>
</div>
<techy-analysis-header>产线缺陷分析</techy-analysis-header>
<pl-fault-analysis-pie-chart />
<div class="date-select">
<span
:class="{ 'date-select__active': dateMode === 'day' }"
@click="
dateMode = 'day'
chosenDatalist = quexianDatalist[2]
"
>
</span>
<span
:class="{ 'date-select__active': dateMode === 'month' }"
@click="
dateMode = 'month'
chosenDatalist = quexianDatalist[3]
"
>
<span :class="{ 'date-select__active': dateMode === 'day' }" @click="dateMode = 'day'"></span>
<span :class="{ 'date-select__active': dateMode === 'month' }" @click="dateMode = 'month'">
</span>
</div>
@ -148,24 +107,10 @@
<div class="grow">
<techy-box class="" style="padding: calc(16px * var(--beilv));">
<techy-analysis-header>产品成品率</techy-analysis-header>
<new-line-stack :data-update-token="dataUpdateToken" />
<new-line-stack />
<div class="date-select">
<span
:class="{ 'date-select__active': dateMode2 === 'day' }"
@click="
dateMode2 = 'day'
dataUpdateToken = '' + Math.random()
"
>
</span>
<span
:class="{ 'date-select__active': dateMode2 === 'month' }"
@click="
dateMode2 = 'month'
dataUpdateToken = '' + Math.random()
"
>
<span :class="{ 'date-select__active': dateMode2 === 'day' }" @click="dateMode2 = 'day'"></span>
<span :class="{ 'date-select__active': dateMode2 === 'month' }" @click="dateMode2 = 'month'">
</span>
</div>
@ -264,44 +209,7 @@ export default {
NewLineStack
},
data() {
const quexianDatalist = [
[
{ value: 107, name: '破片' },
{ value: 146, name: '崩边' },
{ value: 43, name: '脏污' },
{ value: 83, name: '划擦伤' },
{ value: 20, name: '崩孔' },
{ value: 21, name: '其他' }
],
[
{ value: 117, name: '破片' },
{ value: 106, name: '崩边' },
{ value: 40, name: '脏污' },
{ value: 82, name: '划擦伤' },
{ value: 22, name: '崩孔' },
{ value: 19, name: '其他' }
],
[
{ value: 97, name: '破片' },
{ value: 96, name: '崩边' },
{ value: 33, name: '脏污' },
{ value: 43, name: '划擦伤' },
{ value: 10, name: '崩孔' },
{ value: 18, name: '其他' }
],
[
{ value: 127, name: '破片' },
{ value: 156, name: '崩边' },
{ value: 53, name: '脏污' },
{ value: 93, name: '划擦伤' },
{ value: 25, name: '崩孔' },
{ value: 22, name: '其他' }
]
]
return {
dataUpdateToken: 'xx-token',
plMode: 'a',
dateMode: 'month',
dateMode2: 'month',
qualityTableProps,
@ -319,9 +227,7 @@ export default {
{ name: '包装', amount: 20 },
{ name: '清晰', amount: 20 },
{ name: '物流仓储', amount: 233920 }
],
quexianDatalist,
chosenDatalist: quexianDatalist[0]
]
}
},
computed: {
@ -443,8 +349,7 @@ export default {
.quality-analysis__body__row-1 {
height: calc(216px * var(--beilv));
/* overflow: hidden; */
overflow: initial;
overflow: hidden;
display: flex;
gap: calc(16px * var(--beilv));
}
@ -504,7 +409,6 @@ export default {
gap: calc(16px * var(--beilv));
}
.pl-select,
.date-select {
position: absolute;
top: calc(16px * var(--beilv));
@ -515,12 +419,6 @@ export default {
cursor: pointer;
}
.pl-select {
right: unset;
left: calc(10px * var(--beilv));
}
.pl-select span,
.date-select span {
display: inline-block;
width: calc(40px * var(--beilv));
@ -531,7 +429,6 @@ export default {
background-color: #31878c94;
}
.pl-select span.pl-select__active,
.date-select span.date-select__active {
background-color: #42bbb7;
}

View File

@ -1,6 +1,6 @@
<template>
<div class="techy-analysis-header">
<span v-if="showTopIcon" class="top-icon">
<span class="top-icon">
<svg
width="100%"
height="100%"
@ -51,7 +51,7 @@
<span class="techy-analysis-header__title">
<slot />
</span>
<span v-if="showTopIcon" class="top-icon">
<span class="top-icon">
<svg
width="100%"
height="100%"
@ -105,12 +105,6 @@
<script>
export default {
name: 'TechyAnalysisHeader',
props: {
showTopIcon: {
type: Boolean,
default: true
}
},
data() {
return {}
}

View File

@ -13,10 +13,6 @@ export default {
id: {
type: String,
default: 'default-fault-analysis-id'
},
dataList: {
type: Array,
required: true
}
},
data() {
@ -48,19 +44,6 @@ export default {
],
global: false
},
{
type: 'linear',
x: 0,
y: 1,
x2: 0,
y2: 0,
colorStops: [
{ color: '#FFFFFF00', offset: 0 },
{ color: '#49FBD600', offset: 0.1 },
{ color: '#74DC85', offset: 1 } // 绿
],
global: false
},
{
type: 'linear',
x: 1,
@ -76,9 +59,9 @@ export default {
},
{
type: 'linear',
x: 0,
y: 0.5,
x2: 1,
x: 1,
y: 1,
x2: 0,
y2: 0,
colorStops: [
{ color: '#FFFFFF00', offset: 0 },
@ -90,8 +73,8 @@ export default {
{
type: 'linear',
x: 0,
y: 0.5,
x2: 1,
y: 1,
x2: 0,
y2: 0,
colorStops: [
{ color: '#FFFFFF00', offset: 0 },
@ -102,21 +85,29 @@ export default {
}
]
const demoData = [
{ value: 55, name: 'A' },
{ value: 33, name: 'B' },
{ value: 22, name: 'C' },
{ value: 11, name: 'D' },
{ value: 32, name: 'E' }
]
return {
chart: null,
// default configs
configs: {
title: {
textAlign: 'center',
left: '69%',
top: '46%',
text: '',
left: '63%',
top: '35%',
text: '33039',
textStyle: {
color: '#fff',
fontSize: 16,
fontWeight: 'normal'
},
itemGap: 5,
itemGap: 2,
subtext: '总数',
subtextStyle: {
color: '#fff',
@ -125,15 +116,16 @@ export default {
}
},
legend: {
top: '10%',
top: 0,
bottom: 0,
left: 0,
left: -10,
orient: 'vertical',
icon: 'none',
itemGap: 5,
itemWidth: 10,
formatter: name => {
const testData = this.dataList
formatter: function(name) {
// test data - dynamic
const testData = demoData
let pieLegendVale = {}
testData.filter((item, index) => {
@ -141,7 +133,7 @@ export default {
pieLegendVale = item
}
})
const color = ['c', 'd', 'h', 'e', 'f', 'g']
const color = ['c', 'd', 'e', 'f', 'g']
const arr = [
'{' + color[testData.findIndex(item => item.name === name)] + '|}',
'{b|' + pieLegendVale.name + '}',
@ -154,51 +146,58 @@ export default {
a: {
fontSize: 10,
color: 'rgba(255, 255, 255, 0.7)',
lineHeight: 16,
width: 48,
align: 'left'
lineHeight: 16
},
b: {
width: 40,
align: 'left',
// verticalAlign: 'top',
// align: 'center',
fontSize: 10,
color: 'rgba(255, 255, 255)'
},
c: {
// verticalAlign: 'top',
// align: 'center',
width: 10,
borderRadius: 5,
height: 10,
backgroundColor: '#FB418C'
// backgroundColor: '#1A99FF'
},
d: {
// verticalAlign: 'top',
// align: 'center',
width: 10,
borderRadius: 5,
height: 10,
backgroundColor: '#DDB112'
},
h: {
width: 10,
borderRadius: 5,
height: 10,
backgroundColor: '#74DC85'
// backgroundColor: '#A691FF'
},
e: {
// verticalAlign: 'top',
// align: 'center',
width: 10,
borderRadius: 5,
height: 10,
backgroundColor: '#1A99FF'
// backgroundColor: '#FB418C'
},
f: {
// verticalAlign: 'top',
// align: 'center',
width: 10,
borderRadius: 5,
height: 10,
backgroundColor: '#A691FF'
// backgroundColor: '#49FBD6'
},
g: {
// verticalAlign: 'top',
// align: 'center',
width: 10,
borderRadius: 5,
height: 10,
backgroundColor: '#49FBD6'
// backgroundColor: '#DDB112'
}
}
}
@ -208,12 +207,12 @@ export default {
{
name: 'PieForm',
type: 'pie',
center: ['70%', '56%'],
radius: ['45%', '65%'],
center: ['65%', '48%'],
radius: ['60%', '85%'],
avoidLabelOverlap: true,
label: {
formatter: params => {
const colorMap = ['first', 'second', 'sixth', 'third', 'fourth', 'fifth']
const colorMap = ['first', 'second', 'third', 'fourth', 'fifth']
return `{${colorMap[params.dataIndex]}|${params.percent} %}`
},
rich: {
@ -221,8 +220,7 @@ export default {
second: { color: '#DDB112', fontSize: 8 },
third: { color: '#1A99FF', fontSize: 8 },
fourth: { color: '#A691FF', fontSize: 8 },
fifth: { color: '#49FBD6', fontSize: 8 },
sixth: { color: '#74DC85', fontSize: 8 }
fifth: { color: '#49FBD6', fontSize: 8 }
}
},
labelLine: {
@ -236,7 +234,7 @@ export default {
const colorGradient = colors[dataIndex]
if (totalRate + percent < 25) {
/** 也许这里需要完善,但目前工作良好 */
;(() => {})()
(() => {})()
} else if (totalRate + percent < 50) {
colorGradient.x = 0
colorGradient.y = 0
@ -249,28 +247,19 @@ export default {
colorGradient.y2 = 0
} else if (totalRate + percent < 100) {
/** 也许这里需要完善,但目前工作良好 */
;(() => {})()
(() => {})()
}
totalRate += percent
return colorGradient
}
},
data: this.dataList
data: demoData
}
]
}
}
},
watch: {
dataList: function(val) {
if (val && Array.isArray(val) && val.length) {
this.applyChartOption(val)
}
}
},
mounted() {
window.addEventListener('resize', () => {
if (this.chart) {
@ -295,20 +284,26 @@ export default {
const beilv = document.documentElement.style.getPropertyValue('--beilv')
return beilv * baseSize
},
applyChartOption(datalist) {
// calcRate(baseRate) {
// const beilv = document.documentElement.style.getPropertyValue('--beilv')
// return baseRate * beilv
// },
applyChartOption() {
const fs1 = this.calcFontsize(1 /** px*/)
const fs3 = this.calcFontsize(3 /** px*/)
const fs5 = this.calcFontsize(5 /** px*/)
const fs8 = this.calcFontsize(8 /** px*/)
const fs10 = this.calcFontsize(10 /** px*/)
const fs14 = this.calcFontsize(14 /** px*/)
const fs18 = this.calcFontsize(18 /** px*/)
const legendTopRate = this.calcFontsize(28 /** % */)
const fs16 = this.calcFontsize(16 /** px*/)
const rate10 = this.calcFontsize(10 /** % */)
const rate3 = this.calcFontsize(3 /** % */)
this.configs.title.text = this.dataList.reduce((prev, curr) => prev + curr.value, 0)
this.configs.title.textStyle.fontSize = fs18
this.configs.title.subtextStyle.fontSize = fs14
this.configs.title.textStyle.fontSize = fs14
this.configs.title.subtextStyle.fontSize = fs10
this.configs.legend.top = legendTopRate + '%'
this.configs.legend.left = 0 + '%'
this.configs.legend.top = rate10 + '%'
this.configs.legend.left = rate3 + '%'
this.configs.legend.itemGap = fs5
this.configs.legend.itemWidth = fs10
@ -331,17 +326,13 @@ export default {
this.configs.legend.textStyle.rich.g.width = fs10
this.configs.legend.textStyle.rich.g.height = fs10
this.configs.legend.textStyle.rich.g.borderRadius = fs5
this.configs.legend.textStyle.rich.h.width = fs10
this.configs.legend.textStyle.rich.h.height = fs10
this.configs.legend.textStyle.rich.h.borderRadius = fs5
this.configs.series[0].label.rich.first.fontSize = fs10
this.configs.series[0].label.rich.second.fontSize = fs10
this.configs.series[0].label.rich.third.fontSize = fs10
this.configs.series[0].label.rich.fourth.fontSize = fs10
this.configs.series[0].label.rich.fifth.fontSize = fs10
this.configs.series[0].label.rich.sixth.fontSize = fs10
if (datalist) this.configs.series[0].data = datalist
this.chart.setOption(this.configs)
}
}
@ -350,13 +341,9 @@ export default {
<style scoped>
.chartContainer {
/* height: calc(100% - (36px * var(--beilv))); */
/* position: relative; */
/* position: absolute;
top: 0;
left: 0; */
height: calc(100% - (36px * var(--beilv)));
position: relative;
width: 100%;
height: 100%;
}
.chartContainer > div {

View File

@ -9,12 +9,7 @@ import resize from '@/views/OperationalOverview/components/mixins/resize'
export default {
name: 'PlFaultAnalysisPieChart',
mixins: [resize],
props: {
dataUpdateToken: {
type: String,
default: 'default-token'
}
},
props: {},
data() {
return {
chart: null,
@ -22,7 +17,6 @@ export default {
color: ['#FB418C', '#DDB112', '#1A99FF', '#A691FF', '#49FBD6'],
tooltip: {
trigger: 'axis',
extraCssText: 'width: 180px !important; ',
axisPointer: {
type: 'cross',
label: {
@ -30,6 +24,9 @@ export default {
}
}
},
// legend: {
// data: ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine']
// },
grid: {
top: '15%',
left: '2%',
@ -76,7 +73,6 @@ export default {
show: false
},
axisLabel: {
formatter: '{value} %',
textStyle: {
color: 'rgba(255,255,255,0.5)' //
}
@ -118,10 +114,7 @@ export default {
emphasis: {
focus: 'series'
},
data: [11, 199, 140, 63, 185, 5, 78].map(_ => {
let v = Math.floor(Math.random() * 100)
return v
})
data: [11, 199, 140, 63, 185, 5, 78]
},
{
name: '磨边机',
@ -152,10 +145,7 @@ export default {
emphasis: {
focus: 'series'
},
data: [151, 57, 31, 7, 77, 88, 119].map(_ => {
let v = Math.floor(Math.random() * 100)
return v
})
data: [151, 57, 31, 7, 77, 88, 119]
},
{
name: '镀膜机',
@ -186,10 +176,7 @@ export default {
emphasis: {
focus: 'series'
},
data: [58, 3, 67, 100, 42, 96, 124].map(_ => {
let v = Math.floor(Math.random() * 100)
return v
})
data: [58, 3, 67, 100, 42, 96, 124]
},
{
name: '包装纸',
@ -220,10 +207,7 @@ export default {
emphasis: {
focus: 'series'
},
data: [92, 88, 122, 169, 108, 130, 147].map(_ => {
let v = Math.floor(Math.random() * 100)
return v
})
data: [92, 88, 122, 169, 108, 130, 147]
},
{
name: '丝印',
@ -258,22 +242,12 @@ export default {
emphasis: {
focus: 'series'
},
data: [44, 40, 118, 197, 123, 95, 96].map(_ => {
let v = Math.floor(Math.random() * 100)
return v
})
data: [44, 40, 118, 197, 123, 95, 96]
}
]
}
}
},
watch: {
dataUpdateToken(val) {
this.refreshData()
}
},
mounted() {
window.addEventListener('resize', function() {
if (this.chart) {
@ -289,17 +263,7 @@ export default {
this.chart.resize()
})
},
methods: {
refreshData() {
this.configs.series.forEach(item => {
item.data = [44, 40, 118, 197, 123, 95, 96].map(_ => {
let v = Math.floor(Math.random() * 100)
return v
})
})
if (this.chart) this.chart.setOption(this.configs)
}
}
methods: {}
}
</script>
@ -307,8 +271,4 @@ export default {
.chartContainer >>> div {
width: 100% !important;
}
.diy-linestack-tooltip {
color: red;
}
</style>

View File

@ -27,18 +27,14 @@
<ul class="report-item__list">
<li v-if="!item.quantity">
<span class="icon icon-no-reports" />
<span style="color: #909090;">暂无报表</span>
<span>暂无报表</span>
</li>
<template v-else>
<li v-for="n in item.reportNames" :key="n">
<span class="icon" />
<span>{{ n }}</span>
</li>
<!-- <li v-for="n in item.quantity" :key="n">
<li v-for="n in item.quantity" :key="n">
<span class="icon" />
<span>报表{{ n }}</span>
</li> -->
</li>
</template>
</ul>
</div>
@ -216,21 +212,7 @@ export default {
init() {
list({}).then(res => {
this.allNum = 0
this.sortList = res.data.map(item => {
if (item.name === '能源') {
return { ...item, reportNames: ['产线电量日能耗统计'] }
} else if (item.name === '订单') {
return { ...item, reportNames: ['订单历史记录', '在线订单进度'] }
} else if (item.name === '设备') {
return { ...item, reportNames: ['设备报警', '设备加工数量统计', '设备OEE'] }
} else if (item.name === '人员') {
return { ...item, reportNames: ['班组加工数量统计'] }
} else if (item.name === '产线') {
return { ...item, reportNames: ['产线日产量统计', '产线历史产量记录'] }
} else {
return item
}
})
this.sortList = res.data
res.data.forEach(item => {
this.allNum += item.quantity
})