| | |
| | | <!-- |
| | | * @Date: 2024-01-13 20:46:33 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-14 13:18:54 |
| | | * @LastEditTime: 2024-01-17 23:06:46 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/workshop/device.vue |
| | | --> |
| | | <template> |
| | | <div class="device-item"> |
| | | <el-checkbox class="care" v-model="care" @change="change"></el-checkbox> |
| | | <p>YKX123123213</p> |
| | | <p>{{ machineName }}</p> |
| | | <div class="device-item-box"> |
| | | <div class="img"> |
| | | <span class="img-status" v-if="item.status === 'STOP'">停机</span> |
| | |
| | | default: function () { |
| | | return {} |
| | | } |
| | | }, |
| | | deviceList: { |
| | | type: Array, |
| | | default: function() { |
| | | return [] |
| | | } |
| | | }, |
| | | plantDeviceList: { |
| | | type: Array, |
| | | default: function() { |
| | | return [] |
| | | } |
| | | } |
| | | }, |
| | | data () { |
| | |
| | | }, |
| | | cycleCount () { |
| | | return this.info.cycleCount || 0 |
| | | }, |
| | | machineName () { |
| | | let machineName = '' |
| | | try { |
| | | machineName = this.deviceList.find(item => item.machineId=== this.id).machineName |
| | | } catch (error) {console.error(error)} |
| | | try { |
| | | machineName = this.plantDeviceList.find(item => item.machineId=== this.id).machineName |
| | | } catch (error) {console.error(error)} |
| | | if (machineName) { |
| | | return machineName |
| | | } |
| | | return '' |
| | | } |
| | | }, |
| | | methods: { |