|
@@ -376,9 +376,9 @@ export default {
|
|
led_resolution_ratio: [
|
|
led_resolution_ratio: [
|
|
{ required: true, message: this.$t('deviceManage.ledResolutionRatio'), trigger: 'blur' }
|
|
{ required: true, message: this.$t('deviceManage.ledResolutionRatio'), trigger: 'blur' }
|
|
],
|
|
],
|
|
- led_voice: [
|
|
|
|
- { required: true, message: this.$t('deviceManage.ledVoice'), trigger: 'blur' }
|
|
|
|
- ],
|
|
|
|
|
|
+ // led_voice: [
|
|
|
|
+ // { required: true, message: this.$t('deviceManage.ledVoice'), trigger: 'blur' }
|
|
|
|
+ // ],
|
|
led_font_size: [
|
|
led_font_size: [
|
|
{ required: true, message: this.$t('deviceManage.ledFontSize'), trigger: 'blur' }
|
|
{ required: true, message: this.$t('deviceManage.ledFontSize'), trigger: 'blur' }
|
|
],
|
|
],
|
|
@@ -640,17 +640,21 @@ export default {
|
|
const deviceData = [...response.data]
|
|
const deviceData = [...response.data]
|
|
deviceData.forEach(item => {
|
|
deviceData.forEach(item => {
|
|
if (this.onlineDevice.length > 0) {
|
|
if (this.onlineDevice.length > 0) {
|
|
- if (item.eth_mac) {
|
|
|
|
- const mac = this.onlineDevice.filter(p => p.toLowerCase() === item.eth_mac.toLowerCase())[0]
|
|
|
|
- // console.log('在线设备1', mac)
|
|
|
|
- if (mac !== undefined && mac !== null) {
|
|
|
|
- item['online_state'] = this.$t('deviceManage.connectTrue')
|
|
|
|
- } else {
|
|
|
|
- item['online_state'] = this.$t('deviceManage.connectFalse')
|
|
|
|
|
|
+ if (this.isCannotBeOnline(item.device_type)) {
|
|
|
|
+ if (item.eth_mac) {
|
|
|
|
+ const mac = this.onlineDevice.filter(p => p.toLowerCase() === item.eth_mac.toLowerCase())[0]
|
|
|
|
+ // console.log('在线设备1', mac)
|
|
|
|
+ if (mac !== undefined && mac !== null) {
|
|
|
|
+ item['online_state'] = this.$t('deviceManage.connectTrue')
|
|
|
|
+ } else {
|
|
|
|
+ item['online_state'] = this.$t('deviceManage.connectFalse')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ item['online_state'] = '/'
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- item['online_state'] = this.$t('deviceManage.connectFalse')
|
|
|
|
|
|
+ item['online_state'] = '/'
|
|
}
|
|
}
|
|
})
|
|
})
|
|
this.rowData = deviceData
|
|
this.rowData = deviceData
|
|
@@ -691,8 +695,8 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 过滤状态发生变化,发送到服务器检索数据
|
|
|
|
- */
|
|
|
|
|
|
+ * 过滤状态发生变化,发送到服务器检索数据
|
|
|
|
+ */
|
|
filterModifed(param) {
|
|
filterModifed(param) {
|
|
var model = param.api.getFilterModel()
|
|
var model = param.api.getFilterModel()
|
|
// 连接状态不经过服务器过滤
|
|
// 连接状态不经过服务器过滤
|
|
@@ -764,9 +768,11 @@ export default {
|
|
if (params.value === this.$t('deviceManage.connectTrue')) {
|
|
if (params.value === this.$t('deviceManage.connectTrue')) {
|
|
// return '<span style="color:green;">在线</span>'
|
|
// return '<span style="color:green;">在线</span>'
|
|
return '<span style="color:green;">' + this.$t('deviceManage.connectTrue') + '</span>'
|
|
return '<span style="color:green;">' + this.$t('deviceManage.connectTrue') + '</span>'
|
|
- } else {
|
|
|
|
|
|
+ } else if (params.value === this.$t('deviceManage.connectFalse')) {
|
|
// return '<span style="color:gray;">离线</span>'
|
|
// return '<span style="color:gray;">离线</span>'
|
|
return '<span style="color:gray;">' + this.$t('deviceManage.connectFalse') + '</span>'
|
|
return '<span style="color:gray;">' + this.$t('deviceManage.connectFalse') + '</span>'
|
|
|
|
+ } else {
|
|
|
|
+ return '<span style="color:gray;"> / </span>'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
/** 删除设备 **/
|
|
/** 删除设备 **/
|
|
@@ -1027,9 +1033,13 @@ export default {
|
|
this.onlineDevice = JSON.parse(e.data)
|
|
this.onlineDevice = JSON.parse(e.data)
|
|
if (this.rowData !== null) {
|
|
if (this.rowData !== null) {
|
|
for (let i = 0; i < this.rowData.length; i++) {
|
|
for (let i = 0; i < this.rowData.length; i++) {
|
|
- if (this.rowData[i].eth_mac) {
|
|
|
|
- const mac = this.onlineDevice.filter(p => p.toLowerCase() === this.rowData[i].eth_mac.toLowerCase())[0]
|
|
|
|
- this.rowData[i]['online_state'] = (mac !== undefined && mac !== null) ? this.$t('deviceManage.connectTrue') : this.$t('deviceManage.connectFalse')
|
|
|
|
|
|
+ if (this.isCannotBeOnline(this.rowData[i].device_type)) {
|
|
|
|
+ if (this.rowData[i].eth_mac) {
|
|
|
|
+ const mac = this.onlineDevice.filter(p => p.toLowerCase() === this.rowData[i].eth_mac.toLowerCase())[0]
|
|
|
|
+ this.rowData[i]['online_state'] = (mac !== undefined && mac !== null) ? this.$t('deviceManage.connectTrue') : this.$t('deviceManage.connectFalse')
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.rowData[i]['online_state'] = '/'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const rowData = [...this.rowData]
|
|
const rowData = [...this.rowData]
|
|
@@ -1059,8 +1069,22 @@ export default {
|
|
this.$message.success(this.$t('action.settingsSuccess'))
|
|
this.$message.success(this.$t('action.settingsSuccess'))
|
|
this.serverAddressDialogVisible = false
|
|
this.serverAddressDialogVisible = false
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * 判断设备是否为模拟分机这种,无法在线是设备
|
|
|
|
+ */
|
|
|
|
+ isCannotBeOnline(val){
|
|
|
|
+ return val === DEVICE_TYPE.NURSE_HOST ||
|
|
|
|
+ val === DEVICE_TYPE.OTHER_HOST ||
|
|
|
|
+ val === DEVICE_TYPE.NURSE_HOST ||
|
|
|
|
+ val === DEVICE_TYPE.DOCTOR_HOST ||
|
|
|
|
+ val === DEVICE_TYPE.NURSE_WATCH ||
|
|
|
|
+ val === DEVICE_TYPE.WORKER_WATCH ||
|
|
|
|
+ val === DEVICE_TYPE.TRANSFER_DEVICE ||
|
|
|
|
+ val === DEVICE_TYPE.DOOR_DEVICE ||
|
|
|
|
+ val === DEVICE_TYPE.DIGIT_BED_DEVICE ||
|
|
|
|
+ val === DEVICE_TYPE.CELL_PHONE;
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|