88 lines
2.1 KiB
JavaScript
88 lines
2.1 KiB
JavaScript
|
|
import request from '@/utils/request'
|
||
|
|
|
||
|
|
export function trackEdit(data) {
|
||
|
|
return request({
|
||
|
|
url: 'api/trajectoryBackground/queryAllEnable',
|
||
|
|
method: 'post',
|
||
|
|
data
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
export function carEdit(data) {
|
||
|
|
return request({
|
||
|
|
url: 'api/trajectoryConfiguration/queryAllEnable',
|
||
|
|
method: 'post',
|
||
|
|
data
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
export function queryDevice(data) {
|
||
|
|
return request({
|
||
|
|
url: 'api/trajectory/queryDevice',
|
||
|
|
method: 'post',
|
||
|
|
data
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// export function trackEdit() {
|
||
|
|
// const res = {
|
||
|
|
// code: 200,
|
||
|
|
// msg: 'ok',
|
||
|
|
// content: [{
|
||
|
|
// background_code: '图片',
|
||
|
|
// image_code: 'aaa.jpg',
|
||
|
|
// zoom_ratio: '0.5',
|
||
|
|
// coordinate_origin: '4',
|
||
|
|
// max_x: '1000',
|
||
|
|
// max_y: '1000',
|
||
|
|
// refresh_time: 10000
|
||
|
|
// }]
|
||
|
|
// }
|
||
|
|
// return new Promise((resolve, reject) => {
|
||
|
|
// resolve(res)
|
||
|
|
// })
|
||
|
|
// }
|
||
|
|
|
||
|
|
// export function carEdit() {
|
||
|
|
// const res = {
|
||
|
|
// code: 200,
|
||
|
|
// msg: 'ok',
|
||
|
|
// content: [{
|
||
|
|
// configuration_code: '1号agv',
|
||
|
|
// image_code: 'aaa.jpg',
|
||
|
|
// image_width: '20',
|
||
|
|
// image_height: '20',
|
||
|
|
// device_code: '1',
|
||
|
|
// x: 100,
|
||
|
|
// y: 100,
|
||
|
|
// angle: 90
|
||
|
|
// }, {
|
||
|
|
// configuration_code: '2号agv',
|
||
|
|
// image_code: 'aaa.jpg',
|
||
|
|
// image_width: '20',
|
||
|
|
// image_height: '20',
|
||
|
|
// device_code: '2',
|
||
|
|
// x: 200,
|
||
|
|
// y: 200,
|
||
|
|
// angle: 0
|
||
|
|
// }]
|
||
|
|
// }
|
||
|
|
// return new Promise((resolve, reject) => {
|
||
|
|
// resolve(res)
|
||
|
|
// })
|
||
|
|
// }
|
||
|
|
|
||
|
|
// export function queryDevice() {
|
||
|
|
// const res = {
|
||
|
|
// data: [{ device_code: '1', x: Math.floor(Math.random() * 10) * 100, y: Math.floor(Math.random() * 10) * 100, angle: 90 }, { device_code: '2', x: Math.floor(Math.random() * 10) * 100, y: Math.floor(Math.random() * 10) * 100, angle: 0 }],
|
||
|
|
// data1: [{ device_code: '1', x: 100, y: 100, angle: 90 }, { device_code: '2', x: 200, y: 200, angle: 0 }],
|
||
|
|
// status: '200',
|
||
|
|
// message: '操作成功'
|
||
|
|
// }
|
||
|
|
// return new Promise((resolve, reject) => {
|
||
|
|
// resolve(res)
|
||
|
|
// })
|
||
|
|
// }
|
||
|
|
|
||
|
|
export default { trackEdit, carEdit, queryDevice }
|