From 5b9a1d6cb3a7d59c8f2de83c495bba1a069b2723 Mon Sep 17 00:00:00 2001 From: gaosp <gaosp> Date: 星期五, 19 一月 2024 00:23:15 +0800 Subject: [PATCH] update --- src/mixins/index.js | 29 ++++++++++++++++++++++++++--- 1 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/mixins/index.js b/src/mixins/index.js index 0ce398e..3e07f21 100644 --- a/src/mixins/index.js +++ b/src/mixins/index.js @@ -1,7 +1,7 @@ /* * @Date: 2024-01-07 22:18:41 * @LastEditors: Sneed - * @LastEditTime: 2024-01-16 01:02:46 + * @LastEditTime: 2024-01-17 23:06:26 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/mixins/index.js */ import { getUseDpts, getRequest } from '@/api/Api' @@ -11,13 +11,24 @@ deviceList: [], //寰呴�夎澶� deviceId: [], plantDeviceList: [], + info: { + runRate: '', + cutRate: '', + alarmRate: '', + threeShiftRate: '', + twoShiftRate: '', + run: '', + alarm: '', + stop: '', + idle: '', + }, + } }, watch: { id: { handler (val) { if(val) { - debugger getRequest('machineList',{plantId: val}).then(res => { this.plantDeviceList = res.data.list.map(item => { return { @@ -25,9 +36,21 @@ machineName: item.machineName } }) || [] + this.info = { + runRate: res.data.runRate, + cutRate: res.data.cutRate, + alarmRate: res.data.alarmRate, + threeShiftRate: res.data.threeShiftRate, + twoShiftRate: res.data.twoShiftRate, + run: res.data.run, + alarm: res.data.alarm, + stop: res.data.stop, + idle: res.data.idle + } }) } - } + }, + immediate:true } }, mounted () { -- Gitblit v1.9.3