diff --git a/package.json b/package.json
index 96ae945..596b8c1 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,7 @@
"html-webpack-plugin": "4.0.0-alpha",
"mini-css-extract-plugin": "0.4.1",
"node-notifier": "5.2.1",
- "node-sass": "^4.7.2",
+ "node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "5.0.0",
"ora": "3.0.0",
"path-to-regexp": "2.4.0",
diff --git a/package.json b/package.json
index 96ae945..596b8c1 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,7 @@
"html-webpack-plugin": "4.0.0-alpha",
"mini-css-extract-plugin": "0.4.1",
"node-notifier": "5.2.1",
- "node-sass": "^4.7.2",
+ "node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "5.0.0",
"ora": "3.0.0",
"path-to-regexp": "2.4.0",
diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue
index bbda98e..ca2721f 100644
--- a/src/views/dashboard/components/PanelGroup.vue
+++ b/src/views/dashboard/components/PanelGroup.vue
@@ -1,8 +1,10 @@
-
-
-
+
+
+
+
+
@@ -23,28 +25,32 @@
context: '--',
icon: 'icon-well',
color: '#40c9c6',
- path: '/wellList'
+ path: '/wellList',
+ permission: '/well/list'
},
{
title: '设备数量',
context: '--',
icon: 'icon-device',
color: '#36a3f7',
- path: '/deviceList'
+ path: '/deviceList',
+ permission: '/device/list'
},
{
title: '当前报警数',
context: '--',
icon: 'icon-alarm',
color: '#f4516c',
- path: '/alarmNow'
+ path: '/alarmNow',
+ permission: '/alarm/now'
},
{
title: '未完成工单数',
context: '--',
icon: 'icon-order',
color: '#f4516c',
- path: '/listJob'
+ path: '/listJob',
+ permission: '/job'
}
]
}
diff --git a/package.json b/package.json
index 96ae945..596b8c1 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,7 @@
"html-webpack-plugin": "4.0.0-alpha",
"mini-css-extract-plugin": "0.4.1",
"node-notifier": "5.2.1",
- "node-sass": "^4.7.2",
+ "node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "5.0.0",
"ora": "3.0.0",
"path-to-regexp": "2.4.0",
diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue
index bbda98e..ca2721f 100644
--- a/src/views/dashboard/components/PanelGroup.vue
+++ b/src/views/dashboard/components/PanelGroup.vue
@@ -1,8 +1,10 @@
-
-
-
+
+
+
+
+
@@ -23,28 +25,32 @@
context: '--',
icon: 'icon-well',
color: '#40c9c6',
- path: '/wellList'
+ path: '/wellList',
+ permission: '/well/list'
},
{
title: '设备数量',
context: '--',
icon: 'icon-device',
color: '#36a3f7',
- path: '/deviceList'
+ path: '/deviceList',
+ permission: '/device/list'
},
{
title: '当前报警数',
context: '--',
icon: 'icon-alarm',
color: '#f4516c',
- path: '/alarmNow'
+ path: '/alarmNow',
+ permission: '/alarm/now'
},
{
title: '未完成工单数',
context: '--',
icon: 'icon-order',
color: '#f4516c',
- path: '/listJob'
+ path: '/listJob',
+ permission: '/job'
}
]
}
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 8b8b043..d875d75 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -3,7 +3,7 @@
-
+
@@ -15,25 +15,25 @@
-
+
-
+
-
+
-
+
diff --git a/package.json b/package.json
index 96ae945..596b8c1 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,7 @@
"html-webpack-plugin": "4.0.0-alpha",
"mini-css-extract-plugin": "0.4.1",
"node-notifier": "5.2.1",
- "node-sass": "^4.7.2",
+ "node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "5.0.0",
"ora": "3.0.0",
"path-to-regexp": "2.4.0",
diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue
index bbda98e..ca2721f 100644
--- a/src/views/dashboard/components/PanelGroup.vue
+++ b/src/views/dashboard/components/PanelGroup.vue
@@ -1,8 +1,10 @@
-
-
-
+
+
+
+
+
@@ -23,28 +25,32 @@
context: '--',
icon: 'icon-well',
color: '#40c9c6',
- path: '/wellList'
+ path: '/wellList',
+ permission: '/well/list'
},
{
title: '设备数量',
context: '--',
icon: 'icon-device',
color: '#36a3f7',
- path: '/deviceList'
+ path: '/deviceList',
+ permission: '/device/list'
},
{
title: '当前报警数',
context: '--',
icon: 'icon-alarm',
color: '#f4516c',
- path: '/alarmNow'
+ path: '/alarmNow',
+ permission: '/alarm/now'
},
{
title: '未完成工单数',
context: '--',
icon: 'icon-order',
color: '#f4516c',
- path: '/listJob'
+ path: '/listJob',
+ permission: '/job'
}
]
}
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 8b8b043..d875d75 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -3,7 +3,7 @@
-
+
@@ -15,25 +15,25 @@
-
+
-
+
-
+
-
+
diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue
index d806a45..8cc5f60 100644
--- a/src/views/dataManage/dataManage.vue
+++ b/src/views/dataManage/dataManage.vue
@@ -35,6 +35,8 @@
import ListTempData from './deviceData/listTempData'
import ListWellLocaData from './deviceData/listWellLocaData'
import { parseUrl } from '@/utils/parseutils'
+import { hasPermission } from '@/utils/permission'
+
export default {
name: 'DataManage',
components: { ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData },
@@ -50,11 +52,15 @@
if (params && params.deviceType) {
this.changeTab(params.deviceType)
}
+ } else {
+ this.caclActive()
}
},
activated() {
if (this.$route.query && this.$route.query.deviceType) {
this.changeTab(this.$route.query.deviceType)
+ } else {
+ this.caclActive()
}
},
methods: {
@@ -92,6 +98,24 @@
} else if (deviceType === '7') {
this.activeName = 'wellloca'
}
+ },
+ // 计算那个是当前第一个tab
+ caclActive() {
+ if (hasPermission('/welldata/list')) {
+ this.activeName = 'wellcover'
+ } else if (hasPermission('/liquiddata/list')) {
+ this.activeName = 'liquid'
+ } else if (hasPermission('/gasdata/list')) {
+ this.activeName = 'gas'
+ } else if (hasPermission('/digdata/list')) {
+ this.activeName = 'dig'
+ } else if (hasPermission('/harmfuldata/list')) {
+ this.activeName = 'harmful'
+ } else if (hasPermission('/tempdata/list')) {
+ this.activeName = 'temp'
+ } else if (hasPermission('/welllocadata/list')) {
+ this.activeName = 'wellloca'
+ }
}
}
}
diff --git a/package.json b/package.json
index 96ae945..596b8c1 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,7 @@
"html-webpack-plugin": "4.0.0-alpha",
"mini-css-extract-plugin": "0.4.1",
"node-notifier": "5.2.1",
- "node-sass": "^4.7.2",
+ "node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "5.0.0",
"ora": "3.0.0",
"path-to-regexp": "2.4.0",
diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue
index bbda98e..ca2721f 100644
--- a/src/views/dashboard/components/PanelGroup.vue
+++ b/src/views/dashboard/components/PanelGroup.vue
@@ -1,8 +1,10 @@
-
-
-
+
+
+
+
+
@@ -23,28 +25,32 @@
context: '--',
icon: 'icon-well',
color: '#40c9c6',
- path: '/wellList'
+ path: '/wellList',
+ permission: '/well/list'
},
{
title: '设备数量',
context: '--',
icon: 'icon-device',
color: '#36a3f7',
- path: '/deviceList'
+ path: '/deviceList',
+ permission: '/device/list'
},
{
title: '当前报警数',
context: '--',
icon: 'icon-alarm',
color: '#f4516c',
- path: '/alarmNow'
+ path: '/alarmNow',
+ permission: '/alarm/now'
},
{
title: '未完成工单数',
context: '--',
icon: 'icon-order',
color: '#f4516c',
- path: '/listJob'
+ path: '/listJob',
+ permission: '/job'
}
]
}
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 8b8b043..d875d75 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -3,7 +3,7 @@
-
+
@@ -15,25 +15,25 @@
-
+
-
+
-
+
-
+
diff --git a/src/views/dataManage/dataManage.vue b/src/views/dataManage/dataManage.vue
index d806a45..8cc5f60 100644
--- a/src/views/dataManage/dataManage.vue
+++ b/src/views/dataManage/dataManage.vue
@@ -35,6 +35,8 @@
import ListTempData from './deviceData/listTempData'
import ListWellLocaData from './deviceData/listWellLocaData'
import { parseUrl } from '@/utils/parseutils'
+import { hasPermission } from '@/utils/permission'
+
export default {
name: 'DataManage',
components: { ListWellLocaData, ListTempData, ListHarmfulData, ListDigData, ListGasData, ListLiquidData, ListWellCoverData },
@@ -50,11 +52,15 @@
if (params && params.deviceType) {
this.changeTab(params.deviceType)
}
+ } else {
+ this.caclActive()
}
},
activated() {
if (this.$route.query && this.$route.query.deviceType) {
this.changeTab(this.$route.query.deviceType)
+ } else {
+ this.caclActive()
}
},
methods: {
@@ -92,6 +98,24 @@
} else if (deviceType === '7') {
this.activeName = 'wellloca'
}
+ },
+ // 计算那个是当前第一个tab
+ caclActive() {
+ if (hasPermission('/welldata/list')) {
+ this.activeName = 'wellcover'
+ } else if (hasPermission('/liquiddata/list')) {
+ this.activeName = 'liquid'
+ } else if (hasPermission('/gasdata/list')) {
+ this.activeName = 'gas'
+ } else if (hasPermission('/digdata/list')) {
+ this.activeName = 'dig'
+ } else if (hasPermission('/harmfuldata/list')) {
+ this.activeName = 'harmful'
+ } else if (hasPermission('/tempdata/list')) {
+ this.activeName = 'temp'
+ } else if (hasPermission('/welllocadata/list')) {
+ this.activeName = 'wellloca'
+ }
}
}
}
diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue
index 1bd5274..fc8847a 100644
--- a/src/views/deviceConfig/deviceConfig.vue
+++ b/src/views/deviceConfig/deviceConfig.vue
@@ -26,6 +26,7 @@
import ListHarmfulConfig from './components/listHarmfulConfig'
import ListTempConfig from './components/listTempConfig'
import ListDigConfig from './components/listDigConfig'
+import { hasPermission } from '@/utils/permission'
export default {
name: 'DeviceConfig',
components: { ListDigConfig, ListTempConfig, ListHarmfulConfig, ListGasConfig, ListLiquidConfig },
@@ -34,6 +35,9 @@
activeName: 'liquid'
}
},
+ created() {
+ this.caclActive()
+ },
methods: {
handleClick(tab, event) {
if (tab.name === 'liquid') {
@@ -47,6 +51,20 @@
} else if (tab.name === 'dig') {
this.$refs.digConfig.fetchData()
}
+ },
+ // 计算那个是当前第一个tab
+ caclActive() {
+ if (hasPermission('/busConfig/liquidConfig/list')) {
+ this.activeName = 'liquid'
+ } else if (hasPermission('/busConfig/gasConfig/list')) {
+ this.activeName = 'gas'
+ } else if (hasPermission('/busConfig/harmfulConfig/list')) {
+ this.activeName = 'harmful'
+ } else if (hasPermission('/busConfig/tempConfig/list')) {
+ this.activeName = 'temp'
+ } else if (hasPermission('/busConfig/digConfig/list')) {
+ this.activeName = 'dig'
+ }
}
}
}