You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import request from '@/utils/request'
|
|
|
|
|
|
|
|
// 查询设备列表
|
|
|
|
export function getBoardList(query) {
|
|
|
|
return request({
|
|
|
|
url: '/business/device/query',
|
|
|
|
method: 'get',
|
|
|
|
params: {
|
|
|
|
...query,
|
|
|
|
deviceType:2
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询设备列表
|
|
|
|
export function getBoardDeviceInfo(deviceId) {
|
|
|
|
return request({
|
|
|
|
// url: `/business/board/realtimeProperty/${deviceId}`,
|
|
|
|
url: `/business/device/properties/realtime/${deviceId}/3A`,
|
|
|
|
// url: `/business/device/batchFunctions`,
|
|
|
|
method: 'GET',
|
|
|
|
params: {}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 敏感字段检测
|
|
|
|
export function checkBoardContent(content) {
|
|
|
|
return request({
|
|
|
|
url: `/business/dcInfoBoardVocabulary/checkBoardContent`,
|
|
|
|
method: 'get',
|
|
|
|
params:{
|
|
|
|
content
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 保存情报板发布日志
|
|
|
|
export function saveBoardReleaseLog(data) {
|
|
|
|
return request({
|
|
|
|
url: `/business/boardReleaseLog`,
|
|
|
|
method: 'post',
|
|
|
|
data
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
export function publishToBoard(data) {
|
|
|
|
let devices = []
|
|
|
|
data.deviceList.map(item=>{
|
|
|
|
devices.push(
|
|
|
|
{
|
|
|
|
id: item.id,
|
|
|
|
iotDeviceId: item.iotDeviceId,
|
|
|
|
deviceType: "2"
|
|
|
|
}
|
|
|
|
)
|
|
|
|
})
|
|
|
|
|
|
|
|
return request({
|
|
|
|
// url: '/business/board/batch/publish',
|
|
|
|
url: `/business/device/batchFunctions`,
|
|
|
|
method: 'post',
|
|
|
|
// data: data
|
|
|
|
data: {
|
|
|
|
devices,
|
|
|
|
"functions": [
|
|
|
|
{
|
|
|
|
"functionId": "11",
|
|
|
|
"params": {
|
|
|
|
"size": "65535",
|
|
|
|
"fileName": "play010.lst"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"functionId": "13",
|
|
|
|
"params": {
|
|
|
|
parameters : data.content
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"functionId": "1B",
|
|
|
|
"params": {
|
|
|
|
"fileId": "10"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|