| | |
| | | <!-- |
| | | * @Date: 2024-01-13 20:46:33 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-21 22:33:42 |
| | | * @LastEditTime: 2024-01-21 22:53:27 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/workshop/device.vue |
| | | --> |
| | | <template> |
| | |
| | | return this.info.cycleCount || 0 |
| | | }, |
| | | machineName() { |
| | | debugger |
| | | let machineName = '' |
| | | if (this.info.machineName) return this.info.machineName |
| | | if (this.deviceList.length > 0) { |
| | | try { |
| | | machineName = this.deviceList.find(item => item.machineId === this.id).machineName |
| | | } catch (error) { |
| | | // console.info(error) |
| | | } |
| | | } |
| | | if (this.plantDeviceList.length > 0) { |
| | | try { |
| | | machineName = this.plantDeviceList.find(item => item.machineId === this.id).machineName |
| | |
| | | // console.info(error) |
| | | } |
| | | } |
| | | if (this.deviceList.length > 0) { |
| | | try { |
| | | machineName = this.deviceList.find(item => item.machineId === this.id).machineName |
| | | } catch (error) { |
| | | // console.info(error) |
| | | } |
| | | } |
| | | |
| | | |
| | | if (machineName) { |
| | | return machineName |
| | |
| | | pic() { |
| | | let pic = '' |
| | | if (this.info.pic) return this.info.pic |
| | | if (this.deviceList.length > 0) { |
| | | try { |
| | | pic = this.deviceList.find(item => item.machineId === this.id).pic |
| | | } catch (error) { |
| | | } |
| | | } |
| | | if (this.plantDeviceList.length > 0) { |
| | | try { |
| | | pic = this.plantDeviceList.find(item => item.machineId === this.id).pic |
| | | } catch (error) { |
| | | } |
| | | } |
| | | if (this.deviceList.length > 0) { |
| | | try { |
| | | pic = this.deviceList.find(item => item.machineId === this.id).pic |
| | | } catch (error) { |
| | | } |
| | | } |
| | | |
| | | if (pic) { |
| | | return pic |
| | | } |