7 changed files with 354 additions and 270 deletions
-
303src/api/storeManage/deviceManage/device.js
-
38src/api/storeManage/displayConfig/index.js
-
37src/views/dashboard/PanelGroup.vue
-
62src/views/environmentalScreen/index.vue
-
96src/views/home.vue
-
52src/views/storeManage/deviceManage/module/deviceDetail.vue
-
36src/views/storeManage/levelManage/index.vue
@ -1,147 +1,156 @@ |
|||||
import request from '@/utils/request' |
|
||||
|
|
||||
export function getSupplier() { |
|
||||
return request({ |
|
||||
url: 'api/supplier/dropdown-list', |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function add(data) { |
|
||||
const url = getUrl(data, 'add') |
|
||||
return request({ |
|
||||
url: url, |
|
||||
method: 'post', |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function del(data) { |
|
||||
return request({ |
|
||||
url: '/api/device/delete', |
|
||||
method: 'delete', |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function edit(data) { |
|
||||
const url = getUrl(data, 'edit') |
|
||||
return request({ |
|
||||
url: url, |
|
||||
method: 'put', |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function getDeviceType() { |
|
||||
return request({ |
|
||||
url: 'api/device/type', |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function getDeviceById(params) { |
|
||||
return request({ |
|
||||
url: 'api/device/state', |
|
||||
method: 'get', |
|
||||
params |
|
||||
}) |
|
||||
} |
|
||||
export function getDesecabinetById(params) { |
|
||||
return request({ |
|
||||
url: 'api/desecabinet/query', |
|
||||
method: 'get', |
|
||||
params |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function getRotarycabinetById(params) { |
|
||||
return request({ |
|
||||
url: 'api/rotarycabinet/query', |
|
||||
method: 'get', |
|
||||
params |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
function getUrl(data, optTYpe) { |
|
||||
let url = 'api/desecabinet/' |
|
||||
if (data.deviceTypeId.name === '密集架') { |
|
||||
url = 'api/desecabinet/' |
|
||||
} else if (data.deviceTypeId.name === '回转柜') { |
|
||||
url = 'api/rotarycabinet/' |
|
||||
} else if (data.deviceTypeId.name === '摄像头') { |
|
||||
url = 'api/camera/' |
|
||||
} else if (data.deviceTypeId.name === '空调' || data.deviceTypeId.name === '桌面式RFID读写器' || data.deviceTypeId.name === '盘点机' || data.deviceTypeId.name === '恒湿机' || data.deviceTypeId.name === '漏水传感器' || data.deviceTypeId.name === '温湿度感应器' || data.deviceTypeId.name === '空气质量检测设备' || data.deviceTypeId.name === '漏水传感器') { |
|
||||
url = 'api/insidedevices/' |
|
||||
} else if (data.deviceTypeId.name === '通道门' || data.deviceTypeId.name === '手持式RFID读写器') { |
|
||||
url = 'api/outsidedevices/' |
|
||||
} |
|
||||
if (optTYpe === 'add') { |
|
||||
url += 'create' |
|
||||
} else if (optTYpe === 'edit') { |
|
||||
url += 'update' |
|
||||
} |
|
||||
return url |
|
||||
} |
|
||||
export function getDeviceList(params) { |
|
||||
return request({ |
|
||||
url: 'api/device/list', |
|
||||
method: 'get', |
|
||||
params |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 根据区列获取在库已借数
|
|
||||
export function FetchInBorrowByQuCol(params) { |
|
||||
return request({ |
|
||||
url: 'api/tag/getInBorrowByQuCol', |
|
||||
method: 'get', |
|
||||
params |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function unbind(data) { |
|
||||
return request({ |
|
||||
url: 'api/displayconfig/unbind', |
|
||||
method: 'post', |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 打开架体具体某一列
|
|
||||
export function FetchCallExternalOpenCol(params) { |
|
||||
return request({ |
|
||||
url: 'api/callExternal/openCol', |
|
||||
method: 'get', |
|
||||
params |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 密集架合架
|
|
||||
export function FetchCallExternalResetCol(params) { |
|
||||
return request({ |
|
||||
url: 'api/callExternal/reset', |
|
||||
method: 'get', |
|
||||
params |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 密集架通风
|
|
||||
export function FetchCallExternalVent(params) { |
|
||||
return request({ |
|
||||
url: 'api/callExternal/vent', |
|
||||
method: 'get', |
|
||||
params |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 停止移动
|
|
||||
export function FetchCallExternalStopMove(params) { |
|
||||
return request({ |
|
||||
url: 'api/callExternal/stopMove', |
|
||||
method: 'get', |
|
||||
params |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export default { add, edit, del, getSupplier, getDeviceType, getDeviceById, getDesecabinetById, getRotarycabinetById, getDeviceList, FetchInBorrowByQuCol, unbind, FetchCallExternalOpenCol, FetchCallExternalResetCol, FetchCallExternalVent, FetchCallExternalStopMove } |
|
||||
|
import request from '@/utils/request' |
||||
|
import qs from 'qs' |
||||
|
|
||||
|
export function getSupplier() { |
||||
|
return request({ |
||||
|
url: 'api/supplier/dropdown-list', |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function add(data) { |
||||
|
const url = getUrl(data, 'add') |
||||
|
return request({ |
||||
|
url: url, |
||||
|
method: 'post', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function del(data) { |
||||
|
return request({ |
||||
|
url: '/api/device/delete', |
||||
|
method: 'delete', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function edit(data) { |
||||
|
const url = getUrl(data, 'edit') |
||||
|
return request({ |
||||
|
url: url, |
||||
|
method: 'put', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function getDeviceType() { |
||||
|
return request({ |
||||
|
url: 'api/device/type', |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function getDeviceById(params) { |
||||
|
return request({ |
||||
|
url: 'api/device/state', |
||||
|
method: 'get', |
||||
|
params |
||||
|
}) |
||||
|
} |
||||
|
export function getDesecabinetById(params) { |
||||
|
return request({ |
||||
|
url: 'api/desecabinet/query', |
||||
|
method: 'get', |
||||
|
params |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function getRotarycabinetById(params) { |
||||
|
return request({ |
||||
|
url: 'api/rotarycabinet/query', |
||||
|
method: 'get', |
||||
|
params |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
function getUrl(data, optTYpe) { |
||||
|
let url = 'api/desecabinet/' |
||||
|
if (data.deviceTypeId.name === '密集架') { |
||||
|
url = 'api/desecabinet/' |
||||
|
} else if (data.deviceTypeId.name === '回转柜') { |
||||
|
url = 'api/rotarycabinet/' |
||||
|
} else if (data.deviceTypeId.name === '摄像头') { |
||||
|
url = 'api/camera/' |
||||
|
} else if (data.deviceTypeId.name === '空调' || data.deviceTypeId.name === '桌面式RFID读写器' || data.deviceTypeId.name === '盘点机' || data.deviceTypeId.name === '恒湿机' || data.deviceTypeId.name === '漏水传感器' || data.deviceTypeId.name === '温湿度感应器' || data.deviceTypeId.name === '空气质量检测设备' || data.deviceTypeId.name === '漏水传感器') { |
||||
|
url = 'api/insidedevices/' |
||||
|
} else if (data.deviceTypeId.name === '通道门' || data.deviceTypeId.name === '手持式RFID读写器') { |
||||
|
url = 'api/outsidedevices/' |
||||
|
} |
||||
|
if (optTYpe === 'add') { |
||||
|
url += 'create' |
||||
|
} else if (optTYpe === 'edit') { |
||||
|
url += 'update' |
||||
|
} |
||||
|
return url |
||||
|
} |
||||
|
export function getDeviceList(params) { |
||||
|
return request({ |
||||
|
url: 'api/device/list', |
||||
|
method: 'get', |
||||
|
params |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 根据设备id查看设备是否在线
|
||||
|
export function FetchIsOnline(params) { |
||||
|
return request({ |
||||
|
url: 'api/device/isOnline' + '?' + qs.stringify(params, { indices: false }), |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 根据区列获取在库已借数
|
||||
|
export function FetchInBorrowByQuCol(params) { |
||||
|
return request({ |
||||
|
url: 'api/tag/getInBorrowByQuCol', |
||||
|
method: 'get', |
||||
|
params |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function unbind(data) { |
||||
|
return request({ |
||||
|
url: 'api/displayconfig/unbind', |
||||
|
method: 'post', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 打开架体具体某一列
|
||||
|
export function FetchCallExternalOpenCol(params) { |
||||
|
return request({ |
||||
|
url: 'api/callExternal/openCol', |
||||
|
method: 'get', |
||||
|
params |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 密集架合架
|
||||
|
export function FetchCallExternalResetCol(params) { |
||||
|
return request({ |
||||
|
url: 'api/callExternal/reset', |
||||
|
method: 'get', |
||||
|
params |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 密集架通风
|
||||
|
export function FetchCallExternalVent(params) { |
||||
|
return request({ |
||||
|
url: 'api/callExternal/vent', |
||||
|
method: 'get', |
||||
|
params |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 停止移动
|
||||
|
export function FetchCallExternalStopMove(params) { |
||||
|
return request({ |
||||
|
url: 'api/callExternal/stopMove', |
||||
|
method: 'get', |
||||
|
params |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export default { add, edit, del, getSupplier, getDeviceType, getDeviceById, getDesecabinetById, getRotarycabinetById, getDeviceList, FetchIsOnline, FetchInBorrowByQuCol, unbind, FetchCallExternalOpenCol, FetchCallExternalResetCol, FetchCallExternalVent, FetchCallExternalStopMove } |
@ -1,19 +1,19 @@ |
|||||
import request from '@/utils/request' |
|
||||
|
|
||||
export function list(params) { |
|
||||
return request({ |
|
||||
url: 'api/displayconfig/list', |
|
||||
method: 'get', |
|
||||
params |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function bind(data) { |
|
||||
return request({ |
|
||||
url: 'api/displayconfig/bind', |
|
||||
method: 'post', |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export default { list, bind } |
|
||||
|
import request from '@/utils/request' |
||||
|
import qs from 'qs' |
||||
|
|
||||
|
export function list(params) { |
||||
|
return request({ |
||||
|
url: 'api/displayconfig/list' + '?' + qs.stringify(params, { indices: false }), |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function bind(data) { |
||||
|
return request({ |
||||
|
url: 'api/displayconfig/bind', |
||||
|
method: 'post', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export default { list, bind } |
Write
Preview
Loading…
Cancel
Save
Reference in new issue