diff --git a/mock/index.js b/mock/index.js
index e13b51e..6646246 100644
--- a/mock/index.js
+++ b/mock/index.js
@@ -20,6 +20,7 @@
const tenantConfig = require('./systemConfig/tenantConfig')
const deptPermission = require('./systemConfig/deptPermission')
const tenant = require('./system/tenant')
+const warningRule = require('./warning/warningRule')
const mocks = [
...user,
@@ -40,7 +41,8 @@
...alarmContent,
...tenantConfig,
...deptPermission,
- ...tenant
+ ...tenant,
+ ...warningRule
]
// for front mock
diff --git a/mock/index.js b/mock/index.js
index e13b51e..6646246 100644
--- a/mock/index.js
+++ b/mock/index.js
@@ -20,6 +20,7 @@
const tenantConfig = require('./systemConfig/tenantConfig')
const deptPermission = require('./systemConfig/deptPermission')
const tenant = require('./system/tenant')
+const warningRule = require('./warning/warningRule')
const mocks = [
...user,
@@ -40,7 +41,8 @@
...alarmContent,
...tenantConfig,
...deptPermission,
- ...tenant
+ ...tenant,
+ ...warningRule
]
// for front mock
diff --git a/mock/system/user.js b/mock/system/user.js
index f3aaad6..9fd5637 100644
--- a/mock/system/user.js
+++ b/mock/system/user.js
@@ -98,6 +98,8 @@
{ 'code': 'device_type', 'icon': '', 'id': '1138694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备类型管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/type' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备型号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/model' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958338', 'ismenu': '1', 'levels': 1, 'name': '设备SIM卡号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/imei' },
+ { 'code': 'device', 'icon': 'icon-alarm', 'id': '1138378229630761985', 'ismenu': '1', 'levels': 1, 'name': '报警管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning' },
+ { 'code': 'concentrator_manage', 'icon': '', 'id': '1138693302442582017', 'ismenu': '1', 'levels': 1, 'name': '报警规则管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning/rule' },
{ 'code': 'well_add', 'icon': '', 'id': '1138614981481963521', 'ismenu': '1', 'levels': 2, 'name': '新增窨井', 'num': 0, 'parentId': '1138377674778685442', 'resourceType': '03', 'url': '/well/add' },
{ 'code': 'noisedataList', 'icon': '', 'id': '1301828354294067202', 'ismenu': '0', 'levels': 2, 'name': '噪声记录仪', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/noisedata/list' },
{ 'code': 'liquid_gas_data_list', 'icon': '', 'id': '1426002745902108673', 'ismenu': '0', 'levels': 2, 'name': '燃气一体化数据查询', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/liquidGasData/list' },
diff --git a/mock/index.js b/mock/index.js
index e13b51e..6646246 100644
--- a/mock/index.js
+++ b/mock/index.js
@@ -20,6 +20,7 @@
const tenantConfig = require('./systemConfig/tenantConfig')
const deptPermission = require('./systemConfig/deptPermission')
const tenant = require('./system/tenant')
+const warningRule = require('./warning/warningRule')
const mocks = [
...user,
@@ -40,7 +41,8 @@
...alarmContent,
...tenantConfig,
...deptPermission,
- ...tenant
+ ...tenant,
+ ...warningRule
]
// for front mock
diff --git a/mock/system/user.js b/mock/system/user.js
index f3aaad6..9fd5637 100644
--- a/mock/system/user.js
+++ b/mock/system/user.js
@@ -98,6 +98,8 @@
{ 'code': 'device_type', 'icon': '', 'id': '1138694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备类型管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/type' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备型号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/model' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958338', 'ismenu': '1', 'levels': 1, 'name': '设备SIM卡号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/imei' },
+ { 'code': 'device', 'icon': 'icon-alarm', 'id': '1138378229630761985', 'ismenu': '1', 'levels': 1, 'name': '报警管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning' },
+ { 'code': 'concentrator_manage', 'icon': '', 'id': '1138693302442582017', 'ismenu': '1', 'levels': 1, 'name': '报警规则管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning/rule' },
{ 'code': 'well_add', 'icon': '', 'id': '1138614981481963521', 'ismenu': '1', 'levels': 2, 'name': '新增窨井', 'num': 0, 'parentId': '1138377674778685442', 'resourceType': '03', 'url': '/well/add' },
{ 'code': 'noisedataList', 'icon': '', 'id': '1301828354294067202', 'ismenu': '0', 'levels': 2, 'name': '噪声记录仪', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/noisedata/list' },
{ 'code': 'liquid_gas_data_list', 'icon': '', 'id': '1426002745902108673', 'ismenu': '0', 'levels': 2, 'name': '燃气一体化数据查询', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/liquidGasData/list' },
diff --git a/mock/warning/warningRule.js b/mock/warning/warningRule.js
new file mode 100644
index 0000000..7706647
--- /dev/null
+++ b/mock/warning/warningRule.js
@@ -0,0 +1,40 @@
+const alarmRuleList = [
+ {
+ 'devCode': '4324324234',
+ 'highValue': '123',
+ 'lowValue': '10',
+ 'overTime': '2021/12/20 17:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '一级报警',
+ 'ts': '2021/12/20 13:23:13',
+ 'openAtor': '张三'
+ },
+ {
+ 'devCode': '1564324234',
+ 'highValue': '100',
+ 'lowValue': '20',
+ 'overTime': '2021/12/20 11:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '二级报警',
+ 'ts': '2021/12/20 10:23:13',
+ 'openAtor': '李四'
+ }
+
+]
+module.exports = [
+ // mock get all routes form server
+ {
+ url: '/alarmRule/list',
+ type: 'get',
+ response: _ => {
+ return {
+ code: 200,
+ data: alarmRuleList,
+ message: '请求成功',
+ success: true
+ }
+ }
+ }
+]
diff --git a/mock/index.js b/mock/index.js
index e13b51e..6646246 100644
--- a/mock/index.js
+++ b/mock/index.js
@@ -20,6 +20,7 @@
const tenantConfig = require('./systemConfig/tenantConfig')
const deptPermission = require('./systemConfig/deptPermission')
const tenant = require('./system/tenant')
+const warningRule = require('./warning/warningRule')
const mocks = [
...user,
@@ -40,7 +41,8 @@
...alarmContent,
...tenantConfig,
...deptPermission,
- ...tenant
+ ...tenant,
+ ...warningRule
]
// for front mock
diff --git a/mock/system/user.js b/mock/system/user.js
index f3aaad6..9fd5637 100644
--- a/mock/system/user.js
+++ b/mock/system/user.js
@@ -98,6 +98,8 @@
{ 'code': 'device_type', 'icon': '', 'id': '1138694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备类型管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/type' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备型号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/model' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958338', 'ismenu': '1', 'levels': 1, 'name': '设备SIM卡号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/imei' },
+ { 'code': 'device', 'icon': 'icon-alarm', 'id': '1138378229630761985', 'ismenu': '1', 'levels': 1, 'name': '报警管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning' },
+ { 'code': 'concentrator_manage', 'icon': '', 'id': '1138693302442582017', 'ismenu': '1', 'levels': 1, 'name': '报警规则管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning/rule' },
{ 'code': 'well_add', 'icon': '', 'id': '1138614981481963521', 'ismenu': '1', 'levels': 2, 'name': '新增窨井', 'num': 0, 'parentId': '1138377674778685442', 'resourceType': '03', 'url': '/well/add' },
{ 'code': 'noisedataList', 'icon': '', 'id': '1301828354294067202', 'ismenu': '0', 'levels': 2, 'name': '噪声记录仪', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/noisedata/list' },
{ 'code': 'liquid_gas_data_list', 'icon': '', 'id': '1426002745902108673', 'ismenu': '0', 'levels': 2, 'name': '燃气一体化数据查询', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/liquidGasData/list' },
diff --git a/mock/warning/warningRule.js b/mock/warning/warningRule.js
new file mode 100644
index 0000000..7706647
--- /dev/null
+++ b/mock/warning/warningRule.js
@@ -0,0 +1,40 @@
+const alarmRuleList = [
+ {
+ 'devCode': '4324324234',
+ 'highValue': '123',
+ 'lowValue': '10',
+ 'overTime': '2021/12/20 17:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '一级报警',
+ 'ts': '2021/12/20 13:23:13',
+ 'openAtor': '张三'
+ },
+ {
+ 'devCode': '1564324234',
+ 'highValue': '100',
+ 'lowValue': '20',
+ 'overTime': '2021/12/20 11:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '二级报警',
+ 'ts': '2021/12/20 10:23:13',
+ 'openAtor': '李四'
+ }
+
+]
+module.exports = [
+ // mock get all routes form server
+ {
+ url: '/alarmRule/list',
+ type: 'get',
+ response: _ => {
+ return {
+ code: 200,
+ data: alarmRuleList,
+ message: '请求成功',
+ success: true
+ }
+ }
+ }
+]
diff --git a/src/api/warning/warningRule.js b/src/api/warning/warningRule.js
new file mode 100644
index 0000000..c0b91b0
--- /dev/null
+++ b/src/api/warning/warningRule.js
@@ -0,0 +1,56 @@
+/*
+ * 报警规则管理配置接口
+*/
+import request from '@/utils/request'
+import qs from 'qs'
+
+// 报警规则管理配置查询
+export function warningRuleList(params) {
+ return request({
+ url: 'alarmRule/list',
+ method: 'get',
+ params
+ })
+}
+
+// 添加报警规则管理
+export function addWarningRule(params) {
+ return request({
+ url: 'alarmRule/add',
+ method: 'post',
+ params
+ })
+}
+// 修改报警规则管理
+export function updateWarningRule(params) {
+ return request({
+ url: 'alarmRule/update',
+ method: 'post',
+ params
+ })
+}
+// 删除报警规则管理
+export function delWarningRule(ids) {
+ return request({
+ url: 'alarmRule/delete',
+ method: 'post',
+ params: {
+ ids: ids
+ },
+ paramsSerializer: params => {
+ return qs.stringify(params, { indices: false })
+ }
+ })
+}
+// 批量导入
+export function batchImportWarn(fileobj) {
+ const param = new FormData()
+ param.append('file', fileobj)
+ return request({
+ url: 'alarmRule/batchImport',
+ method: 'post',
+ timeout: 240000,
+ headers: { 'Content-Type': 'multipart/form-data' },
+ data: param
+ })
+}
diff --git a/mock/index.js b/mock/index.js
index e13b51e..6646246 100644
--- a/mock/index.js
+++ b/mock/index.js
@@ -20,6 +20,7 @@
const tenantConfig = require('./systemConfig/tenantConfig')
const deptPermission = require('./systemConfig/deptPermission')
const tenant = require('./system/tenant')
+const warningRule = require('./warning/warningRule')
const mocks = [
...user,
@@ -40,7 +41,8 @@
...alarmContent,
...tenantConfig,
...deptPermission,
- ...tenant
+ ...tenant,
+ ...warningRule
]
// for front mock
diff --git a/mock/system/user.js b/mock/system/user.js
index f3aaad6..9fd5637 100644
--- a/mock/system/user.js
+++ b/mock/system/user.js
@@ -98,6 +98,8 @@
{ 'code': 'device_type', 'icon': '', 'id': '1138694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备类型管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/type' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备型号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/model' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958338', 'ismenu': '1', 'levels': 1, 'name': '设备SIM卡号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/imei' },
+ { 'code': 'device', 'icon': 'icon-alarm', 'id': '1138378229630761985', 'ismenu': '1', 'levels': 1, 'name': '报警管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning' },
+ { 'code': 'concentrator_manage', 'icon': '', 'id': '1138693302442582017', 'ismenu': '1', 'levels': 1, 'name': '报警规则管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning/rule' },
{ 'code': 'well_add', 'icon': '', 'id': '1138614981481963521', 'ismenu': '1', 'levels': 2, 'name': '新增窨井', 'num': 0, 'parentId': '1138377674778685442', 'resourceType': '03', 'url': '/well/add' },
{ 'code': 'noisedataList', 'icon': '', 'id': '1301828354294067202', 'ismenu': '0', 'levels': 2, 'name': '噪声记录仪', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/noisedata/list' },
{ 'code': 'liquid_gas_data_list', 'icon': '', 'id': '1426002745902108673', 'ismenu': '0', 'levels': 2, 'name': '燃气一体化数据查询', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/liquidGasData/list' },
diff --git a/mock/warning/warningRule.js b/mock/warning/warningRule.js
new file mode 100644
index 0000000..7706647
--- /dev/null
+++ b/mock/warning/warningRule.js
@@ -0,0 +1,40 @@
+const alarmRuleList = [
+ {
+ 'devCode': '4324324234',
+ 'highValue': '123',
+ 'lowValue': '10',
+ 'overTime': '2021/12/20 17:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '一级报警',
+ 'ts': '2021/12/20 13:23:13',
+ 'openAtor': '张三'
+ },
+ {
+ 'devCode': '1564324234',
+ 'highValue': '100',
+ 'lowValue': '20',
+ 'overTime': '2021/12/20 11:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '二级报警',
+ 'ts': '2021/12/20 10:23:13',
+ 'openAtor': '李四'
+ }
+
+]
+module.exports = [
+ // mock get all routes form server
+ {
+ url: '/alarmRule/list',
+ type: 'get',
+ response: _ => {
+ return {
+ code: 200,
+ data: alarmRuleList,
+ message: '请求成功',
+ success: true
+ }
+ }
+ }
+]
diff --git a/src/api/warning/warningRule.js b/src/api/warning/warningRule.js
new file mode 100644
index 0000000..c0b91b0
--- /dev/null
+++ b/src/api/warning/warningRule.js
@@ -0,0 +1,56 @@
+/*
+ * 报警规则管理配置接口
+*/
+import request from '@/utils/request'
+import qs from 'qs'
+
+// 报警规则管理配置查询
+export function warningRuleList(params) {
+ return request({
+ url: 'alarmRule/list',
+ method: 'get',
+ params
+ })
+}
+
+// 添加报警规则管理
+export function addWarningRule(params) {
+ return request({
+ url: 'alarmRule/add',
+ method: 'post',
+ params
+ })
+}
+// 修改报警规则管理
+export function updateWarningRule(params) {
+ return request({
+ url: 'alarmRule/update',
+ method: 'post',
+ params
+ })
+}
+// 删除报警规则管理
+export function delWarningRule(ids) {
+ return request({
+ url: 'alarmRule/delete',
+ method: 'post',
+ params: {
+ ids: ids
+ },
+ paramsSerializer: params => {
+ return qs.stringify(params, { indices: false })
+ }
+ })
+}
+// 批量导入
+export function batchImportWarn(fileobj) {
+ const param = new FormData()
+ param.append('file', fileobj)
+ return request({
+ url: 'alarmRule/batchImport',
+ method: 'post',
+ timeout: 240000,
+ headers: { 'Content-Type': 'multipart/form-data' },
+ data: param
+ })
+}
diff --git a/src/router/modules/config.js b/src/router/modules/config.js
index 85bdba6..07fcc53 100644
--- a/src/router/modules/config.js
+++ b/src/router/modules/config.js
@@ -25,22 +25,22 @@
meta: { title: '告警等级配置', icon: 'function', permission: ['/alarmLevel'] }
},
{
+ path: '/tenantConfig',
+ name: 'TenantConfig',
+ component: () => import('@/views/systemConfig/tenantConfig/listTenant'),
+ meta: { title: '项目配置', icon: 'function', permission: ['/tenantConfig'] }
+ },
+ {
path: '/alarmContent',
name: 'AlarmContent',
component: () => import('@/views/systemConfig/alarmContent/listContent'),
meta: { title: '告警内容配置', icon: 'function', permission: ['/alarmContent'] }
},
{
- path: '/tenantConfig',
- name: 'TenantConfig',
- component: () => import('@/views/systemConfig/tenantConfig/listTenant'),
- meta: { title: '告警内容配置', icon: 'function', permission: ['/tenantConfig'] }
- },
- {
path: '/deptPermission',
name: 'DeptPermission',
component: () => import('@/views/systemConfig/deptPermission/listDept'),
- meta: { title: '告警内容配置', icon: 'function', permission: ['/deptPermission'] }
+ meta: { title: '组织权限配置', icon: 'function', permission: ['/deptPermission'] }
}
]
}]
diff --git a/mock/index.js b/mock/index.js
index e13b51e..6646246 100644
--- a/mock/index.js
+++ b/mock/index.js
@@ -20,6 +20,7 @@
const tenantConfig = require('./systemConfig/tenantConfig')
const deptPermission = require('./systemConfig/deptPermission')
const tenant = require('./system/tenant')
+const warningRule = require('./warning/warningRule')
const mocks = [
...user,
@@ -40,7 +41,8 @@
...alarmContent,
...tenantConfig,
...deptPermission,
- ...tenant
+ ...tenant,
+ ...warningRule
]
// for front mock
diff --git a/mock/system/user.js b/mock/system/user.js
index f3aaad6..9fd5637 100644
--- a/mock/system/user.js
+++ b/mock/system/user.js
@@ -98,6 +98,8 @@
{ 'code': 'device_type', 'icon': '', 'id': '1138694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备类型管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/type' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备型号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/model' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958338', 'ismenu': '1', 'levels': 1, 'name': '设备SIM卡号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/imei' },
+ { 'code': 'device', 'icon': 'icon-alarm', 'id': '1138378229630761985', 'ismenu': '1', 'levels': 1, 'name': '报警管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning' },
+ { 'code': 'concentrator_manage', 'icon': '', 'id': '1138693302442582017', 'ismenu': '1', 'levels': 1, 'name': '报警规则管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning/rule' },
{ 'code': 'well_add', 'icon': '', 'id': '1138614981481963521', 'ismenu': '1', 'levels': 2, 'name': '新增窨井', 'num': 0, 'parentId': '1138377674778685442', 'resourceType': '03', 'url': '/well/add' },
{ 'code': 'noisedataList', 'icon': '', 'id': '1301828354294067202', 'ismenu': '0', 'levels': 2, 'name': '噪声记录仪', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/noisedata/list' },
{ 'code': 'liquid_gas_data_list', 'icon': '', 'id': '1426002745902108673', 'ismenu': '0', 'levels': 2, 'name': '燃气一体化数据查询', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/liquidGasData/list' },
diff --git a/mock/warning/warningRule.js b/mock/warning/warningRule.js
new file mode 100644
index 0000000..7706647
--- /dev/null
+++ b/mock/warning/warningRule.js
@@ -0,0 +1,40 @@
+const alarmRuleList = [
+ {
+ 'devCode': '4324324234',
+ 'highValue': '123',
+ 'lowValue': '10',
+ 'overTime': '2021/12/20 17:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '一级报警',
+ 'ts': '2021/12/20 13:23:13',
+ 'openAtor': '张三'
+ },
+ {
+ 'devCode': '1564324234',
+ 'highValue': '100',
+ 'lowValue': '20',
+ 'overTime': '2021/12/20 11:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '二级报警',
+ 'ts': '2021/12/20 10:23:13',
+ 'openAtor': '李四'
+ }
+
+]
+module.exports = [
+ // mock get all routes form server
+ {
+ url: '/alarmRule/list',
+ type: 'get',
+ response: _ => {
+ return {
+ code: 200,
+ data: alarmRuleList,
+ message: '请求成功',
+ success: true
+ }
+ }
+ }
+]
diff --git a/src/api/warning/warningRule.js b/src/api/warning/warningRule.js
new file mode 100644
index 0000000..c0b91b0
--- /dev/null
+++ b/src/api/warning/warningRule.js
@@ -0,0 +1,56 @@
+/*
+ * 报警规则管理配置接口
+*/
+import request from '@/utils/request'
+import qs from 'qs'
+
+// 报警规则管理配置查询
+export function warningRuleList(params) {
+ return request({
+ url: 'alarmRule/list',
+ method: 'get',
+ params
+ })
+}
+
+// 添加报警规则管理
+export function addWarningRule(params) {
+ return request({
+ url: 'alarmRule/add',
+ method: 'post',
+ params
+ })
+}
+// 修改报警规则管理
+export function updateWarningRule(params) {
+ return request({
+ url: 'alarmRule/update',
+ method: 'post',
+ params
+ })
+}
+// 删除报警规则管理
+export function delWarningRule(ids) {
+ return request({
+ url: 'alarmRule/delete',
+ method: 'post',
+ params: {
+ ids: ids
+ },
+ paramsSerializer: params => {
+ return qs.stringify(params, { indices: false })
+ }
+ })
+}
+// 批量导入
+export function batchImportWarn(fileobj) {
+ const param = new FormData()
+ param.append('file', fileobj)
+ return request({
+ url: 'alarmRule/batchImport',
+ method: 'post',
+ timeout: 240000,
+ headers: { 'Content-Type': 'multipart/form-data' },
+ data: param
+ })
+}
diff --git a/src/router/modules/config.js b/src/router/modules/config.js
index 85bdba6..07fcc53 100644
--- a/src/router/modules/config.js
+++ b/src/router/modules/config.js
@@ -25,22 +25,22 @@
meta: { title: '告警等级配置', icon: 'function', permission: ['/alarmLevel'] }
},
{
+ path: '/tenantConfig',
+ name: 'TenantConfig',
+ component: () => import('@/views/systemConfig/tenantConfig/listTenant'),
+ meta: { title: '项目配置', icon: 'function', permission: ['/tenantConfig'] }
+ },
+ {
path: '/alarmContent',
name: 'AlarmContent',
component: () => import('@/views/systemConfig/alarmContent/listContent'),
meta: { title: '告警内容配置', icon: 'function', permission: ['/alarmContent'] }
},
{
- path: '/tenantConfig',
- name: 'TenantConfig',
- component: () => import('@/views/systemConfig/tenantConfig/listTenant'),
- meta: { title: '告警内容配置', icon: 'function', permission: ['/tenantConfig'] }
- },
- {
path: '/deptPermission',
name: 'DeptPermission',
component: () => import('@/views/systemConfig/deptPermission/listDept'),
- meta: { title: '告警内容配置', icon: 'function', permission: ['/deptPermission'] }
+ meta: { title: '组织权限配置', icon: 'function', permission: ['/deptPermission'] }
}
]
}]
diff --git a/src/router/modules/well.js b/src/router/modules/well.js
index 98e4748..605a7c0 100644
--- a/src/router/modules/well.js
+++ b/src/router/modules/well.js
@@ -161,6 +161,26 @@
]
},
{
+ path: 'warningManage',
+ component: Layout,
+ redirect: '/warningList',
+ name: 'WarningManage',
+ alwaysShow: true,
+ meta: {
+ title: '报警管理',
+ icon: 'icon-alarm', // 图标
+ permission: ['/warning']// 权限名称
+ },
+ children: [
+ {
+ path: '/warningList',
+ name: 'warningList',
+ component: () => import('@/views/warningManage/warningRule'),
+ meta: { title: '报警规则管理', icon: 'icon-config', permission: ['/warning/rule'] }
+ }
+ ]
+ },
+ {
path: 'data',
component: Layout,
redirect: '/dataManage',
diff --git a/mock/index.js b/mock/index.js
index e13b51e..6646246 100644
--- a/mock/index.js
+++ b/mock/index.js
@@ -20,6 +20,7 @@
const tenantConfig = require('./systemConfig/tenantConfig')
const deptPermission = require('./systemConfig/deptPermission')
const tenant = require('./system/tenant')
+const warningRule = require('./warning/warningRule')
const mocks = [
...user,
@@ -40,7 +41,8 @@
...alarmContent,
...tenantConfig,
...deptPermission,
- ...tenant
+ ...tenant,
+ ...warningRule
]
// for front mock
diff --git a/mock/system/user.js b/mock/system/user.js
index f3aaad6..9fd5637 100644
--- a/mock/system/user.js
+++ b/mock/system/user.js
@@ -98,6 +98,8 @@
{ 'code': 'device_type', 'icon': '', 'id': '1138694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备类型管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/type' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备型号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/model' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958338', 'ismenu': '1', 'levels': 1, 'name': '设备SIM卡号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/imei' },
+ { 'code': 'device', 'icon': 'icon-alarm', 'id': '1138378229630761985', 'ismenu': '1', 'levels': 1, 'name': '报警管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning' },
+ { 'code': 'concentrator_manage', 'icon': '', 'id': '1138693302442582017', 'ismenu': '1', 'levels': 1, 'name': '报警规则管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning/rule' },
{ 'code': 'well_add', 'icon': '', 'id': '1138614981481963521', 'ismenu': '1', 'levels': 2, 'name': '新增窨井', 'num': 0, 'parentId': '1138377674778685442', 'resourceType': '03', 'url': '/well/add' },
{ 'code': 'noisedataList', 'icon': '', 'id': '1301828354294067202', 'ismenu': '0', 'levels': 2, 'name': '噪声记录仪', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/noisedata/list' },
{ 'code': 'liquid_gas_data_list', 'icon': '', 'id': '1426002745902108673', 'ismenu': '0', 'levels': 2, 'name': '燃气一体化数据查询', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/liquidGasData/list' },
diff --git a/mock/warning/warningRule.js b/mock/warning/warningRule.js
new file mode 100644
index 0000000..7706647
--- /dev/null
+++ b/mock/warning/warningRule.js
@@ -0,0 +1,40 @@
+const alarmRuleList = [
+ {
+ 'devCode': '4324324234',
+ 'highValue': '123',
+ 'lowValue': '10',
+ 'overTime': '2021/12/20 17:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '一级报警',
+ 'ts': '2021/12/20 13:23:13',
+ 'openAtor': '张三'
+ },
+ {
+ 'devCode': '1564324234',
+ 'highValue': '100',
+ 'lowValue': '20',
+ 'overTime': '2021/12/20 11:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '二级报警',
+ 'ts': '2021/12/20 10:23:13',
+ 'openAtor': '李四'
+ }
+
+]
+module.exports = [
+ // mock get all routes form server
+ {
+ url: '/alarmRule/list',
+ type: 'get',
+ response: _ => {
+ return {
+ code: 200,
+ data: alarmRuleList,
+ message: '请求成功',
+ success: true
+ }
+ }
+ }
+]
diff --git a/src/api/warning/warningRule.js b/src/api/warning/warningRule.js
new file mode 100644
index 0000000..c0b91b0
--- /dev/null
+++ b/src/api/warning/warningRule.js
@@ -0,0 +1,56 @@
+/*
+ * 报警规则管理配置接口
+*/
+import request from '@/utils/request'
+import qs from 'qs'
+
+// 报警规则管理配置查询
+export function warningRuleList(params) {
+ return request({
+ url: 'alarmRule/list',
+ method: 'get',
+ params
+ })
+}
+
+// 添加报警规则管理
+export function addWarningRule(params) {
+ return request({
+ url: 'alarmRule/add',
+ method: 'post',
+ params
+ })
+}
+// 修改报警规则管理
+export function updateWarningRule(params) {
+ return request({
+ url: 'alarmRule/update',
+ method: 'post',
+ params
+ })
+}
+// 删除报警规则管理
+export function delWarningRule(ids) {
+ return request({
+ url: 'alarmRule/delete',
+ method: 'post',
+ params: {
+ ids: ids
+ },
+ paramsSerializer: params => {
+ return qs.stringify(params, { indices: false })
+ }
+ })
+}
+// 批量导入
+export function batchImportWarn(fileobj) {
+ const param = new FormData()
+ param.append('file', fileobj)
+ return request({
+ url: 'alarmRule/batchImport',
+ method: 'post',
+ timeout: 240000,
+ headers: { 'Content-Type': 'multipart/form-data' },
+ data: param
+ })
+}
diff --git a/src/router/modules/config.js b/src/router/modules/config.js
index 85bdba6..07fcc53 100644
--- a/src/router/modules/config.js
+++ b/src/router/modules/config.js
@@ -25,22 +25,22 @@
meta: { title: '告警等级配置', icon: 'function', permission: ['/alarmLevel'] }
},
{
+ path: '/tenantConfig',
+ name: 'TenantConfig',
+ component: () => import('@/views/systemConfig/tenantConfig/listTenant'),
+ meta: { title: '项目配置', icon: 'function', permission: ['/tenantConfig'] }
+ },
+ {
path: '/alarmContent',
name: 'AlarmContent',
component: () => import('@/views/systemConfig/alarmContent/listContent'),
meta: { title: '告警内容配置', icon: 'function', permission: ['/alarmContent'] }
},
{
- path: '/tenantConfig',
- name: 'TenantConfig',
- component: () => import('@/views/systemConfig/tenantConfig/listTenant'),
- meta: { title: '告警内容配置', icon: 'function', permission: ['/tenantConfig'] }
- },
- {
path: '/deptPermission',
name: 'DeptPermission',
component: () => import('@/views/systemConfig/deptPermission/listDept'),
- meta: { title: '告警内容配置', icon: 'function', permission: ['/deptPermission'] }
+ meta: { title: '组织权限配置', icon: 'function', permission: ['/deptPermission'] }
}
]
}]
diff --git a/src/router/modules/well.js b/src/router/modules/well.js
index 98e4748..605a7c0 100644
--- a/src/router/modules/well.js
+++ b/src/router/modules/well.js
@@ -161,6 +161,26 @@
]
},
{
+ path: 'warningManage',
+ component: Layout,
+ redirect: '/warningList',
+ name: 'WarningManage',
+ alwaysShow: true,
+ meta: {
+ title: '报警管理',
+ icon: 'icon-alarm', // 图标
+ permission: ['/warning']// 权限名称
+ },
+ children: [
+ {
+ path: '/warningList',
+ name: 'warningList',
+ component: () => import('@/views/warningManage/warningRule'),
+ meta: { title: '报警规则管理', icon: 'icon-config', permission: ['/warning/rule'] }
+ }
+ ]
+ },
+ {
path: 'data',
component: Layout,
redirect: '/dataManage',
diff --git a/src/views/warningManage/components/dialogListWarning.vue b/src/views/warningManage/components/dialogListWarning.vue
new file mode 100644
index 0000000..010a00e
--- /dev/null
+++ b/src/views/warningManage/components/dialogListWarning.vue
@@ -0,0 +1,293 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mock/index.js b/mock/index.js
index e13b51e..6646246 100644
--- a/mock/index.js
+++ b/mock/index.js
@@ -20,6 +20,7 @@
const tenantConfig = require('./systemConfig/tenantConfig')
const deptPermission = require('./systemConfig/deptPermission')
const tenant = require('./system/tenant')
+const warningRule = require('./warning/warningRule')
const mocks = [
...user,
@@ -40,7 +41,8 @@
...alarmContent,
...tenantConfig,
...deptPermission,
- ...tenant
+ ...tenant,
+ ...warningRule
]
// for front mock
diff --git a/mock/system/user.js b/mock/system/user.js
index f3aaad6..9fd5637 100644
--- a/mock/system/user.js
+++ b/mock/system/user.js
@@ -98,6 +98,8 @@
{ 'code': 'device_type', 'icon': '', 'id': '1138694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备类型管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/type' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958339', 'ismenu': '1', 'levels': 1, 'name': '设备型号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/model' },
{ 'code': 'device_model', 'icon': '', 'id': '1128694597554958338', 'ismenu': '1', 'levels': 1, 'name': '设备SIM卡号管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/device/imei' },
+ { 'code': 'device', 'icon': 'icon-alarm', 'id': '1138378229630761985', 'ismenu': '1', 'levels': 1, 'name': '报警管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning' },
+ { 'code': 'concentrator_manage', 'icon': '', 'id': '1138693302442582017', 'ismenu': '1', 'levels': 1, 'name': '报警规则管理', 'num': 0, 'parentId': '0', 'resourceType': '03', 'url': '/warning/rule' },
{ 'code': 'well_add', 'icon': '', 'id': '1138614981481963521', 'ismenu': '1', 'levels': 2, 'name': '新增窨井', 'num': 0, 'parentId': '1138377674778685442', 'resourceType': '03', 'url': '/well/add' },
{ 'code': 'noisedataList', 'icon': '', 'id': '1301828354294067202', 'ismenu': '0', 'levels': 2, 'name': '噪声记录仪', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/noisedata/list' },
{ 'code': 'liquid_gas_data_list', 'icon': '', 'id': '1426002745902108673', 'ismenu': '0', 'levels': 2, 'name': '燃气一体化数据查询', 'num': 0, 'parentId': '1138702379389775873', 'resourceType': '04', 'url': '/liquidGasData/list' },
diff --git a/mock/warning/warningRule.js b/mock/warning/warningRule.js
new file mode 100644
index 0000000..7706647
--- /dev/null
+++ b/mock/warning/warningRule.js
@@ -0,0 +1,40 @@
+const alarmRuleList = [
+ {
+ 'devCode': '4324324234',
+ 'highValue': '123',
+ 'lowValue': '10',
+ 'overTime': '2021/12/20 17:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '一级报警',
+ 'ts': '2021/12/20 13:23:13',
+ 'openAtor': '张三'
+ },
+ {
+ 'devCode': '1564324234',
+ 'highValue': '100',
+ 'lowValue': '20',
+ 'overTime': '2021/12/20 11:23:13',
+ 'saltaTion': '22',
+ 'sensorCode': 'fd2131213',
+ 'grade': '二级报警',
+ 'ts': '2021/12/20 10:23:13',
+ 'openAtor': '李四'
+ }
+
+]
+module.exports = [
+ // mock get all routes form server
+ {
+ url: '/alarmRule/list',
+ type: 'get',
+ response: _ => {
+ return {
+ code: 200,
+ data: alarmRuleList,
+ message: '请求成功',
+ success: true
+ }
+ }
+ }
+]
diff --git a/src/api/warning/warningRule.js b/src/api/warning/warningRule.js
new file mode 100644
index 0000000..c0b91b0
--- /dev/null
+++ b/src/api/warning/warningRule.js
@@ -0,0 +1,56 @@
+/*
+ * 报警规则管理配置接口
+*/
+import request from '@/utils/request'
+import qs from 'qs'
+
+// 报警规则管理配置查询
+export function warningRuleList(params) {
+ return request({
+ url: 'alarmRule/list',
+ method: 'get',
+ params
+ })
+}
+
+// 添加报警规则管理
+export function addWarningRule(params) {
+ return request({
+ url: 'alarmRule/add',
+ method: 'post',
+ params
+ })
+}
+// 修改报警规则管理
+export function updateWarningRule(params) {
+ return request({
+ url: 'alarmRule/update',
+ method: 'post',
+ params
+ })
+}
+// 删除报警规则管理
+export function delWarningRule(ids) {
+ return request({
+ url: 'alarmRule/delete',
+ method: 'post',
+ params: {
+ ids: ids
+ },
+ paramsSerializer: params => {
+ return qs.stringify(params, { indices: false })
+ }
+ })
+}
+// 批量导入
+export function batchImportWarn(fileobj) {
+ const param = new FormData()
+ param.append('file', fileobj)
+ return request({
+ url: 'alarmRule/batchImport',
+ method: 'post',
+ timeout: 240000,
+ headers: { 'Content-Type': 'multipart/form-data' },
+ data: param
+ })
+}
diff --git a/src/router/modules/config.js b/src/router/modules/config.js
index 85bdba6..07fcc53 100644
--- a/src/router/modules/config.js
+++ b/src/router/modules/config.js
@@ -25,22 +25,22 @@
meta: { title: '告警等级配置', icon: 'function', permission: ['/alarmLevel'] }
},
{
+ path: '/tenantConfig',
+ name: 'TenantConfig',
+ component: () => import('@/views/systemConfig/tenantConfig/listTenant'),
+ meta: { title: '项目配置', icon: 'function', permission: ['/tenantConfig'] }
+ },
+ {
path: '/alarmContent',
name: 'AlarmContent',
component: () => import('@/views/systemConfig/alarmContent/listContent'),
meta: { title: '告警内容配置', icon: 'function', permission: ['/alarmContent'] }
},
{
- path: '/tenantConfig',
- name: 'TenantConfig',
- component: () => import('@/views/systemConfig/tenantConfig/listTenant'),
- meta: { title: '告警内容配置', icon: 'function', permission: ['/tenantConfig'] }
- },
- {
path: '/deptPermission',
name: 'DeptPermission',
component: () => import('@/views/systemConfig/deptPermission/listDept'),
- meta: { title: '告警内容配置', icon: 'function', permission: ['/deptPermission'] }
+ meta: { title: '组织权限配置', icon: 'function', permission: ['/deptPermission'] }
}
]
}]
diff --git a/src/router/modules/well.js b/src/router/modules/well.js
index 98e4748..605a7c0 100644
--- a/src/router/modules/well.js
+++ b/src/router/modules/well.js
@@ -161,6 +161,26 @@
]
},
{
+ path: 'warningManage',
+ component: Layout,
+ redirect: '/warningList',
+ name: 'WarningManage',
+ alwaysShow: true,
+ meta: {
+ title: '报警管理',
+ icon: 'icon-alarm', // 图标
+ permission: ['/warning']// 权限名称
+ },
+ children: [
+ {
+ path: '/warningList',
+ name: 'warningList',
+ component: () => import('@/views/warningManage/warningRule'),
+ meta: { title: '报警规则管理', icon: 'icon-config', permission: ['/warning/rule'] }
+ }
+ ]
+ },
+ {
path: 'data',
component: Layout,
redirect: '/dataManage',
diff --git a/src/views/warningManage/components/dialogListWarning.vue b/src/views/warningManage/components/dialogListWarning.vue
new file mode 100644
index 0000000..010a00e
--- /dev/null
+++ b/src/views/warningManage/components/dialogListWarning.vue
@@ -0,0 +1,293 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/warningManage/warningRule.vue b/src/views/warningManage/warningRule.vue
new file mode 100644
index 0000000..c09d63f
--- /dev/null
+++ b/src/views/warningManage/warningRule.vue
@@ -0,0 +1,232 @@
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+ 批量导入
+
+
+
+
+
+
+
+
+ 修改
+
+
+ 删除
+
+
+ 详情
+
+
+
+
+
+
+
+
+
+
+
+