diff --git a/src/router/index.js b/src/router/index.js index 4f3dbe0..a007ca0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,7 +8,7 @@ /* Layout */ import Layout from '@/layout/Layout' -import {systemRouters} from './modules/system.js' +import { systemRouters } from './modules/system.js' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -54,28 +54,15 @@ { path: '/', component: Layout, - redirect: 'dashboard', + redirect: '/dashboard', name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - component: () => import('@/views/dashboard/index'), - 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 } - }] + hidden: true + // children: [{ + // path: 'dashboard', + // component: () => import('@/views/dashboard/index'), + // name: 'Dashboard', + // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + // }] } ] // 实例化vue的时候直挂载constantRouter @@ -88,24 +75,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: '/dashboard', + component: Layout, + redirect: '/waterDashboard', + meta: { + title: '供水首页', + icon: 'icon-config', // 图标 + permission: ['/dashboard']// 权限名称 + }, + children: [ + { + path: '/waterDashboard', + component: () => import('@/views/dashboard/index'), + name: 'waterDashboard', + meta: { title: '供水管理首页', icon: 'icon-config', permission: ['/dashboard'] } + } + ] + }, + { + path: '/dashboard', + 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, @@ -129,17 +134,16 @@ component: Layout, redirect: '/overview', meta: { - title: '运行状态总览', + title: '供水管线总览', icon: 'icon-config', // 图标 - permission: ['/overview/wellList']// 权限名称 + permission: ['/overview']// 权限名称 }, children: [ { path: '/overview', component: () => import('@/views/overview/overviewSimple'), - // component: () => import('@/views/overview/oo'), name: 'overview', - meta: { title: '运行状态总览', icon: 'icon-config', permission: ['/overview/wellList'] } + meta: { title: '供水管线总览', icon: 'icon-config', permission: ['/overview'] } } ] }, @@ -288,13 +292,13 @@ path: '/dataAnalyse', name: 'DataAnalyse', component: () => import('@/views/dataStatics/dataStatics'), - meta: { title: '数据分析', icon: 'icon-config' , permission: ['/dataAnalyse'] } + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } }, { path: '/deviceStatics', name: 'DeviceStatics', component: () => import('@/views/deviceStatics/deviceStatics'), - meta: { title: '设备统计', icon: 'icon-config' , permission: ['/deviceStatics'] } + meta: { title: '设备统计', icon: 'icon-config', permission: ['/deviceStatics'] } }, { path: '/alarmStatics', diff --git a/src/router/index.js b/src/router/index.js index 4f3dbe0..a007ca0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,7 +8,7 @@ /* Layout */ import Layout from '@/layout/Layout' -import {systemRouters} from './modules/system.js' +import { systemRouters } from './modules/system.js' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -54,28 +54,15 @@ { path: '/', component: Layout, - redirect: 'dashboard', + redirect: '/dashboard', name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - component: () => import('@/views/dashboard/index'), - 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 } - }] + hidden: true + // children: [{ + // path: 'dashboard', + // component: () => import('@/views/dashboard/index'), + // name: 'Dashboard', + // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + // }] } ] // 实例化vue的时候直挂载constantRouter @@ -88,24 +75,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: '/dashboard', + component: Layout, + redirect: '/waterDashboard', + meta: { + title: '供水首页', + icon: 'icon-config', // 图标 + permission: ['/dashboard']// 权限名称 + }, + children: [ + { + path: '/waterDashboard', + component: () => import('@/views/dashboard/index'), + name: 'waterDashboard', + meta: { title: '供水管理首页', icon: 'icon-config', permission: ['/dashboard'] } + } + ] + }, + { + path: '/dashboard', + 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, @@ -129,17 +134,16 @@ component: Layout, redirect: '/overview', meta: { - title: '运行状态总览', + title: '供水管线总览', icon: 'icon-config', // 图标 - permission: ['/overview/wellList']// 权限名称 + permission: ['/overview']// 权限名称 }, children: [ { path: '/overview', component: () => import('@/views/overview/overviewSimple'), - // component: () => import('@/views/overview/oo'), name: 'overview', - meta: { title: '运行状态总览', icon: 'icon-config', permission: ['/overview/wellList'] } + meta: { title: '供水管线总览', icon: 'icon-config', permission: ['/overview'] } } ] }, @@ -288,13 +292,13 @@ path: '/dataAnalyse', name: 'DataAnalyse', component: () => import('@/views/dataStatics/dataStatics'), - meta: { title: '数据分析', icon: 'icon-config' , permission: ['/dataAnalyse'] } + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } }, { path: '/deviceStatics', name: 'DeviceStatics', component: () => import('@/views/deviceStatics/deviceStatics'), - meta: { title: '设备统计', icon: 'icon-config' , permission: ['/deviceStatics'] } + meta: { title: '设备统计', icon: 'icon-config', permission: ['/deviceStatics'] } }, { path: '/alarmStatics', diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..2535b36 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -58,7 +58,10 @@ }, methods: { fetchData() { - deviceStaticsByType().then(response => { + const params = { + extra: '1' + } + deviceStaticsByType(params).then(response => { this.chartData.rows = response.data }) } diff --git a/src/router/index.js b/src/router/index.js index 4f3dbe0..a007ca0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,7 +8,7 @@ /* Layout */ import Layout from '@/layout/Layout' -import {systemRouters} from './modules/system.js' +import { systemRouters } from './modules/system.js' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -54,28 +54,15 @@ { path: '/', component: Layout, - redirect: 'dashboard', + redirect: '/dashboard', name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - component: () => import('@/views/dashboard/index'), - 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 } - }] + hidden: true + // children: [{ + // path: 'dashboard', + // component: () => import('@/views/dashboard/index'), + // name: 'Dashboard', + // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + // }] } ] // 实例化vue的时候直挂载constantRouter @@ -88,24 +75,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: '/dashboard', + component: Layout, + redirect: '/waterDashboard', + meta: { + title: '供水首页', + icon: 'icon-config', // 图标 + permission: ['/dashboard']// 权限名称 + }, + children: [ + { + path: '/waterDashboard', + component: () => import('@/views/dashboard/index'), + name: 'waterDashboard', + meta: { title: '供水管理首页', icon: 'icon-config', permission: ['/dashboard'] } + } + ] + }, + { + path: '/dashboard', + 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, @@ -129,17 +134,16 @@ component: Layout, redirect: '/overview', meta: { - title: '运行状态总览', + title: '供水管线总览', icon: 'icon-config', // 图标 - permission: ['/overview/wellList']// 权限名称 + permission: ['/overview']// 权限名称 }, children: [ { path: '/overview', component: () => import('@/views/overview/overviewSimple'), - // component: () => import('@/views/overview/oo'), name: 'overview', - meta: { title: '运行状态总览', icon: 'icon-config', permission: ['/overview/wellList'] } + meta: { title: '供水管线总览', icon: 'icon-config', permission: ['/overview'] } } ] }, @@ -288,13 +292,13 @@ path: '/dataAnalyse', name: 'DataAnalyse', component: () => import('@/views/dataStatics/dataStatics'), - meta: { title: '数据分析', icon: 'icon-config' , permission: ['/dataAnalyse'] } + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } }, { path: '/deviceStatics', name: 'DeviceStatics', component: () => import('@/views/deviceStatics/deviceStatics'), - meta: { title: '设备统计', icon: 'icon-config' , permission: ['/deviceStatics'] } + meta: { title: '设备统计', icon: 'icon-config', permission: ['/deviceStatics'] } }, { path: '/alarmStatics', diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..2535b36 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -58,7 +58,10 @@ }, methods: { fetchData() { - deviceStaticsByType().then(response => { + const params = { + extra: '1' + } + deviceStaticsByType(params).then(response => { this.chartData.rows = response.data }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 479b9ad..8717f74 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '1' - } - getNoteList(data).then(response => { + getNoteList('1').then(response => { this.currentList = JSON.parse(response.data) }) }, diff --git a/src/router/index.js b/src/router/index.js index 4f3dbe0..a007ca0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,7 +8,7 @@ /* Layout */ import Layout from '@/layout/Layout' -import {systemRouters} from './modules/system.js' +import { systemRouters } from './modules/system.js' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -54,28 +54,15 @@ { path: '/', component: Layout, - redirect: 'dashboard', + redirect: '/dashboard', name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - component: () => import('@/views/dashboard/index'), - 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 } - }] + hidden: true + // children: [{ + // path: 'dashboard', + // component: () => import('@/views/dashboard/index'), + // name: 'Dashboard', + // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + // }] } ] // 实例化vue的时候直挂载constantRouter @@ -88,24 +75,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: '/dashboard', + component: Layout, + redirect: '/waterDashboard', + meta: { + title: '供水首页', + icon: 'icon-config', // 图标 + permission: ['/dashboard']// 权限名称 + }, + children: [ + { + path: '/waterDashboard', + component: () => import('@/views/dashboard/index'), + name: 'waterDashboard', + meta: { title: '供水管理首页', icon: 'icon-config', permission: ['/dashboard'] } + } + ] + }, + { + path: '/dashboard', + 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, @@ -129,17 +134,16 @@ component: Layout, redirect: '/overview', meta: { - title: '运行状态总览', + title: '供水管线总览', icon: 'icon-config', // 图标 - permission: ['/overview/wellList']// 权限名称 + permission: ['/overview']// 权限名称 }, children: [ { path: '/overview', component: () => import('@/views/overview/overviewSimple'), - // component: () => import('@/views/overview/oo'), name: 'overview', - meta: { title: '运行状态总览', icon: 'icon-config', permission: ['/overview/wellList'] } + meta: { title: '供水管线总览', icon: 'icon-config', permission: ['/overview'] } } ] }, @@ -288,13 +292,13 @@ path: '/dataAnalyse', name: 'DataAnalyse', component: () => import('@/views/dataStatics/dataStatics'), - meta: { title: '数据分析', icon: 'icon-config' , permission: ['/dataAnalyse'] } + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } }, { path: '/deviceStatics', name: 'DeviceStatics', component: () => import('@/views/deviceStatics/deviceStatics'), - meta: { title: '设备统计', icon: 'icon-config' , permission: ['/deviceStatics'] } + meta: { title: '设备统计', icon: 'icon-config', permission: ['/deviceStatics'] } }, { path: '/alarmStatics', diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..2535b36 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -58,7 +58,10 @@ }, methods: { fetchData() { - deviceStaticsByType().then(response => { + const params = { + extra: '1' + } + deviceStaticsByType(params).then(response => { this.chartData.rows = response.data }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 479b9ad..8717f74 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '1' - } - getNoteList(data).then(response => { + getNoteList('1').then(response => { this.currentList = JSON.parse(response.data) }) }, diff --git a/src/views/gasDashboard/components/DeviceCount.vue b/src/views/gasDashboard/components/DeviceCount.vue index c777fe5..bb197f8 100644 --- a/src/views/gasDashboard/components/DeviceCount.vue +++ b/src/views/gasDashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { diff --git a/src/router/index.js b/src/router/index.js index 4f3dbe0..a007ca0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,7 +8,7 @@ /* Layout */ import Layout from '@/layout/Layout' -import {systemRouters} from './modules/system.js' +import { systemRouters } from './modules/system.js' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -54,28 +54,15 @@ { path: '/', component: Layout, - redirect: 'dashboard', + redirect: '/dashboard', name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - component: () => import('@/views/dashboard/index'), - 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 } - }] + hidden: true + // children: [{ + // path: 'dashboard', + // component: () => import('@/views/dashboard/index'), + // name: 'Dashboard', + // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + // }] } ] // 实例化vue的时候直挂载constantRouter @@ -88,24 +75,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: '/dashboard', + component: Layout, + redirect: '/waterDashboard', + meta: { + title: '供水首页', + icon: 'icon-config', // 图标 + permission: ['/dashboard']// 权限名称 + }, + children: [ + { + path: '/waterDashboard', + component: () => import('@/views/dashboard/index'), + name: 'waterDashboard', + meta: { title: '供水管理首页', icon: 'icon-config', permission: ['/dashboard'] } + } + ] + }, + { + path: '/dashboard', + 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, @@ -129,17 +134,16 @@ component: Layout, redirect: '/overview', meta: { - title: '运行状态总览', + title: '供水管线总览', icon: 'icon-config', // 图标 - permission: ['/overview/wellList']// 权限名称 + permission: ['/overview']// 权限名称 }, children: [ { path: '/overview', component: () => import('@/views/overview/overviewSimple'), - // component: () => import('@/views/overview/oo'), name: 'overview', - meta: { title: '运行状态总览', icon: 'icon-config', permission: ['/overview/wellList'] } + meta: { title: '供水管线总览', icon: 'icon-config', permission: ['/overview'] } } ] }, @@ -288,13 +292,13 @@ path: '/dataAnalyse', name: 'DataAnalyse', component: () => import('@/views/dataStatics/dataStatics'), - meta: { title: '数据分析', icon: 'icon-config' , permission: ['/dataAnalyse'] } + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } }, { path: '/deviceStatics', name: 'DeviceStatics', component: () => import('@/views/deviceStatics/deviceStatics'), - meta: { title: '设备统计', icon: 'icon-config' , permission: ['/deviceStatics'] } + meta: { title: '设备统计', icon: 'icon-config', permission: ['/deviceStatics'] } }, { path: '/alarmStatics', diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..2535b36 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -58,7 +58,10 @@ }, methods: { fetchData() { - deviceStaticsByType().then(response => { + const params = { + extra: '1' + } + deviceStaticsByType(params).then(response => { this.chartData.rows = response.data }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 479b9ad..8717f74 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '1' - } - getNoteList(data).then(response => { + getNoteList('1').then(response => { this.currentList = JSON.parse(response.data) }) }, diff --git a/src/views/gasDashboard/components/DeviceCount.vue b/src/views/gasDashboard/components/DeviceCount.vue index c777fe5..bb197f8 100644 --- a/src/views/gasDashboard/components/DeviceCount.vue +++ b/src/views/gasDashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { diff --git a/src/views/gasDashboard/components/waterNote.vue b/src/views/gasDashboard/components/waterNote.vue index 89c62d9..0b705fc 100644 --- a/src/views/gasDashboard/components/waterNote.vue +++ b/src/views/gasDashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '2' - } - getNoteList(data).then(response => { + getNoteList('2').then(response => { console.log(response, '=====1234') this.currentList = JSON.parse(response.data) }) @@ -92,10 +89,19 @@ // 保存用水事记 saveNote() { const currentList = this.currentList.map((item, index) => { - return { list: this.currentList, content: item.content, num: index, type: '2' } + return { content: item.content, num: index } }) console.log(currentList) +<<<<<<< HEAD updateNoteList(currentList).then(res => { +======= + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { + console.log(res, '======7890') +>>>>>>> e6bfd4632c0a242465974fc63c94bbb267c63d41 this.editMode = false this.$message.success('保存成功') }).catch(e => { diff --git a/src/router/index.js b/src/router/index.js index 4f3dbe0..a007ca0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,7 +8,7 @@ /* Layout */ import Layout from '@/layout/Layout' -import {systemRouters} from './modules/system.js' +import { systemRouters } from './modules/system.js' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -54,28 +54,15 @@ { path: '/', component: Layout, - redirect: 'dashboard', + redirect: '/dashboard', name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - component: () => import('@/views/dashboard/index'), - 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 } - }] + hidden: true + // children: [{ + // path: 'dashboard', + // component: () => import('@/views/dashboard/index'), + // name: 'Dashboard', + // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + // }] } ] // 实例化vue的时候直挂载constantRouter @@ -88,24 +75,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: '/dashboard', + component: Layout, + redirect: '/waterDashboard', + meta: { + title: '供水首页', + icon: 'icon-config', // 图标 + permission: ['/dashboard']// 权限名称 + }, + children: [ + { + path: '/waterDashboard', + component: () => import('@/views/dashboard/index'), + name: 'waterDashboard', + meta: { title: '供水管理首页', icon: 'icon-config', permission: ['/dashboard'] } + } + ] + }, + { + path: '/dashboard', + 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, @@ -129,17 +134,16 @@ component: Layout, redirect: '/overview', meta: { - title: '运行状态总览', + title: '供水管线总览', icon: 'icon-config', // 图标 - permission: ['/overview/wellList']// 权限名称 + permission: ['/overview']// 权限名称 }, children: [ { path: '/overview', component: () => import('@/views/overview/overviewSimple'), - // component: () => import('@/views/overview/oo'), name: 'overview', - meta: { title: '运行状态总览', icon: 'icon-config', permission: ['/overview/wellList'] } + meta: { title: '供水管线总览', icon: 'icon-config', permission: ['/overview'] } } ] }, @@ -288,13 +292,13 @@ path: '/dataAnalyse', name: 'DataAnalyse', component: () => import('@/views/dataStatics/dataStatics'), - meta: { title: '数据分析', icon: 'icon-config' , permission: ['/dataAnalyse'] } + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } }, { path: '/deviceStatics', name: 'DeviceStatics', component: () => import('@/views/deviceStatics/deviceStatics'), - meta: { title: '设备统计', icon: 'icon-config' , permission: ['/deviceStatics'] } + meta: { title: '设备统计', icon: 'icon-config', permission: ['/deviceStatics'] } }, { path: '/alarmStatics', diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..2535b36 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -58,7 +58,10 @@ }, methods: { fetchData() { - deviceStaticsByType().then(response => { + const params = { + extra: '1' + } + deviceStaticsByType(params).then(response => { this.chartData.rows = response.data }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 479b9ad..8717f74 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '1' - } - getNoteList(data).then(response => { + getNoteList('1').then(response => { this.currentList = JSON.parse(response.data) }) }, diff --git a/src/views/gasDashboard/components/DeviceCount.vue b/src/views/gasDashboard/components/DeviceCount.vue index c777fe5..bb197f8 100644 --- a/src/views/gasDashboard/components/DeviceCount.vue +++ b/src/views/gasDashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { diff --git a/src/views/gasDashboard/components/waterNote.vue b/src/views/gasDashboard/components/waterNote.vue index 89c62d9..0b705fc 100644 --- a/src/views/gasDashboard/components/waterNote.vue +++ b/src/views/gasDashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '2' - } - getNoteList(data).then(response => { + getNoteList('2').then(response => { console.log(response, '=====1234') this.currentList = JSON.parse(response.data) }) @@ -92,10 +89,19 @@ // 保存用水事记 saveNote() { const currentList = this.currentList.map((item, index) => { - return { list: this.currentList, content: item.content, num: index, type: '2' } + return { content: item.content, num: index } }) console.log(currentList) +<<<<<<< HEAD updateNoteList(currentList).then(res => { +======= + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { + console.log(res, '======7890') +>>>>>>> e6bfd4632c0a242465974fc63c94bbb267c63d41 this.editMode = false this.$message.success('保存成功') }).catch(e => { diff --git a/src/views/gasOverview/gasOverviewSimple.vue b/src/views/gasOverview/gasOverviewSimple.vue index 889ed8b..cf9ebf6 100644 --- a/src/views/gasOverview/gasOverviewSimple.vue +++ b/src/views/gasOverview/gasOverviewSimple.vue @@ -858,7 +858,7 @@ bottom: 2px; right: 0px; padding: 10px 0px 10px 10px; - background-color: rgba(255, 234, 241,0.8); + background-color: rgba(241, 236, 238, 0.8); } // 报警列表 .map-alarm-div{ diff --git a/src/router/index.js b/src/router/index.js index 4f3dbe0..a007ca0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,7 +8,7 @@ /* Layout */ import Layout from '@/layout/Layout' -import {systemRouters} from './modules/system.js' +import { systemRouters } from './modules/system.js' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -54,28 +54,15 @@ { path: '/', component: Layout, - redirect: 'dashboard', + redirect: '/dashboard', name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - component: () => import('@/views/dashboard/index'), - 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 } - }] + hidden: true + // children: [{ + // path: 'dashboard', + // component: () => import('@/views/dashboard/index'), + // name: 'Dashboard', + // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + // }] } ] // 实例化vue的时候直挂载constantRouter @@ -88,24 +75,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: '/dashboard', + component: Layout, + redirect: '/waterDashboard', + meta: { + title: '供水首页', + icon: 'icon-config', // 图标 + permission: ['/dashboard']// 权限名称 + }, + children: [ + { + path: '/waterDashboard', + component: () => import('@/views/dashboard/index'), + name: 'waterDashboard', + meta: { title: '供水管理首页', icon: 'icon-config', permission: ['/dashboard'] } + } + ] + }, + { + path: '/dashboard', + 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, @@ -129,17 +134,16 @@ component: Layout, redirect: '/overview', meta: { - title: '运行状态总览', + title: '供水管线总览', icon: 'icon-config', // 图标 - permission: ['/overview/wellList']// 权限名称 + permission: ['/overview']// 权限名称 }, children: [ { path: '/overview', component: () => import('@/views/overview/overviewSimple'), - // component: () => import('@/views/overview/oo'), name: 'overview', - meta: { title: '运行状态总览', icon: 'icon-config', permission: ['/overview/wellList'] } + meta: { title: '供水管线总览', icon: 'icon-config', permission: ['/overview'] } } ] }, @@ -288,13 +292,13 @@ path: '/dataAnalyse', name: 'DataAnalyse', component: () => import('@/views/dataStatics/dataStatics'), - meta: { title: '数据分析', icon: 'icon-config' , permission: ['/dataAnalyse'] } + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } }, { path: '/deviceStatics', name: 'DeviceStatics', component: () => import('@/views/deviceStatics/deviceStatics'), - meta: { title: '设备统计', icon: 'icon-config' , permission: ['/deviceStatics'] } + meta: { title: '设备统计', icon: 'icon-config', permission: ['/deviceStatics'] } }, { path: '/alarmStatics', diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..2535b36 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { @@ -58,7 +58,10 @@ }, methods: { fetchData() { - deviceStaticsByType().then(response => { + const params = { + extra: '1' + } + deviceStaticsByType(params).then(response => { this.chartData.rows = response.data }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 479b9ad..8717f74 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '1' - } - getNoteList(data).then(response => { + getNoteList('1').then(response => { this.currentList = JSON.parse(response.data) }) }, diff --git a/src/views/gasDashboard/components/DeviceCount.vue b/src/views/gasDashboard/components/DeviceCount.vue index c777fe5..bb197f8 100644 --- a/src/views/gasDashboard/components/DeviceCount.vue +++ b/src/views/gasDashboard/components/DeviceCount.vue @@ -15,7 +15,7 @@ data() { this.extend = { series: { - label: { show: true, position: 'right', color:'#333' } + label: { show: true, position: 'right', color: '#333' } } } this.grid = { diff --git a/src/views/gasDashboard/components/waterNote.vue b/src/views/gasDashboard/components/waterNote.vue index 89c62d9..0b705fc 100644 --- a/src/views/gasDashboard/components/waterNote.vue +++ b/src/views/gasDashboard/components/waterNote.vue @@ -65,10 +65,7 @@ // { 'content': '测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试', 'num': 1 } // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) - const data = { - type: '2' - } - getNoteList(data).then(response => { + getNoteList('2').then(response => { console.log(response, '=====1234') this.currentList = JSON.parse(response.data) }) @@ -92,10 +89,19 @@ // 保存用水事记 saveNote() { const currentList = this.currentList.map((item, index) => { - return { list: this.currentList, content: item.content, num: index, type: '2' } + return { content: item.content, num: index } }) console.log(currentList) +<<<<<<< HEAD updateNoteList(currentList).then(res => { +======= + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { + console.log(res, '======7890') +>>>>>>> e6bfd4632c0a242465974fc63c94bbb267c63d41 this.editMode = false this.$message.success('保存成功') }).catch(e => { diff --git a/src/views/gasOverview/gasOverviewSimple.vue b/src/views/gasOverview/gasOverviewSimple.vue index 889ed8b..cf9ebf6 100644 --- a/src/views/gasOverview/gasOverviewSimple.vue +++ b/src/views/gasOverview/gasOverviewSimple.vue @@ -858,7 +858,7 @@ bottom: 2px; right: 0px; padding: 10px 0px 10px 10px; - background-color: rgba(255, 234, 241,0.8); + background-color: rgba(241, 236, 238, 0.8); } // 报警列表 .map-alarm-div{ diff --git a/static/project.config.json b/static/project.config.json index be2f8d7..7b9a3c3 100644 --- a/static/project.config.json +++ b/static/project.config.json @@ -1,5 +1,5 @@ { - "title": "场区供水管理系统", + "title": "场区能源管理系统", "baseUrl": "http://111.198.10.15:20104/", "mainPage": "http://111.198.10.15:11404/dcms/#", "singleSys": true,