diff --git a/src/api/project.js b/src/api/project.js new file mode 100644 index 000000000..bdfcbd098 --- /dev/null +++ b/src/api/project.js @@ -0,0 +1,63 @@ +import request from '@/utils/request'; + +/** 新建项目设备*/ +export function createDevice(data) { + return request({ + url: `/api/project/device`, + method: 'post', + data: data + }); +} +/** 项目设备编码是否已存在 */ +export function deviceIsExist(projectCode, code) { + return request({ + url: `/api/project/device/exist/${projectCode}/${code}`, + method: 'get' + }); +} +/** 分页查询项目设备 */ +export function getProjectDeviceList(params) { + return request({ + url: `/api/project/device/paging`, + method: 'get', + params:params + }); +} +/** 删除项目设备 */ +export function deleteProjectDevice(id) { + return request({ + url: `/api/project/device/${id}`, + method: 'delete' + }); +} +/** 获取设备详情 */ +export function getDeviceDetail(id) { + return request({ + url: `/api/project/device/${id}`, + method: 'get' + }); +} +/** 添加/修改屏蔽门设备网关映射配置 */ +export function setPsdConfig(id, data) { + return request({ + url: `/api/project/device/${id}/config/psd`, + method: 'put', + data: data + }); +} +/** 添加/修改信号机设备网关映射配置 */ +export function setSignalConfig(id, data) { + return request({ + url: `/api/project/device/${id}/config/signal`, + method: 'put', + data: data + }); +} +/** 添加/修改信号机设备网关映射配置 */ +export function setSwitchConfig(id, data) { + return request({ + url: `/api/project/device/${id}/config/switch`, + method: 'put', + data: data + }); +} diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js index 0ca93382f..4d3e0655b 100644 --- a/src/i18n/langs/en/router.js +++ b/src/i18n/langs/en/router.js @@ -71,5 +71,6 @@ export default { subsystemGeneration: 'Subsystem generation', newsBulletin: 'New bulletin', commandDictionary: 'Command dictionary', - configLine: 'Line management' + configLine: 'Line management', + deviceManage: 'Device management' }; diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js index a1e74a379..5438cb8c8 100644 --- a/src/i18n/langs/zh/router.js +++ b/src/i18n/langs/zh/router.js @@ -72,5 +72,6 @@ export default { subsystemGeneration: '子系统生成', newsBulletin: '消息公告', commandDictionary: '指令字典', - configLine: '线路管理' + configLine: '线路管理', + deviceManage: '设备管理' }; diff --git a/src/router/index.js b/src/router/index.js index 15558845c..1d4d6e3ae 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -104,6 +104,7 @@ const UserRulesDetail = () => import('@/views/orderauthor/rules/detail'); const LessonApproval = () => import('@/views/approval/lesson/index'); const ScriptApproval = () => import('@/views/approval/script/index'); const RunPlanApproval = () => import('@/views/approval/runPlan/index'); +const DeviceManage = () => import('@/views/system/deviceManage/index'); import { loginInfo } from '@/scripts/ConstDic'; import { getSessionStorage } from '@/utils/auth'; @@ -838,6 +839,13 @@ export const asyncRouter = [ meta: { i18n: 'router.configLine' } + }, + { + path: 'deviceManage', + component: DeviceManage, + meta: { + i18n: 'router.deviceManage' + } } ] }, diff --git a/src/views/system/deviceManage/add.vue b/src/views/system/deviceManage/add.vue new file mode 100644 index 000000000..b94e6edf2 --- /dev/null +++ b/src/views/system/deviceManage/add.vue @@ -0,0 +1,108 @@ + + + diff --git a/src/views/system/deviceManage/editConfig.vue b/src/views/system/deviceManage/editConfig.vue new file mode 100644 index 000000000..58dbc9b57 --- /dev/null +++ b/src/views/system/deviceManage/editConfig.vue @@ -0,0 +1,397 @@ + + + diff --git a/src/views/system/deviceManage/index.vue b/src/views/system/deviceManage/index.vue new file mode 100644 index 000000000..24aa7c4d2 --- /dev/null +++ b/src/views/system/deviceManage/index.vue @@ -0,0 +1,176 @@ + + +