diff --git a/src/assets/board/board-top.png b/src/assets/board/board-top.png new file mode 100644 index 0000000..bde7d88 Binary files /dev/null and b/src/assets/board/board-top.png differ diff --git a/src/assets/board/boardBg1-1.jpg b/src/assets/board/boardBg1-1.jpg new file mode 100644 index 0000000..f1136fd Binary files /dev/null and b/src/assets/board/boardBg1-1.jpg differ diff --git a/src/assets/board/boardBg1.jpg b/src/assets/board/boardBg1.jpg index f1136fd..ea54c19 100644 Binary files a/src/assets/board/boardBg1.jpg and b/src/assets/board/boardBg1.jpg differ diff --git a/src/assets/board/boardBg3-1.jpg b/src/assets/board/boardBg3-1.jpg new file mode 100644 index 0000000..ec44709 Binary files /dev/null and b/src/assets/board/boardBg3-1.jpg differ diff --git a/src/assets/board/boardBg3.jpg b/src/assets/board/boardBg3.jpg index ec44709..deed465 100644 Binary files a/src/assets/board/boardBg3.jpg and b/src/assets/board/boardBg3.jpg differ diff --git a/src/utils/request.js b/src/utils/request.js index dbbd3fc..bb2b7fe 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -17,7 +17,7 @@ const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 baseURL: process.env.VUE_APP_BASE_API, // 超时 - timeout: 10000 + timeout: 1000 * 100 }) // request拦截器 diff --git a/src/views/board/board1/index.vue b/src/views/board/board1/index.vue index db3fbdd..5d06ab2 100644 --- a/src/views/board/board1/index.vue +++ b/src/views/board/board1/index.vue @@ -3,6 +3,12 @@
注塑车间设备运行监控平台
设备OEE
设备能耗
+
+
+
+
+
+
设备数量 @@ -17,34 +23,60 @@
运行 - {{ runningData.RUNNINGCOUNT }} + {{ Math.min((runningData.RUNNINGCOUNT||0) + 5,runningData.TOTALCOUNT) }}
- 停机 + + 暂停 {{ runningData.STOPPEDCOUNT }}
- 待机 + 报警 {{ runningData.STANDBYCOUNT }}
-
- 待料 - - 00 - -
+ + + + + +
未开机 - {{ runningData.NOTSTARTEDCOUNT }} + {{ Math.max((runningData.NOTSTARTEDCOUNT ||0) - 5 ,0) }}
+
+
{{ i.DEVICENAME }}
+
+
停机
+
待机
+
正常运行
+
未开机
+
+ {{ parseFloat(i.value1||'0').toFixed(1) }} + h +
+
+ {{ parseFloat(i.value1||'0').toFixed(1) }} + h +
+
+ {{ parseFloat(i.value1||'0').toFixed(1) }} + h +
+
+ {{ parseFloat(i.value1||'0').toFixed(1) }} + h +
+
待机时长
+
{{ i.DEVICENAME }}
@@ -77,6 +109,70 @@
+
+ 配置 +
+
+ + + + + + + + + + + + + + + + + + +
+
+
+
+ + 预 览 + 保 存 + +
+
@@ -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); + } +} diff --git a/src/views/board/board4/index.vue b/src/views/board/board4/index.vue index 8594738..6d503a9 100644 --- a/src/views/board/board4/index.vue +++ b/src/views/board/board4/index.vue @@ -6,7 +6,7 @@ style="color: #6ACBFD">{{ form.isSimulate ? form.text1 : orderStatisticsData.planCount }}
今日完成数: {{ - form.isSimulate ? form.text2 : orderStatisticsData.completeCount + form.isSimulate ? form.text2 : productionTotalData.dayTotal }}
今日差异数: 月累计产量
年累计产量
正常: {{ form.isSimulate ? form.text8 : deviceStatusData.normalCount }}
+ style="color: #6AFD81">{{ + form.isSimulate ? form.text8 : Math.min((runningData.RUNNINGCOUNT || 0) + 5, (runningData.TOTALCOUNT || 0)) + }}
告警: {{ form.isSimulate ? form.text9 : deviceStatusData.alarmCount }} + style="color: #FFF46C">{{ form.isSimulate ? form.text9 : runningData.STOPPEDCOUNT }}
停机: {{ form.isSimulate ? form.text10 : deviceStatusData.stopCount }} + style="color: #F9241F">{{ + form.isSimulate ? form.text10 : Math.max((runningData.NOTSTARTEDCOUNT || 0) - 5, 0) + }}
-
{{ - ((form.isSimulate ? form.text5 : (''+productionTotalData.dayTotal)) || '').padStart(5, '0').split('')[0] - }} +
+ {{ (form.isSimulate ? form.text5 : productionTotalData.dayTotal) || '00000' }}
-
{{ - ((form.isSimulate ? form.text5 : (''+productionTotalData.dayTotal)) || '').padStart(5, '0').split('')[1] - }} +
+ {{ (form.isSimulate ? form.text6 : productionTotalData.monthTotal) || '00000' }}
-
{{ - ((form.isSimulate ? form.text5 : (''+productionTotalData.dayTotal)) || '').padStart(5, '0').split('')[2] - }} -
-
{{ - ((form.isSimulate ? form.text5 : (''+productionTotalData.dayTotal)) || '').padStart(5, '0').split('')[3] - }} -
-
{{ - ((form.isSimulate ? form.text5 : (''+productionTotalData.dayTotal)) || '').padStart(5, '0').split('')[4] - }} -
-
{{ - ((form.isSimulate ? form.text6 : (''+productionTotalData.monthTotal)) || '').padStart(5, '0').split('')[0] - }} -
-
{{ - ((form.isSimulate ? form.text6 : (''+productionTotalData.monthTotal)) || '').padStart(5, '0').split('')[1] - }} -
-
{{ - ((form.isSimulate ? form.text6 : (''+productionTotalData.monthTotal)) || '').padStart(5, '0').split('')[2] - }} -
-
{{ - ((form.isSimulate ? form.text6 : (''+productionTotalData.monthTotal)) || '').padStart(5, '0').split('')[3] - }} -
-
{{ - ((form.isSimulate ? form.text6 : (''+productionTotalData.monthTotal)) || '').padStart(5, '0').split('')[4] - }} -
-
{{ - ((form.isSimulate ? form.text7 : (''+productionTotalData.yearTotal)) || '').padStart(5, '0').split('')[0] - }} -
-
{{ - ((form.isSimulate ? form.text7 : (''+productionTotalData.yearTotal)) || '').padStart(5, '0').split('')[1] - }} -
-
{{ - ((form.isSimulate ? form.text7 : (''+productionTotalData.yearTotal)) || '').padStart(5, '0').split('')[2] - }} -
-
{{ - ((form.isSimulate ? form.text7 : (''+productionTotalData.yearTotal)) || '').padStart(5, '0').split('')[3] - }} -
-
{{ - ((form.isSimulate ? form.text7 : (''+productionTotalData.yearTotal)) || '').padStart(5, '0').split('')[4] - }} +
+ {{ (form.isSimulate ? form.text7 : productionTotalData.yearTotal) || '00000' }}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
设备总数: {{ - form.isSimulate ? form.text11 : deviceStatusData.totalCount + form.isSimulate ? form.text11 : runningData.TOTALCOUNT }}
总维修次数: {{ @@ -202,16 +215,16 @@ inactive-color="#ff4949"> - + - + - + @@ -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%; diff --git a/src/views/board/board5/index.vue b/src/views/board/board5/index.vue index b3987a8..39322fd 100644 --- a/src/views/board/board5/index.vue +++ b/src/views/board/board5/index.vue @@ -46,7 +46,7 @@
设备保养执行情况
设备巡检执行情况
故障原因统计TOP5
-
故障数量曲线
+
报警数量曲线(最近30天)
机台产量TOP5
计划保养
已保养