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.
66 lines
1.1 KiB
66 lines
1.1 KiB
import request from '@/utils/request'
|
|
|
|
export function get(device_code) {
|
|
return request({
|
|
url: 'api/device/' + device_code,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
export function queryDriverConfig(device_id, driver_code) {
|
|
const data = {
|
|
device_id: device_id,
|
|
driver_code: driver_code
|
|
}
|
|
return request({
|
|
url: 'api/device/driverConfig',
|
|
data,
|
|
method: 'post'
|
|
})
|
|
}
|
|
|
|
export function selectDriverCodeList(device_code) {
|
|
return request({
|
|
url: 'api/device/selectDriverCodeList/' + device_code,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
export function updateConfig(parentForm, form, data1, data2) {
|
|
const data = {
|
|
parentForm,
|
|
form,
|
|
data1,
|
|
data2
|
|
}
|
|
return request({
|
|
url: 'api/device/updateConfig',
|
|
data,
|
|
method: 'post'
|
|
})
|
|
}
|
|
|
|
export function testRead(dbItems, opc_id) {
|
|
const data = {
|
|
dbItems: dbItems,
|
|
opc_id: opc_id
|
|
}
|
|
return request({
|
|
url: 'api/device/testRead',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
export function testwrite(dbItems, opc_id) {
|
|
const data = {
|
|
dbItems: dbItems,
|
|
opc_id: opc_id
|
|
}
|
|
return request({
|
|
url: 'api/device/testWrite',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
|