2026-04-30 16:59:21 +08:00
|
|
|
import request from '@/utils/request'
|
|
|
|
|
|
|
|
|
|
export function getUdpConfig() {
|
|
|
|
|
return request({ url: '/mill/udp/config', method: 'get' })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function updateUdpConfig(data) {
|
|
|
|
|
return request({ url: '/mill/udp/config', method: 'put', data })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function sendTelegram(data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/mill/udp/send',
|
|
|
|
|
method: 'post',
|
|
|
|
|
data: data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getTelegramHistory(query) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/mill/udp/history',
|
|
|
|
|
method: 'get',
|
|
|
|
|
params: query
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getTelegramStats() {
|
|
|
|
|
return request({ url: '/mill/udp/stats', method: 'get' })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function parseTelegram(tcNo, payload) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/mill/udp/parse',
|
|
|
|
|
method: 'post',
|
|
|
|
|
data: { tcNo, payload }
|
|
|
|
|
})
|
2026-05-05 14:43:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function clearTelegramHistory() {
|
|
|
|
|
return request({ url: '/mill/udp/history', method: 'delete' })
|
2026-04-30 16:59:21 +08:00
|
|
|
}
|