device.js 3.31 KB
Newer Older
冯超鹏's avatar
冯超鹏 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
import request from '@/utils/request';

export function deviceTypeList() { // 设备类型
  return request({
    url: 'devices/devicetype',
    method: 'get',
  });
}

export function deviceList(page, limit, type) {
  return request({
    url: 'devices/devicelist?page=' + page + '&limit=' + limit + '&type=' + type,
    method: 'get',
  });
}

export function deviceDataInfo(id) {
  return request({
    url: '/devices/deviceDataInfo/' + id,
    method: 'get',
  });
}

export function deviceDataSearch(data) {
  return request({
    url: '/devices/deviceDataSearch',
    method: 'post',
    data,
  });
}

冯超鹏's avatar
冯超鹏 committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
export function deviceBasket() {
  return request({
    url: '/devices/deviceBasket',
    method: 'get',
  });
}

export function deviceDelete(id, type) {
  return request({
    url: '/devices/deviceDelete?id=' + id + '&type=' + type,
    method: 'get',
  });
}

export function deviceBasketList() {
  return request({
    url: '/devices/deviceBasketList',
    method: 'get',
  });
}

export function UpPaperBasket(id) {
  return request({
    url: '/devices/UpPaperBasket/' + id,
    method: 'get',
  });
}
59 60 61 62 63 64 65

export function addClassify(data) {
  return request({
    url: '/devices/addClassify/' + data,
    method: 'get',
  });
}
Administrator's avatar
Administrator committed
66 67 68 69 70 71 72 73
// 更新设备分类
export function updateClassify(data) {
  return request({
    url: '/devices/updateClassify',
    method: 'post',
    data: data,
  });
}
74 75 76 77 78 79 80

export function delteClassify(id) {
  return request({
    url: '/devices/delteClassify/' + id,
    method: 'get',
  });
}
冯超鹏's avatar
冯超鹏 committed
81 82 83 84 85 86 87 88

export function equipment() {
  return request({
    url: '/devices/equipment',
    method: 'get',
  });
}

89
export function detedevice(data) {
冯超鹏's avatar
冯超鹏 committed
90
  return request({
91 92 93
    url: '/devices/detedevice',
    method: 'post',
    data,
冯超鹏's avatar
冯超鹏 committed
94 95 96 97 98 99 100 101 102 103
  });
}

export function police(dete) {
  return request({
    url: '/devices/police',
    method: 'get',
  });
}

冯超鹏's avatar
冯超鹏 committed
104 105 106 107 108 109 110
export function deviceLocation() {
  return request({
    url: '/devices/deviceLocation',
    method: 'get',
  });
}

冯超鹏's avatar
冯超鹏 committed
111 112 113 114 115 116 117
export function addUserDevice() {
  return request({
    url: '/devices/addUserDevice',
    method: 'get',
  });
}

Administrator's avatar
Administrator committed
118
export function control(page, limit, type, formData) {
冯超鹏's avatar
冯超鹏 committed
119
  return request({
Administrator's avatar
Administrator committed
120
    url: 'devices/control?page=' + page + '&limit=' + limit + '&type=' + type + '&search=' + JSON.stringify(formData),
冯超鹏's avatar
冯超鹏 committed
121 122 123
    method: 'get',
  });
}
冯超鹏's avatar
冯超鹏 committed
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139

export function adddevice(data) {
  return request({
    url: '/devices/adddevice',
    method: 'post',
    data,
  });
}

export function addcontactsuser(data) {
  return request({
    url: '/user/addcontactsuser',
    method: 'post',
    data,
  });
}
140 141 142 143 144 145 146 147

export function userdeviceList(data) {
  return request({
    url: '/devices/userdevicelist',
    method: 'post',
    data,
  });
}
冯超鹏's avatar
冯超鹏 committed
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162

export function postupdatedevice(id) {
  return request({
    url: '/devices/updatedevice?deid=' + id,
    method: 'get',
  });
}

export function updedata(data) {
  return request({
    url: '/devices/updatedevice',
    method: 'post',
    data,
  });
}
163 164 165 166 167 168 169 170 171 172 173 174 175 176

export function devicepolice(devicenum) {
  return request({
    url: '/devices/devicepolice?devicenum=' + devicenum,
    method: 'get',
  });
}

export function devicepoliceinfo(devicenum) {
  return request({
    url: '/devices/devicepoliceinfo?devicenum=' + devicenum,
    method: 'get',
  });
}
冯超鹏's avatar
冯超鹏 committed
177 178 179 180 181 182 183 184

export function history_device_type() {
  return request({
    url: '/devices/history_device_type',
    method: 'get',
  });
}