diff --git a/src/api/device.js b/src/api/device.js deleted file mode 100644 index 4dbbe9c..0000000 --- a/src/api/device.js +++ /dev/null @@ -1,249 +0,0 @@ -import request from '@/config/axios' - -export const driverApi = { - add: (driver) => request({ - url: '/device_api/device/driver/add', - method: 'post', - data: driver - }), - delete: (id) => request({ - url: '/device_api/device/driver/delete/' + id, - method: 'post' - }), - update: (driver) => request({ - url: '/device_api/device/driver/update', - method: 'post', - data: driver - }), - selectById: (id) => request({ - url: '/device_api/device/driver/id/' + id, - method: 'get' - }), - list: (driver) => request({ - url: '/device_api/device/driver/list', - method: 'post', - data: driver - }), - dictionary: () => request({ - url: '/device_api/device/driver/dictionary', - method: 'get' - }) -}; - -export const connectInfoApi = { - add: (connectInfo) => request({ - url: '/device_api/device/connectInfo/add', - method: 'post', - data: connectInfo - }), - delete: (id) => request({ - url: '/device_api/device/connectInfo/delete/' + id, - method: 'post' - }), - update: (connectInfo) => request({ - url: '/device_api/device/connectInfo/update', - method: 'post', - data: connectInfo - }), - selectById: (id) => request({ - url: '/device_api/device/connectInfo/id/' + id, - method: 'get' - }), - list: (connectInfo) => request({ - url: '/device_api/device/connectInfo/list', - method: 'post', - data: connectInfo - }), - dictionary: () => request({ - url: '/device_api/device/connectInfo/dictionary', - method: 'get' - }) -}; - -export const profileInfoApi = { - add: (profileInfo) => request({ - url: '/device_api/device/profileInfo/add', - method: 'post', - data: profileInfo - }), - delete: (id) => request({ - url: '/device_api/device/profileInfo/delete/' + id, - method: 'post' - }), - update: (profileInfo) => request({ - url: '/device_api/device/profileInfo/update', - method: 'post', - data: profileInfo - }), - selectById: (id) => request({ - url: '/device_api/device/profileInfo/id/' + id, - method: 'get' - }), - list: (profileInfo) => request({ - url: '/device_api/device/profileInfo/list', - method: 'post', - data: profileInfo - }), - dictionary: () => request({ - url: '/device_api/device/profileInfo/dictionary', - method: 'get' - }) -}; - -export const profileApi = { - add: (profile) => request({ - url: '/device_api/device/profile/add', - method: 'post', - data: profile - }), - delete: (id) => request({ - url: '/device_api/device/profile/delete/' + id, - method: 'post' - }), - update: (profile) => request({ - url: '/device_api/device/profile/update', - method: 'post', - data: profile - }), - selectById: (id) => request({ - url: '/device_api/device/profile/id/' + id, - method: 'get' - }), - list: (profile) => request({ - url: '/device_api/device/profile/list', - method: 'post', - data: profile - }), - dictionary: () => request({ - url: '/device_api/device/profile/dictionary', - method: 'get' - }) -}; - -export const groupApi = { - add: (group) => request({ - url: '/device_api/device/group/add', - method: 'post', - data: group - }), - delete: (id) => request({ - url: '/device_api/device/group/delete/' + id, - method: 'post' - }), - update: (group) => request({ - url: '/device_api/device/group/update', - method: 'post', - data: group - }), - selectById: (id) => request({ - url: '/device_api/device/group/id/' + id, - method: 'get' - }), - list: (group) => request({ - url: '/device_api/device/group/list', - method: 'post', - data: group - }), - dictionary: () => request({ - url: '/device_api/device/group/dictionary', - method: 'get' - }) -}; - -export const deviceApi = { - add: (device) => request({ - url: '/device_api/device/device/add', - method: 'post', - data: device - }), - delete: (id) => request({ - url: '/device_api/device/device/delete/' + id, - method: 'post' - }), - update: (device) => request({ - url: '/device_api/device/device/update', - method: 'post', - data: device - }), - selectById: (id) => request({ - url: '/device_api/device/device/id/' + id, - method: 'get' - }), - selectByCode: (code) => request({ - url: '/device_api/device/device/code/' + code, - method: 'get' - }), - selectByGroupAndName: (groupId, name) => request({ - url: '/device_api/device/device/group/' + groupId + '/name/' + name, - method: 'get' - }), - list: (device) => request({ - url: '/device_api/device/device/list', - method: 'post', - data: device - }), - dictionary: () => request({ - url: '/device_api/device/device/dictionary', - method: 'get' - }) -}; - -export const pointApi = { - add: (point) => request({ - url: '/device_api/device/point/add', - method: 'post', - data: point - }), - delete: (id) => request({ - url: '/device_api/device/point/delete/' + id, - method: 'post' - }), - update: (point) => request({ - url: '/device_api/device/point/update', - method: 'post', - data: point - }), - selectById: (id) => request({ - url: '/device_api/device/point/id/' + id, - method: 'get' - }), - list: (point) => request({ - url: '/device_api/device/point/list', - method: 'post', - data: point - }), - dictionary: () => request({ - url: '/device_api/device/point/dictionary', - method: 'get' - }) -}; - -export const pointInfoApi = { - add: (pointInfo) => request({ - url: '/device_api/device/pointInfo/add', - method: 'post', - data: pointInfo - }), - delete: (id) => request({ - url: '/device_api/device/pointInfo/delete/' + id, - method: 'post' - }), - update: (pointInfo) => request({ - url: '/device_api/device/pointInfo/update', - method: 'post', - data: pointInfo - }), - selectById: (id) => request({ - url: '/device_api/device/pointInfo/id/' + id, - method: 'get' - }), - list: (pointInfo) => request({ - url: '/device_api/device/pointInfo/list', - method: 'post', - data: pointInfo - }), - dictionary: () => request({ - url: '/device_api/device/pointInfo/dictionary', - method: 'get' - }) -}; diff --git a/src/api/manager.js b/src/api/manager.js new file mode 100644 index 0000000..abe7aaa --- /dev/null +++ b/src/api/manager.js @@ -0,0 +1,191 @@ +import request from '@/config/axios' + +export const driverApi = { + delete: (id) => request({ + url: '/device_api/manager/driver/delete/' + id, + method: 'post' + }), + list: (driver) => request({ + url: '/device_api/manager/driver/list', + method: 'post', + data: driver + }), + dictionary: () => request({ + url: '/device_api/manager/driver/dictionary', + method: 'get' + }) +}; + +export const connectInfoApi = { + add: (connectInfo) => request({ + url: '/device_api/manager/connectInfo/add', + method: 'post', + data: connectInfo + }), + delete: (id) => request({ + url: '/device_api/manager/connectInfo/delete/' + id, + method: 'post' + }), + update: (connectInfo) => request({ + url: '/device_api/manager/connectInfo/update', + method: 'post', + data: connectInfo + }), + list: (connectInfo) => request({ + url: '/device_api/manager/connectInfo/list', + method: 'post', + data: connectInfo + }) +}; + +export const profileInfoApi = { + add: (profileInfo) => request({ + url: '/device_api/manager/profileInfo/add', + method: 'post', + data: profileInfo + }), + delete: (id) => request({ + url: '/device_api/manager/profileInfo/delete/' + id, + method: 'post' + }), + update: (profileInfo) => request({ + url: '/device_api/manager/profileInfo/update', + method: 'post', + data: profileInfo + }), + list: (profileInfo) => request({ + url: '/device_api/manager/profileInfo/list', + method: 'post', + data: profileInfo + }), + dictionary: () => request({ + url: '/device_api/manager/profileInfo/dictionary', + method: 'get' + }) +}; + +export const profileApi = { + add: (profile) => request({ + url: '/device_api/manager/profile/add', + method: 'post', + data: profile + }), + delete: (id) => request({ + url: '/device_api/manager/profile/delete/' + id, + method: 'post' + }), + update: (profile) => request({ + url: '/device_api/manager/profile/update', + method: 'post', + data: profile + }), + list: (profile) => request({ + url: '/device_api/manager/profile/list', + method: 'post', + data: profile + }), + dictionary: () => request({ + url: '/device_api/manager/profile/dictionary', + method: 'get' + }) +}; + +export const groupApi = { + add: (group) => request({ + url: '/device_api/manager/group/add', + method: 'post', + data: group + }), + delete: (id) => request({ + url: '/device_api/manager/group/delete/' + id, + method: 'post' + }), + update: (group) => request({ + url: '/device_api/manager/group/update', + method: 'post', + data: group + }), + list: (group) => request({ + url: '/device_api/manager/group/list', + method: 'post', + data: group + }), + dictionary: () => request({ + url: '/device_api/manager/group/dictionary', + method: 'get' + }) +}; + +export const deviceApi = { + add: (device) => request({ + url: '/device_api/manager/device/add', + method: 'post', + data: device + }), + delete: (id) => request({ + url: '/device_api/manager/device/delete/' + id, + method: 'post' + }), + update: (device) => request({ + url: '/device_api/manager/device/update', + method: 'post', + data: device + }), + list: (device) => request({ + url: '/device_api/manager/device/list', + method: 'post', + data: device + }), + dictionary: () => request({ + url: '/device_api/manager/device/dictionary', + method: 'get' + }) +}; + +export const pointApi = { + add: (point) => request({ + url: '/device_api/manager/point/add', + method: 'post', + data: point + }), + delete: (id) => request({ + url: '/device_api/manager/point/delete/' + id, + method: 'post' + }), + update: (point) => request({ + url: '/device_api/manager/point/update', + method: 'post', + data: point + }), + list: (point) => request({ + url: '/device_api/manager/point/list', + method: 'post', + data: point + }), + dictionary: () => request({ + url: '/device_api/manager/point/dictionary', + method: 'get' + }) +}; + +export const pointInfoApi = { + add: (pointInfo) => request({ + url: '/device_api/manager/pointInfo/add', + method: 'post', + data: pointInfo + }), + delete: (id) => request({ + url: '/device_api/manager/pointInfo/delete/' + id, + method: 'post' + }), + update: (pointInfo) => request({ + url: '/device_api/manager/pointInfo/update', + method: 'post', + data: pointInfo + }), + list: (pointInfo) => request({ + url: '/device_api/manager/pointInfo/list', + method: 'post', + data: pointInfo + }) +}; diff --git a/src/views/attribute/Attribute.vue b/src/views/attribute/Attribute.vue index 9e6e74b..49a8525 100644 --- a/src/views/attribute/Attribute.vue +++ b/src/views/attribute/Attribute.vue @@ -23,7 +23,7 @@