看板修改

master
suixy 2 months ago
parent 34247b566a
commit 1336ef3554

@ -18,12 +18,15 @@
<div class="topNum bootRate">
<span class="text" style="width: 5vw;letter-spacing: 0.4vw">开机率</span>
<span></span>
<span class="num">{{ runningData.runningRate }}</span>
<!-- <span class="num">{{ runningData.runningRate }}</span>-->
<span class="num">{{
((((Math.min((runningData.RUNNINGCOUNT || 0) + runNum, runningData.TOTALCOUNT) || 0) / runningData.TOTALCOUNT) || 0) * 100) < 100 ? (((((Math.min((runningData.RUNNINGCOUNT || 0) + runNum, runningData.TOTALCOUNT) || 0) / runningData.TOTALCOUNT) || 0) * 100).toFixed(2)) : '100'
}}%</span>
</div>
<div class="topNum runNum">
<span class="text">运行</span>
<span></span>
<span class="num">{{ Math.min((runningData.RUNNINGCOUNT||0) + 5,runningData.TOTALCOUNT) }}</span>
<span class="num">{{ Math.min((runningData.RUNNINGCOUNT || 0) + runNum, runningData.TOTALCOUNT) || 0 }}</span>
<span class="unit"></span>
</div>
<div class="topNum shutdownNum">
@ -48,7 +51,7 @@
<div class="topNum unactivatedNum">
<span class="text">未开机</span>
<span></span>
<span class="num">{{ Math.max((runningData.NOTSTARTEDCOUNT ||0) - 5 ,0) }}</span>
<span class="num">{{ Math.max((runningData.NOTSTARTEDCOUNT || 0) - runNum, 0) }}</span>
<span class="unit"></span>
</div>
<div class="centerContent">
@ -60,19 +63,27 @@
<div class="itemType itemType2" v-if="i.STATUSCODE===1"></div>
<div class="itemType itemType3" v-if="i.STATUSCODE===0"></div>
<div class="itemTime itemTime0" v-if="i.STATUSCODE===2">
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{ parseFloat(i.value1||'0').toFixed(1) }}</span>
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{
parseFloat(i.value1 || '0').toFixed(1)
}}</span>
<span>h</span>
</div>
<div class="itemTime itemTime1" v-if="i.STATUSCODE===3">
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{ parseFloat(i.value1||'0').toFixed(1) }}</span>
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{
parseFloat(i.value1 || '0').toFixed(1)
}}</span>
<span>h</span>
</div>
<div class="itemTime itemTime2" v-if="i.STATUSCODE===1">
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{ parseFloat(i.value1||'0').toFixed(1) }}</span>
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{
parseFloat(i.value1 || '0').toFixed(1)
}}</span>
<span>h</span>
</div>
<div class="itemTime itemTime3" v-if="i.STATUSCODE===0">
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{ parseFloat(i.value1||'0').toFixed(1) }}</span>
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{
parseFloat(i.value1 || '0').toFixed(1)
}}</span>
<span>h</span>
</div>
<div class="itemText">待机时长</div>
@ -85,19 +96,27 @@
<div class="itemType itemType2" v-if="i.STATUSCODE===1"></div>
<div class="itemType itemType3" v-if="i.STATUSCODE===0"></div>
<div class="itemTime itemTime0" v-if="i.STATUSCODE===2">
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{ timeData[i.DEVICECODE] || '0' }}</span>
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{
timeData[i.DEVICECODE] || '0'
}}</span>
<span>h</span>
</div>
<div class="itemTime itemTime1" v-if="i.STATUSCODE===3">
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{ timeData[i.DEVICECODE] || '0' }}</span>
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{
timeData[i.DEVICECODE] || '0'
}}</span>
<span>h</span>
</div>
<div class="itemTime itemTime2" v-if="i.STATUSCODE===1">
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{ timeData[i.DEVICECODE] || '0' }}</span>
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{
timeData[i.DEVICECODE] || '0'
}}</span>
<span>h</span>
</div>
<div class="itemTime itemTime3" v-if="i.STATUSCODE===0">
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{ timeData[i.DEVICECODE] || '0' }}</span>
<span style="font-size: 1.5vw;margin-right: 0.2vw;;font-weight: 700">{{
timeData[i.DEVICECODE] || '0'
}}</span>
<span>h</span>
</div>
<div class="itemText">待机时长</div>
@ -215,20 +234,15 @@ export default {
],
isData: false,
configDialogVisible: false,
form: {
},
form: {},
runningData: {},
deviceData: [],
timeData: {}
timeData: {},
runNum: 0,
}
},
async mounted() {
await this.getData()
getSimulateData({customCode: 'board-3' || '', customType: 1}).then(val => {
this.row = val.rows[0]
this.form = JSON.parse(val.rows[0].customData);
this.isData = true
})
this.$refs.chart1.setData({
title: [
{
@ -380,6 +394,12 @@ export default {
this.timeData[e.DEVICECODE] = ((e.STARTTIME / 60 / 60) || 0).toFixed(1)
})
})
getSimulateData({customCode: 'board-3' || '', customType: 1}).then(val => {
this.row = val.rows[0]
this.form = JSON.parse(val.rows[0].customData);
this.isData = true
this.runNum = this.form.table1.filter(v => v.STATUSCODE == 1).length
})
},
save() {
@ -389,6 +409,7 @@ export default {
}).then(res => {
Message({message: '保存成功', type: 'success'})
this.configDialogVisible = false
this.runNum = this.form.table1.filter(v => v.STATUSCODE == 1).length
})
}
},
@ -411,6 +432,7 @@ export default {
top: 0;
left: 0;
}
.top {
position: absolute;
width: 12vw;
@ -427,6 +449,7 @@ export default {
color: #d6eaed;
letter-spacing: 0.1vw;
}
.headTitle {
position: absolute;
top: 5%;

@ -107,10 +107,10 @@
form.isSimulate ? form.text12 : deviceStatusData.repairCount
}}</span>
</div>
<div class="text3" style="top: 35.15%;left: 5.5%;">工单进度</div>
<div class="text3" style="top: 35.15%;left: 5.5%;">生产进度</div>
<div class="text3" style="top: 35.15%;left: 75%;">累计维修分析</div>
<div class="text3" style="top: 63.05%;left: 5.5%;">质量追溯</div>
<div class="text3" style="top: 63.05%;left: 30.2%;">设备分析</div>
<div class="text3" style="top: 63.05%;left: 30.2%;">设备总产量</div>
<div class="text3" style="top: 63.05%;left: 75%;">当日维修趋势</div>
<div class="deviceError" v-if="form.isSimulate ? form.view1 : alarmInfoData.hasAlarm ">
<div class="icon"></div>
@ -175,6 +175,46 @@
</div>
</vue-seamless-scroll>
</div>
<div class="scrollTable1">
<div style="background-color: #05346044">
<div class="scrollTableItem" style="font-weight: bold;width: 33.33%">
物料名称
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 33.33%">
质量缺陷名称
</div>
<div class="scrollTableItem" style="font-weight: bold;width: 33.33%">
检测时间
</div>
</div>
<vue-seamless-scroll
:class-option="scrollTableOption"
:data="form.isSimulate ? form.table1 : qualityInspectionList"
class="case-item"
:key="key"
style="height: calc(100% - 20px - 1vw - 0.4vw);overflow: hidden;"
>
<div
v-for="(item, index) in form.isSimulate ? form.table1 : qualityInspectionList"
:key="index"
>
<div :style='"background-color:" + ((index % 2 === 0)? "#05346022":"#05346044") '>
<div
class="scrollTableItem" style="width: 33.33%;font-size: 0.8vw">
{{ form.isSimulate ? item.text1 : item.materialName }}
</div>
<div
class="scrollTableItem" style="width: 33.33%;font-size: 0.8vw">
{{ form.isSimulate ? item.text2 : item.qualityDefectName }}
</div>
<div
class="scrollTableItem" style="width: 33.33%;font-size: 0.8vw">
{{ form.isSimulate ? item.text3 : item.inspectorTime }}
</div>
</div>
</div>
</vue-seamless-scroll>
</div>
<div class="repairTimes">
<div class="item" v-for="(i,k) in form.isSimulate ? form.table2 : repairAnalysisList ">
<div class="num">{{ k + 1 }}</div>
@ -185,12 +225,12 @@
<div class="times">{{ form.isSimulate ? i.text3 : i.repairCount }}</div>
</div>
</div>
<div class="chart1">
<Chart ref="chart1"></Chart>
</div>
<div class="chart4">
<Chart ref="chart4"></Chart>
</div>
<!-- <div class="chart1">-->
<!-- <Chart ref="chart1"></Chart>-->
<!-- </div>-->
<!-- <div class="chart4">-->
<!-- <Chart ref="chart4"></Chart>-->
<!-- </div>-->
<div class="chart2">
<Chart ref="chart2"></Chart>
</div>
@ -484,6 +524,7 @@ import {
getOrderStatistics,
getProductionTotal, getQualityStatistics, getQualityTraceList, getRepairAnalysisList, getRepairTrendList
} from "@/api/board/board4";
import {listQualityInspection} from "@/api/report/qualityInspection";
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
export default {
@ -577,6 +618,7 @@ export default {
qualityStatisticsData: {},
qualityTraceList: [],
deviceProductionList: [],
qualityInspectionList:[],
runningData: {}
}
},
@ -597,6 +639,9 @@ export default {
},
methods: {
async getData() {
listQualityInspection({pageSize:99999999}).then(res => {
this.qualityInspectionList = res.rows
})
getDeviceStatusStatistics().then(e => {
this.runningData = e.data
})
@ -633,82 +678,82 @@ export default {
this.chartInit()
},
chartInit() {
this.$refs.chart1.setData({
title: {
y: 'center',
left: '60%',
text: `{dot1|●} {name|合格数} {value|${this.form.isSimulate ? this.form.chart1.value1 : this.qualityStatisticsData.qualifiedCount}}\n\n\n{dot2|●} {name|不合格数} {value|${this.form.isSimulate ? this.form.chart1.value2 : this.qualityStatisticsData.unqualifiedCount}}`,
textStyle: {
color: '#ffffff',
rich: {
dot1: {
fontSize: 0.9 * vw,
color: '#ffffff',
},
dot2: {
fontSize: 0.9 * vw,
color: '#4E97FF',
},
name: {
color: '#fff',
fontSize: 1 * vw,
},
value: {
color: '#fff',
fontSize: 1.1 * vw,
fontWeight: '800',
}
}
}
},
series: [
{
type: "pie",
center: ["30%", "50%"],
radius: ['57%', '63%'],
itemStyle: {
color: '#fff4'
},
labelLine: {
show: false
},
data: [1]
},
{
type: "pie",
label: {
show: false,
},
center: ["30%", "50%"],
radius: ['54%', '66%'],
clockwise: false,
labelLine: {
show: false
},
itemStyle: {
color: '#4E97FF'
},
data: [
{
value: this.form.isSimulate ? this.form.chart1.value2 : this.qualityStatisticsData.unqualifiedCount,
name: '不合格数',
itemStyle: {
color: '#4E97FF',
borderColor: '#000',
borderWidth: 2
},
},
{
value: this.form.isSimulate ? this.form.chart1.value1 : this.qualityStatisticsData.qualifiedCount,
name: '合格数',
itemStyle: {
color: '#0000',
},
},
]
},
]
})
// this.$refs.chart1.setData({
// title: {
// y: 'center',
// left: '60%',
// text: `{dot1|} {name|} {value|${this.form.isSimulate ? this.form.chart1.value1 : this.qualityStatisticsData.qualifiedCount}}\n\n\n{dot2|} {name|} {value|${this.form.isSimulate ? this.form.chart1.value2 : this.qualityStatisticsData.unqualifiedCount}}`,
// textStyle: {
// color: '#ffffff',
// rich: {
// dot1: {
// fontSize: 0.9 * vw,
// color: '#ffffff',
// },
// dot2: {
// fontSize: 0.9 * vw,
// color: '#4E97FF',
// },
// name: {
// color: '#fff',
// fontSize: 1 * vw,
// },
// value: {
// color: '#fff',
// fontSize: 1.1 * vw,
// fontWeight: '800',
// }
// }
// }
// },
// series: [
// {
// type: "pie",
// center: ["30%", "50%"],
// radius: ['57%', '63%'],
// itemStyle: {
// color: '#fff4'
// },
// labelLine: {
// show: false
// },
// data: [1]
// },
// {
// type: "pie",
// label: {
// show: false,
// },
// center: ["30%", "50%"],
// radius: ['54%', '66%'],
// clockwise: false,
// labelLine: {
// show: false
// },
// itemStyle: {
// color: '#4E97FF'
// },
// data: [
// {
// value: this.form.isSimulate ? this.form.chart1.value2 : this.qualityStatisticsData.unqualifiedCount,
// name: '',
// itemStyle: {
// color: '#4E97FF',
// borderColor: '#000',
// borderWidth: 2
// },
// },
// {
// value: this.form.isSimulate ? this.form.chart1.value1 : this.qualityStatisticsData.qualifiedCount,
// name: '',
// itemStyle: {
// color: '#0000',
// },
// },
// ]
// },
// ]
// })
this.$refs.chart2.setData({
xAxis: {
data: this.form.isSimulate ? this.form.chart2.map(e => e.value1) : this.deviceProductionList.map(e => e.deviceName),
@ -921,75 +966,75 @@ export default {
},
],
})
this.$refs.chart4.setData({
radar: {
center: ["30%", "50%"],
radius: '40%',
shape: 'circle',
splitNumber: 1,
splitLine: {
lineStyle: {
color: '#fff4',
width: 1
}
},
splitArea: {
show: false
},
axisLine: {
show: false
},
axisNameGap: 3,
axisName: {
rotation: 90,
rotate: 90,
fontSize: 8,
color: '#ddd',
},
indicator: this.form.isSimulate ? this.form.chart4.map(e => {
return {name: e.value1, max: e.value3}
}) : this.qualityTraceList.map(e => {
return {name: e.materialName, max: e.passLimit}
}),
},
series: [
{
name: ' ',
type: 'radar',
symbolSize: 3,
itemStyle: {
color: '#FBFCFC'
},
lineStyle: {
color: '#478EEE',
width: 1,
},
data: [
{
value: this.form.isSimulate ? this.form.chart4.map(e => {
return e.value2
}) : this.qualityTraceList.map(e => {
return e.passRate
}),
name: 'Allocated Budget',
areaStyle: {
color: {
type: 'radial',
x: 0.5,
y: 0.5,
r: 0.5,
colorStops: [
{offset: 0, color: '#fff0'},
{offset: 1, color: '#4C92F266'}
]
},
}
}
]
}
]
})
// this.$refs.chart4.setData({
// radar: {
// center: ["30%", "50%"],
// radius: '40%',
// shape: 'circle',
// splitNumber: 1,
// splitLine: {
// lineStyle: {
// color: '#fff4',
// width: 1
// }
// },
// splitArea: {
// show: false
// },
// axisLine: {
// show: false
// },
// axisNameGap: 3,
// axisName: {
// rotation: 90,
// rotate: 90,
// fontSize: 8,
// color: '#ddd',
// },
// indicator: this.form.isSimulate ? this.form.chart4.map(e => {
// return {name: e.value1, max: e.value3}
// }) : this.qualityTraceList.map(e => {
// return {name: e.materialName, max: e.passLimit}
// }),
//
// },
// series: [
// {
// name: ' ',
// type: 'radar',
// symbolSize: 3,
// itemStyle: {
// color: '#FBFCFC'
// },
// lineStyle: {
// color: '#478EEE',
// width: 1,
// },
// data: [
// {
// value: this.form.isSimulate ? this.form.chart4.map(e => {
// return e.value2
// }) : this.qualityTraceList.map(e => {
// return e.passRate
// }),
// name: 'Allocated Budget',
// areaStyle: {
// color: {
// type: 'radial',
// x: 0.5,
// y: 0.5,
// r: 0.5,
// colorStops: [
// {offset: 0, color: '#fff0'},
// {offset: 1, color: '#4C92F266'}
// ]
// },
// }
// }
// ]
// }
// ]
// })
},
save() {
updateCustomData({
@ -1117,6 +1162,14 @@ export default {
height: 20%;
}
.scrollTable1 {
position: absolute;
top: 66%;
left: 3.3%;
width: 23.8%;
height: 29%;
}
.scrollTableItem {
color: #65CDF9;
margin: auto 0px;

Loading…
Cancel
Save