{
if (valid) {
- updateDeviceType(this.deviceForm).then(response => {
+ updateDeviceType(this.dataForm).then(response => {
if (response.code === 200) {
this.$message.success('修改成功')
this.$emit('watchChild')
@@ -196,9 +206,9 @@
// 新增数据
createData: function() {
this.$refs['dataForm'].validate((valid) => {
- console.log(this.deviceForm)
+ console.log(this.dataForm)
if (valid) {
- addDeviceType(this.deviceForm).then(response => {
+ addDeviceType(this.dataForm).then(response => {
if (response.code === 200) {
this.$confirm('新增成功,是否继续新增?', '提示', {
confirmButtonText: '是',
diff --git a/src/views/deviceManage/deviceType/deviceType.vue b/src/views/deviceManage/deviceType/deviceType.vue
index 05bd847..9429fb0 100644
--- a/src/views/deviceManage/deviceType/deviceType.vue
+++ b/src/views/deviceManage/deviceType/deviceType.vue
@@ -1,103 +1,57 @@
+
-
+
-
-
+
+
-
-
-
-
-
-
-
- 新增
-
-
-
-
-
-
-
- {{ scope.row[column.value] }}
+
+
+
+ 新增
+
+
+
+
+
+ {{ alarmRuleTypeDict[scope.row.alarmRuleType] }}
+
+
+
+
+ {{ scope.row.alarmRuleHighvalue==='1'?'是':scope.row.alarmRuleHighvalue==='0'?'否':'' }}
+
+
+
+
+ {{ scope.row.alarmRuleLowvalue==='1'?'是':scope.row.alarmRuleLowvalue==='0'?'否':'' }}
+
+
+
+
+ {{ scope.row.valid==='1'?'是':scope.row.valid==='0'?'否':'' }}
-
-
+
+
编辑
-
+
删除
-
-
-
-
-
+
+
@@ -112,27 +66,19 @@
data() {
return {
listQuery: {
+ deviceType: '',
isValid: '',
offset: 1,
limit: 20,
sort: 'id',
order: 'asc'
}, // 查询条件
- isValidList: [
- {
- label: '是',
- value: '1'
- },
- {
- label: '否',
- value: '0'
- }
- ],
columns: [
{
text: '设备类型编号',
value: 'id',
- align: 'center'
+ align: 'center',
+ width: 100
},
{
text: '设备类型',
@@ -145,16 +91,20 @@
align: 'center'
},
{
- text: '是否启用',
- value: 'valid',
- align: 'center'
- },
- {
text: '监控内容',
value: 'watchType',
align: 'center'
}
], // 显示列
+ alarmRuleTypeDict: {
+ '1': '需要单独设置报警规则',
+ '2': '统一的报警规则',
+ '3': '无报警规则'
+ }, // 报警规则类型字典
+ tableOptions: {
+ needIndex: false, // 是否需要序号列
+ border: true // 是否需要上方边框
+ }, // 配置项
total: 0, // 数据总数
multipleSelection: [], // 多选选中项
list: [], // 列表数据
@@ -166,20 +116,6 @@
this.fetchData()
},
methods: {
- // 序号计算
- indexMethod(index) {
- return this.listQuery.limit * (this.listQuery.offset - 1) + index + 1
- },
- // 改变页容量
- handleSizeChange(val) {
- this.listQuery.limit = val
- this.fetchData()
- },
- // 改变当前页
- handleCurrentChange(val) {
- this.listQuery.offset = val
- this.fetchData()
- },
// 查询数据
search() {
this.fetchData(false)
@@ -191,10 +127,6 @@
this.listQuery.offset = 1
}
getDeviceTypeList(this.listQuery).then(response => {
- console.log(response, '======response')
- response.data.rows.forEach(item => {
- item.valid === '1' ? item.valid = '是' : item.valid = '否'
- })
this.list = response.data.rows
this.total = parseInt(response.data.total)
this.listLoading = false
@@ -203,7 +135,7 @@
// 删除设备
del(row) {
this.$confirm(
- '确定要删除所选设备吗?',
+ '确定要删除所选设备类型吗?该操作可能会引起其他功能异常',
'确认操作',
{
confirmButtonText: '确定',
@@ -230,36 +162,21 @@
// 编辑设备信息
edit(row) {
this.$refs.editDevice.initDialog('update', row)
+ },
+ // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
+ changePage(val) {
+ if (val && val.size) {
+ this.listQuery.limit = val.size
+ }
+ if (val && val.page) {
+ this.listQuery.offset = val.page
+ }
+ this.fetchData()
}
}
}
diff --git a/README.md b/README.md
index a93bd30..ae90135 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,19 @@
-# 智能闸井监测管理系统前端
+# 管网运行监测系统
-> 智能闸井监测管理系统WEB前端,系统管理模块基于基础权限管理的基础框架 ,整个系统模块包括闸井状态总览、闸井管理、告警管理、工单管理、设备配置。
+> 管网运行监测系统WEB前端,系统管理模块基于基础权限管理的基础框架,整个系统模块包括闸井状态总览、闸井管理、告警管理、工单管理、设备配置。
-> 可作为后续前后端分离的管理系统的基础前端框架使用。
## 相关项目
-本项目源于vue-element-admin,一个极简的 vue admin 管理后台V4.4.0版本。
+本项目源于vue-element-admin。
-[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
## 安装前提
1. 安装nodejs
-去[nodejs官网](https://nodejs.org/zh-cn/)下载安装包
+去[nodejs官网](https://nodejs.org/zh-cn/)下载安装包, 建议版本不要超过14
安装完成之后,在cmd中检查Node.js版本,输出版本号则表示安装成功
@@ -56,11 +54,11 @@
## 浏览器支持情况
-主流浏览器和IE 10+.
+主流浏览器和IE 11.
-| [

](http://godban.github.io/browsers-support-badges/)IE / Edge | [

](http://godban.github.io/browsers-support-badges/)Firefox | [

](http://godban.github.io/browsers-support-badges/)Chrome | [

](http://godban.github.io/browsers-support-badges/)Safari |
-| --------- | --------- | --------- | --------- |
-| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
+| IE | Edge | Firefox |Chrome | Safari |
+|--------------| --------- | --------- | --------- |------|
+| IE11(部分特性不支持) | 90+ | 80+ | 90+ |14+|
## License
diff --git a/src/api/device/deviceType.js b/src/api/device/deviceType.js
index 7274ede..bee92d0 100644
--- a/src/api/device/deviceType.js
+++ b/src/api/device/deviceType.js
@@ -4,7 +4,7 @@
import request from '@/utils/request'
import qs from 'qs'
-// 设备类别
+// 设备类别, 不分页全部
export function getDevice(params) {
return request({
url: 'device/type',
diff --git a/src/api/systemConfig/alarmContent.js b/src/api/systemConfig/alarmContent.js
index bdefe72..486c3ce 100644
--- a/src/api/systemConfig/alarmContent.js
+++ b/src/api/systemConfig/alarmContent.js
@@ -22,31 +22,25 @@
}
// 添加告警内容
-export function addAlarmContent(params) {
+export function addAlarmContent(data) {
return request({
- url: 'device/simManage/add',
+ url: 'alarmContent/add',
method: 'post',
- params
+ data
})
}
// 修改告警内容
export function updateAlarmContent(params) {
return request({
- url: 'device/simManage/update',
+ url: 'alarmContent/update',
method: 'post',
params
})
}
// 删除告警内容
-export function delAlarmContent(ids) {
+export function delAlarmContent(id) {
return request({
- url: 'device/simManage/delete',
- method: 'post',
- params: {
- ids: ids
- },
- paramsSerializer: params => {
- return qs.stringify(params, { indices: false })
- }
+ url: 'alarmContent/delete/' + id,
+ method: 'post'
})
}
diff --git a/src/components/Amap/AMapContainer.vue b/src/components/Amap/AMapContainer.vue
index 7348e02..5b5057e 100644
--- a/src/components/Amap/AMapContainer.vue
+++ b/src/components/Amap/AMapContainer.vue
@@ -75,9 +75,11 @@
methods: {
initMap() {
const { vid, zoom, zooms, center, viewMode, mapStyle } = this
- // 安全码
- window._AMapSecurityConfig = {
- securityJsCode: this.$store.getters.amapSecurityCode
+ if (!window._AMapSecurityConfig) {
+ // 安全码
+ window._AMapSecurityConfig = {
+ securityJsCode: this.$store.getters.amapSecurityCode
+ }
}
AMapLoader.load({
key: this.$store.getters.amapKey, // 秘钥,从store中取
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index 842f145..7f8def7 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -157,10 +157,10 @@
return []
}
}, // 列
- // pagination: {
- // type: Boolean,
- // default: true
- // }, // 是否分页
+ pagination: {
+ type: Boolean,
+ default: true
+ }, // 是否分页
options: {
type: Object,
default: function() {
@@ -195,8 +195,8 @@
columnsFiltered: [], // 过滤后的列情况
columnsChecked: [], // 显示列选择情况
visible: false, // 弹窗显示情况
- animateClass: '', // 按钮动画效果
- pagination: false // 是否显示分页
+ animateClass: '' // 按钮动画效果
+ // pagination: false // 是否显示分页
}
},
watch: {
@@ -213,11 +213,11 @@
methods: {
// 初始化显示列状态
initColumnsState(paginationStatus) {
- if (paginationStatus === true || paginationStatus === undefined) {
- this.pagination = true
- } else {
- this.pagination = false
- }
+ // if (paginationStatus === true || paginationStatus === undefined) {
+ // this.pagination = true
+ // } else {
+ // this.pagination = false
+ // }
this.columnsChecked = []
for (const column of this.columns) {
if (column.show === false) {
diff --git a/src/router/modules/config.js b/src/router/modules/config.js
index 0ca7f44..c33329b 100644
--- a/src/router/modules/config.js
+++ b/src/router/modules/config.js
@@ -52,7 +52,7 @@
path: '/deptPermission',
name: 'DeptPermission',
component: () => import('@/views/systemConfig/deptPermission/deptPermission'),
- meta: { title: '组织权限配置', icon: 'function', permission: ['/deptPermission'] }
+ meta: { title: '组织权限配置', icon: 'function', permission: ['/deptPermission/list'] }
}
]
}]
diff --git a/src/router/modules/well.js b/src/router/modules/well.js
index d12cfa8..61fd1a8 100644
--- a/src/router/modules/well.js
+++ b/src/router/modules/well.js
@@ -168,7 +168,7 @@
path: '/deviceType',
name: 'DeviceType',
component: () => import('@/views/deviceManage/deviceType/deviceType'),
- meta: { title: '设备类型管理', icon: 'icon-config', permission: ['/deviceType/mange'] }
+ meta: { title: '设备类型管理', icon: 'icon-config', permission: ['/deviceType/listPage'] }
},
{
path: '/deviceModel',
@@ -180,7 +180,7 @@
path: '/deviceImei',
name: 'DeviceImei',
component: () => import('@/views/deviceManage/deviceImei/deviceImei'),
- meta: { title: '设备SIM卡号管理', icon: 'icon-config', permission: ['/device/imei'] }
+ meta: { title: '设备SIM卡号管理', icon: 'icon-config', permission: ['/device/simManage/listpage'] }
}
]
},
diff --git a/src/views/alarmManage/listAlarmNow.vue b/src/views/alarmManage/listAlarmNow.vue
index ea04b30..f50de80 100644
--- a/src/views/alarmManage/listAlarmNow.vue
+++ b/src/views/alarmManage/listAlarmNow.vue
@@ -59,19 +59,12 @@
-
+
-
+
{{ scope.row.wellCode }}
diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue
index 8d92fa3..873e7be 100644
--- a/src/views/alarmManage/listAlarmRecords.vue
+++ b/src/views/alarmManage/listAlarmRecords.vue
@@ -66,20 +66,20 @@
-
+
{{ scope.row[column.value] }}
{{ formatValue(scope.row[column.value]) }}
-
+
{{ scope.row[column.value] }}
-
+
查看工单
diff --git a/src/views/alarmRule/components/listRule.vue b/src/views/alarmRule/components/listRule.vue
index 20c360f..fcda9ef 100644
--- a/src/views/alarmRule/components/listRule.vue
+++ b/src/views/alarmRule/components/listRule.vue
@@ -40,23 +40,23 @@
-
+
{{ scope.row[column.value] }}
-
+
{{ scope.row.wellCode }}
-
+
编辑
-
+
删除
diff --git a/src/views/alarmRule/editRule.vue b/src/views/alarmRule/editRule.vue
deleted file mode 100644
index 685e2d6..0000000
--- a/src/views/alarmRule/editRule.vue
+++ /dev/null
@@ -1,237 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/alarmRule/listRule.vue b/src/views/alarmRule/listRule.vue
deleted file mode 100644
index a45a5be..0000000
--- a/src/views/alarmRule/listRule.vue
+++ /dev/null
@@ -1,277 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 新增
-
-
-
-
-
-
-
-
- {{ scope.row[column.value] }}
-
- {{ scope.row.wellCode }}
-
-
-
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/concentrator/listConcentrator.vue b/src/views/concentrator/listConcentrator.vue
index 55a600c..c7ea99d 100644
--- a/src/views/concentrator/listConcentrator.vue
+++ b/src/views/concentrator/listConcentrator.vue
@@ -61,7 +61,7 @@
-
+
@@ -71,7 +71,7 @@
-
+
编辑
diff --git a/src/views/dataView/components/panelGroup.vue b/src/views/dataView/components/panelGroup.vue
index f01f626..cdb9180 100644
--- a/src/views/dataView/components/panelGroup.vue
+++ b/src/views/dataView/components/panelGroup.vue
@@ -13,16 +13,8 @@
-