diff --git a/config/dev.env.js b/config/dev.env.js index 36f7d4a..1cab225 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -9,6 +9,6 @@ // BASE_API: '"http://42.81.160.165:2022/smartwell"' // BASE_API: '"http://111.198.10.15:11304"' // BASE_API: '"http://111.198.10.15:11643"' - // BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 - BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 + BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 + // BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 }) diff --git a/config/dev.env.js b/config/dev.env.js index 36f7d4a..1cab225 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -9,6 +9,6 @@ // BASE_API: '"http://42.81.160.165:2022/smartwell"' // BASE_API: '"http://111.198.10.15:11304"' // BASE_API: '"http://111.198.10.15:11643"' - // BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 - BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 + BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 + // BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 }) diff --git a/config/prod.env.js b/config/prod.env.js index 3455ce7..bb20d1d 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,5 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://111.198.10.15:11304"', // BASE_API: '"http://42.81.160.165:2022/smartwell/"', - BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + // BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + BASE_API: '"http://111.198.10.15:20104"' //11643 } diff --git a/config/dev.env.js b/config/dev.env.js index 36f7d4a..1cab225 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -9,6 +9,6 @@ // BASE_API: '"http://42.81.160.165:2022/smartwell"' // BASE_API: '"http://111.198.10.15:11304"' // BASE_API: '"http://111.198.10.15:11643"' - // BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 - BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 + BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 + // BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 }) diff --git a/config/prod.env.js b/config/prod.env.js index 3455ce7..bb20d1d 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,5 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://111.198.10.15:11304"', // BASE_API: '"http://42.81.160.165:2022/smartwell/"', - BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + // BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + BASE_API: '"http://111.198.10.15:20104"' //11643 } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 559a078..0dc3442 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -11,14 +11,50 @@ }) } -// 气体流量计数量 -// export function deviceCount(params) { -// return request({ -// url: 'device/count/15', -// method: 'get', -// params -// }) -// } +// 用水量、噪声统计数据 +export function gasStatistic2(deviceType) { + return request({ + url: 'gas/statistics/used', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 气体用气量走势图 +export function gasTrend(params) { + return request({ + url: '/gas/statistics/trend', + method: 'get', + params + }) +} +// 用气量超量报警统计 +export function gasAlarmTrend(params) { + return request({ + url: '/gas/alarm/trend', + method: 'get', + params + }) +} +// 各设备气体用气量 +export function gasUsed(params) { + return request({ + url: '/gas/used', + method: 'get', + params + }) +} +// 气体泄漏监测结果 +export function gasLeakStatus(params) { + return request({ + url: 'gas/leakage/rate', + method: 'get', + params + }) +} + // 气体流量计数量 export function deviceCount(type) { return request({ @@ -56,7 +92,7 @@ // 查询二级分区燃气告警 export function gasAlarmBySecondArea(params) { return request({ - url: 'dataStatistic/gasAlarmBySecondArea', + url: 'gas/alarm/rate', method: 'get', params }) diff --git a/config/dev.env.js b/config/dev.env.js index 36f7d4a..1cab225 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -9,6 +9,6 @@ // BASE_API: '"http://42.81.160.165:2022/smartwell"' // BASE_API: '"http://111.198.10.15:11304"' // BASE_API: '"http://111.198.10.15:11643"' - // BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 - BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 + BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 + // BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 }) diff --git a/config/prod.env.js b/config/prod.env.js index 3455ce7..bb20d1d 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,5 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://111.198.10.15:11304"', // BASE_API: '"http://42.81.160.165:2022/smartwell/"', - BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + // BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + BASE_API: '"http://111.198.10.15:20104"' //11643 } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 559a078..0dc3442 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -11,14 +11,50 @@ }) } -// 气体流量计数量 -// export function deviceCount(params) { -// return request({ -// url: 'device/count/15', -// method: 'get', -// params -// }) -// } +// 用水量、噪声统计数据 +export function gasStatistic2(deviceType) { + return request({ + url: 'gas/statistics/used', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 气体用气量走势图 +export function gasTrend(params) { + return request({ + url: '/gas/statistics/trend', + method: 'get', + params + }) +} +// 用气量超量报警统计 +export function gasAlarmTrend(params) { + return request({ + url: '/gas/alarm/trend', + method: 'get', + params + }) +} +// 各设备气体用气量 +export function gasUsed(params) { + return request({ + url: '/gas/used', + method: 'get', + params + }) +} +// 气体泄漏监测结果 +export function gasLeakStatus(params) { + return request({ + url: 'gas/leakage/rate', + method: 'get', + params + }) +} + // 气体流量计数量 export function deviceCount(type) { return request({ @@ -56,7 +92,7 @@ // 查询二级分区燃气告警 export function gasAlarmBySecondArea(params) { return request({ - url: 'dataStatistic/gasAlarmBySecondArea', + url: 'gas/alarm/rate', method: 'get', params }) diff --git a/src/components/BigData/Card1/index.vue b/src/components/BigData/Card1/index.vue index 748747b..c9ec32d 100644 --- a/src/components/BigData/Card1/index.vue +++ b/src/components/BigData/Card1/index.vue @@ -4,21 +4,11 @@
-
-
- -
-
- {{ title[0] }} {{ context[0] }}{{ unit }} -
-
- {{ title[1] }} {{ context[1] }}--> +
+
+
+ {{ name }} {{ context[index] }}{{ unit }}
@@ -41,7 +31,7 @@ props: { title: { type: Array, - default: function () { + default: function() { return ['标题', '标题'] } }, @@ -55,7 +45,7 @@ }, context: { type: Array, - default: function () { + default: function() { return ['--', '--'] } }, @@ -83,6 +73,8 @@ height: 108px; font-size: 12px; position: relative; + display: flex; + align-items: center; overflow: hidden; color: #666; background: #fff; @@ -96,7 +88,6 @@ } .card-panel-icon-wrapper { - float: left; margin: 14px 0 0 10px; padding: 16px 2px; transition: all 0.38s ease-out; @@ -109,25 +100,22 @@ } .card-panel-description { - float: left; + flex:1; font-weight: bold; - margin-top: 26px; overflow: auto; margin-left: 5px; .two { .card-panel-text { - line-height: 18px; + line-height: 26px; color: rgba(0, 0, 0, 0.45); font-size: 14px; - margin-bottom: 12px; + display: flex; + justify-content: space-between; } - .card-panel-num { font-size: 18px; color: #666; - padding-left: 10px; - float: right; } } .only { diff --git a/config/dev.env.js b/config/dev.env.js index 36f7d4a..1cab225 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -9,6 +9,6 @@ // BASE_API: '"http://42.81.160.165:2022/smartwell"' // BASE_API: '"http://111.198.10.15:11304"' // BASE_API: '"http://111.198.10.15:11643"' - // BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 - BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 + BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 + // BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 }) diff --git a/config/prod.env.js b/config/prod.env.js index 3455ce7..bb20d1d 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,5 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://111.198.10.15:11304"', // BASE_API: '"http://42.81.160.165:2022/smartwell/"', - BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + // BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + BASE_API: '"http://111.198.10.15:20104"' //11643 } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 559a078..0dc3442 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -11,14 +11,50 @@ }) } -// 气体流量计数量 -// export function deviceCount(params) { -// return request({ -// url: 'device/count/15', -// method: 'get', -// params -// }) -// } +// 用水量、噪声统计数据 +export function gasStatistic2(deviceType) { + return request({ + url: 'gas/statistics/used', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 气体用气量走势图 +export function gasTrend(params) { + return request({ + url: '/gas/statistics/trend', + method: 'get', + params + }) +} +// 用气量超量报警统计 +export function gasAlarmTrend(params) { + return request({ + url: '/gas/alarm/trend', + method: 'get', + params + }) +} +// 各设备气体用气量 +export function gasUsed(params) { + return request({ + url: '/gas/used', + method: 'get', + params + }) +} +// 气体泄漏监测结果 +export function gasLeakStatus(params) { + return request({ + url: 'gas/leakage/rate', + method: 'get', + params + }) +} + // 气体流量计数量 export function deviceCount(type) { return request({ @@ -56,7 +92,7 @@ // 查询二级分区燃气告警 export function gasAlarmBySecondArea(params) { return request({ - url: 'dataStatistic/gasAlarmBySecondArea', + url: 'gas/alarm/rate', method: 'get', params }) diff --git a/src/components/BigData/Card1/index.vue b/src/components/BigData/Card1/index.vue index 748747b..c9ec32d 100644 --- a/src/components/BigData/Card1/index.vue +++ b/src/components/BigData/Card1/index.vue @@ -4,21 +4,11 @@
-
-
- -
-
- {{ title[0] }} {{ context[0] }}{{ unit }} -
-
- {{ title[1] }} {{ context[1] }}--> +
+
+
+ {{ name }} {{ context[index] }}{{ unit }}
@@ -41,7 +31,7 @@ props: { title: { type: Array, - default: function () { + default: function() { return ['标题', '标题'] } }, @@ -55,7 +45,7 @@ }, context: { type: Array, - default: function () { + default: function() { return ['--', '--'] } }, @@ -83,6 +73,8 @@ height: 108px; font-size: 12px; position: relative; + display: flex; + align-items: center; overflow: hidden; color: #666; background: #fff; @@ -96,7 +88,6 @@ } .card-panel-icon-wrapper { - float: left; margin: 14px 0 0 10px; padding: 16px 2px; transition: all 0.38s ease-out; @@ -109,25 +100,22 @@ } .card-panel-description { - float: left; + flex:1; font-weight: bold; - margin-top: 26px; overflow: auto; margin-left: 5px; .two { .card-panel-text { - line-height: 18px; + line-height: 26px; color: rgba(0, 0, 0, 0.45); font-size: 14px; - margin-bottom: 12px; + display: flex; + justify-content: space-between; } - .card-panel-num { font-size: 18px; color: #666; - padding-left: 10px; - float: right; } } .only { diff --git a/src/utils/dateutils.js b/src/utils/dateutils.js index aa41264..11dc521 100644 --- a/src/utils/dateutils.js +++ b/src/utils/dateutils.js @@ -52,3 +52,13 @@ } return fmt } + +/** + * 获取近1周日期范围 + * @returns {*[]} + */ +export function getSearchLastWeekTime() { + const startTime = getLastWeek().Format('yyyy-MM-dd hh:mm:ss') + const endTime = getToday('yyyy-MM-dd hh:mm:ss') + return [startTime, endTime] +} diff --git a/config/dev.env.js b/config/dev.env.js index 36f7d4a..1cab225 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -9,6 +9,6 @@ // BASE_API: '"http://42.81.160.165:2022/smartwell"' // BASE_API: '"http://111.198.10.15:11304"' // BASE_API: '"http://111.198.10.15:11643"' - // BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 - BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 + BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 + // BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 }) diff --git a/config/prod.env.js b/config/prod.env.js index 3455ce7..bb20d1d 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,5 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://111.198.10.15:11304"', // BASE_API: '"http://42.81.160.165:2022/smartwell/"', - BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + // BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + BASE_API: '"http://111.198.10.15:20104"' //11643 } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 559a078..0dc3442 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -11,14 +11,50 @@ }) } -// 气体流量计数量 -// export function deviceCount(params) { -// return request({ -// url: 'device/count/15', -// method: 'get', -// params -// }) -// } +// 用水量、噪声统计数据 +export function gasStatistic2(deviceType) { + return request({ + url: 'gas/statistics/used', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 气体用气量走势图 +export function gasTrend(params) { + return request({ + url: '/gas/statistics/trend', + method: 'get', + params + }) +} +// 用气量超量报警统计 +export function gasAlarmTrend(params) { + return request({ + url: '/gas/alarm/trend', + method: 'get', + params + }) +} +// 各设备气体用气量 +export function gasUsed(params) { + return request({ + url: '/gas/used', + method: 'get', + params + }) +} +// 气体泄漏监测结果 +export function gasLeakStatus(params) { + return request({ + url: 'gas/leakage/rate', + method: 'get', + params + }) +} + // 气体流量计数量 export function deviceCount(type) { return request({ @@ -56,7 +92,7 @@ // 查询二级分区燃气告警 export function gasAlarmBySecondArea(params) { return request({ - url: 'dataStatistic/gasAlarmBySecondArea', + url: 'gas/alarm/rate', method: 'get', params }) diff --git a/src/components/BigData/Card1/index.vue b/src/components/BigData/Card1/index.vue index 748747b..c9ec32d 100644 --- a/src/components/BigData/Card1/index.vue +++ b/src/components/BigData/Card1/index.vue @@ -4,21 +4,11 @@
-
-
- -
-
- {{ title[0] }} {{ context[0] }}{{ unit }} -
-
- {{ title[1] }} {{ context[1] }}--> +
+
+
+ {{ name }} {{ context[index] }}{{ unit }}
@@ -41,7 +31,7 @@ props: { title: { type: Array, - default: function () { + default: function() { return ['标题', '标题'] } }, @@ -55,7 +45,7 @@ }, context: { type: Array, - default: function () { + default: function() { return ['--', '--'] } }, @@ -83,6 +73,8 @@ height: 108px; font-size: 12px; position: relative; + display: flex; + align-items: center; overflow: hidden; color: #666; background: #fff; @@ -96,7 +88,6 @@ } .card-panel-icon-wrapper { - float: left; margin: 14px 0 0 10px; padding: 16px 2px; transition: all 0.38s ease-out; @@ -109,25 +100,22 @@ } .card-panel-description { - float: left; + flex:1; font-weight: bold; - margin-top: 26px; overflow: auto; margin-left: 5px; .two { .card-panel-text { - line-height: 18px; + line-height: 26px; color: rgba(0, 0, 0, 0.45); font-size: 14px; - margin-bottom: 12px; + display: flex; + justify-content: space-between; } - .card-panel-num { font-size: 18px; color: #666; - padding-left: 10px; - float: right; } } .only { diff --git a/src/utils/dateutils.js b/src/utils/dateutils.js index aa41264..11dc521 100644 --- a/src/utils/dateutils.js +++ b/src/utils/dateutils.js @@ -52,3 +52,13 @@ } return fmt } + +/** + * 获取近1周日期范围 + * @returns {*[]} + */ +export function getSearchLastWeekTime() { + const startTime = getLastWeek().Format('yyyy-MM-dd hh:mm:ss') + const endTime = getToday('yyyy-MM-dd hh:mm:ss') + return [startTime, endTime] +} diff --git a/src/views/alarmManage/listAlarmNow.vue b/src/views/alarmManage/listAlarmNow.vue index 97345d9..283c8ef 100644 --- a/src/views/alarmManage/listAlarmNow.vue +++ b/src/views/alarmManage/listAlarmNow.vue @@ -5,7 +5,7 @@ - + diff --git a/config/dev.env.js b/config/dev.env.js index 36f7d4a..1cab225 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -9,6 +9,6 @@ // BASE_API: '"http://42.81.160.165:2022/smartwell"' // BASE_API: '"http://111.198.10.15:11304"' // BASE_API: '"http://111.198.10.15:11643"' - // BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 - BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 + BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 + // BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 }) diff --git a/config/prod.env.js b/config/prod.env.js index 3455ce7..bb20d1d 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,5 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://111.198.10.15:11304"', // BASE_API: '"http://42.81.160.165:2022/smartwell/"', - BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + // BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + BASE_API: '"http://111.198.10.15:20104"' //11643 } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 559a078..0dc3442 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -11,14 +11,50 @@ }) } -// 气体流量计数量 -// export function deviceCount(params) { -// return request({ -// url: 'device/count/15', -// method: 'get', -// params -// }) -// } +// 用水量、噪声统计数据 +export function gasStatistic2(deviceType) { + return request({ + url: 'gas/statistics/used', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 气体用气量走势图 +export function gasTrend(params) { + return request({ + url: '/gas/statistics/trend', + method: 'get', + params + }) +} +// 用气量超量报警统计 +export function gasAlarmTrend(params) { + return request({ + url: '/gas/alarm/trend', + method: 'get', + params + }) +} +// 各设备气体用气量 +export function gasUsed(params) { + return request({ + url: '/gas/used', + method: 'get', + params + }) +} +// 气体泄漏监测结果 +export function gasLeakStatus(params) { + return request({ + url: 'gas/leakage/rate', + method: 'get', + params + }) +} + // 气体流量计数量 export function deviceCount(type) { return request({ @@ -56,7 +92,7 @@ // 查询二级分区燃气告警 export function gasAlarmBySecondArea(params) { return request({ - url: 'dataStatistic/gasAlarmBySecondArea', + url: 'gas/alarm/rate', method: 'get', params }) diff --git a/src/components/BigData/Card1/index.vue b/src/components/BigData/Card1/index.vue index 748747b..c9ec32d 100644 --- a/src/components/BigData/Card1/index.vue +++ b/src/components/BigData/Card1/index.vue @@ -4,21 +4,11 @@
-
-
- -
-
- {{ title[0] }} {{ context[0] }}{{ unit }} -
-
- {{ title[1] }} {{ context[1] }}--> +
+
+
+ {{ name }} {{ context[index] }}{{ unit }}
@@ -41,7 +31,7 @@ props: { title: { type: Array, - default: function () { + default: function() { return ['标题', '标题'] } }, @@ -55,7 +45,7 @@ }, context: { type: Array, - default: function () { + default: function() { return ['--', '--'] } }, @@ -83,6 +73,8 @@ height: 108px; font-size: 12px; position: relative; + display: flex; + align-items: center; overflow: hidden; color: #666; background: #fff; @@ -96,7 +88,6 @@ } .card-panel-icon-wrapper { - float: left; margin: 14px 0 0 10px; padding: 16px 2px; transition: all 0.38s ease-out; @@ -109,25 +100,22 @@ } .card-panel-description { - float: left; + flex:1; font-weight: bold; - margin-top: 26px; overflow: auto; margin-left: 5px; .two { .card-panel-text { - line-height: 18px; + line-height: 26px; color: rgba(0, 0, 0, 0.45); font-size: 14px; - margin-bottom: 12px; + display: flex; + justify-content: space-between; } - .card-panel-num { font-size: 18px; color: #666; - padding-left: 10px; - float: right; } } .only { diff --git a/src/utils/dateutils.js b/src/utils/dateutils.js index aa41264..11dc521 100644 --- a/src/utils/dateutils.js +++ b/src/utils/dateutils.js @@ -52,3 +52,13 @@ } return fmt } + +/** + * 获取近1周日期范围 + * @returns {*[]} + */ +export function getSearchLastWeekTime() { + const startTime = getLastWeek().Format('yyyy-MM-dd hh:mm:ss') + const endTime = getToday('yyyy-MM-dd hh:mm:ss') + return [startTime, endTime] +} diff --git a/src/views/alarmManage/listAlarmNow.vue b/src/views/alarmManage/listAlarmNow.vue index 97345d9..283c8ef 100644 --- a/src/views/alarmManage/listAlarmNow.vue +++ b/src/views/alarmManage/listAlarmNow.vue @@ -5,7 +5,7 @@ - + diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index 8301f8c..03047ac 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -4,7 +4,7 @@ - + diff --git a/config/dev.env.js b/config/dev.env.js index 36f7d4a..1cab225 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -9,6 +9,6 @@ // BASE_API: '"http://42.81.160.165:2022/smartwell"' // BASE_API: '"http://111.198.10.15:11304"' // BASE_API: '"http://111.198.10.15:11643"' - // BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 - BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 + BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 + // BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 }) diff --git a/config/prod.env.js b/config/prod.env.js index 3455ce7..bb20d1d 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,5 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://111.198.10.15:11304"', // BASE_API: '"http://42.81.160.165:2022/smartwell/"', - BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + // BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + BASE_API: '"http://111.198.10.15:20104"' //11643 } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 559a078..0dc3442 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -11,14 +11,50 @@ }) } -// 气体流量计数量 -// export function deviceCount(params) { -// return request({ -// url: 'device/count/15', -// method: 'get', -// params -// }) -// } +// 用水量、噪声统计数据 +export function gasStatistic2(deviceType) { + return request({ + url: 'gas/statistics/used', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 气体用气量走势图 +export function gasTrend(params) { + return request({ + url: '/gas/statistics/trend', + method: 'get', + params + }) +} +// 用气量超量报警统计 +export function gasAlarmTrend(params) { + return request({ + url: '/gas/alarm/trend', + method: 'get', + params + }) +} +// 各设备气体用气量 +export function gasUsed(params) { + return request({ + url: '/gas/used', + method: 'get', + params + }) +} +// 气体泄漏监测结果 +export function gasLeakStatus(params) { + return request({ + url: 'gas/leakage/rate', + method: 'get', + params + }) +} + // 气体流量计数量 export function deviceCount(type) { return request({ @@ -56,7 +92,7 @@ // 查询二级分区燃气告警 export function gasAlarmBySecondArea(params) { return request({ - url: 'dataStatistic/gasAlarmBySecondArea', + url: 'gas/alarm/rate', method: 'get', params }) diff --git a/src/components/BigData/Card1/index.vue b/src/components/BigData/Card1/index.vue index 748747b..c9ec32d 100644 --- a/src/components/BigData/Card1/index.vue +++ b/src/components/BigData/Card1/index.vue @@ -4,21 +4,11 @@
-
-
- -
-
- {{ title[0] }} {{ context[0] }}{{ unit }} -
-
- {{ title[1] }} {{ context[1] }}--> +
+
+
+ {{ name }} {{ context[index] }}{{ unit }}
@@ -41,7 +31,7 @@ props: { title: { type: Array, - default: function () { + default: function() { return ['标题', '标题'] } }, @@ -55,7 +45,7 @@ }, context: { type: Array, - default: function () { + default: function() { return ['--', '--'] } }, @@ -83,6 +73,8 @@ height: 108px; font-size: 12px; position: relative; + display: flex; + align-items: center; overflow: hidden; color: #666; background: #fff; @@ -96,7 +88,6 @@ } .card-panel-icon-wrapper { - float: left; margin: 14px 0 0 10px; padding: 16px 2px; transition: all 0.38s ease-out; @@ -109,25 +100,22 @@ } .card-panel-description { - float: left; + flex:1; font-weight: bold; - margin-top: 26px; overflow: auto; margin-left: 5px; .two { .card-panel-text { - line-height: 18px; + line-height: 26px; color: rgba(0, 0, 0, 0.45); font-size: 14px; - margin-bottom: 12px; + display: flex; + justify-content: space-between; } - .card-panel-num { font-size: 18px; color: #666; - padding-left: 10px; - float: right; } } .only { diff --git a/src/utils/dateutils.js b/src/utils/dateutils.js index aa41264..11dc521 100644 --- a/src/utils/dateutils.js +++ b/src/utils/dateutils.js @@ -52,3 +52,13 @@ } return fmt } + +/** + * 获取近1周日期范围 + * @returns {*[]} + */ +export function getSearchLastWeekTime() { + const startTime = getLastWeek().Format('yyyy-MM-dd hh:mm:ss') + const endTime = getToday('yyyy-MM-dd hh:mm:ss') + return [startTime, endTime] +} diff --git a/src/views/alarmManage/listAlarmNow.vue b/src/views/alarmManage/listAlarmNow.vue index 97345d9..283c8ef 100644 --- a/src/views/alarmManage/listAlarmNow.vue +++ b/src/views/alarmManage/listAlarmNow.vue @@ -5,7 +5,7 @@ - + diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index 8301f8c..03047ac 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index ddfd8e3..8a9a937 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -23,11 +23,11 @@ } this.chartSettings = { labelMap: { - '远传水表': '远传水表', + '远程水表': '远程水表', '噪声记录仪': '噪声记录仪', '液位监测仪': '液位监测仪' }, - metrics: ['远传水表', '噪声记录仪', '液位监测仪'], + metrics: ['远程水表', '噪声记录仪', '液位监测仪'], dimension: ['date'] } return { @@ -37,7 +37,7 @@ endTime: '' }, chartData: { - columns: ['date', '远传水表', '噪声记录仪', '液位监测仪'], + columns: ['date', '远程水表', '噪声记录仪', '液位监测仪'], rows: [] } } @@ -65,7 +65,7 @@ delete item.data return item }) - + this.chartData.rows = arr }) }, diff --git a/config/dev.env.js b/config/dev.env.js index 36f7d4a..1cab225 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -9,6 +9,6 @@ // BASE_API: '"http://42.81.160.165:2022/smartwell"' // BASE_API: '"http://111.198.10.15:11304"' // BASE_API: '"http://111.198.10.15:11643"' - // BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 - BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 + BASE_API: '"http://111.198.10.15:11409/smartwell"' //可以用 + // BASE_API: '"http://192.168.43.66:11643/smartwell"' //彭先洪 }) diff --git a/config/prod.env.js b/config/prod.env.js index 3455ce7..bb20d1d 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,5 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://111.198.10.15:11304"', // BASE_API: '"http://42.81.160.165:2022/smartwell/"', - BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + // BASE_API: '"http://111.198.10.15:11409/smartwell"' //11643 + BASE_API: '"http://111.198.10.15:20104"' //11643 } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index 559a078..0dc3442 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -11,14 +11,50 @@ }) } -// 气体流量计数量 -// export function deviceCount(params) { -// return request({ -// url: 'device/count/15', -// method: 'get', -// params -// }) -// } +// 用水量、噪声统计数据 +export function gasStatistic2(deviceType) { + return request({ + url: 'gas/statistics/used', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 气体用气量走势图 +export function gasTrend(params) { + return request({ + url: '/gas/statistics/trend', + method: 'get', + params + }) +} +// 用气量超量报警统计 +export function gasAlarmTrend(params) { + return request({ + url: '/gas/alarm/trend', + method: 'get', + params + }) +} +// 各设备气体用气量 +export function gasUsed(params) { + return request({ + url: '/gas/used', + method: 'get', + params + }) +} +// 气体泄漏监测结果 +export function gasLeakStatus(params) { + return request({ + url: 'gas/leakage/rate', + method: 'get', + params + }) +} + // 气体流量计数量 export function deviceCount(type) { return request({ @@ -56,7 +92,7 @@ // 查询二级分区燃气告警 export function gasAlarmBySecondArea(params) { return request({ - url: 'dataStatistic/gasAlarmBySecondArea', + url: 'gas/alarm/rate', method: 'get', params }) diff --git a/src/components/BigData/Card1/index.vue b/src/components/BigData/Card1/index.vue index 748747b..c9ec32d 100644 --- a/src/components/BigData/Card1/index.vue +++ b/src/components/BigData/Card1/index.vue @@ -4,21 +4,11 @@
-
-
- -
-
- {{ title[0] }} {{ context[0] }}{{ unit }} -
-
- {{ title[1] }} {{ context[1] }}--> +
+
+
+ {{ name }} {{ context[index] }}{{ unit }}
@@ -41,7 +31,7 @@ props: { title: { type: Array, - default: function () { + default: function() { return ['标题', '标题'] } }, @@ -55,7 +45,7 @@ }, context: { type: Array, - default: function () { + default: function() { return ['--', '--'] } }, @@ -83,6 +73,8 @@ height: 108px; font-size: 12px; position: relative; + display: flex; + align-items: center; overflow: hidden; color: #666; background: #fff; @@ -96,7 +88,6 @@ } .card-panel-icon-wrapper { - float: left; margin: 14px 0 0 10px; padding: 16px 2px; transition: all 0.38s ease-out; @@ -109,25 +100,22 @@ } .card-panel-description { - float: left; + flex:1; font-weight: bold; - margin-top: 26px; overflow: auto; margin-left: 5px; .two { .card-panel-text { - line-height: 18px; + line-height: 26px; color: rgba(0, 0, 0, 0.45); font-size: 14px; - margin-bottom: 12px; + display: flex; + justify-content: space-between; } - .card-panel-num { font-size: 18px; color: #666; - padding-left: 10px; - float: right; } } .only { diff --git a/src/utils/dateutils.js b/src/utils/dateutils.js index aa41264..11dc521 100644 --- a/src/utils/dateutils.js +++ b/src/utils/dateutils.js @@ -52,3 +52,13 @@ } return fmt } + +/** + * 获取近1周日期范围 + * @returns {*[]} + */ +export function getSearchLastWeekTime() { + const startTime = getLastWeek().Format('yyyy-MM-dd hh:mm:ss') + const endTime = getToday('yyyy-MM-dd hh:mm:ss') + return [startTime, endTime] +} diff --git a/src/views/alarmManage/listAlarmNow.vue b/src/views/alarmManage/listAlarmNow.vue index 97345d9..283c8ef 100644 --- a/src/views/alarmManage/listAlarmNow.vue +++ b/src/views/alarmManage/listAlarmNow.vue @@ -5,7 +5,7 @@ - + diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index 8301f8c..03047ac 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index ddfd8e3..8a9a937 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -23,11 +23,11 @@ } this.chartSettings = { labelMap: { - '远传水表': '远传水表', + '远程水表': '远程水表', '噪声记录仪': '噪声记录仪', '液位监测仪': '液位监测仪' }, - metrics: ['远传水表', '噪声记录仪', '液位监测仪'], + metrics: ['远程水表', '噪声记录仪', '液位监测仪'], dimension: ['date'] } return { @@ -37,7 +37,7 @@ endTime: '' }, chartData: { - columns: ['date', '远传水表', '噪声记录仪', '液位监测仪'], + columns: ['date', '远程水表', '噪声记录仪', '液位监测仪'], rows: [] } } @@ -65,7 +65,7 @@ delete item.data return item }) - + this.chartData.rows = arr }) }, diff --git a/src/views/dashboard/components/FunctionArea.vue b/src/views/dashboard/components/FunctionArea.vue index 4c05cee..6401557 100644 --- a/src/views/dashboard/components/FunctionArea.vue +++ b/src/views/dashboard/components/FunctionArea.vue @@ -5,11 +5,11 @@ -->