| | |
| | | <!-- |
| | | * @Date: 2024-01-13 20:46:33 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-16 00:32:38 |
| | | * @LastEditTime: 2024-01-16 01:08:39 |
| | | * @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>{{ name }}</p> |
| | | <p>{{ machineName }}</p> |
| | | <div class="device-item-box"> |
| | | <div class="img"> |
| | | <span class="img-status" v-if="item.status === 'STOP'">停机</span> |
| | |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | name () { |
| | | let name = '' |
| | | let arr = [...this.deviceList,...this.plantDeviceList] |
| | | arr.find(item => { |
| | | if(item.machineId=== this.id) { |
| | | name = item.machineName |
| | | } |
| | | }) |
| | | return machineName |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | care: false, |
| | |
| | | }, |
| | | cycleCount () { |
| | | return this.info.cycleCount || 0 |
| | | }, |
| | | machineName () { |
| | | try { |
| | | let arr = [...this.deviceList,...this.plantDeviceList] |
| | | return arr.find(item => item.machineId=== this.id).machineName |
| | | } catch (error) { |
| | | return this.id |
| | | } |
| | | |
| | | } |
| | | }, |
| | | methods: { |