diff --git a/src/api/disRevenue/earnManage.js b/src/api/disRevenue/earnManage.js index 3f03487..bbbbc2a 100644 --- a/src/api/disRevenue/earnManage.js +++ b/src/api/disRevenue/earnManage.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -/** ------------------服务器宽带收益------------------- */ +/** ------------------服务器带宽收益------------------- */ // 查询列表 export function listBandWidth(data) { return request({ @@ -74,7 +74,7 @@ export function graPackage(data) { data: data }) } -// 95宽带值Mbps/月---图 +// 95带宽值Mbps/月---图 export function graMonthly(data) { return request({ url: '/system/bandwidth/graphicalAnalysisMonthly', @@ -82,7 +82,7 @@ export function graMonthly(data) { data: data }) } -// 有效-95宽带值Mbps/月---图 +// 有效-95带宽值Mbps/月---图 export function graEffectiveMonthly(data) { return request({ url: '/system/bandwidth/graphicalAnalysisEffectiveMonthly', @@ -90,7 +90,7 @@ export function graEffectiveMonthly(data) { data: data }) } -// 有效-95宽带值Mbps/日---图 +// 有效-95带宽值Mbps/日---图 export function graEffectiveDaily(data) { return request({ url: '/system/bandwidth/graphicalAnalysisEffectiveDaily', @@ -106,7 +106,7 @@ export function graEffectiveAvgMonthly(data) { data: data }) } -// 95宽带值/日----图 +// 95带宽值/日----图 export function graDaily(data) { return request({ url: '/system/bandwidth/graphicalAnalysisDaily', diff --git a/src/api/homeIndex.js b/src/api/homeIndex.js new file mode 100644 index 0000000..f6f0ae9 --- /dev/null +++ b/src/api/homeIndex.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 统计当前在线服务器的流量相关的业务数 +export function countBusiness() { + return request({ + url: '/system/screen/countBusinessByTraffic', + method: 'get' + }) +} +// 当前在线服务器发送带宽总流量 +export function sumTrafficByServer() { + return request({ + url: '/system/screen/sumTrafficByServer', + method: 'get' + }) +} +// 当前在线交换机接收带宽总流量 +export function sumTrafficBySwitch() { + return request({ + url: '/system/screen/sumTrafficBySwitch', + method: 'get' + }) +} +// 交换机在线数量 +export function countSwitchNum() { + return request({ + url: '/system/screen/countSwitchNum', + method: 'get' + }) +} +// 服务器在线率 +export function serverOnlineRate() { + return request({ + url: '/system/screen/getServerOnlineRate', + method: 'get' + }) +} +// 当日业务的在线设备数量统计TOP5 +export function countDeviceNumTop5() { + return request({ + url: '/system/screen/countDeviceNumTop5', + method: 'get' + }) +} diff --git a/src/assets/images/switch.png b/src/assets/images/switch.png new file mode 100644 index 0000000..d1b067b Binary files /dev/null and b/src/assets/images/switch.png differ diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index ce960bd..dce00e2 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -142,6 +142,10 @@ aside { height: calc(100vh - 132px); padding: 8px 20px 20px; } +.app-viewContent { + height: calc(100vh - 85px); + overflow: scroll; +} .components-container { margin: 30px 50px; @@ -282,3 +286,16 @@ aside { left: 10px; right: 0px; } +// form表单只读时 +.el-input.is-disabled .el-input__inner { + background-color: transparent; + border-color: transparent; + color: #C0C4CC; + cursor: not-allowed; +} +.el-input.is-disabled .el-input__icon { + display: none; +} +.el-select .el-input.is-disabled .el-input__inner:hover { + border-color: transparent; +} diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue index c71029a..9c4932f 100644 --- a/src/components/RightToolbar/index.vue +++ b/src/components/RightToolbar/index.vue @@ -153,6 +153,7 @@ export default { } else { this.columns[key].visible = event } + this.$emit("columnsChange", this.columns); }, // 切换全选/反选 toggleCheckAll() { @@ -162,6 +163,7 @@ export default { } else { Object.values(this.columns).forEach((col) => (col.visible = newValue)) } + this.$emit("columnsChange", this.columns); } }, } diff --git a/src/components/echartsList/bar.vue b/src/components/echartsList/bar.vue index 96f15c1..7bb8cf6 100644 --- a/src/components/echartsList/bar.vue +++ b/src/components/echartsList/bar.vue @@ -76,7 +76,7 @@ } }, grid: { - top: dataXY && dataXY.gridTop || '20%', + top: dataXY && dataXY.gridTop || '80px', left: '3%', right: '4%', bottom: '3%', @@ -125,6 +125,7 @@ label: { show: dataXY && dataXY.seriesLabel || false, position: 'insideLeft', + offset: [-4, 0] } } ] diff --git a/src/components/echartsList/dateTimeSelect.vue b/src/components/echartsList/dateTimeSelect.vue index ceb8e75..c15e299 100644 --- a/src/components/echartsList/dateTimeSelect.vue +++ b/src/components/echartsList/dateTimeSelect.vue @@ -1,27 +1,27 @@ @@ -154,12 +154,17 @@ } diff --git a/src/views/disRevenue/resource/resMonitor/digitalSuper.vue b/src/views/disRevenue/resource/resMonitor/digitalSuper.vue new file mode 100644 index 0000000..0d17b2d --- /dev/null +++ b/src/views/disRevenue/resource/resMonitor/digitalSuper.vue @@ -0,0 +1,88 @@ + + + diff --git a/src/views/index.vue b/src/views/index.vue index 1c880d4..99e2e65 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -5,9 +5,10 @@
{{item.title}}
-
+
{{item.num}}{{item.unit}}
- + +
{{item.lastVal}} {{item.lastNum}}
@@ -18,7 +19,7 @@
- +
@@ -28,7 +29,7 @@
- 服务器宽带收益 + 服务器带宽收益 更多 >>
@@ -55,6 +56,7 @@ import TableList from "@/components/table/index.vue"; import {listBandWidth} from "@/api/disRevenue/earnManage" import {listTopology} from "@/api/disRevenue/resource" + import {countBusiness, sumTrafficByServer, sumTrafficBySwitch, countSwitchNum, serverOnlineRate, countDeviceNumTop5} from "@/api/homeIndex"; export default { name: "Index", components: {EchartsPie, EchartsLine, EchartsBar, TableList}, @@ -63,10 +65,10 @@ export default { // 版本号 version: "3.6.6", headerList: [ - {title: '当前在线服务器的流量相关的业务数', num: '76800', unit: '个'}, - {title: '当前在线服务器发送带宽总流量', num: '1126', unit: 'Mbps'}, - {title: '当前在线交换机接收带宽总流量', num: '1140', unit: 'Mbps'}, - {title: '交换机在线数量', num: '1111', unit: '个', lastVal: '交换机注册总数', lastNum: '11112222'}, + {title: '当前在线服务器的流量相关的业务数', num: '0', unit: '个'}, + {title: '当前在线服务器发送带宽总流量', type: 'switch', num: '0', unit: 'Mbps'}, + {title: '当前在线交换机接收带宽总流量', type: 'switch', num: '0', unit: 'Mbps'}, + {title: '交换机在线数量', num: '0', unit: '个', lastVal: '交换机注册总数', lastNum: '0'}, ], lineDataParams: { titleVal: {x: '1%', y: '3%',fontSize: 14, textAlign: 'left'}, @@ -77,18 +79,18 @@ export default { hidAxisLabel: true, hidSplitLine: true, name: ' ', - linexData: ['业务名称1', '业务名称2', '业务名称3', '业务名称4', '业务名称5', '业务名称6', '业务名称7', '业务名称8', '业务名称9', '业务名称10'], - data: [100, 90, 80, 70, 60, 50, 40, 30, 20, 10] + lineXData: [], + data: [] }, dataList: [{ titleVal: {title: '服务器在线率', show: true, x: '1%', y: '3%', textAlign: 'left'}, - centerVal: '82%', + centerVal: '0%', lastVal: '在线率', color: ['#0d52d9', '#bbc4d2'], radius: ['60%', '70%'], data: [ - { value: 82, name: '在线' }, - { value: 28, name: '总数' } + { value: 0, name: '在线' }, + { value: 0, name: '总数' } ] },{ titleVal: {title: '资源告警处理情况', show: true, x: '1%', y: '3%', textAlign: 'left'}, @@ -136,8 +138,62 @@ export default { created() { this.serverTableList(); this.resMonitorTableList(); + this.getCountBusiness(); + this.getSumTrafficByServer(); + this.getSumTrafficBySwitch(); + this.getCountSwitchNum(); + this.getServerOnlineRate(); + this.getCountDeviceNumTop5(); }, methods: { + getCountBusiness(){ + countBusiness().then(res => { + this.headerList[0].num = res && res.data; + }); + }, + getSumTrafficByServer(){ + sumTrafficByServer().then(res => { + this.headerList[1].num = res && res.data; + }); + }, + getSumTrafficBySwitch(){ + sumTrafficBySwitch().then(res => { + this.headerList[2].num = res && res.data; + }); + }, + getCountSwitchNum(){ + countSwitchNum().then(res => { + this.headerList[3].num = res && res.onlineCount; + this.headerList[3].lastNum = res && res.total; + }); + }, + getServerOnlineRate(){ + serverOnlineRate().then(res => { + if (res) { + let newParams = { + centerVal: res.onlineRate + '%', + data: [ + {value: res && res.onlineCount, name: '在线'}, + {value: res && res.offlineCount, name: '总数'} + ] + }; + this.dataList[0] = Object.assign({}, this.dataList[0], newParams); + } + }); + }, + getCountDeviceNumTop5(){ + countDeviceNumTop5().then(res => { + console.log('4444===',res); + let lineXData = []; + let dataList = []; + res && res.data.forEach(item => { + lineXData.push(item.businessName); + dataList.push(item.total); + }); + this.lineDataParams['lineXData'] = lineXData; + this.lineDataParams['data'] = dataList; + }); + }, serverTableList() { listBandWidth(this.serQueryParams).then(response => { this.serTableList = response.rows;