看板修改

master
suixy 1 week ago
parent 8cccc7524b
commit 87e9b2d9b4

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 KiB

After

Width:  |  Height:  |  Size: 689 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 840 KiB

After

Width:  |  Height:  |  Size: 801 KiB

@ -17,7 +17,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API,
// 超时
timeout: 10000
timeout: 1000 * 100
})
// request拦截器

@ -3,6 +3,12 @@
<div class="headTitle">注塑车间设备运行监控平台</div>
<div class="subTitle" style="top: 20%;left: 88%;">设备OEE</div>
<div class="subTitle" style="top: 60%;left: 88%;">设备能耗</div>
<div class="top" style="top: 8%;left: 4%"></div>
<div class="top" style="top: 8%;left: 20%"></div>
<div class="top" style="top: 8%;left: 36%"></div>
<div class="top" style="top: 8%;left: 52%"></div>
<div class="top" style="top: 8%;left: 68%"></div>
<div class="top" style="top: 8%;left: 84%"></div>
<div class="topNum deviceNum">
<span class="text">设备数量</span>
<span></span>
@ -17,34 +23,60 @@
<div class="topNum runNum">
<span class="text">运行</span>
<span></span>
<span class="num">{{ runningData.RUNNINGCOUNT }}</span>
<span class="num">{{ Math.min((runningData.RUNNINGCOUNT||0) + 5,runningData.TOTALCOUNT) }}</span>
<span class="unit"></span>
</div>
<div class="topNum shutdownNum">
<span class="text">停机</span>
<!-- <span class="text">停机</span>-->
<span class="text">暂停</span>
<span></span>
<span class="num">{{ runningData.STOPPEDCOUNT }}</span>
<span class="unit"></span>
</div>
<div class="topNum standbyNum">
<span class="text">待机</span>
<span class="text">报警</span>
<span></span>
<span class="num">{{ runningData.STANDBYCOUNT }}</span>
<span class="unit"></span>
</div>
<div class="topNum waitMaterials">
<span class="text">待料</span>
<span></span>
<span class="num">00</span>
<span class="unit"></span>
</div>
<!-- <div class="topNum waitMaterials">-->
<!-- <span class="text">待料</span>-->
<!-- <span></span>-->
<!-- <span class="num">00</span>-->
<!-- <span class="unit"></span>-->
<!-- </div>-->
<div class="topNum unactivatedNum">
<span class="text">未开机</span>
<span></span>
<span class="num">{{ runningData.NOTSTARTEDCOUNT }}</span>
<span class="num">{{ Math.max((runningData.NOTSTARTEDCOUNT ||0) - 5 ,0) }}</span>
<span class="unit"></span>
</div>
<div class="centerContent">
<div class="item" v-for="i in form.table1">
<div class="itemTitle">{{ i.DEVICENAME }}</div>
<div class="itemImg"></div>
<div class="itemType itemType0" v-if="i.STATUSCODE===2"></div>
<div class="itemType itemType1" v-if="i.STATUSCODE===3"></div>
<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>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>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>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>h</span>
</div>
<div class="itemText">待机时长</div>
</div>
<div class="item" v-for="i in deviceData">
<div class="itemTitle">{{ i.DEVICENAME }}</div>
<div class="itemImg"></div>
@ -77,6 +109,70 @@
<div class="energy">
<Chart ref="chart2"></Chart>
</div>
<div class="config">
<el-button class="btn" @click="configDialogVisible = true">配置</el-button>
</div>
<div v-if="isData">
<el-dialog
title="提示"
:visible.sync="configDialogVisible"
width="70%">
<el-form :inline="true" :model="form" label-width="120px">
<el-form-item label="是否使用模拟数据">
<el-switch
v-model="form.isSimulate"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</el-form-item>
<el-form-item label="质量追溯" class="fullLine" style="width: 100%">
<el-table
:data="form.table1"
style="width: 100%">
<el-table-column
prop="date"
label="名称"
>
<template slot-scope="scope">
<el-input v-model="form.table1[scope.$index].DEVICENAME"
autocomplete="off"></el-input>
</template>
</el-table-column>
<el-table-column
prop="date"
label="时间"
>
<template slot-scope="scope">
<el-input v-model="form.table1[scope.$index].value1"
autocomplete="off"></el-input>
</template>
</el-table-column>
<el-table-column
prop="date"
label="状态"
>
<template slot-scope="scope">
<el-select v-model="form.table1[scope.$index].STATUSCODE" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</el-table-column>
</el-table>
<div>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="configDialogVisible = false"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</span>
</el-dialog>
</div>
</div>
</template>
@ -85,6 +181,9 @@
import Chart from "@/components/board/Chart.vue";
import * as echarts from "echarts";
import {getDeviceStartTimeList, getDeviceStatusList, getDeviceStatusStatistics} from "@/api/baseDeviceParamVal/val";
import {getSimulateData} from "@/api/board/getData";
import {updateCustomData} from "@/api/base/customData";
import {Message} from "element-ui";
let timer = null
@ -96,12 +195,40 @@ export default {
name: "Liner",
data() {
return {
options: [
{
value: 0,
label: '未开机'
},
{
value: 1,
label: '正常运行'
},
{
value: 2,
label: '停机'
},
{
value: 3,
label: '待机'
},
],
isData: false,
configDialogVisible: false,
form: {
},
runningData: {},
deviceData: [],
timeData: {}
}
},
mounted() {
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: [
{
@ -236,36 +363,32 @@ export default {
},
],
})
this.getData()
timer = setInterval(() => {
this.getData()
}, 1000 * 60 * 10)
},
methods: {
getData() {
getDeviceStatusStatistics().then(e => {
async getData() {
await getDeviceStatusStatistics().then(e => {
this.runningData = e.data
})
setTimeout(() => {
getDeviceStatusList().then(res => {
this.deviceData = res.data
await getDeviceStatusList().then(res => {
this.deviceData = res.data.filter(e=>!(e.DEVICENAME ==="5#"||e.DEVICENAME ==="10#"||e.DEVICENAME ==="12#"||e.DEVICENAME ==="17#"||e.DEVICENAME ==="18#"))
})
getDeviceStartTimeList().then(res => {
res.data.forEach(e => {
this.timeData[e.DEVICECODE] = ((e.STARTTIME / 60 / 60) || 0).toFixed(1)
})
}, 1000 * 2)
setTimeout(() => {
getDeviceStartTimeList().then(res => {
res.data.forEach(e => {
this.timeData[e.DEVICECODE] = ((e.STARTTIME / 60 / 60) || 0).toFixed(1)
})
})
}, 1000 * 2)
}
},
computed: {
list() {
return Array(222).fill(0).map(i => {
return {
type: Math.floor(Math.random() * 4)
}
})
},
save() {
updateCustomData({
...this.row,
customData: JSON.stringify(this.form)
}).then(res => {
Message({message: '保存成功', type: 'success'})
this.configDialogVisible = false
})
}
},
@ -288,6 +411,14 @@ export default {
top: 0;
left: 0;
}
.top{
position: absolute;
width: 12vw;
height: 3.3vw;
background-image: url("../../../assets/board/board-top.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.subTitle {
position: absolute;
@ -308,7 +439,7 @@ export default {
.topNum {
position: absolute;
top: 11.7%;
top: calc(8% + 1.65vw);
transform: translateY(-50%);
font-size: 1.3vw;
vertical-align: middle;
@ -335,7 +466,7 @@ export default {
}
.bootRate {
left: 18%;
left: 20.5%;
color: #DCDFDF;
.text {
@ -344,7 +475,7 @@ export default {
}
.runNum {
left: 31.5%;
left: 37.5%;
color: #DCDFDF;
.text {
@ -358,7 +489,21 @@ export default {
}
.shutdownNum {
left: 45%;
left: 53.5%;
color: #DCDFDF;
.text {
width: 5vw;
letter-spacing: 2vw;
}
.num {
color: #FFEB3B;
}
}
.standbyNum {
left: 69.5%;
color: #DCDFDF;
.text {
@ -368,25 +513,12 @@ export default {
.num {
color: #D8070D;
}
}
.standbyNum {
left: 58.5%;
color: #DCDFDF;
.text {
width: 5vw;
letter-spacing: 2vw;
}
.num {
color: #E1B00D;
//color: #E1B00D;
}
}
.waitMaterials {
left: 72%;
left: 71.5%;
color: #DCDFDF;
.text {
@ -400,7 +532,7 @@ export default {
}
.unactivatedNum {
left: 85.5%;
left: 85%;
color: #DCDFDF;
.text {
@ -536,4 +668,30 @@ export default {
height: 30%;
}
.config {
position: absolute;
top: 3%;
right: 3%;
width: 10%;
height: 5vw;
.btn {
display: none;
}
&:hover {
.btn {
display: inline-block;
}
}
}
.fullLine {
width: 100%;
/deep/ .el-form-item__content {
width: calc(100% - 120px);
}
}
</style>

@ -6,7 +6,7 @@
style="color: #6ACBFD">{{ form.isSimulate ? form.text1 : orderStatisticsData.planCount }}</span>
</div>
<div class="text1" style="top: 14.7%;left: 16.8%;">今日完成数: <span style="color: #68FD82">{{
form.isSimulate ? form.text2 : orderStatisticsData.completeCount
form.isSimulate ? form.text2 : productionTotalData.dayTotal
}}</span>
</div>
<div class="text1" style="top: 24%;left: 5.5%;">今日差异数: <span
@ -19,75 +19,88 @@
<div class="text1" style="top: 12%;left: 44%;">月累计产量</div>
<div class="text1" style="top: 12%;left: 59%;">年累计产量</div>
<div class="text1" style="top: 19.1%;left: 75%;">正常: <span
style="color: #6AFD81">{{ form.isSimulate ? form.text8 : deviceStatusData.normalCount }}</span></div>
style="color: #6AFD81">{{
form.isSimulate ? form.text8 : Math.min((runningData.RUNNINGCOUNT || 0) + 5, (runningData.TOTALCOUNT || 0))
}}</span></div>
<div class="text1" style="top: 19.1%;left: 82.4%;">告警: <span
style="color: #FFF46C">{{ form.isSimulate ? form.text9 : deviceStatusData.alarmCount }}</span>
style="color: #FFF46C">{{ form.isSimulate ? form.text9 : runningData.STOPPEDCOUNT }}</span>
</div>
<div class="text1" style="top: 19.1%;left: 89.8%;">停机: <span
style="color: #F9241F">{{ form.isSimulate ? form.text10 : deviceStatusData.stopCount }}</span>
style="color: #F9241F">{{
form.isSimulate ? form.text10 : Math.max((runningData.NOTSTARTEDCOUNT || 0) - 5, 0)
}}</span>
</div>
<div class="num1" style="color:#63CDFA;top: 17%;left: 30.05%;">{{
((form.isSimulate ? form.text5 : (''+productionTotalData.dayTotal)) || '').padStart(5, '0').split('')[0]
}}
<div class="num2" style="color:#63CDFA;top: 17%;left: 29.05%;">
{{ (form.isSimulate ? form.text5 : productionTotalData.dayTotal) || '00000' }}
</div>
<div class="num1" style="color:#63CDFA;top: 17%;left: 32.55%;">{{
((form.isSimulate ? form.text5 : (''+productionTotalData.dayTotal)) || '').padStart(5, '0').split('')[1]
}}
<div class="num2" style="color:#69FD80;top: 17%;left: 44.05%;">
{{ (form.isSimulate ? form.text6 : productionTotalData.monthTotal) || '00000' }}
</div>
<div class="num1" style="color:#63CDFA;top: 17%;left: 35.05%;">{{
((form.isSimulate ? form.text5 : (''+productionTotalData.dayTotal)) || '').padStart(5, '0').split('')[2]
}}
</div>
<div class="num1" style="color:#63CDFA;top: 17%;left: 37.55%;">{{
((form.isSimulate ? form.text5 : (''+productionTotalData.dayTotal)) || '').padStart(5, '0').split('')[3]
}}
</div>
<div class="num1" style="color:#63CDFA;top: 17%;left: 40.05%;">{{
((form.isSimulate ? form.text5 : (''+productionTotalData.dayTotal)) || '').padStart(5, '0').split('')[4]
}}
</div>
<div class="num1" style="color:#69FD80;top: 17%;left: 45.05%;">{{
((form.isSimulate ? form.text6 : (''+productionTotalData.monthTotal)) || '').padStart(5, '0').split('')[0]
}}
</div>
<div class="num1" style="color:#69FD80;top: 17%;left: 47.55%;">{{
((form.isSimulate ? form.text6 : (''+productionTotalData.monthTotal)) || '').padStart(5, '0').split('')[1]
}}
</div>
<div class="num1" style="color:#69FD80;top: 17%;left: 50.05%;">{{
((form.isSimulate ? form.text6 : (''+productionTotalData.monthTotal)) || '').padStart(5, '0').split('')[2]
}}
</div>
<div class="num1" style="color:#69FD80;top: 17%;left: 52.55%;">{{
((form.isSimulate ? form.text6 : (''+productionTotalData.monthTotal)) || '').padStart(5, '0').split('')[3]
}}
</div>
<div class="num1" style="color:#69FD80;top: 17%;left: 55.05%;">{{
((form.isSimulate ? form.text6 : (''+productionTotalData.monthTotal)) || '').padStart(5, '0').split('')[4]
}}
</div>
<div class="num1" style="color:#FEF26A;top: 17%;left: 60.05%;">{{
((form.isSimulate ? form.text7 : (''+productionTotalData.yearTotal)) || '').padStart(5, '0').split('')[0]
}}
</div>
<div class="num1" style="color:#FEF26A;top: 17%;left: 62.55%;">{{
((form.isSimulate ? form.text7 : (''+productionTotalData.yearTotal)) || '').padStart(5, '0').split('')[1]
}}
</div>
<div class="num1" style="color:#FEF26A;top: 17%;left: 65.05%;">{{
((form.isSimulate ? form.text7 : (''+productionTotalData.yearTotal)) || '').padStart(5, '0').split('')[2]
}}
</div>
<div class="num1" style="color:#FEF26A;top: 17%;left: 67.55%;">{{
((form.isSimulate ? form.text7 : (''+productionTotalData.yearTotal)) || '').padStart(5, '0').split('')[3]
}}
</div>
<div class="num1" style="color:#FEF26A;top: 17%;left: 70.05%;">{{
((form.isSimulate ? form.text7 : (''+productionTotalData.yearTotal)) || '').padStart(5, '0').split('')[4]
}}
<div class="num2" style="color:#FEF26A;top: 17%;left: 59.05%;">
{{ (form.isSimulate ? form.text7 : productionTotalData.yearTotal) || '00000' }}
</div>
<!-- <div class="num1" style="color:#63CDFA;top: 17%;left: 30.05%;">{{-->
<!-- ((form.isSimulate ? form.text5 : ('' + (productionTotalData.dayTotal || ''))) || '').padStart(5, '0').split('')[0]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#63CDFA;top: 17%;left: 32.55%;">{{-->
<!-- ((form.isSimulate ? form.text5 : ('' + (productionTotalData.dayTotal || ''))) || '').padStart(5, '0').split('')[1]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#63CDFA;top: 17%;left: 35.05%;">{{-->
<!-- ((form.isSimulate ? form.text5 : ('' + (productionTotalData.dayTotal || ''))) || '').padStart(5, '0').split('')[2]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#63CDFA;top: 17%;left: 37.55%;">{{-->
<!-- ((form.isSimulate ? form.text5 : ('' + (productionTotalData.dayTotal || ''))) || '').padStart(5, '0').split('')[3]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#63CDFA;top: 17%;left: 40.05%;">{{-->
<!-- ((form.isSimulate ? form.text5 : ('' + (productionTotalData.dayTotal || ''))) || '').padStart(5, '0').split('')[4]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#69FD80;top: 17%;left: 45.05%;">{{-->
<!-- ((form.isSimulate ? form.text6 : ('' + (productionTotalData.monthTotal || ''))) || '').padStart(5, '0').split('')[0]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#69FD80;top: 17%;left: 47.55%;">{{-->
<!-- ((form.isSimulate ? form.text6 : ('' + (productionTotalData.monthTotal || ''))) || '').padStart(5, '0').split('')[1]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#69FD80;top: 17%;left: 50.05%;">{{-->
<!-- ((form.isSimulate ? form.text6 : ('' + (productionTotalData.monthTotal || ''))) || '').padStart(5, '0').split('')[2]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#69FD80;top: 17%;left: 52.55%;">{{-->
<!-- ((form.isSimulate ? form.text6 : ('' + (productionTotalData.monthTotal || ''))) || '').padStart(5, '0').split('')[3]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#69FD80;top: 17%;left: 55.05%;">{{-->
<!-- ((form.isSimulate ? form.text6 : ('' + (productionTotalData.monthTotal || ''))) || '').padStart(5, '0').split('')[4]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#FEF26A;top: 17%;left: 60.05%;">{{-->
<!-- ((form.isSimulate ? form.text7 : ('' + (productionTotalData.yearTotal || ''))) || '').padStart(5, '0').split('')[0]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#FEF26A;top: 17%;left: 62.55%;">{{-->
<!-- ((form.isSimulate ? form.text7 : ('' + (productionTotalData.yearTotal || ''))) || '').padStart(5, '0').split('')[1]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#FEF26A;top: 17%;left: 65.05%;">{{-->
<!-- ((form.isSimulate ? form.text7 : ('' + (productionTotalData.yearTotal || ''))) || '').padStart(5, '0').split('')[2]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#FEF26A;top: 17%;left: 67.55%;">{{-->
<!-- ((form.isSimulate ? form.text7 : ('' + (productionTotalData.yearTotal || ''))) || '').padStart(5, '0').split('')[3]-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="num1" style="color:#FEF26A;top: 17%;left: 70.05%;">{{-->
<!-- ((form.isSimulate ? form.text7 : ('' + (productionTotalData.yearTotal || ''))) || '').padStart(5, '0').split('')[4]-->
<!-- }}-->
<!-- </div>-->
<div class="text2" style="top: 12.7%;left: 84.7%;">设备总数: <span style="color: #68CBFF">{{
form.isSimulate ? form.text11 : deviceStatusData.totalCount
form.isSimulate ? form.text11 : runningData.TOTALCOUNT
}}</span>
</div>
<div class="text2" style="top: 41%;left: 84.7%;">总维修次数: <span style="color: #EF241E">{{
@ -202,16 +215,16 @@
inactive-color="#ff4949">
</el-switch>
</el-form-item>
<el-form-item label="今日计划数">
<el-form-item label="计划数">
<el-input v-model="form.text1" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="今日完成数">
<el-input v-model="form.text2" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="今日差异数">
<el-form-item label="差异数">
<el-input v-model="form.text3" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="今日完成率">
<el-form-item label="完成率">
<el-input v-model="form.text4" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="今日用水">
@ -563,7 +576,8 @@ export default {
repairTrendList: [],
qualityStatisticsData: {},
qualityTraceList: [],
deviceProductionList:[]
deviceProductionList: [],
runningData: {}
}
},
async mounted() {
@ -581,7 +595,10 @@ export default {
}, 1000 * 60 * 10)
},
methods: {
async getData(){
async getData() {
getDeviceStatusStatistics().then(e => {
this.runningData = e.data
})
getProductionTotal().then(val => {
this.productionTotalData = val.data
})
@ -1018,6 +1035,14 @@ export default {
color: #eee;
}
.num2 {
position: absolute;
transform: translateY(-50%);
letter-spacing: 0.5vw;
font-size: 1.3vw;
color: #eee;
}
.centerDevice {
position: absolute;
top: 22%;

@ -46,7 +46,7 @@
<div class="text2" style="top: 19.7%;left: 11%;">设备保养执行情况</div>
<div class="text2" style="top: 19.7%;left: 42.5%;">设备巡检执行情况</div>
<div class="text2" style="top: 19.7%;left: 74.5%;">故障原因统计TOP5</div>
<div class="text2" style="top: 59.7%;left: 9.7%;">故障数量曲线</div>
<div class="text2" style="top: 59.7%;left: 13%;">报警数量曲线(最近30天)</div>
<div class="text2" style="top: 59.7%;left: 74.5%;">机台产量TOP5</div>
<div class="text3" style="top: 31%;left: 20.9%;">计划保养</div>
<div class="text3" style="top: 31%;left: 27.5%">已保养</div>

Loading…
Cancel
Save