| | |
| | | <a-col :md="24-5" :sm="24"> |
| | | <div class="device-status-info"> |
| | | <a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info"> |
| | | <template v-if="item.value!=99"> |
| | | <template v-if="item.value!=99 && item.value!=88"> |
| | | <div>{{ item.label }}</div> |
| | | <div class="status-square" :style="{ backgroundColor: item.color }"></div> |
| | | <div>{{getDeviceNumberByStatus(item.value) }}</div> |
| | |
| | | value: 22, |
| | | color: '#FF0000' |
| | | }, |
| | | { |
| | | label: '异常', |
| | | value: 33, |
| | | color: '#FFA200' |
| | | }, |
| | | // { |
| | | // label: '异常', |
| | | // value: 33, |
| | | // color: '#FFA200' |
| | | // }, |
| | | { |
| | | label: '总数', |
| | | value: 99, |
| | | color: '#fff' |
| | | }, |
| | | { |
| | | label: '大修、项修数', |
| | | value: 88 |
| | | } |
| | | ]// 设备状态指示灯列表, |
| | | } |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 单击状态反馈后触发 |
| | | * @param record |
| | | */ |
| | | editEquipmentStatus(record) { |
| | | const _this = this |
| | | this.$notification.info({ |
| | | key: 'equipmentStatus', |
| | | message: '消息', |
| | | description: '反馈中...' |
| | | }) |
| | | getAction(this.url.updateEquipmentStatus, { id: record.id }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | _this.equipmentStatistics(this.param, { key: true, message: res.message }) |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: '消息', |
| | | description: err.message |
| | | }) |
| | | }) |
| | | }, |
| | | // /** |
| | | // * 单击状态反馈后触发 |
| | | // * @param record |
| | | // */ |
| | | // editEquipmentStatus(record) { |
| | | // const _this = this |
| | | // this.$notification.info({ |
| | | // key: 'equipmentStatus', |
| | | // message: '消息', |
| | | // description: '反馈中...' |
| | | // }) |
| | | // getAction(this.url.updateEquipmentStatus, { id: record.id }) |
| | | // .then(res => { |
| | | // if (res.success) { |
| | | // _this.equipmentStatistics(this.param, { key: true, message: res.message }) |
| | | // } else { |
| | | // this.$notification.warning({ |
| | | // message: '消息', |
| | | // description: res.message |
| | | // }) |
| | | // } |
| | | // }) |
| | | // .catch(err => { |
| | | // this.$notification.error({ |
| | | // message: '消息', |
| | | // description: err.message |
| | | // }) |
| | | // }) |
| | | // }, |
| | | |
| | | /** |
| | | * 根据设备状态值获取对应设备数量 |