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/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/device/device-info.ts b/src/views/basic/device/device-info.ts
index 0ba2135..044b3b4 100644
--- a/src/views/basic/device/device-info.ts
+++ b/src/views/basic/device/device-info.ts
@@ -15,20 +15,23 @@
deviceName?: string
deviceType: string
deviceTypeName?: string
- status?: string
- statusName?: string
+ onlineState?: string
+ onlineStateName?: string
+ watchType: string
+ communication?: string
+ wellId?: string
+ wellCode?: string
+ deptid?: string
+ deptName?: string
+ position?: string
cell?: string
- imei: string
- iccid: string
- model: string
+ imei?: string
+ iccid?: string
+ version: string
modelName?: string
- encipherType: string
- encipherTypeName?: string
installDate?: string
- createTime: string
- createUserId: string
- createUserName?: string
- dataValue?: string
+ latestData?: string
+ latestTime?: string
}
export interface IConfigListQuery {
@@ -42,3 +45,9 @@
sort?: string
order?: string
}
+
+export interface IDeviceType {
+ name: string
+ value: string
+ deviceType?: string
+}
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/device/device-info.ts b/src/views/basic/device/device-info.ts
index 0ba2135..044b3b4 100644
--- a/src/views/basic/device/device-info.ts
+++ b/src/views/basic/device/device-info.ts
@@ -15,20 +15,23 @@
deviceName?: string
deviceType: string
deviceTypeName?: string
- status?: string
- statusName?: string
+ onlineState?: string
+ onlineStateName?: string
+ watchType: string
+ communication?: string
+ wellId?: string
+ wellCode?: string
+ deptid?: string
+ deptName?: string
+ position?: string
cell?: string
- imei: string
- iccid: string
- model: string
+ imei?: string
+ iccid?: string
+ version: string
modelName?: string
- encipherType: string
- encipherTypeName?: string
installDate?: string
- createTime: string
- createUserId: string
- createUserName?: string
- dataValue?: string
+ latestData?: string
+ latestTime?: string
}
export interface IConfigListQuery {
@@ -42,3 +45,9 @@
sort?: string
order?: string
}
+
+export interface IDeviceType {
+ name: string
+ value: string
+ deviceType?: string
+}
diff --git a/src/views/basic/device/list.vue b/src/views/basic/device/list.vue
index 9a98a52..9f2e438 100644
--- a/src/views/basic/device/list.vue
+++ b/src/views/basic/device/list.vue
@@ -2,11 +2,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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/device/device-info.ts b/src/views/basic/device/device-info.ts
index 0ba2135..044b3b4 100644
--- a/src/views/basic/device/device-info.ts
+++ b/src/views/basic/device/device-info.ts
@@ -15,20 +15,23 @@
deviceName?: string
deviceType: string
deviceTypeName?: string
- status?: string
- statusName?: string
+ onlineState?: string
+ onlineStateName?: string
+ watchType: string
+ communication?: string
+ wellId?: string
+ wellCode?: string
+ deptid?: string
+ deptName?: string
+ position?: string
cell?: string
- imei: string
- iccid: string
- model: string
+ imei?: string
+ iccid?: string
+ version: string
modelName?: string
- encipherType: string
- encipherTypeName?: string
installDate?: string
- createTime: string
- createUserId: string
- createUserName?: string
- dataValue?: string
+ latestData?: string
+ latestTime?: string
}
export interface IConfigListQuery {
@@ -42,3 +45,9 @@
sort?: string
order?: string
}
+
+export interface IDeviceType {
+ name: string
+ value: string
+ deviceType?: string
+}
diff --git a/src/views/basic/device/list.vue b/src/views/basic/device/list.vue
index 9a98a52..9f2e438 100644
--- a/src/views/basic/device/list.vue
+++ b/src/views/basic/device/list.vue
@@ -2,11 +2,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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/device/device-info.ts b/src/views/basic/device/device-info.ts
index 0ba2135..044b3b4 100644
--- a/src/views/basic/device/device-info.ts
+++ b/src/views/basic/device/device-info.ts
@@ -15,20 +15,23 @@
deviceName?: string
deviceType: string
deviceTypeName?: string
- status?: string
- statusName?: string
+ onlineState?: string
+ onlineStateName?: string
+ watchType: string
+ communication?: string
+ wellId?: string
+ wellCode?: string
+ deptid?: string
+ deptName?: string
+ position?: string
cell?: string
- imei: string
- iccid: string
- model: string
+ imei?: string
+ iccid?: string
+ version: string
modelName?: string
- encipherType: string
- encipherTypeName?: string
installDate?: string
- createTime: string
- createUserId: string
- createUserName?: string
- dataValue?: string
+ latestData?: string
+ latestTime?: string
}
export interface IConfigListQuery {
@@ -42,3 +45,9 @@
sort?: string
order?: string
}
+
+export interface IDeviceType {
+ name: string
+ value: string
+ deviceType?: string
+}
diff --git a/src/views/basic/device/list.vue b/src/views/basic/device/list.vue
index 9a98a52..9f2e438 100644
--- a/src/views/basic/device/list.vue
+++ b/src/views/basic/device/list.vue
@@ -2,11 +2,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/basic/locate/list.vue b/src/views/basic/locate/list.vue
index 01b0f3f..1eb9c37 100644
--- a/src/views/basic/locate/list.vue
+++ b/src/views/basic/locate/list.vue
@@ -3,6 +3,7 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import type { IDictType } from '../common-interface'
import type { IListQuery, ILocateInfo } from './locate-info'
+import AddLocateDialog from './addLocateDialog.vue'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
@@ -22,20 +23,21 @@
// 表头
const columns = ref([
- { text: '点位编号', value: 'wellCode', align: 'center', width: '160' },
- { text: '点位名称', value: 'wellName', align: 'center', width: '160' },
+ { text: '点位编号', value: 'wellCode', align: 'center', width: '200' },
+ { text: '点位名称', value: 'wellName', align: 'center', width: '200' },
{ text: '点位类型', value: 'wellTypeName', align: 'center', width: '100' },
{ text: '具体位置', value: 'position', align: 'center' },
{ text: '责任部门', value: 'responsibleDeptName', align: 'center', width: '160' },
{ text: '责任人', value: 'staff', align: 'center', width: '160' },
{ text: '联系电话', value: 'tel', align: 'center', width: '160' },
- { text: '布防状态', value: 'bfztName', align: 'center', width: '160' },
-
+ { text: '布防状态', value: 'bfztName', align: 'center', width: '120' },
])
const dataList = ref>([]) // 表格数据
const bfztDict = ref>([])
-const deviceTypeDict = ref>([])
+const locateTypeDict = ref>([])
+
+const addLocateRef = ref()
// 逻辑
// 导出所有
@@ -128,6 +130,17 @@
fetchData(true)
}
+// 新增
+const addLocateHandler = () => {
+ addLocateRef.value.initDialog({ type: 'create' })
+}
+
+// 编辑
+const updateById = (row: ILocateInfo) => {
+ sessionStorage.setItem('locateInfo', JSON.stringify(row))
+ addLocateRef.value.initDialog({ type: 'update' })
+}
+
// 删除
const deleteById = (row: ILocateInfo) => {
ElMessageBox.confirm(`是否删除点位 ${row.wellName}`, '提示', {
@@ -148,10 +161,10 @@
}
const getLocateTypeDict = async () => {
- getDictByCode('deviceType').then((res: any) => {
+ getDictByCode('sluicewellType').then((res: any) => {
if (res.code === 200) {
- deviceTypeDict.value = res.data
- sessionStorage.setItem('deviceType', JSON.stringify(deviceTypeDict.value))
+ locateTypeDict.value = res.data
+ sessionStorage.setItem('locateType', JSON.stringify(locateTypeDict.value))
}
})
}
@@ -194,6 +207,10 @@
导出列表
+
+
+ 新增
+
@@ -216,7 +233,7 @@
查看
-
+
编辑
@@ -227,5 +244,7 @@
+
+
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/device/device-info.ts b/src/views/basic/device/device-info.ts
index 0ba2135..044b3b4 100644
--- a/src/views/basic/device/device-info.ts
+++ b/src/views/basic/device/device-info.ts
@@ -15,20 +15,23 @@
deviceName?: string
deviceType: string
deviceTypeName?: string
- status?: string
- statusName?: string
+ onlineState?: string
+ onlineStateName?: string
+ watchType: string
+ communication?: string
+ wellId?: string
+ wellCode?: string
+ deptid?: string
+ deptName?: string
+ position?: string
cell?: string
- imei: string
- iccid: string
- model: string
+ imei?: string
+ iccid?: string
+ version: string
modelName?: string
- encipherType: string
- encipherTypeName?: string
installDate?: string
- createTime: string
- createUserId: string
- createUserName?: string
- dataValue?: string
+ latestData?: string
+ latestTime?: string
}
export interface IConfigListQuery {
@@ -42,3 +45,9 @@
sort?: string
order?: string
}
+
+export interface IDeviceType {
+ name: string
+ value: string
+ deviceType?: string
+}
diff --git a/src/views/basic/device/list.vue b/src/views/basic/device/list.vue
index 9a98a52..9f2e438 100644
--- a/src/views/basic/device/list.vue
+++ b/src/views/basic/device/list.vue
@@ -2,11 +2,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/basic/locate/list.vue b/src/views/basic/locate/list.vue
index 01b0f3f..1eb9c37 100644
--- a/src/views/basic/locate/list.vue
+++ b/src/views/basic/locate/list.vue
@@ -3,6 +3,7 @@
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import type { IDictType } from '../common-interface'
import type { IListQuery, ILocateInfo } from './locate-info'
+import AddLocateDialog from './addLocateDialog.vue'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getDictByCode } from '@/api/system/dict'
import { exportFile } from '@/utils/exportUtils'
@@ -22,20 +23,21 @@
// 表头
const columns = ref([
- { text: '点位编号', value: 'wellCode', align: 'center', width: '160' },
- { text: '点位名称', value: 'wellName', align: 'center', width: '160' },
+ { text: '点位编号', value: 'wellCode', align: 'center', width: '200' },
+ { text: '点位名称', value: 'wellName', align: 'center', width: '200' },
{ text: '点位类型', value: 'wellTypeName', align: 'center', width: '100' },
{ text: '具体位置', value: 'position', align: 'center' },
{ text: '责任部门', value: 'responsibleDeptName', align: 'center', width: '160' },
{ text: '责任人', value: 'staff', align: 'center', width: '160' },
{ text: '联系电话', value: 'tel', align: 'center', width: '160' },
- { text: '布防状态', value: 'bfztName', align: 'center', width: '160' },
-
+ { text: '布防状态', value: 'bfztName', align: 'center', width: '120' },
])
const dataList = ref>([]) // 表格数据
const bfztDict = ref>([])
-const deviceTypeDict = ref>([])
+const locateTypeDict = ref>([])
+
+const addLocateRef = ref()
// 逻辑
// 导出所有
@@ -128,6 +130,17 @@
fetchData(true)
}
+// 新增
+const addLocateHandler = () => {
+ addLocateRef.value.initDialog({ type: 'create' })
+}
+
+// 编辑
+const updateById = (row: ILocateInfo) => {
+ sessionStorage.setItem('locateInfo', JSON.stringify(row))
+ addLocateRef.value.initDialog({ type: 'update' })
+}
+
// 删除
const deleteById = (row: ILocateInfo) => {
ElMessageBox.confirm(`是否删除点位 ${row.wellName}`, '提示', {
@@ -148,10 +161,10 @@
}
const getLocateTypeDict = async () => {
- getDictByCode('deviceType').then((res: any) => {
+ getDictByCode('sluicewellType').then((res: any) => {
if (res.code === 200) {
- deviceTypeDict.value = res.data
- sessionStorage.setItem('deviceType', JSON.stringify(deviceTypeDict.value))
+ locateTypeDict.value = res.data
+ sessionStorage.setItem('locateType', JSON.stringify(locateTypeDict.value))
}
})
}
@@ -194,6 +207,10 @@
导出列表
+
+
+ 新增
+
@@ -216,7 +233,7 @@
查看
-
+
编辑
@@ -227,5 +244,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 {