diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index debeba6..96c445e 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -64,3 +64,18 @@ }) } +// 获取设备类型 +export function getDeviceTypeList() { + return request({ + url: 'baseDeviceType/list-type', + method: 'post', + }) +} + +// 获取设备型号 +export function getDeviceModelList(deviceType: string) { + return request({ + url: `baseDeviceModels/model?deviceType=${deviceType}`, + method: 'get', + }) +} diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index debeba6..96c445e 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -64,3 +64,18 @@ }) } +// 获取设备类型 +export function getDeviceTypeList() { + return request({ + url: 'baseDeviceType/list-type', + method: 'post', + }) +} + +// 获取设备型号 +export function getDeviceModelList(deviceType: string) { + return request({ + url: `baseDeviceModels/model?deviceType=${deviceType}`, + method: 'get', + }) +} diff --git a/src/api/basic/locate.ts b/src/api/basic/locate.ts index b0fd7c3..6aa3722 100644 --- a/src/api/basic/locate.ts +++ b/src/api/basic/locate.ts @@ -10,6 +10,15 @@ }) } +// 查询点位列表 分页 +export function getLocateListSelect(data: any) { + return request({ + url: `${prefix}/selectList`, + method: 'post', + data, + }) +} + // 导出 export function exportLocate(data: object) { return request({ @@ -20,17 +29,8 @@ }) } -// 查询产品详情 -export function detailProduct(data: object) { - return request({ - url: `${prefix}/detail`, - method: 'post', - data, - }) -} - // 添加产品 -export function addProduct(data: object) { +export function addLocate(data: object) { return request({ url: `${prefix}/add`, method: 'post', @@ -38,7 +38,7 @@ }) } // 修改产品 -export function updateProduct(data: object) { +export function updateLocate(data: object) { return request({ url: `${prefix}/update`, method: 'post', diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index debeba6..96c445e 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -64,3 +64,18 @@ }) } +// 获取设备类型 +export function getDeviceTypeList() { + return request({ + url: 'baseDeviceType/list-type', + method: 'post', + }) +} + +// 获取设备型号 +export function getDeviceModelList(deviceType: string) { + return request({ + url: `baseDeviceModels/model?deviceType=${deviceType}`, + method: 'get', + }) +} diff --git a/src/api/basic/locate.ts b/src/api/basic/locate.ts index b0fd7c3..6aa3722 100644 --- a/src/api/basic/locate.ts +++ b/src/api/basic/locate.ts @@ -10,6 +10,15 @@ }) } +// 查询点位列表 分页 +export function getLocateListSelect(data: any) { + return request({ + url: `${prefix}/selectList`, + method: 'post', + data, + }) +} + // 导出 export function exportLocate(data: object) { return request({ @@ -20,17 +29,8 @@ }) } -// 查询产品详情 -export function detailProduct(data: object) { - return request({ - url: `${prefix}/detail`, - method: 'post', - data, - }) -} - // 添加产品 -export function addProduct(data: object) { +export function addLocate(data: object) { return request({ url: `${prefix}/add`, method: 'post', @@ -38,7 +38,7 @@ }) } // 修改产品 -export function updateProduct(data: object) { +export function updateLocate(data: object) { return request({ url: `${prefix}/update`, method: 'post', diff --git a/src/router/modules/leak.ts b/src/router/modules/leak.ts index 8b203ea..54710b4 100644 --- a/src/router/modules/leak.ts +++ b/src/router/modules/leak.ts @@ -40,7 +40,7 @@ { path: 'pair', name: 'LocatePaier', - component: () => import('@/views/basic/group/list.vue'), + component: () => import('@/views/basic/locate/list.vue'), meta: { title: '点位关联管理', auth: '/basic/locate/pair', @@ -65,7 +65,7 @@ { path: 'list', name: 'LeakAlarmList', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '当前报警', auth: '/leak/alarm/list', @@ -77,7 +77,7 @@ { path: 'history', name: 'LeakAlarmHistory', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '报警记录', auth: '/leak/alarm/history', @@ -89,7 +89,7 @@ { path: 'config', name: 'LeakAlarmConfig', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '报警规则配置', auth: '/leak/alarm/config', @@ -171,17 +171,6 @@ activeMenu: '/data/query', }, }, - /* { - path: 'detail/:id?', - name: 'GroupInfoDetail', - component: () => import('@/views/basic/group/detail.vue'), - meta: { - title: '分组详情', - sidebar: false, - breadcrumb: true, - activeMenu: '/basic/group', - }, - }, */ ], }, ] diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index debeba6..96c445e 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -64,3 +64,18 @@ }) } +// 获取设备类型 +export function getDeviceTypeList() { + return request({ + url: 'baseDeviceType/list-type', + method: 'post', + }) +} + +// 获取设备型号 +export function getDeviceModelList(deviceType: string) { + return request({ + url: `baseDeviceModels/model?deviceType=${deviceType}`, + method: 'get', + }) +} diff --git a/src/api/basic/locate.ts b/src/api/basic/locate.ts index b0fd7c3..6aa3722 100644 --- a/src/api/basic/locate.ts +++ b/src/api/basic/locate.ts @@ -10,6 +10,15 @@ }) } +// 查询点位列表 分页 +export function getLocateListSelect(data: any) { + return request({ + url: `${prefix}/selectList`, + method: 'post', + data, + }) +} + // 导出 export function exportLocate(data: object) { return request({ @@ -20,17 +29,8 @@ }) } -// 查询产品详情 -export function detailProduct(data: object) { - return request({ - url: `${prefix}/detail`, - method: 'post', - data, - }) -} - // 添加产品 -export function addProduct(data: object) { +export function addLocate(data: object) { return request({ url: `${prefix}/add`, method: 'post', @@ -38,7 +38,7 @@ }) } // 修改产品 -export function updateProduct(data: object) { +export function updateLocate(data: object) { return request({ url: `${prefix}/update`, method: 'post', diff --git a/src/router/modules/leak.ts b/src/router/modules/leak.ts index 8b203ea..54710b4 100644 --- a/src/router/modules/leak.ts +++ b/src/router/modules/leak.ts @@ -40,7 +40,7 @@ { path: 'pair', name: 'LocatePaier', - component: () => import('@/views/basic/group/list.vue'), + component: () => import('@/views/basic/locate/list.vue'), meta: { title: '点位关联管理', auth: '/basic/locate/pair', @@ -65,7 +65,7 @@ { path: 'list', name: 'LeakAlarmList', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '当前报警', auth: '/leak/alarm/list', @@ -77,7 +77,7 @@ { path: 'history', name: 'LeakAlarmHistory', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '报警记录', auth: '/leak/alarm/history', @@ -89,7 +89,7 @@ { path: 'config', name: 'LeakAlarmConfig', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '报警规则配置', auth: '/leak/alarm/config', @@ -171,17 +171,6 @@ activeMenu: '/data/query', }, }, - /* { - path: 'detail/:id?', - name: 'GroupInfoDetail', - component: () => import('@/views/basic/group/detail.vue'), - meta: { - title: '分组详情', - sidebar: false, - breadcrumb: true, - activeMenu: '/basic/group', - }, - }, */ ], }, ] diff --git a/src/views/basic/common-interface.ts b/src/views/basic/common-interface.ts index 714fb31..0e16ce7 100644 --- a/src/views/basic/common-interface.ts +++ b/src/views/basic/common-interface.ts @@ -4,3 +4,14 @@ id: string value: string } + +// 验证手机 +export const phoneValidator = (rule: any, value: any, callback: any) => { + const reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ + if (reg.test(value.trim()) === true || value.trim() === '') { + callback() + } + else { + callback(new Error('手机号验证失败')) + } +} diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index debeba6..96c445e 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -64,3 +64,18 @@ }) } +// 获取设备类型 +export function getDeviceTypeList() { + return request({ + url: 'baseDeviceType/list-type', + method: 'post', + }) +} + +// 获取设备型号 +export function getDeviceModelList(deviceType: string) { + return request({ + url: `baseDeviceModels/model?deviceType=${deviceType}`, + method: 'get', + }) +} diff --git a/src/api/basic/locate.ts b/src/api/basic/locate.ts index b0fd7c3..6aa3722 100644 --- a/src/api/basic/locate.ts +++ b/src/api/basic/locate.ts @@ -10,6 +10,15 @@ }) } +// 查询点位列表 分页 +export function getLocateListSelect(data: any) { + return request({ + url: `${prefix}/selectList`, + method: 'post', + data, + }) +} + // 导出 export function exportLocate(data: object) { return request({ @@ -20,17 +29,8 @@ }) } -// 查询产品详情 -export function detailProduct(data: object) { - return request({ - url: `${prefix}/detail`, - method: 'post', - data, - }) -} - // 添加产品 -export function addProduct(data: object) { +export function addLocate(data: object) { return request({ url: `${prefix}/add`, method: 'post', @@ -38,7 +38,7 @@ }) } // 修改产品 -export function updateProduct(data: object) { +export function updateLocate(data: object) { return request({ url: `${prefix}/update`, method: 'post', diff --git a/src/router/modules/leak.ts b/src/router/modules/leak.ts index 8b203ea..54710b4 100644 --- a/src/router/modules/leak.ts +++ b/src/router/modules/leak.ts @@ -40,7 +40,7 @@ { path: 'pair', name: 'LocatePaier', - component: () => import('@/views/basic/group/list.vue'), + component: () => import('@/views/basic/locate/list.vue'), meta: { title: '点位关联管理', auth: '/basic/locate/pair', @@ -65,7 +65,7 @@ { path: 'list', name: 'LeakAlarmList', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '当前报警', auth: '/leak/alarm/list', @@ -77,7 +77,7 @@ { path: 'history', name: 'LeakAlarmHistory', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '报警记录', auth: '/leak/alarm/history', @@ -89,7 +89,7 @@ { path: 'config', name: 'LeakAlarmConfig', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '报警规则配置', auth: '/leak/alarm/config', @@ -171,17 +171,6 @@ activeMenu: '/data/query', }, }, - /* { - path: 'detail/:id?', - name: 'GroupInfoDetail', - component: () => import('@/views/basic/group/detail.vue'), - meta: { - title: '分组详情', - sidebar: false, - breadcrumb: true, - activeMenu: '/basic/group', - }, - }, */ ], }, ] diff --git a/src/views/basic/common-interface.ts b/src/views/basic/common-interface.ts index 714fb31..0e16ce7 100644 --- a/src/views/basic/common-interface.ts +++ b/src/views/basic/common-interface.ts @@ -4,3 +4,14 @@ id: string value: string } + +// 验证手机 +export const phoneValidator = (rule: any, value: any, callback: any) => { + const reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ + if (reg.test(value.trim()) === true || value.trim() === '') { + callback() + } + else { + callback(new Error('手机号验证失败')) + } +} diff --git a/src/views/basic/device/addDeviceDialog.vue b/src/views/basic/device/addDeviceDialog.vue new file mode 100644 index 0000000..49801f7 --- /dev/null +++ b/src/views/basic/device/addDeviceDialog.vue @@ -0,0 +1,265 @@ + + + + diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index debeba6..96c445e 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -64,3 +64,18 @@ }) } +// 获取设备类型 +export function getDeviceTypeList() { + return request({ + url: 'baseDeviceType/list-type', + method: 'post', + }) +} + +// 获取设备型号 +export function getDeviceModelList(deviceType: string) { + return request({ + url: `baseDeviceModels/model?deviceType=${deviceType}`, + method: 'get', + }) +} diff --git a/src/api/basic/locate.ts b/src/api/basic/locate.ts index b0fd7c3..6aa3722 100644 --- a/src/api/basic/locate.ts +++ b/src/api/basic/locate.ts @@ -10,6 +10,15 @@ }) } +// 查询点位列表 分页 +export function getLocateListSelect(data: any) { + return request({ + url: `${prefix}/selectList`, + method: 'post', + data, + }) +} + // 导出 export function exportLocate(data: object) { return request({ @@ -20,17 +29,8 @@ }) } -// 查询产品详情 -export function detailProduct(data: object) { - return request({ - url: `${prefix}/detail`, - method: 'post', - data, - }) -} - // 添加产品 -export function addProduct(data: object) { +export function addLocate(data: object) { return request({ url: `${prefix}/add`, method: 'post', @@ -38,7 +38,7 @@ }) } // 修改产品 -export function updateProduct(data: object) { +export function updateLocate(data: object) { return request({ url: `${prefix}/update`, method: 'post', diff --git a/src/router/modules/leak.ts b/src/router/modules/leak.ts index 8b203ea..54710b4 100644 --- a/src/router/modules/leak.ts +++ b/src/router/modules/leak.ts @@ -40,7 +40,7 @@ { path: 'pair', name: 'LocatePaier', - component: () => import('@/views/basic/group/list.vue'), + component: () => import('@/views/basic/locate/list.vue'), meta: { title: '点位关联管理', auth: '/basic/locate/pair', @@ -65,7 +65,7 @@ { path: 'list', name: 'LeakAlarmList', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '当前报警', auth: '/leak/alarm/list', @@ -77,7 +77,7 @@ { path: 'history', name: 'LeakAlarmHistory', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '报警记录', auth: '/leak/alarm/history', @@ -89,7 +89,7 @@ { path: 'config', name: 'LeakAlarmConfig', - component: () => import('@/views/basic/product/list.vue'), + component: () => import('@/views/basic/device/list.vue'), meta: { title: '报警规则配置', auth: '/leak/alarm/config', @@ -171,17 +171,6 @@ activeMenu: '/data/query', }, }, - /* { - path: 'detail/:id?', - name: 'GroupInfoDetail', - component: () => import('@/views/basic/group/detail.vue'), - meta: { - title: '分组详情', - sidebar: false, - breadcrumb: true, - activeMenu: '/basic/group', - }, - }, */ ], }, ] diff --git a/src/views/basic/common-interface.ts b/src/views/basic/common-interface.ts index 714fb31..0e16ce7 100644 --- a/src/views/basic/common-interface.ts +++ b/src/views/basic/common-interface.ts @@ -4,3 +4,14 @@ id: string value: string } + +// 验证手机 +export const phoneValidator = (rule: any, value: any, callback: any) => { + const reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ + if (reg.test(value.trim()) === true || value.trim() === '') { + callback() + } + else { + callback(new Error('手机号验证失败')) + } +} diff --git a/src/views/basic/device/addDeviceDialog.vue b/src/views/basic/device/addDeviceDialog.vue new file mode 100644 index 0000000..49801f7 --- /dev/null +++ b/src/views/basic/device/addDeviceDialog.vue @@ -0,0 +1,265 @@ + + + + diff --git a/src/views/basic/device/detail.vue b/src/views/basic/device/detail.vue index 3a9582a..348afd6 100644 --- a/src/views/basic/device/detail.vue +++ b/src/views/basic/device/detail.vue @@ -26,19 +26,12 @@ deviceName: '', deviceType: '', deviceTypeName: '', - status: '', - statusName: '', - cell: '', - imei: '', - iccid: '', - model: '', + onlineState: '', + onlineStateName: '', + watchType: '', + wellCode: '', + version: '', modelName: '', - encipherType: '', - encipherTypeName: '', - createTime: '', - createUserId: '', - createUserName: '', - dataValue: '', }) const dataQuery = ref({ @@ -174,6 +167,10 @@ {{ deviceInfo.devcode }} + + + {{ deviceInfo.wellCode }} + @@ -181,6 +178,10 @@ {{ deviceInfo.modelName }} + + + {{ deviceInfo.watchType }} + @@ -230,7 +231,7 @@ diff --git a/src/views/basic/locate/locate-info.ts b/src/views/basic/locate/locate-info.ts index 54c86f1..4eb4217 100644 --- a/src/views/basic/locate/locate-info.ts +++ b/src/views/basic/locate/locate-info.ts @@ -32,7 +32,7 @@ responsibleDeptName?: string staff?: string tel?: string - ts: string + ts?: string } export interface IConfigListQuery {