diff --git a/src/router/index.js b/src/router/index.js index e2cf1e9..4f3dbe0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -63,6 +63,19 @@ name: 'Dashboard', meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } }] + }, + { + path: '/', + component: Layout, + redirect: 'gasDashboard', + name: 'GasDashboard', + // hidden: true, + children: [{ + path: 'gasDashboard', + component: () => import('@/views/gasDashboard/index'), + name: 'GasDashboard', + meta: { title: '动力管线首页', icon: 'dashboard', noCache: true, affix: true } + }] } ] // 实例化vue的时候直挂载constantRouter @@ -75,6 +88,42 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ + // { + // path: 'gasDashboard', + // component: Layout, + // redirect: '/gasDashboard', + // meta: { + // title: '动力管线首页', + // icon: 'icon-config', // 图标 + // permission: ['/gasDashboard']// 权限名称 + // }, + // children: [ + // { + // path: '/gasDashboard', + // component: () => import('@/views/gasDashboard/index'), + // name: 'gasDashboard', + // meta: { title: '动力管线首页', icon: 'icon-config', permission: ['/gasDashboard'] } + // } + // ] + // }, + { + path: 'gasOverview', + component: Layout, + redirect: '/gasOverview', + meta: { + title: '动力管线总览', + icon: 'icon-config', // 图标 + permission: ['/gasOverview']// 权限名称 + }, + children: [ + { + path: '/gasOverview', + component: () => import('@/views/gasOverview/gasOverviewSimple'), + name: 'gasOverview', + meta: { title: '动力管线总览', icon: 'icon-config', permission: ['/gasOverview'] } + } + ] + }, { path: 'overview', component: Layout, diff --git a/src/router/index.js b/src/router/index.js index e2cf1e9..4f3dbe0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -63,6 +63,19 @@ name: 'Dashboard', meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } }] + }, + { + path: '/', + component: Layout, + redirect: 'gasDashboard', + name: 'GasDashboard', + // hidden: true, + children: [{ + path: 'gasDashboard', + component: () => import('@/views/gasDashboard/index'), + name: 'GasDashboard', + meta: { title: '动力管线首页', icon: 'dashboard', noCache: true, affix: true } + }] } ] // 实例化vue的时候直挂载constantRouter @@ -75,6 +88,42 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ + // { + // path: 'gasDashboard', + // component: Layout, + // redirect: '/gasDashboard', + // meta: { + // title: '动力管线首页', + // icon: 'icon-config', // 图标 + // permission: ['/gasDashboard']// 权限名称 + // }, + // children: [ + // { + // path: '/gasDashboard', + // component: () => import('@/views/gasDashboard/index'), + // name: 'gasDashboard', + // meta: { title: '动力管线首页', icon: 'icon-config', permission: ['/gasDashboard'] } + // } + // ] + // }, + { + path: 'gasOverview', + component: Layout, + redirect: '/gasOverview', + meta: { + title: '动力管线总览', + icon: 'icon-config', // 图标 + permission: ['/gasOverview']// 权限名称 + }, + children: [ + { + path: '/gasOverview', + component: () => import('@/views/gasOverview/gasOverviewSimple'), + name: 'gasOverview', + meta: { title: '动力管线总览', icon: 'icon-config', permission: ['/gasOverview'] } + } + ] + }, { path: 'overview', component: Layout, diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4395df9..4347727 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } }, title: { - text: '分区气体流量计报警占比' + text: '分区水表报警占比图' }, chartSettings: { labelMap: { diff --git a/src/router/index.js b/src/router/index.js index e2cf1e9..4f3dbe0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -63,6 +63,19 @@ name: 'Dashboard', meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } }] + }, + { + path: '/', + component: Layout, + redirect: 'gasDashboard', + name: 'GasDashboard', + // hidden: true, + children: [{ + path: 'gasDashboard', + component: () => import('@/views/gasDashboard/index'), + name: 'GasDashboard', + meta: { title: '动力管线首页', icon: 'dashboard', noCache: true, affix: true } + }] } ] // 实例化vue的时候直挂载constantRouter @@ -75,6 +88,42 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ + // { + // path: 'gasDashboard', + // component: Layout, + // redirect: '/gasDashboard', + // meta: { + // title: '动力管线首页', + // icon: 'icon-config', // 图标 + // permission: ['/gasDashboard']// 权限名称 + // }, + // children: [ + // { + // path: '/gasDashboard', + // component: () => import('@/views/gasDashboard/index'), + // name: 'gasDashboard', + // meta: { title: '动力管线首页', icon: 'icon-config', permission: ['/gasDashboard'] } + // } + // ] + // }, + { + path: 'gasOverview', + component: Layout, + redirect: '/gasOverview', + meta: { + title: '动力管线总览', + icon: 'icon-config', // 图标 + permission: ['/gasOverview']// 权限名称 + }, + children: [ + { + path: '/gasOverview', + component: () => import('@/views/gasOverview/gasOverviewSimple'), + name: 'gasOverview', + meta: { title: '动力管线总览', icon: 'icon-config', permission: ['/gasOverview'] } + } + ] + }, { path: 'overview', component: Layout, diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4395df9..4347727 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } }, title: { - text: '分区气体流量计报警占比' + text: '分区水表报警占比图' }, chartSettings: { labelMap: { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 30fa639..cbacc0f 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -46,17 +46,20 @@ mounted() { // TODO:待调试真接口 this.fetchData() - this.chartData.rows = [ - { 'deviceType': '气体流量计', 'deviceCount': 20, '下单用户': 1093, '下单率': 0.32 }, - { 'deviceType': '供水泄露监测仪', 'deviceCount': 20, '下单用户': 3230, '下单率': 0.26 }, - { 'deviceType': '气体泄露监测仪', 'deviceCount': 50, '下单用户': 2623, '下单率': 0.76 }, - { 'deviceType': '腐蚀速率监测仪', 'deviceCount': 10, '下单用户': 1423, '下单率': 0.49 } - ] + // this.chartData.rows = [ + // { 'deviceType': '井盖状态监测仪', 'deviceCount': 1393, '下单用户': 1093, '下单率': 0.32 }, + // { 'deviceType': '液位监测仪', 'deviceCount': 3530, '下单用户': 3230, '下单率': 0.26 }, + // { 'deviceType': '燃气智能监测终端', 'deviceCount': 2923, '下单用户': 2623, '下单率': 0.76 }, + // { 'deviceType': '开挖监测仪', 'deviceCount': 1723, '下单用户': 1423, '下单率': 0.49 }, + // { 'deviceType': '有害气体监测仪', 'deviceCount': 3792, '下单用户': 3492, '下单率': 0.323 }, + // { 'deviceType': '水质监测仪', 'deviceCount': 2, '下单用户': 4293, '下单率': 0.78 }, + // { 'deviceType': '流量监测仪', 'deviceCount': 2, '下单用户': 4293, '下单率': 0.78 } + // ] }, methods: { fetchData() { deviceStaticsByType().then(response => { - // this.chartData.rows = response.data + this.chartData.rows = response.data }) } } diff --git a/src/router/index.js b/src/router/index.js index e2cf1e9..4f3dbe0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -63,6 +63,19 @@ name: 'Dashboard', meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } }] + }, + { + path: '/', + component: Layout, + redirect: 'gasDashboard', + name: 'GasDashboard', + // hidden: true, + children: [{ + path: 'gasDashboard', + component: () => import('@/views/gasDashboard/index'), + name: 'GasDashboard', + meta: { title: '动力管线首页', icon: 'dashboard', noCache: true, affix: true } + }] } ] // 实例化vue的时候直挂载constantRouter @@ -75,6 +88,42 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ + // { + // path: 'gasDashboard', + // component: Layout, + // redirect: '/gasDashboard', + // meta: { + // title: '动力管线首页', + // icon: 'icon-config', // 图标 + // permission: ['/gasDashboard']// 权限名称 + // }, + // children: [ + // { + // path: '/gasDashboard', + // component: () => import('@/views/gasDashboard/index'), + // name: 'gasDashboard', + // meta: { title: '动力管线首页', icon: 'icon-config', permission: ['/gasDashboard'] } + // } + // ] + // }, + { + path: 'gasOverview', + component: Layout, + redirect: '/gasOverview', + meta: { + title: '动力管线总览', + icon: 'icon-config', // 图标 + permission: ['/gasOverview']// 权限名称 + }, + children: [ + { + path: '/gasOverview', + component: () => import('@/views/gasOverview/gasOverviewSimple'), + name: 'gasOverview', + meta: { title: '动力管线总览', icon: 'icon-config', permission: ['/gasOverview'] } + } + ] + }, { path: 'overview', component: Layout, diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4395df9..4347727 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } }, title: { - text: '分区气体流量计报警占比' + text: '分区水表报警占比图' }, chartSettings: { labelMap: { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 30fa639..cbacc0f 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -46,17 +46,20 @@ mounted() { // TODO:待调试真接口 this.fetchData() - this.chartData.rows = [ - { 'deviceType': '气体流量计', 'deviceCount': 20, '下单用户': 1093, '下单率': 0.32 }, - { 'deviceType': '供水泄露监测仪', 'deviceCount': 20, '下单用户': 3230, '下单率': 0.26 }, - { 'deviceType': '气体泄露监测仪', 'deviceCount': 50, '下单用户': 2623, '下单率': 0.76 }, - { 'deviceType': '腐蚀速率监测仪', 'deviceCount': 10, '下单用户': 1423, '下单率': 0.49 } - ] + // this.chartData.rows = [ + // { 'deviceType': '井盖状态监测仪', 'deviceCount': 1393, '下单用户': 1093, '下单率': 0.32 }, + // { 'deviceType': '液位监测仪', 'deviceCount': 3530, '下单用户': 3230, '下单率': 0.26 }, + // { 'deviceType': '燃气智能监测终端', 'deviceCount': 2923, '下单用户': 2623, '下单率': 0.76 }, + // { 'deviceType': '开挖监测仪', 'deviceCount': 1723, '下单用户': 1423, '下单率': 0.49 }, + // { 'deviceType': '有害气体监测仪', 'deviceCount': 3792, '下单用户': 3492, '下单率': 0.323 }, + // { 'deviceType': '水质监测仪', 'deviceCount': 2, '下单用户': 4293, '下单率': 0.78 }, + // { 'deviceType': '流量监测仪', 'deviceCount': 2, '下单用户': 4293, '下单率': 0.78 } + // ] }, methods: { fetchData() { deviceStaticsByType().then(response => { - // this.chartData.rows = response.data + this.chartData.rows = response.data }) } } diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 2232a6f..7cdf078 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -32,7 +32,7 @@ return { dataGroup1: [ { - title: ['总用气量', '本月用气量'], + title: ['总用水量', '本月用水量'], context: ['--', '--'], icon: '', color: '#40c9c6', @@ -40,7 +40,7 @@ index: 0 }, { - title: ['今日用气量', '生产厂区用气量'], + title: ['今日用水量', '生产厂区用水量'], context: ['--', '--'], icon: '', color: '#36a3f7', @@ -58,7 +58,14 @@ ], dataGroup: [ { - title: '气体流量计', + title: '阀门数量', + context: '--', + icon: 'icon-valve', + color: '#40c9c6', + permission: '/device/list' + }, + { + title: '水表数量', context: '--', icon: 'icon-watch', color: '#9694f7', @@ -92,7 +99,7 @@ this.$router.push(path) }, getWater() { - // 用气量 + // 用水量 getWatchStatistic().then(response => { this.dataGroup1[0].context = [response.data.total ? parseFloat(response.data.total).toFixed(2) : '--', response.data.month ? parseFloat(response.data.month).toFixed(2) : '--'] this.dataGroup1[1].context = [response.data.today ? parseFloat(response.data.today).toFixed(2) : '--', response.data.prodution ? parseFloat(response.data.prodution).toFixed(2) : '--'] diff --git a/src/router/index.js b/src/router/index.js index e2cf1e9..4f3dbe0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -63,6 +63,19 @@ name: 'Dashboard', meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } }] + }, + { + path: '/', + component: Layout, + redirect: 'gasDashboard', + name: 'GasDashboard', + // hidden: true, + children: [{ + path: 'gasDashboard', + component: () => import('@/views/gasDashboard/index'), + name: 'GasDashboard', + meta: { title: '动力管线首页', icon: 'dashboard', noCache: true, affix: true } + }] } ] // 实例化vue的时候直挂载constantRouter @@ -75,6 +88,42 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ + // { + // path: 'gasDashboard', + // component: Layout, + // redirect: '/gasDashboard', + // meta: { + // title: '动力管线首页', + // icon: 'icon-config', // 图标 + // permission: ['/gasDashboard']// 权限名称 + // }, + // children: [ + // { + // path: '/gasDashboard', + // component: () => import('@/views/gasDashboard/index'), + // name: 'gasDashboard', + // meta: { title: '动力管线首页', icon: 'icon-config', permission: ['/gasDashboard'] } + // } + // ] + // }, + { + path: 'gasOverview', + component: Layout, + redirect: '/gasOverview', + meta: { + title: '动力管线总览', + icon: 'icon-config', // 图标 + permission: ['/gasOverview']// 权限名称 + }, + children: [ + { + path: '/gasOverview', + component: () => import('@/views/gasOverview/gasOverviewSimple'), + name: 'gasOverview', + meta: { title: '动力管线总览', icon: 'icon-config', permission: ['/gasOverview'] } + } + ] + }, { path: 'overview', component: Layout, diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4395df9..4347727 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } }, title: { - text: '分区气体流量计报警占比' + text: '分区水表报警占比图' }, chartSettings: { labelMap: { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 30fa639..cbacc0f 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -46,17 +46,20 @@ mounted() { // TODO:待调试真接口 this.fetchData() - this.chartData.rows = [ - { 'deviceType': '气体流量计', 'deviceCount': 20, '下单用户': 1093, '下单率': 0.32 }, - { 'deviceType': '供水泄露监测仪', 'deviceCount': 20, '下单用户': 3230, '下单率': 0.26 }, - { 'deviceType': '气体泄露监测仪', 'deviceCount': 50, '下单用户': 2623, '下单率': 0.76 }, - { 'deviceType': '腐蚀速率监测仪', 'deviceCount': 10, '下单用户': 1423, '下单率': 0.49 } - ] + // this.chartData.rows = [ + // { 'deviceType': '井盖状态监测仪', 'deviceCount': 1393, '下单用户': 1093, '下单率': 0.32 }, + // { 'deviceType': '液位监测仪', 'deviceCount': 3530, '下单用户': 3230, '下单率': 0.26 }, + // { 'deviceType': '燃气智能监测终端', 'deviceCount': 2923, '下单用户': 2623, '下单率': 0.76 }, + // { 'deviceType': '开挖监测仪', 'deviceCount': 1723, '下单用户': 1423, '下单率': 0.49 }, + // { 'deviceType': '有害气体监测仪', 'deviceCount': 3792, '下单用户': 3492, '下单率': 0.323 }, + // { 'deviceType': '水质监测仪', 'deviceCount': 2, '下单用户': 4293, '下单率': 0.78 }, + // { 'deviceType': '流量监测仪', 'deviceCount': 2, '下单用户': 4293, '下单率': 0.78 } + // ] }, methods: { fetchData() { deviceStaticsByType().then(response => { - // this.chartData.rows = response.data + this.chartData.rows = response.data }) } } diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 2232a6f..7cdf078 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -32,7 +32,7 @@ return { dataGroup1: [ { - title: ['总用气量', '本月用气量'], + title: ['总用水量', '本月用水量'], context: ['--', '--'], icon: '', color: '#40c9c6', @@ -40,7 +40,7 @@ index: 0 }, { - title: ['今日用气量', '生产厂区用气量'], + title: ['今日用水量', '生产厂区用水量'], context: ['--', '--'], icon: '', color: '#36a3f7', @@ -58,7 +58,14 @@ ], dataGroup: [ { - title: '气体流量计', + title: '阀门数量', + context: '--', + icon: 'icon-valve', + color: '#40c9c6', + permission: '/device/list' + }, + { + title: '水表数量', context: '--', icon: 'icon-watch', color: '#9694f7', @@ -92,7 +99,7 @@ this.$router.push(path) }, getWater() { - // 用气量 + // 用水量 getWatchStatistic().then(response => { this.dataGroup1[0].context = [response.data.total ? parseFloat(response.data.total).toFixed(2) : '--', response.data.month ? parseFloat(response.data.month).toFixed(2) : '--'] this.dataGroup1[1].context = [response.data.today ? parseFloat(response.data.today).toFixed(2) : '--', response.data.prodution ? parseFloat(response.data.prodution).toFixed(2) : '--'] diff --git a/src/views/dashboard/components/alarmGasCountByDept.vue b/src/views/dashboard/components/alarmGasCountByDept.vue deleted file mode 100644 index 534d8f3..0000000 --- a/src/views/dashboard/components/alarmGasCountByDept.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - - diff --git a/src/router/index.js b/src/router/index.js index e2cf1e9..4f3dbe0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -63,6 +63,19 @@ name: 'Dashboard', meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } }] + }, + { + path: '/', + component: Layout, + redirect: 'gasDashboard', + name: 'GasDashboard', + // hidden: true, + children: [{ + path: 'gasDashboard', + component: () => import('@/views/gasDashboard/index'), + name: 'GasDashboard', + meta: { title: '动力管线首页', icon: 'dashboard', noCache: true, affix: true } + }] } ] // 实例化vue的时候直挂载constantRouter @@ -75,6 +88,42 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ + // { + // path: 'gasDashboard', + // component: Layout, + // redirect: '/gasDashboard', + // meta: { + // title: '动力管线首页', + // icon: 'icon-config', // 图标 + // permission: ['/gasDashboard']// 权限名称 + // }, + // children: [ + // { + // path: '/gasDashboard', + // component: () => import('@/views/gasDashboard/index'), + // name: 'gasDashboard', + // meta: { title: '动力管线首页', icon: 'icon-config', permission: ['/gasDashboard'] } + // } + // ] + // }, + { + path: 'gasOverview', + component: Layout, + redirect: '/gasOverview', + meta: { + title: '动力管线总览', + icon: 'icon-config', // 图标 + permission: ['/gasOverview']// 权限名称 + }, + children: [ + { + path: '/gasOverview', + component: () => import('@/views/gasOverview/gasOverviewSimple'), + name: 'gasOverview', + meta: { title: '动力管线总览', icon: 'icon-config', permission: ['/gasOverview'] } + } + ] + }, { path: 'overview', component: Layout, diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4395df9..4347727 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } }, title: { - text: '分区气体流量计报警占比' + text: '分区水表报警占比图' }, chartSettings: { labelMap: { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 30fa639..cbacc0f 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -46,17 +46,20 @@ mounted() { // TODO:待调试真接口 this.fetchData() - this.chartData.rows = [ - { 'deviceType': '气体流量计', 'deviceCount': 20, '下单用户': 1093, '下单率': 0.32 }, - { 'deviceType': '供水泄露监测仪', 'deviceCount': 20, '下单用户': 3230, '下单率': 0.26 }, - { 'deviceType': '气体泄露监测仪', 'deviceCount': 50, '下单用户': 2623, '下单率': 0.76 }, - { 'deviceType': '腐蚀速率监测仪', 'deviceCount': 10, '下单用户': 1423, '下单率': 0.49 } - ] + // this.chartData.rows = [ + // { 'deviceType': '井盖状态监测仪', 'deviceCount': 1393, '下单用户': 1093, '下单率': 0.32 }, + // { 'deviceType': '液位监测仪', 'deviceCount': 3530, '下单用户': 3230, '下单率': 0.26 }, + // { 'deviceType': '燃气智能监测终端', 'deviceCount': 2923, '下单用户': 2623, '下单率': 0.76 }, + // { 'deviceType': '开挖监测仪', 'deviceCount': 1723, '下单用户': 1423, '下单率': 0.49 }, + // { 'deviceType': '有害气体监测仪', 'deviceCount': 3792, '下单用户': 3492, '下单率': 0.323 }, + // { 'deviceType': '水质监测仪', 'deviceCount': 2, '下单用户': 4293, '下单率': 0.78 }, + // { 'deviceType': '流量监测仪', 'deviceCount': 2, '下单用户': 4293, '下单率': 0.78 } + // ] }, methods: { fetchData() { deviceStaticsByType().then(response => { - // this.chartData.rows = response.data + this.chartData.rows = response.data }) } } diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 2232a6f..7cdf078 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -32,7 +32,7 @@ return { dataGroup1: [ { - title: ['总用气量', '本月用气量'], + title: ['总用水量', '本月用水量'], context: ['--', '--'], icon: '', color: '#40c9c6', @@ -40,7 +40,7 @@ index: 0 }, { - title: ['今日用气量', '生产厂区用气量'], + title: ['今日用水量', '生产厂区用水量'], context: ['--', '--'], icon: '', color: '#36a3f7', @@ -58,7 +58,14 @@ ], dataGroup: [ { - title: '气体流量计', + title: '阀门数量', + context: '--', + icon: 'icon-valve', + color: '#40c9c6', + permission: '/device/list' + }, + { + title: '水表数量', context: '--', icon: 'icon-watch', color: '#9694f7', @@ -92,7 +99,7 @@ this.$router.push(path) }, getWater() { - // 用气量 + // 用水量 getWatchStatistic().then(response => { this.dataGroup1[0].context = [response.data.total ? parseFloat(response.data.total).toFixed(2) : '--', response.data.month ? parseFloat(response.data.month).toFixed(2) : '--'] this.dataGroup1[1].context = [response.data.today ? parseFloat(response.data.today).toFixed(2) : '--', response.data.prodution ? parseFloat(response.data.prodution).toFixed(2) : '--'] diff --git a/src/views/dashboard/components/alarmGasCountByDept.vue b/src/views/dashboard/components/alarmGasCountByDept.vue deleted file mode 100644 index 534d8f3..0000000 --- a/src/views/dashboard/components/alarmGasCountByDept.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - - diff --git a/src/views/dashboard/components/corrodeCountByDay.vue b/src/views/dashboard/components/corrodeCountByDay.vue deleted file mode 100644 index 8563956..0000000 --- a/src/views/dashboard/components/corrodeCountByDay.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - diff --git a/src/router/index.js b/src/router/index.js index e2cf1e9..4f3dbe0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -63,6 +63,19 @@ name: 'Dashboard', meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } }] + }, + { + path: '/', + component: Layout, + redirect: 'gasDashboard', + name: 'GasDashboard', + // hidden: true, + children: [{ + path: 'gasDashboard', + component: () => import('@/views/gasDashboard/index'), + name: 'GasDashboard', + meta: { title: '动力管线首页', icon: 'dashboard', noCache: true, affix: true } + }] } ] // 实例化vue的时候直挂载constantRouter @@ -75,6 +88,42 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ + // { + // path: 'gasDashboard', + // component: Layout, + // redirect: '/gasDashboard', + // meta: { + // title: '动力管线首页', + // icon: 'icon-config', // 图标 + // permission: ['/gasDashboard']// 权限名称 + // }, + // children: [ + // { + // path: '/gasDashboard', + // component: () => import('@/views/gasDashboard/index'), + // name: 'gasDashboard', + // meta: { title: '动力管线首页', icon: 'icon-config', permission: ['/gasDashboard'] } + // } + // ] + // }, + { + path: 'gasOverview', + component: Layout, + redirect: '/gasOverview', + meta: { + title: '动力管线总览', + icon: 'icon-config', // 图标 + permission: ['/gasOverview']// 权限名称 + }, + children: [ + { + path: '/gasOverview', + component: () => import('@/views/gasOverview/gasOverviewSimple'), + name: 'gasOverview', + meta: { title: '动力管线总览', icon: 'icon-config', permission: ['/gasOverview'] } + } + ] + }, { path: 'overview', component: Layout, diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4395df9..4347727 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } }, title: { - text: '分区气体流量计报警占比' + text: '分区水表报警占比图' }, chartSettings: { labelMap: { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 30fa639..cbacc0f 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -46,17 +46,20 @@ mounted() { // TODO:待调试真接口 this.fetchData() - this.chartData.rows = [ - { 'deviceType': '气体流量计', 'deviceCount': 20, '下单用户': 1093, '下单率': 0.32 }, - { 'deviceType': '供水泄露监测仪', 'deviceCount': 20, '下单用户': 3230, '下单率': 0.26 }, - { 'deviceType': '气体泄露监测仪', 'deviceCount': 50, '下单用户': 2623, '下单率': 0.76 }, - { 'deviceType': '腐蚀速率监测仪', 'deviceCount': 10, '下单用户': 1423, '下单率': 0.49 } - ] + // this.chartData.rows = [ + // { 'deviceType': '井盖状态监测仪', 'deviceCount': 1393, '下单用户': 1093, '下单率': 0.32 }, + // { 'deviceType': '液位监测仪', 'deviceCount': 3530, '下单用户': 3230, '下单率': 0.26 }, + // { 'deviceType': '燃气智能监测终端', 'deviceCount': 2923, '下单用户': 2623, '下单率': 0.76 }, + // { 'deviceType': '开挖监测仪', 'deviceCount': 1723, '下单用户': 1423, '下单率': 0.49 }, + // { 'deviceType': '有害气体监测仪', 'deviceCount': 3792, '下单用户': 3492, '下单率': 0.323 }, + // { 'deviceType': '水质监测仪', 'deviceCount': 2, '下单用户': 4293, '下单率': 0.78 }, + // { 'deviceType': '流量监测仪', 'deviceCount': 2, '下单用户': 4293, '下单率': 0.78 } + // ] }, methods: { fetchData() { deviceStaticsByType().then(response => { - // this.chartData.rows = response.data + this.chartData.rows = response.data }) } } diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 2232a6f..7cdf078 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -32,7 +32,7 @@ return { dataGroup1: [ { - title: ['总用气量', '本月用气量'], + title: ['总用水量', '本月用水量'], context: ['--', '--'], icon: '', color: '#40c9c6', @@ -40,7 +40,7 @@ index: 0 }, { - title: ['今日用气量', '生产厂区用气量'], + title: ['今日用水量', '生产厂区用水量'], context: ['--', '--'], icon: '', color: '#36a3f7', @@ -58,7 +58,14 @@ ], dataGroup: [ { - title: '气体流量计', + title: '阀门数量', + context: '--', + icon: 'icon-valve', + color: '#40c9c6', + permission: '/device/list' + }, + { + title: '水表数量', context: '--', icon: 'icon-watch', color: '#9694f7', @@ -92,7 +99,7 @@ this.$router.push(path) }, getWater() { - // 用气量 + // 用水量 getWatchStatistic().then(response => { this.dataGroup1[0].context = [response.data.total ? parseFloat(response.data.total).toFixed(2) : '--', response.data.month ? parseFloat(response.data.month).toFixed(2) : '--'] this.dataGroup1[1].context = [response.data.today ? parseFloat(response.data.today).toFixed(2) : '--', response.data.prodution ? parseFloat(response.data.prodution).toFixed(2) : '--'] diff --git a/src/views/dashboard/components/alarmGasCountByDept.vue b/src/views/dashboard/components/alarmGasCountByDept.vue deleted file mode 100644 index 534d8f3..0000000 --- a/src/views/dashboard/components/alarmGasCountByDept.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - - diff --git a/src/views/dashboard/components/corrodeCountByDay.vue b/src/views/dashboard/components/corrodeCountByDay.vue deleted file mode 100644 index 8563956..0000000 --- a/src/views/dashboard/components/corrodeCountByDay.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - diff --git a/src/views/dashboard/components/watchAlarmBar.vue b/src/views/dashboard/components/watchAlarmBar.vue index dbf30c7..5fe709d 100644 --- a/src/views/dashboard/components/watchAlarmBar.vue +++ b/src/views/dashboard/components/watchAlarmBar.vue @@ -1,4 +1,4 @@ - +