diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index 4859071..4a558d1 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -33,16 +33,16 @@ } }, mounted() { - // this.fetchData() + this.fetchData() // 模拟数据 - this.chartData.rows = [ - { 'date': '9月20日', 'alarmTimes': 1393, 'alarmWells': 1093 }, - { 'date': '9月21日', 'alarmTimes': 3530, 'alarmWells': 3230 }, - { 'date': '9月22日', 'alarmTimes': 2923, 'alarmWells': 2623 }, - { 'date': '9月23日', 'alarmTimes': 1723, 'alarmWells': 1423 }, - { 'date': '9月24日', 'alarmTimes': 3792, 'alarmWells': 3492 }, - { 'date': '9月25日', 'alarmTimes': 4593, 'alarmWells': 4293 } - ] + // this.chartData.rows = [ + // { 'date': '9月20日', 'alarmTimes': 153, 'alarmWells': 43 }, + // { 'date': '9月21日', 'alarmTimes': 150, 'alarmWells': 30 }, + // { 'date': '9月22日', 'alarmTimes': 143, 'alarmWells': 23 }, + // { 'date': '9月23日', 'alarmTimes': 173, 'alarmWells': 23 }, + // { 'date': '9月24日', 'alarmTimes': 272, 'alarmWells': 52 }, + // { 'date': '9月25日', 'alarmTimes': 253, 'alarmWells': 53 } + // ] }, methods: { fetchData() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index 4859071..4a558d1 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -33,16 +33,16 @@ } }, mounted() { - // this.fetchData() + this.fetchData() // 模拟数据 - this.chartData.rows = [ - { 'date': '9月20日', 'alarmTimes': 1393, 'alarmWells': 1093 }, - { 'date': '9月21日', 'alarmTimes': 3530, 'alarmWells': 3230 }, - { 'date': '9月22日', 'alarmTimes': 2923, 'alarmWells': 2623 }, - { 'date': '9月23日', 'alarmTimes': 1723, 'alarmWells': 1423 }, - { 'date': '9月24日', 'alarmTimes': 3792, 'alarmWells': 3492 }, - { 'date': '9月25日', 'alarmTimes': 4593, 'alarmWells': 4293 } - ] + // this.chartData.rows = [ + // { 'date': '9月20日', 'alarmTimes': 153, 'alarmWells': 43 }, + // { 'date': '9月21日', 'alarmTimes': 150, 'alarmWells': 30 }, + // { 'date': '9月22日', 'alarmTimes': 143, 'alarmWells': 23 }, + // { 'date': '9月23日', 'alarmTimes': 173, 'alarmWells': 23 }, + // { 'date': '9月24日', 'alarmTimes': 272, 'alarmWells': 52 }, + // { 'date': '9月25日', 'alarmTimes': 253, 'alarmWells': 53 } + // ] }, methods: { fetchData() { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 811e253..7ff9ba3 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -41,16 +41,16 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - 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 } - ] + this.fetchData() + // 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() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index 4859071..4a558d1 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -33,16 +33,16 @@ } }, mounted() { - // this.fetchData() + this.fetchData() // 模拟数据 - this.chartData.rows = [ - { 'date': '9月20日', 'alarmTimes': 1393, 'alarmWells': 1093 }, - { 'date': '9月21日', 'alarmTimes': 3530, 'alarmWells': 3230 }, - { 'date': '9月22日', 'alarmTimes': 2923, 'alarmWells': 2623 }, - { 'date': '9月23日', 'alarmTimes': 1723, 'alarmWells': 1423 }, - { 'date': '9月24日', 'alarmTimes': 3792, 'alarmWells': 3492 }, - { 'date': '9月25日', 'alarmTimes': 4593, 'alarmWells': 4293 } - ] + // this.chartData.rows = [ + // { 'date': '9月20日', 'alarmTimes': 153, 'alarmWells': 43 }, + // { 'date': '9月21日', 'alarmTimes': 150, 'alarmWells': 30 }, + // { 'date': '9月22日', 'alarmTimes': 143, 'alarmWells': 23 }, + // { 'date': '9月23日', 'alarmTimes': 173, 'alarmWells': 23 }, + // { 'date': '9月24日', 'alarmTimes': 272, 'alarmWells': 52 }, + // { 'date': '9月25日', 'alarmTimes': 253, 'alarmWells': 53 } + // ] }, methods: { fetchData() { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 811e253..7ff9ba3 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -41,16 +41,16 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - 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 } - ] + this.fetchData() + // 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() { diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 5ddb3cc..b30e092 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -32,16 +32,16 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'onlineStatus': '在线', 'deviceCount': 0 }, - { 'onlineStatus': '离线', 'deviceCount': 0 } - ] + this.fetchData() }, methods: { fetchData() { deviceStaticByStatus().then(response => { - this.chartData.rows = response.data + const data = response.data + this.chartData.rows = [ + { 'onlineStatus': '在线', 'deviceCount': data.online }, + { 'onlineStatus': '离线', 'deviceCount': data.offline } + ] }) } } diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index 4859071..4a558d1 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -33,16 +33,16 @@ } }, mounted() { - // this.fetchData() + this.fetchData() // 模拟数据 - this.chartData.rows = [ - { 'date': '9月20日', 'alarmTimes': 1393, 'alarmWells': 1093 }, - { 'date': '9月21日', 'alarmTimes': 3530, 'alarmWells': 3230 }, - { 'date': '9月22日', 'alarmTimes': 2923, 'alarmWells': 2623 }, - { 'date': '9月23日', 'alarmTimes': 1723, 'alarmWells': 1423 }, - { 'date': '9月24日', 'alarmTimes': 3792, 'alarmWells': 3492 }, - { 'date': '9月25日', 'alarmTimes': 4593, 'alarmWells': 4293 } - ] + // this.chartData.rows = [ + // { 'date': '9月20日', 'alarmTimes': 153, 'alarmWells': 43 }, + // { 'date': '9月21日', 'alarmTimes': 150, 'alarmWells': 30 }, + // { 'date': '9月22日', 'alarmTimes': 143, 'alarmWells': 23 }, + // { 'date': '9月23日', 'alarmTimes': 173, 'alarmWells': 23 }, + // { 'date': '9月24日', 'alarmTimes': 272, 'alarmWells': 52 }, + // { 'date': '9月25日', 'alarmTimes': 253, 'alarmWells': 53 } + // ] }, methods: { fetchData() { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 811e253..7ff9ba3 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -41,16 +41,16 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - 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 } - ] + this.fetchData() + // 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() { diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 5ddb3cc..b30e092 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -32,16 +32,16 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'onlineStatus': '在线', 'deviceCount': 0 }, - { 'onlineStatus': '离线', 'deviceCount': 0 } - ] + this.fetchData() }, methods: { fetchData() { deviceStaticByStatus().then(response => { - this.chartData.rows = response.data + const data = response.data + this.chartData.rows = [ + { 'onlineStatus': '在线', 'deviceCount': data.online }, + { 'onlineStatus': '离线', 'deviceCount': data.offline } + ] }) } } diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index 3c0f043..9e0d75f 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -15,34 +15,34 @@ this.chartSettings = { labelMap: { 'deptName': '权属单位', - 'beforGet': '待处理', + 'beforeGet': '待处理', 'beforeConfirm': '待确认', 'inHandle': '处理中', 'over': '已完成' }, stack: { - 'xxx': ['beforGet', 'beforeConfirm', 'inHandle', 'over'] + 'xxx': ['beforeGet', 'beforeConfirm', 'inHandle', 'over'] } } return { chartData: { - columns: ['deptName', 'beforGet', 'beforeConfirm', 'inHandle', 'over'], + columns: ['deptName', 'beforeGet', 'beforeConfirm', 'inHandle', 'over'], rows: [] } } }, mounted() { // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'deptName': '电力公司', 'beforGet': 139, 'beforeConfirm': 109, 'inHandle': 123, 'over': 456 }, - { 'deptName': '开拓热力', 'beforGet': 353, 'beforeConfirm': 323, 'inHandle': 123, 'over': 456 }, - { 'deptName': '市政集团', 'beforGet': 292, 'beforeConfirm': 262, 'inHandle': 123, 'over': 456 }, - { 'deptName': '博大网信', 'beforGet': 172, 'beforeConfirm': 142, 'inHandle': 123, 'over': 456 }, - { 'deptName': '信息办', 'beforGet': 379, 'beforeConfirm': 349, 'inHandle': 123, 'over': 456 }, - { 'deptName': '燃气四分', 'beforGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 }, - { 'deptName': '其他', 'beforGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 } - ] + this.fetchData() + // this.chartData.rows = [ + // { 'deptName': '电力公司', 'beforeGet': 139, 'beforeConfirm': 109, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '开拓热力', 'beforeGet': 353, 'beforeConfirm': 323, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '市政集团', 'beforeGet': 292, 'beforeConfirm': 262, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '博大网信', 'beforeGet': 172, 'beforeConfirm': 142, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '信息办', 'beforeGet': 379, 'beforeConfirm': 349, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '燃气四分', 'beforeGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '其他', 'beforeGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 } + // ] }, methods: { fetchData() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index 4859071..4a558d1 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -33,16 +33,16 @@ } }, mounted() { - // this.fetchData() + this.fetchData() // 模拟数据 - this.chartData.rows = [ - { 'date': '9月20日', 'alarmTimes': 1393, 'alarmWells': 1093 }, - { 'date': '9月21日', 'alarmTimes': 3530, 'alarmWells': 3230 }, - { 'date': '9月22日', 'alarmTimes': 2923, 'alarmWells': 2623 }, - { 'date': '9月23日', 'alarmTimes': 1723, 'alarmWells': 1423 }, - { 'date': '9月24日', 'alarmTimes': 3792, 'alarmWells': 3492 }, - { 'date': '9月25日', 'alarmTimes': 4593, 'alarmWells': 4293 } - ] + // this.chartData.rows = [ + // { 'date': '9月20日', 'alarmTimes': 153, 'alarmWells': 43 }, + // { 'date': '9月21日', 'alarmTimes': 150, 'alarmWells': 30 }, + // { 'date': '9月22日', 'alarmTimes': 143, 'alarmWells': 23 }, + // { 'date': '9月23日', 'alarmTimes': 173, 'alarmWells': 23 }, + // { 'date': '9月24日', 'alarmTimes': 272, 'alarmWells': 52 }, + // { 'date': '9月25日', 'alarmTimes': 253, 'alarmWells': 53 } + // ] }, methods: { fetchData() { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 811e253..7ff9ba3 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -41,16 +41,16 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - 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 } - ] + this.fetchData() + // 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() { diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 5ddb3cc..b30e092 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -32,16 +32,16 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'onlineStatus': '在线', 'deviceCount': 0 }, - { 'onlineStatus': '离线', 'deviceCount': 0 } - ] + this.fetchData() }, methods: { fetchData() { deviceStaticByStatus().then(response => { - this.chartData.rows = response.data + const data = response.data + this.chartData.rows = [ + { 'onlineStatus': '在线', 'deviceCount': data.online }, + { 'onlineStatus': '离线', 'deviceCount': data.offline } + ] }) } } diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index 3c0f043..9e0d75f 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -15,34 +15,34 @@ this.chartSettings = { labelMap: { 'deptName': '权属单位', - 'beforGet': '待处理', + 'beforeGet': '待处理', 'beforeConfirm': '待确认', 'inHandle': '处理中', 'over': '已完成' }, stack: { - 'xxx': ['beforGet', 'beforeConfirm', 'inHandle', 'over'] + 'xxx': ['beforeGet', 'beforeConfirm', 'inHandle', 'over'] } } return { chartData: { - columns: ['deptName', 'beforGet', 'beforeConfirm', 'inHandle', 'over'], + columns: ['deptName', 'beforeGet', 'beforeConfirm', 'inHandle', 'over'], rows: [] } } }, mounted() { // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'deptName': '电力公司', 'beforGet': 139, 'beforeConfirm': 109, 'inHandle': 123, 'over': 456 }, - { 'deptName': '开拓热力', 'beforGet': 353, 'beforeConfirm': 323, 'inHandle': 123, 'over': 456 }, - { 'deptName': '市政集团', 'beforGet': 292, 'beforeConfirm': 262, 'inHandle': 123, 'over': 456 }, - { 'deptName': '博大网信', 'beforGet': 172, 'beforeConfirm': 142, 'inHandle': 123, 'over': 456 }, - { 'deptName': '信息办', 'beforGet': 379, 'beforeConfirm': 349, 'inHandle': 123, 'over': 456 }, - { 'deptName': '燃气四分', 'beforGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 }, - { 'deptName': '其他', 'beforGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 } - ] + this.fetchData() + // this.chartData.rows = [ + // { 'deptName': '电力公司', 'beforeGet': 139, 'beforeConfirm': 109, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '开拓热力', 'beforeGet': 353, 'beforeConfirm': 323, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '市政集团', 'beforeGet': 292, 'beforeConfirm': 262, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '博大网信', 'beforeGet': 172, 'beforeConfirm': 142, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '信息办', 'beforeGet': 379, 'beforeConfirm': 349, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '燃气四分', 'beforeGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '其他', 'beforeGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 } + // ] }, methods: { fetchData() { diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index fc3a5d7..bbda98e 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -1,7 +1,7 @@ @@ -22,25 +22,29 @@ title: '井总数量', context: '--', icon: 'icon-well', - color: '#40c9c6' + color: '#40c9c6', + path: '/wellList' }, { title: '设备数量', context: '--', icon: 'icon-device', - color: '#36a3f7' + color: '#36a3f7', + path: '/deviceList' }, { title: '当前报警数', context: '--', icon: 'icon-alarm', - color: '#f4516c' + color: '#f4516c', + path: '/alarmNow' }, { title: '未完成工单数', context: '--', icon: 'icon-order', - color: '#f4516c' + color: '#f4516c', + path: '/listJob' } ] } @@ -52,26 +56,23 @@ this.getJobCount() }, methods: { + goPage(path) { + this.$router.push(path) + }, getWellCount() { - this.dataGroup[0].context = 0 - // TODO: 待调试真接口 - // wellCountByBfzt().then(response => { - // this.dataGroup[0].context = response.data.total - // }) + wellCountByBfzt().then(response => { + this.dataGroup[0].context = response.data.total + }) }, getDeviceCount() { - this.dataGroup[1].context = 0 - // TODO: 待调试真接口 - // deviceStaticByStatus().then(response => { - // this.dataGroup[1].context = response.data.total - // }) + deviceStaticByStatus().then(response => { + this.dataGroup[1].context = response.data.total + }) }, getAlarmCount() { - // TODO: 待调试真接口 - this.dataGroup[2].context = 0 - // alarmNowStatic().then(response => { - // this.dataGroup[2].context = response.data.total - // }) + alarmNowStatic().then(response => { + this.dataGroup[2].context = response.data.total + }) }, getJobCount() { jobCountByStatus().then(response => { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index 4859071..4a558d1 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -33,16 +33,16 @@ } }, mounted() { - // this.fetchData() + this.fetchData() // 模拟数据 - this.chartData.rows = [ - { 'date': '9月20日', 'alarmTimes': 1393, 'alarmWells': 1093 }, - { 'date': '9月21日', 'alarmTimes': 3530, 'alarmWells': 3230 }, - { 'date': '9月22日', 'alarmTimes': 2923, 'alarmWells': 2623 }, - { 'date': '9月23日', 'alarmTimes': 1723, 'alarmWells': 1423 }, - { 'date': '9月24日', 'alarmTimes': 3792, 'alarmWells': 3492 }, - { 'date': '9月25日', 'alarmTimes': 4593, 'alarmWells': 4293 } - ] + // this.chartData.rows = [ + // { 'date': '9月20日', 'alarmTimes': 153, 'alarmWells': 43 }, + // { 'date': '9月21日', 'alarmTimes': 150, 'alarmWells': 30 }, + // { 'date': '9月22日', 'alarmTimes': 143, 'alarmWells': 23 }, + // { 'date': '9月23日', 'alarmTimes': 173, 'alarmWells': 23 }, + // { 'date': '9月24日', 'alarmTimes': 272, 'alarmWells': 52 }, + // { 'date': '9月25日', 'alarmTimes': 253, 'alarmWells': 53 } + // ] }, methods: { fetchData() { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 811e253..7ff9ba3 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -41,16 +41,16 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - 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 } - ] + this.fetchData() + // 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() { diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 5ddb3cc..b30e092 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -32,16 +32,16 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'onlineStatus': '在线', 'deviceCount': 0 }, - { 'onlineStatus': '离线', 'deviceCount': 0 } - ] + this.fetchData() }, methods: { fetchData() { deviceStaticByStatus().then(response => { - this.chartData.rows = response.data + const data = response.data + this.chartData.rows = [ + { 'onlineStatus': '在线', 'deviceCount': data.online }, + { 'onlineStatus': '离线', 'deviceCount': data.offline } + ] }) } } diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index 3c0f043..9e0d75f 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -15,34 +15,34 @@ this.chartSettings = { labelMap: { 'deptName': '权属单位', - 'beforGet': '待处理', + 'beforeGet': '待处理', 'beforeConfirm': '待确认', 'inHandle': '处理中', 'over': '已完成' }, stack: { - 'xxx': ['beforGet', 'beforeConfirm', 'inHandle', 'over'] + 'xxx': ['beforeGet', 'beforeConfirm', 'inHandle', 'over'] } } return { chartData: { - columns: ['deptName', 'beforGet', 'beforeConfirm', 'inHandle', 'over'], + columns: ['deptName', 'beforeGet', 'beforeConfirm', 'inHandle', 'over'], rows: [] } } }, mounted() { // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'deptName': '电力公司', 'beforGet': 139, 'beforeConfirm': 109, 'inHandle': 123, 'over': 456 }, - { 'deptName': '开拓热力', 'beforGet': 353, 'beforeConfirm': 323, 'inHandle': 123, 'over': 456 }, - { 'deptName': '市政集团', 'beforGet': 292, 'beforeConfirm': 262, 'inHandle': 123, 'over': 456 }, - { 'deptName': '博大网信', 'beforGet': 172, 'beforeConfirm': 142, 'inHandle': 123, 'over': 456 }, - { 'deptName': '信息办', 'beforGet': 379, 'beforeConfirm': 349, 'inHandle': 123, 'over': 456 }, - { 'deptName': '燃气四分', 'beforGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 }, - { 'deptName': '其他', 'beforGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 } - ] + this.fetchData() + // this.chartData.rows = [ + // { 'deptName': '电力公司', 'beforeGet': 139, 'beforeConfirm': 109, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '开拓热力', 'beforeGet': 353, 'beforeConfirm': 323, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '市政集团', 'beforeGet': 292, 'beforeConfirm': 262, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '博大网信', 'beforeGet': 172, 'beforeConfirm': 142, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '信息办', 'beforeGet': 379, 'beforeConfirm': 349, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '燃气四分', 'beforeGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '其他', 'beforeGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 } + // ] }, methods: { fetchData() { diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index fc3a5d7..bbda98e 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -1,7 +1,7 @@ @@ -22,25 +22,29 @@ title: '井总数量', context: '--', icon: 'icon-well', - color: '#40c9c6' + color: '#40c9c6', + path: '/wellList' }, { title: '设备数量', context: '--', icon: 'icon-device', - color: '#36a3f7' + color: '#36a3f7', + path: '/deviceList' }, { title: '当前报警数', context: '--', icon: 'icon-alarm', - color: '#f4516c' + color: '#f4516c', + path: '/alarmNow' }, { title: '未完成工单数', context: '--', icon: 'icon-order', - color: '#f4516c' + color: '#f4516c', + path: '/listJob' } ] } @@ -52,26 +56,23 @@ this.getJobCount() }, methods: { + goPage(path) { + this.$router.push(path) + }, getWellCount() { - this.dataGroup[0].context = 0 - // TODO: 待调试真接口 - // wellCountByBfzt().then(response => { - // this.dataGroup[0].context = response.data.total - // }) + wellCountByBfzt().then(response => { + this.dataGroup[0].context = response.data.total + }) }, getDeviceCount() { - this.dataGroup[1].context = 0 - // TODO: 待调试真接口 - // deviceStaticByStatus().then(response => { - // this.dataGroup[1].context = response.data.total - // }) + deviceStaticByStatus().then(response => { + this.dataGroup[1].context = response.data.total + }) }, getAlarmCount() { - // TODO: 待调试真接口 - this.dataGroup[2].context = 0 - // alarmNowStatic().then(response => { - // this.dataGroup[2].context = response.data.total - // }) + alarmNowStatic().then(response => { + this.dataGroup[2].context = response.data.total + }) }, getJobCount() { jobCountByStatus().then(response => { diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue index 5290140..ae8b829 100644 --- a/src/views/dashboard/components/WellCountByBfzt.vue +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -31,17 +31,17 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'bfzt': '布防', 'wellCount': 0 }, - { 'bfzt': '撤防', 'wellCount': 0 } - ] + this.fetchData() }, methods: { // 获取统计数据 fetchData() { wellStaticByBfzt(this.listQuery).then(response => { - this.chartData.rows = response.data + const data = response.data + this.chartData.rows = [ + { 'bfzt': '布防', 'wellCount': data.bfWell }, + { 'bfzt': '撤防', 'wellCount': data.cfWell } + ] }) } } diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index 4859071..4a558d1 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -33,16 +33,16 @@ } }, mounted() { - // this.fetchData() + this.fetchData() // 模拟数据 - this.chartData.rows = [ - { 'date': '9月20日', 'alarmTimes': 1393, 'alarmWells': 1093 }, - { 'date': '9月21日', 'alarmTimes': 3530, 'alarmWells': 3230 }, - { 'date': '9月22日', 'alarmTimes': 2923, 'alarmWells': 2623 }, - { 'date': '9月23日', 'alarmTimes': 1723, 'alarmWells': 1423 }, - { 'date': '9月24日', 'alarmTimes': 3792, 'alarmWells': 3492 }, - { 'date': '9月25日', 'alarmTimes': 4593, 'alarmWells': 4293 } - ] + // this.chartData.rows = [ + // { 'date': '9月20日', 'alarmTimes': 153, 'alarmWells': 43 }, + // { 'date': '9月21日', 'alarmTimes': 150, 'alarmWells': 30 }, + // { 'date': '9月22日', 'alarmTimes': 143, 'alarmWells': 23 }, + // { 'date': '9月23日', 'alarmTimes': 173, 'alarmWells': 23 }, + // { 'date': '9月24日', 'alarmTimes': 272, 'alarmWells': 52 }, + // { 'date': '9月25日', 'alarmTimes': 253, 'alarmWells': 53 } + // ] }, methods: { fetchData() { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 811e253..7ff9ba3 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -41,16 +41,16 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - 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 } - ] + this.fetchData() + // 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() { diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 5ddb3cc..b30e092 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -32,16 +32,16 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'onlineStatus': '在线', 'deviceCount': 0 }, - { 'onlineStatus': '离线', 'deviceCount': 0 } - ] + this.fetchData() }, methods: { fetchData() { deviceStaticByStatus().then(response => { - this.chartData.rows = response.data + const data = response.data + this.chartData.rows = [ + { 'onlineStatus': '在线', 'deviceCount': data.online }, + { 'onlineStatus': '离线', 'deviceCount': data.offline } + ] }) } } diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index 3c0f043..9e0d75f 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -15,34 +15,34 @@ this.chartSettings = { labelMap: { 'deptName': '权属单位', - 'beforGet': '待处理', + 'beforeGet': '待处理', 'beforeConfirm': '待确认', 'inHandle': '处理中', 'over': '已完成' }, stack: { - 'xxx': ['beforGet', 'beforeConfirm', 'inHandle', 'over'] + 'xxx': ['beforeGet', 'beforeConfirm', 'inHandle', 'over'] } } return { chartData: { - columns: ['deptName', 'beforGet', 'beforeConfirm', 'inHandle', 'over'], + columns: ['deptName', 'beforeGet', 'beforeConfirm', 'inHandle', 'over'], rows: [] } } }, mounted() { // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'deptName': '电力公司', 'beforGet': 139, 'beforeConfirm': 109, 'inHandle': 123, 'over': 456 }, - { 'deptName': '开拓热力', 'beforGet': 353, 'beforeConfirm': 323, 'inHandle': 123, 'over': 456 }, - { 'deptName': '市政集团', 'beforGet': 292, 'beforeConfirm': 262, 'inHandle': 123, 'over': 456 }, - { 'deptName': '博大网信', 'beforGet': 172, 'beforeConfirm': 142, 'inHandle': 123, 'over': 456 }, - { 'deptName': '信息办', 'beforGet': 379, 'beforeConfirm': 349, 'inHandle': 123, 'over': 456 }, - { 'deptName': '燃气四分', 'beforGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 }, - { 'deptName': '其他', 'beforGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 } - ] + this.fetchData() + // this.chartData.rows = [ + // { 'deptName': '电力公司', 'beforeGet': 139, 'beforeConfirm': 109, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '开拓热力', 'beforeGet': 353, 'beforeConfirm': 323, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '市政集团', 'beforeGet': 292, 'beforeConfirm': 262, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '博大网信', 'beforeGet': 172, 'beforeConfirm': 142, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '信息办', 'beforeGet': 379, 'beforeConfirm': 349, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '燃气四分', 'beforeGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 }, + // { 'deptName': '其他', 'beforeGet': 459, 'beforeConfirm': 429, 'inHandle': 123, 'over': 456 } + // ] }, methods: { fetchData() { diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index fc3a5d7..bbda98e 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -1,7 +1,7 @@ @@ -22,25 +22,29 @@ title: '井总数量', context: '--', icon: 'icon-well', - color: '#40c9c6' + color: '#40c9c6', + path: '/wellList' }, { title: '设备数量', context: '--', icon: 'icon-device', - color: '#36a3f7' + color: '#36a3f7', + path: '/deviceList' }, { title: '当前报警数', context: '--', icon: 'icon-alarm', - color: '#f4516c' + color: '#f4516c', + path: '/alarmNow' }, { title: '未完成工单数', context: '--', icon: 'icon-order', - color: '#f4516c' + color: '#f4516c', + path: '/listJob' } ] } @@ -52,26 +56,23 @@ this.getJobCount() }, methods: { + goPage(path) { + this.$router.push(path) + }, getWellCount() { - this.dataGroup[0].context = 0 - // TODO: 待调试真接口 - // wellCountByBfzt().then(response => { - // this.dataGroup[0].context = response.data.total - // }) + wellCountByBfzt().then(response => { + this.dataGroup[0].context = response.data.total + }) }, getDeviceCount() { - this.dataGroup[1].context = 0 - // TODO: 待调试真接口 - // deviceStaticByStatus().then(response => { - // this.dataGroup[1].context = response.data.total - // }) + deviceStaticByStatus().then(response => { + this.dataGroup[1].context = response.data.total + }) }, getAlarmCount() { - // TODO: 待调试真接口 - this.dataGroup[2].context = 0 - // alarmNowStatic().then(response => { - // this.dataGroup[2].context = response.data.total - // }) + alarmNowStatic().then(response => { + this.dataGroup[2].context = response.data.total + }) }, getJobCount() { jobCountByStatus().then(response => { diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue index 5290140..ae8b829 100644 --- a/src/views/dashboard/components/WellCountByBfzt.vue +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -31,17 +31,17 @@ }, mounted() { // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'bfzt': '布防', 'wellCount': 0 }, - { 'bfzt': '撤防', 'wellCount': 0 } - ] + this.fetchData() }, methods: { // 获取统计数据 fetchData() { wellStaticByBfzt(this.listQuery).then(response => { - this.chartData.rows = response.data + const data = response.data + this.chartData.rows = [ + { 'bfzt': '布防', 'wellCount': data.bfWell }, + { 'bfzt': '撤防', 'wellCount': data.cfWell } + ] }) } } diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index e2c5285..0eef65f 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -26,34 +26,21 @@ }, barWidth: 15, labelMap: { - 'wellType': '井类型', + 'wellTypeName': '井类型', 'wellCount': '井数量' }, - dimension: ['wellType'], + dimension: ['wellTypeName'], metrics: ['wellCount'] } return { chartData: { - columns: ['wellType', 'wellCount'], + columns: ['wellTypeName', 'wellCount'], rows: [] } } }, mounted() { - // TODO:待调试真接口 - // this.fetchData() - this.chartData.rows = [ - { 'wellType': '电力', 'wellCount': 1282 }, - { 'wellType': '热力', 'wellCount': 1457 }, - { 'wellType': '交通', 'wellCount': 1580 }, - { 'wellType': '路灯', 'wellCount': 4426 }, - { 'wellType': '监控', 'wellCount': 310 }, - { 'wellType': '雨水', 'wellCount': 2317 }, - { 'wellType': '污水', 'wellCount': 2055 }, - { 'wellType': '通信', 'wellCount': 1174 }, - { 'wellType': '燃气', 'wellCount': 43 }, - { 'wellType': '其他', 'wellCount': 8 } - ] + this.fetchData() }, methods: { fetchData() {