diff --git a/package.json b/package.json index be3e56e..a60e7b3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "vue-template-compiler": "2.5.17", "webpack": "4.16.5", "webpack-bundle-analyzer": "2.13.1", - "webpack-cli": "3.1.0", + "webpack-cli": "^3.1.0", "webpack-dev-server": "3.1.14", "webpack-merge": "4.1.4" }, diff --git a/package.json b/package.json index be3e56e..a60e7b3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "vue-template-compiler": "2.5.17", "webpack": "4.16.5", "webpack-bundle-analyzer": "2.13.1", - "webpack-cli": "3.1.0", + "webpack-cli": "^3.1.0", "webpack-dev-server": "3.1.14", "webpack-merge": "4.1.4" }, diff --git a/src/views/alarmRule/components/editRule.vue b/src/views/alarmRule/components/editRule.vue index 503102f..491f1e6 100644 --- a/src/views/alarmRule/components/editRule.vue +++ b/src/views/alarmRule/components/editRule.vue @@ -112,7 +112,7 @@ devcode: '', // 设备编号 deviceType: '', // 设备类型 highValue: '', // 告警上限 - lowValue: '0',// 告警下限 + lowValue: '0', // 告警下限 warnValue: '' // 预警上限 }, // 表单 textMap: { @@ -140,7 +140,7 @@ return true }, showLowValue() { - if (this.alarmRuleForm.deviceType === '13') { + if (this.alarmRuleForm.deviceType === '13' || this.alarmRuleForm.deviceType === '15') { return true } else { return false diff --git a/package.json b/package.json index be3e56e..a60e7b3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "vue-template-compiler": "2.5.17", "webpack": "4.16.5", "webpack-bundle-analyzer": "2.13.1", - "webpack-cli": "3.1.0", + "webpack-cli": "^3.1.0", "webpack-dev-server": "3.1.14", "webpack-merge": "4.1.4" }, diff --git a/src/views/alarmRule/components/editRule.vue b/src/views/alarmRule/components/editRule.vue index 503102f..491f1e6 100644 --- a/src/views/alarmRule/components/editRule.vue +++ b/src/views/alarmRule/components/editRule.vue @@ -112,7 +112,7 @@ devcode: '', // 设备编号 deviceType: '', // 设备类型 highValue: '', // 告警上限 - lowValue: '0',// 告警下限 + lowValue: '0', // 告警下限 warnValue: '' // 预警上限 }, // 表单 textMap: { @@ -140,7 +140,7 @@ return true }, showLowValue() { - if (this.alarmRuleForm.deviceType === '13') { + if (this.alarmRuleForm.deviceType === '13' || this.alarmRuleForm.deviceType === '15') { return true } else { return false diff --git a/src/views/alarmRule/components/listRule.vue b/src/views/alarmRule/components/listRule.vue index 3a8bb47..b5428ab 100644 --- a/src/views/alarmRule/components/listRule.vue +++ b/src/views/alarmRule/components/listRule.vue @@ -9,10 +9,11 @@ + v-for="item in deviceTypeList" + :key="item.value" + :label="item.name" + :value="item.value" + /> @@ -76,7 +77,7 @@ import editRule from '@/views/alarmRule/components/editRule' import { getDeviceType } from '@/api/device' import { getAlarmRuleList, delAlarmRule } from '@/api/alarmRule' -import AreaSelectTree from "@/components/AreaSelect/areaSelectTree"; +import AreaSelectTree from '@/components/AreaSelect/areaSelectTree' export default { name: 'ListRule', @@ -86,8 +87,8 @@ listQuery: { keywords: '', status: '', - deviceType:'', - areaId:'', + deviceType: '', + areaId: '', offset: 1, limit: 20, sort: '', diff --git a/package.json b/package.json index be3e56e..a60e7b3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "vue-template-compiler": "2.5.17", "webpack": "4.16.5", "webpack-bundle-analyzer": "2.13.1", - "webpack-cli": "3.1.0", + "webpack-cli": "^3.1.0", "webpack-dev-server": "3.1.14", "webpack-merge": "4.1.4" }, diff --git a/src/views/alarmRule/components/editRule.vue b/src/views/alarmRule/components/editRule.vue index 503102f..491f1e6 100644 --- a/src/views/alarmRule/components/editRule.vue +++ b/src/views/alarmRule/components/editRule.vue @@ -112,7 +112,7 @@ devcode: '', // 设备编号 deviceType: '', // 设备类型 highValue: '', // 告警上限 - lowValue: '0',// 告警下限 + lowValue: '0', // 告警下限 warnValue: '' // 预警上限 }, // 表单 textMap: { @@ -140,7 +140,7 @@ return true }, showLowValue() { - if (this.alarmRuleForm.deviceType === '13') { + if (this.alarmRuleForm.deviceType === '13' || this.alarmRuleForm.deviceType === '15') { return true } else { return false diff --git a/src/views/alarmRule/components/listRule.vue b/src/views/alarmRule/components/listRule.vue index 3a8bb47..b5428ab 100644 --- a/src/views/alarmRule/components/listRule.vue +++ b/src/views/alarmRule/components/listRule.vue @@ -9,10 +9,11 @@ + v-for="item in deviceTypeList" + :key="item.value" + :label="item.name" + :value="item.value" + /> @@ -76,7 +77,7 @@ import editRule from '@/views/alarmRule/components/editRule' import { getDeviceType } from '@/api/device' import { getAlarmRuleList, delAlarmRule } from '@/api/alarmRule' -import AreaSelectTree from "@/components/AreaSelect/areaSelectTree"; +import AreaSelectTree from '@/components/AreaSelect/areaSelectTree' export default { name: 'ListRule', @@ -86,8 +87,8 @@ listQuery: { keywords: '', status: '', - deviceType:'', - areaId:'', + deviceType: '', + areaId: '', offset: 1, limit: 20, sort: '', diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4347727..4395df9 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } }, title: { - text: '分区水表报警占比图' + text: '分区气体流量计报警占比' }, chartSettings: { labelMap: { diff --git a/package.json b/package.json index be3e56e..a60e7b3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "vue-template-compiler": "2.5.17", "webpack": "4.16.5", "webpack-bundle-analyzer": "2.13.1", - "webpack-cli": "3.1.0", + "webpack-cli": "^3.1.0", "webpack-dev-server": "3.1.14", "webpack-merge": "4.1.4" }, diff --git a/src/views/alarmRule/components/editRule.vue b/src/views/alarmRule/components/editRule.vue index 503102f..491f1e6 100644 --- a/src/views/alarmRule/components/editRule.vue +++ b/src/views/alarmRule/components/editRule.vue @@ -112,7 +112,7 @@ devcode: '', // 设备编号 deviceType: '', // 设备类型 highValue: '', // 告警上限 - lowValue: '0',// 告警下限 + lowValue: '0', // 告警下限 warnValue: '' // 预警上限 }, // 表单 textMap: { @@ -140,7 +140,7 @@ return true }, showLowValue() { - if (this.alarmRuleForm.deviceType === '13') { + if (this.alarmRuleForm.deviceType === '13' || this.alarmRuleForm.deviceType === '15') { return true } else { return false diff --git a/src/views/alarmRule/components/listRule.vue b/src/views/alarmRule/components/listRule.vue index 3a8bb47..b5428ab 100644 --- a/src/views/alarmRule/components/listRule.vue +++ b/src/views/alarmRule/components/listRule.vue @@ -9,10 +9,11 @@ + v-for="item in deviceTypeList" + :key="item.value" + :label="item.name" + :value="item.value" + /> @@ -76,7 +77,7 @@ import editRule from '@/views/alarmRule/components/editRule' import { getDeviceType } from '@/api/device' import { getAlarmRuleList, delAlarmRule } from '@/api/alarmRule' -import AreaSelectTree from "@/components/AreaSelect/areaSelectTree"; +import AreaSelectTree from '@/components/AreaSelect/areaSelectTree' export default { name: 'ListRule', @@ -86,8 +87,8 @@ listQuery: { keywords: '', status: '', - deviceType:'', - areaId:'', + deviceType: '', + areaId: '', offset: 1, limit: 20, sort: '', diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4347727..4395df9 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } }, title: { - text: '分区水表报警占比图' + text: '分区气体流量计报警占比' }, chartSettings: { labelMap: { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..30fa639 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -46,20 +46,17 @@ 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.chartData.rows = [ + { 'deviceType': '气体流量计', 'deviceCount': 20, '下单用户': 1093, '下单率': 0.32 }, + { 'deviceType': '供水泄露监测仪', 'deviceCount': 20, '下单用户': 3230, '下单率': 0.26 }, + { 'deviceType': '气体泄露监测仪', 'deviceCount': 50, '下单用户': 2623, '下单率': 0.76 }, + { 'deviceType': '腐蚀速率监测仪', 'deviceCount': 10, '下单用户': 1423, '下单率': 0.49 } + ] }, methods: { fetchData() { deviceStaticsByType().then(response => { - this.chartData.rows = response.data + // this.chartData.rows = response.data }) } } diff --git a/package.json b/package.json index be3e56e..a60e7b3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "vue-template-compiler": "2.5.17", "webpack": "4.16.5", "webpack-bundle-analyzer": "2.13.1", - "webpack-cli": "3.1.0", + "webpack-cli": "^3.1.0", "webpack-dev-server": "3.1.14", "webpack-merge": "4.1.4" }, diff --git a/src/views/alarmRule/components/editRule.vue b/src/views/alarmRule/components/editRule.vue index 503102f..491f1e6 100644 --- a/src/views/alarmRule/components/editRule.vue +++ b/src/views/alarmRule/components/editRule.vue @@ -112,7 +112,7 @@ devcode: '', // 设备编号 deviceType: '', // 设备类型 highValue: '', // 告警上限 - lowValue: '0',// 告警下限 + lowValue: '0', // 告警下限 warnValue: '' // 预警上限 }, // 表单 textMap: { @@ -140,7 +140,7 @@ return true }, showLowValue() { - if (this.alarmRuleForm.deviceType === '13') { + if (this.alarmRuleForm.deviceType === '13' || this.alarmRuleForm.deviceType === '15') { return true } else { return false diff --git a/src/views/alarmRule/components/listRule.vue b/src/views/alarmRule/components/listRule.vue index 3a8bb47..b5428ab 100644 --- a/src/views/alarmRule/components/listRule.vue +++ b/src/views/alarmRule/components/listRule.vue @@ -9,10 +9,11 @@ + v-for="item in deviceTypeList" + :key="item.value" + :label="item.name" + :value="item.value" + /> @@ -76,7 +77,7 @@ import editRule from '@/views/alarmRule/components/editRule' import { getDeviceType } from '@/api/device' import { getAlarmRuleList, delAlarmRule } from '@/api/alarmRule' -import AreaSelectTree from "@/components/AreaSelect/areaSelectTree"; +import AreaSelectTree from '@/components/AreaSelect/areaSelectTree' export default { name: 'ListRule', @@ -86,8 +87,8 @@ listQuery: { keywords: '', status: '', - deviceType:'', - areaId:'', + deviceType: '', + areaId: '', offset: 1, limit: 20, sort: '', diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4347727..4395df9 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } }, title: { - text: '分区水表报警占比图' + text: '分区气体流量计报警占比' }, chartSettings: { labelMap: { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..30fa639 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -46,20 +46,17 @@ 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.chartData.rows = [ + { 'deviceType': '气体流量计', 'deviceCount': 20, '下单用户': 1093, '下单率': 0.32 }, + { 'deviceType': '供水泄露监测仪', 'deviceCount': 20, '下单用户': 3230, '下单率': 0.26 }, + { 'deviceType': '气体泄露监测仪', 'deviceCount': 50, '下单用户': 2623, '下单率': 0.76 }, + { 'deviceType': '腐蚀速率监测仪', 'deviceCount': 10, '下单用户': 1423, '下单率': 0.49 } + ] }, methods: { fetchData() { deviceStaticsByType().then(response => { - this.chartData.rows = response.data + // this.chartData.rows = response.data }) } } diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 7cdf078..2232a6f 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -32,7 +32,7 @@ return { dataGroup1: [ { - title: ['总用水量', '本月用水量'], + title: ['总用气量', '本月用气量'], context: ['--', '--'], icon: '', color: '#40c9c6', @@ -40,7 +40,7 @@ index: 0 }, { - title: ['今日用水量', '生产厂区用水量'], + title: ['今日用气量', '生产厂区用气量'], context: ['--', '--'], icon: '', color: '#36a3f7', @@ -58,14 +58,7 @@ ], dataGroup: [ { - title: '阀门数量', - context: '--', - icon: 'icon-valve', - color: '#40c9c6', - permission: '/device/list' - }, - { - title: '水表数量', + title: '气体流量计', context: '--', icon: 'icon-watch', color: '#9694f7', @@ -99,7 +92,7 @@ this.$router.push(path) }, getWater() { - // 用水量 + // 用气量 getWatchStatistic().then(response => { this.dataGroup1[0].context = [response.data.total ? parseFloat(response.data.total).toFixed(2) : '--', response.data.month ? parseFloat(response.data.month).toFixed(2) : '--'] this.dataGroup1[1].context = [response.data.today ? parseFloat(response.data.today).toFixed(2) : '--', response.data.prodution ? parseFloat(response.data.prodution).toFixed(2) : '--'] diff --git a/package.json b/package.json index be3e56e..a60e7b3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "vue-template-compiler": "2.5.17", "webpack": "4.16.5", "webpack-bundle-analyzer": "2.13.1", - "webpack-cli": "3.1.0", + "webpack-cli": "^3.1.0", "webpack-dev-server": "3.1.14", "webpack-merge": "4.1.4" }, diff --git a/src/views/alarmRule/components/editRule.vue b/src/views/alarmRule/components/editRule.vue index 503102f..491f1e6 100644 --- a/src/views/alarmRule/components/editRule.vue +++ b/src/views/alarmRule/components/editRule.vue @@ -112,7 +112,7 @@ devcode: '', // 设备编号 deviceType: '', // 设备类型 highValue: '', // 告警上限 - lowValue: '0',// 告警下限 + lowValue: '0', // 告警下限 warnValue: '' // 预警上限 }, // 表单 textMap: { @@ -140,7 +140,7 @@ return true }, showLowValue() { - if (this.alarmRuleForm.deviceType === '13') { + if (this.alarmRuleForm.deviceType === '13' || this.alarmRuleForm.deviceType === '15') { return true } else { return false diff --git a/src/views/alarmRule/components/listRule.vue b/src/views/alarmRule/components/listRule.vue index 3a8bb47..b5428ab 100644 --- a/src/views/alarmRule/components/listRule.vue +++ b/src/views/alarmRule/components/listRule.vue @@ -9,10 +9,11 @@ + v-for="item in deviceTypeList" + :key="item.value" + :label="item.name" + :value="item.value" + /> @@ -76,7 +77,7 @@ import editRule from '@/views/alarmRule/components/editRule' import { getDeviceType } from '@/api/device' import { getAlarmRuleList, delAlarmRule } from '@/api/alarmRule' -import AreaSelectTree from "@/components/AreaSelect/areaSelectTree"; +import AreaSelectTree from '@/components/AreaSelect/areaSelectTree' export default { name: 'ListRule', @@ -86,8 +87,8 @@ listQuery: { keywords: '', status: '', - deviceType:'', - areaId:'', + deviceType: '', + areaId: '', offset: 1, limit: 20, sort: '', diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4347727..4395df9 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } }, title: { - text: '分区水表报警占比图' + text: '分区气体流量计报警占比' }, chartSettings: { labelMap: { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..30fa639 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -46,20 +46,17 @@ 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.chartData.rows = [ + { 'deviceType': '气体流量计', 'deviceCount': 20, '下单用户': 1093, '下单率': 0.32 }, + { 'deviceType': '供水泄露监测仪', 'deviceCount': 20, '下单用户': 3230, '下单率': 0.26 }, + { 'deviceType': '气体泄露监测仪', 'deviceCount': 50, '下单用户': 2623, '下单率': 0.76 }, + { 'deviceType': '腐蚀速率监测仪', 'deviceCount': 10, '下单用户': 1423, '下单率': 0.49 } + ] }, methods: { fetchData() { deviceStaticsByType().then(response => { - this.chartData.rows = response.data + // this.chartData.rows = response.data }) } } diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 7cdf078..2232a6f 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -32,7 +32,7 @@ return { dataGroup1: [ { - title: ['总用水量', '本月用水量'], + title: ['总用气量', '本月用气量'], context: ['--', '--'], icon: '', color: '#40c9c6', @@ -40,7 +40,7 @@ index: 0 }, { - title: ['今日用水量', '生产厂区用水量'], + title: ['今日用气量', '生产厂区用气量'], context: ['--', '--'], icon: '', color: '#36a3f7', @@ -58,14 +58,7 @@ ], dataGroup: [ { - title: '阀门数量', - context: '--', - icon: 'icon-valve', - color: '#40c9c6', - permission: '/device/list' - }, - { - title: '水表数量', + title: '气体流量计', context: '--', icon: 'icon-watch', color: '#9694f7', @@ -99,7 +92,7 @@ this.$router.push(path) }, getWater() { - // 用水量 + // 用气量 getWatchStatistic().then(response => { this.dataGroup1[0].context = [response.data.total ? parseFloat(response.data.total).toFixed(2) : '--', response.data.month ? parseFloat(response.data.month).toFixed(2) : '--'] this.dataGroup1[1].context = [response.data.today ? parseFloat(response.data.today).toFixed(2) : '--', response.data.prodution ? parseFloat(response.data.prodution).toFixed(2) : '--'] diff --git a/src/views/dashboard/components/alarmGasCountByDept.vue b/src/views/dashboard/components/alarmGasCountByDept.vue new file mode 100644 index 0000000..534d8f3 --- /dev/null +++ b/src/views/dashboard/components/alarmGasCountByDept.vue @@ -0,0 +1,73 @@ + + + + diff --git a/package.json b/package.json index be3e56e..a60e7b3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "vue-template-compiler": "2.5.17", "webpack": "4.16.5", "webpack-bundle-analyzer": "2.13.1", - "webpack-cli": "3.1.0", + "webpack-cli": "^3.1.0", "webpack-dev-server": "3.1.14", "webpack-merge": "4.1.4" }, diff --git a/src/views/alarmRule/components/editRule.vue b/src/views/alarmRule/components/editRule.vue index 503102f..491f1e6 100644 --- a/src/views/alarmRule/components/editRule.vue +++ b/src/views/alarmRule/components/editRule.vue @@ -112,7 +112,7 @@ devcode: '', // 设备编号 deviceType: '', // 设备类型 highValue: '', // 告警上限 - lowValue: '0',// 告警下限 + lowValue: '0', // 告警下限 warnValue: '' // 预警上限 }, // 表单 textMap: { @@ -140,7 +140,7 @@ return true }, showLowValue() { - if (this.alarmRuleForm.deviceType === '13') { + if (this.alarmRuleForm.deviceType === '13' || this.alarmRuleForm.deviceType === '15') { return true } else { return false diff --git a/src/views/alarmRule/components/listRule.vue b/src/views/alarmRule/components/listRule.vue index 3a8bb47..b5428ab 100644 --- a/src/views/alarmRule/components/listRule.vue +++ b/src/views/alarmRule/components/listRule.vue @@ -9,10 +9,11 @@ + v-for="item in deviceTypeList" + :key="item.value" + :label="item.name" + :value="item.value" + /> @@ -76,7 +77,7 @@ import editRule from '@/views/alarmRule/components/editRule' import { getDeviceType } from '@/api/device' import { getAlarmRuleList, delAlarmRule } from '@/api/alarmRule' -import AreaSelectTree from "@/components/AreaSelect/areaSelectTree"; +import AreaSelectTree from '@/components/AreaSelect/areaSelectTree' export default { name: 'ListRule', @@ -86,8 +87,8 @@ listQuery: { keywords: '', status: '', - deviceType:'', - areaId:'', + deviceType: '', + areaId: '', offset: 1, limit: 20, sort: '', diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4347727..4395df9 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } }, title: { - text: '分区水表报警占比图' + text: '分区气体流量计报警占比' }, chartSettings: { labelMap: { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..30fa639 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -46,20 +46,17 @@ 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.chartData.rows = [ + { 'deviceType': '气体流量计', 'deviceCount': 20, '下单用户': 1093, '下单率': 0.32 }, + { 'deviceType': '供水泄露监测仪', 'deviceCount': 20, '下单用户': 3230, '下单率': 0.26 }, + { 'deviceType': '气体泄露监测仪', 'deviceCount': 50, '下单用户': 2623, '下单率': 0.76 }, + { 'deviceType': '腐蚀速率监测仪', 'deviceCount': 10, '下单用户': 1423, '下单率': 0.49 } + ] }, methods: { fetchData() { deviceStaticsByType().then(response => { - this.chartData.rows = response.data + // this.chartData.rows = response.data }) } } diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 7cdf078..2232a6f 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -32,7 +32,7 @@ return { dataGroup1: [ { - title: ['总用水量', '本月用水量'], + title: ['总用气量', '本月用气量'], context: ['--', '--'], icon: '', color: '#40c9c6', @@ -40,7 +40,7 @@ index: 0 }, { - title: ['今日用水量', '生产厂区用水量'], + title: ['今日用气量', '生产厂区用气量'], context: ['--', '--'], icon: '', color: '#36a3f7', @@ -58,14 +58,7 @@ ], dataGroup: [ { - title: '阀门数量', - context: '--', - icon: 'icon-valve', - color: '#40c9c6', - permission: '/device/list' - }, - { - title: '水表数量', + title: '气体流量计', context: '--', icon: 'icon-watch', color: '#9694f7', @@ -99,7 +92,7 @@ this.$router.push(path) }, getWater() { - // 用水量 + // 用气量 getWatchStatistic().then(response => { this.dataGroup1[0].context = [response.data.total ? parseFloat(response.data.total).toFixed(2) : '--', response.data.month ? parseFloat(response.data.month).toFixed(2) : '--'] this.dataGroup1[1].context = [response.data.today ? parseFloat(response.data.today).toFixed(2) : '--', response.data.prodution ? parseFloat(response.data.prodution).toFixed(2) : '--'] diff --git a/src/views/dashboard/components/alarmGasCountByDept.vue b/src/views/dashboard/components/alarmGasCountByDept.vue new file mode 100644 index 0000000..534d8f3 --- /dev/null +++ b/src/views/dashboard/components/alarmGasCountByDept.vue @@ -0,0 +1,73 @@ + + + + diff --git a/src/views/dashboard/components/corrodeCountByDay.vue b/src/views/dashboard/components/corrodeCountByDay.vue new file mode 100644 index 0000000..8563956 --- /dev/null +++ b/src/views/dashboard/components/corrodeCountByDay.vue @@ -0,0 +1,84 @@ + + + + diff --git a/package.json b/package.json index be3e56e..a60e7b3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "vue-template-compiler": "2.5.17", "webpack": "4.16.5", "webpack-bundle-analyzer": "2.13.1", - "webpack-cli": "3.1.0", + "webpack-cli": "^3.1.0", "webpack-dev-server": "3.1.14", "webpack-merge": "4.1.4" }, diff --git a/src/views/alarmRule/components/editRule.vue b/src/views/alarmRule/components/editRule.vue index 503102f..491f1e6 100644 --- a/src/views/alarmRule/components/editRule.vue +++ b/src/views/alarmRule/components/editRule.vue @@ -112,7 +112,7 @@ devcode: '', // 设备编号 deviceType: '', // 设备类型 highValue: '', // 告警上限 - lowValue: '0',// 告警下限 + lowValue: '0', // 告警下限 warnValue: '' // 预警上限 }, // 表单 textMap: { @@ -140,7 +140,7 @@ return true }, showLowValue() { - if (this.alarmRuleForm.deviceType === '13') { + if (this.alarmRuleForm.deviceType === '13' || this.alarmRuleForm.deviceType === '15') { return true } else { return false diff --git a/src/views/alarmRule/components/listRule.vue b/src/views/alarmRule/components/listRule.vue index 3a8bb47..b5428ab 100644 --- a/src/views/alarmRule/components/listRule.vue +++ b/src/views/alarmRule/components/listRule.vue @@ -9,10 +9,11 @@ + v-for="item in deviceTypeList" + :key="item.value" + :label="item.name" + :value="item.value" + /> @@ -76,7 +77,7 @@ import editRule from '@/views/alarmRule/components/editRule' import { getDeviceType } from '@/api/device' import { getAlarmRuleList, delAlarmRule } from '@/api/alarmRule' -import AreaSelectTree from "@/components/AreaSelect/areaSelectTree"; +import AreaSelectTree from '@/components/AreaSelect/areaSelectTree' export default { name: 'ListRule', @@ -86,8 +87,8 @@ listQuery: { keywords: '', status: '', - deviceType:'', - areaId:'', + deviceType: '', + areaId: '', offset: 1, limit: 20, sort: '', diff --git a/src/views/dashboard/components/AlarmCountByDept.vue b/src/views/dashboard/components/AlarmCountByDept.vue index 4347727..4395df9 100644 --- a/src/views/dashboard/components/AlarmCountByDept.vue +++ b/src/views/dashboard/components/AlarmCountByDept.vue @@ -44,10 +44,10 @@ label: { show: true, position: 'outside', formatter: '{b}' }, right: 120 }, - // tooltip: { trigger: 'item', formatter: '{b}
用水量:{c}吨
占比:{d}%' } + // tooltip: { trigger: 'item', formatter: '{b}
用气量:{c}吨
占比:{d}%' } }, title: { - text: '分区水表报警占比图' + text: '分区气体流量计报警占比' }, chartSettings: { labelMap: { diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index cbacc0f..30fa639 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -46,20 +46,17 @@ 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.chartData.rows = [ + { 'deviceType': '气体流量计', 'deviceCount': 20, '下单用户': 1093, '下单率': 0.32 }, + { 'deviceType': '供水泄露监测仪', 'deviceCount': 20, '下单用户': 3230, '下单率': 0.26 }, + { 'deviceType': '气体泄露监测仪', 'deviceCount': 50, '下单用户': 2623, '下单率': 0.76 }, + { 'deviceType': '腐蚀速率监测仪', 'deviceCount': 10, '下单用户': 1423, '下单率': 0.49 } + ] }, methods: { fetchData() { deviceStaticsByType().then(response => { - this.chartData.rows = response.data + // this.chartData.rows = response.data }) } } diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 7cdf078..2232a6f 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -32,7 +32,7 @@ return { dataGroup1: [ { - title: ['总用水量', '本月用水量'], + title: ['总用气量', '本月用气量'], context: ['--', '--'], icon: '', color: '#40c9c6', @@ -40,7 +40,7 @@ index: 0 }, { - title: ['今日用水量', '生产厂区用水量'], + title: ['今日用气量', '生产厂区用气量'], context: ['--', '--'], icon: '', color: '#36a3f7', @@ -58,14 +58,7 @@ ], dataGroup: [ { - title: '阀门数量', - context: '--', - icon: 'icon-valve', - color: '#40c9c6', - permission: '/device/list' - }, - { - title: '水表数量', + title: '气体流量计', context: '--', icon: 'icon-watch', color: '#9694f7', @@ -99,7 +92,7 @@ this.$router.push(path) }, getWater() { - // 用水量 + // 用气量 getWatchStatistic().then(response => { this.dataGroup1[0].context = [response.data.total ? parseFloat(response.data.total).toFixed(2) : '--', response.data.month ? parseFloat(response.data.month).toFixed(2) : '--'] this.dataGroup1[1].context = [response.data.today ? parseFloat(response.data.today).toFixed(2) : '--', response.data.prodution ? parseFloat(response.data.prodution).toFixed(2) : '--'] diff --git a/src/views/dashboard/components/alarmGasCountByDept.vue b/src/views/dashboard/components/alarmGasCountByDept.vue new file mode 100644 index 0000000..534d8f3 --- /dev/null +++ b/src/views/dashboard/components/alarmGasCountByDept.vue @@ -0,0 +1,73 @@ + + + + diff --git a/src/views/dashboard/components/corrodeCountByDay.vue b/src/views/dashboard/components/corrodeCountByDay.vue new file mode 100644 index 0000000..8563956 --- /dev/null +++ b/src/views/dashboard/components/corrodeCountByDay.vue @@ -0,0 +1,84 @@ + + + + diff --git a/src/views/dashboard/components/watchAlarmBar.vue b/src/views/dashboard/components/watchAlarmBar.vue index 5fe709d..dbf30c7 100644 --- a/src/views/dashboard/components/watchAlarmBar.vue +++ b/src/views/dashboard/components/watchAlarmBar.vue @@ -1,4 +1,4 @@ - +