| | |
| | | <!-- |
| | | * @Date: 2024-01-13 20:46:33 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-29 22:28:36 |
| | | * @LastEditTime: 2024-01-31 21:31:13 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/workshop/device.vue |
| | | --> |
| | | <template> |
| | | <div class="device-item"> |
| | | <el-checkbox v-show="canconcern" class="care" v-model="concern" @change="change"></el-checkbox> |
| | | <p>{{ machineName }}</p> |
| | | <div class="device-item-box"> |
| | | <div class="device-item-box" @click="toDetail"> |
| | | <div class="img"> |
| | | <span class="img-status" v-if="item.status === 'STOP'">停机</span> |
| | | <span class="img-status run" v-if="item.status === 'RUN'">运行</span> |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | toDetail () { |
| | | this.$emit('toDetail') |
| | | }, |
| | | change(val) { |
| | | console.log(val) |
| | | getRequest('machineConcern', { concern: val ? 1 : 0, id: this.id }).then(res => { |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | position: relative; |
| | | |
| | | p { |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | .care { |
| | | position: absolute; |
| | | right: 5px; |