|
@ -213,7 +213,7 @@ export default { |
|
|
notice_device: null, |
|
|
notice_device: null, |
|
|
notice_devices: [], |
|
|
notice_devices: [], |
|
|
notice_id: '', // 紧急通知的id |
|
|
notice_id: '', // 紧急通知的id |
|
|
orga_id:'133221333123111', |
|
|
|
|
|
|
|
|
orga_id: '133221333123111' |
|
|
}, |
|
|
}, |
|
|
queryInfo: { |
|
|
queryInfo: { |
|
|
notice_name: '', |
|
|
notice_name: '', |
|
@ -244,13 +244,11 @@ export default { |
|
|
getUrgentMessage() { |
|
|
getUrgentMessage() { |
|
|
const params = this.queryInfo |
|
|
const params = this.queryInfo |
|
|
reqUrgentMessage(params).then(res => { |
|
|
reqUrgentMessage(params).then(res => { |
|
|
|
|
|
|
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
this.urgentMessage = res.data.content |
|
|
this.urgentMessage = res.data.content |
|
|
// console.log( this.urgentMessage) |
|
|
// console.log( this.urgentMessage) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
// 获取设备列表的信息 |
|
|
// 获取设备列表的信息 |
|
|
getDevice() { |
|
|
getDevice() { |
|
@ -262,7 +260,6 @@ export default { |
|
|
return this.$message.error('获取设备列表失败!') |
|
|
return this.$message.error('获取设备列表失败!') |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
isStopHandle(index, row) { |
|
|
isStopHandle(index, row) { |
|
|
if (row.is_state == 1) { |
|
|
if (row.is_state == 1) { |
|
@ -303,15 +300,14 @@ export default { |
|
|
} else { |
|
|
} else { |
|
|
this.form.context_speed_name = '3s' |
|
|
this.form.context_speed_name = '3s' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
submit() { |
|
|
submit() { |
|
|
console.log("submit--") |
|
|
|
|
|
|
|
|
console.log('submit--') |
|
|
console.log(this.form.notice_device) |
|
|
console.log(this.form.notice_device) |
|
|
console.log(this.form.notice_devices) |
|
|
console.log(this.form.notice_devices) |
|
|
console.log("----submit") |
|
|
|
|
|
|
|
|
console.log('----submit') |
|
|
}, |
|
|
}, |
|
|
// 所有设备和部分设备的切换数据处理 |
|
|
// 所有设备和部分设备的切换数据处理 |
|
|
clearCheckbox() { |
|
|
clearCheckbox() { |
|
@ -351,20 +347,29 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 添加设备 |
|
|
// 添加设备 |
|
|
tagHandle(tag) { |
|
|
tagHandle(tag) { |
|
|
|
|
|
|
|
|
this.form.notice_devices.push({ deviceId: tag.device_id }) |
|
|
this.form.notice_devices.push({ deviceId: tag.device_id }) |
|
|
|
|
|
|
|
|
const current = this.deviceTags.every((item) => {item == tag} ) |
|
|
|
|
|
|
|
|
console.log('添加选中前----') |
|
|
|
|
|
console.log(this.deviceTags) |
|
|
|
|
|
if (this.deviceTags.length == 0) { |
|
|
|
|
|
this.deviceTags.push(tag) |
|
|
|
|
|
} else { |
|
|
|
|
|
const current = this.deviceTags.find((item) => { |
|
|
|
|
|
return item.device_id == tag.device_id |
|
|
|
|
|
}) |
|
|
// 查找是否存在相同的 |
|
|
// 查找是否存在相同的 |
|
|
console.log('current', current) |
|
|
console.log('current', current) |
|
|
if (!current) { |
|
|
if (!current) { |
|
|
// console.log('没有相同的') |
|
|
// console.log('没有相同的') |
|
|
this.deviceTags.push(tag) |
|
|
this.deviceTags.push(tag) |
|
|
|
|
|
} else { |
|
|
|
|
|
console.log('有相同的') |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
// } else { |
|
|
// } else { |
|
|
// console.log('有相同的') |
|
|
// console.log('有相同的') |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
console.log('添加选中后----') |
|
|
|
|
|
console.log(this.deviceTags) |
|
|
}, |
|
|
}, |
|
|
// 单独删除某一个设备 |
|
|
// 单独删除某一个设备 |
|
|
handleClose(tag) { |
|
|
handleClose(tag) { |
|
@ -374,7 +379,7 @@ export default { |
|
|
// 清空设备 |
|
|
// 清空设备 |
|
|
clearDevice() { |
|
|
clearDevice() { |
|
|
this.deviceTags = [] |
|
|
this.deviceTags = [] |
|
|
}, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|