| | |
| | | /* |
| | | * @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' |
| | |
| | | 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 { |
| | |
| | | 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 () { |