业务95值计算、服务器收益和交换机收益的图形分析、自定义列、修复bug
This commit is contained in:
@@ -123,6 +123,40 @@ export function graAvgMonthly(data) {
|
||||
})
|
||||
}
|
||||
|
||||
/** ------------------服务器和交换机的 图形分析------------------- */
|
||||
// 服务器日
|
||||
export function serverGraphDaily(data) {
|
||||
return request({
|
||||
url: '/system/epsTrafficData/getServerGraphicalAnalysisDaily',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 服务器月
|
||||
export function serverGraphMonth(data) {
|
||||
return request({
|
||||
url: '/system/epsTrafficData/getServerGraphicalAnalysisMonthy',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 交换机日
|
||||
export function switchGraphDaily(data) {
|
||||
return request({
|
||||
url: '/system/switchInfoDetails/getGraphicalAnalysisDaily',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 交换机月
|
||||
export function switchGraphMonth(data) {
|
||||
return request({
|
||||
url: '/system/switchInfoDetails/getGraphicalAnalysisMonthy',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/** ------------------业务管理------------------- */
|
||||
|
||||
// 查询列表
|
||||
@@ -407,3 +441,11 @@ export function taskRraphical(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 获取月均日95时间
|
||||
export function getAvgTimeList(data) {
|
||||
return request({
|
||||
url: '/system/taskStatistics/getAvgTimeList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,3 +7,20 @@ export const getRouters = () => {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 保存自定义列表列
|
||||
export function addColumnList(data) {
|
||||
return request({
|
||||
url: '/system/columnConfig/addColumnConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 获取自定义列表列
|
||||
export function getColumnList(data) {
|
||||
return request({
|
||||
url: '/system/columnConfig/getColumnConfigByUserId',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="Object.keys(columns).length > 0">
|
||||
<el-button size="mini" circle icon="el-icon-menu" @click="showColumn()" v-if="showColumnsType == 'transfer'"/>
|
||||
<el-dropdown trigger="click" :hide-on-click="false" style="padding-left: 12px" v-if="showColumnsType == 'checkbox'">
|
||||
<el-dropdown trigger="click" :hide-on-click="false" style="padding-left: 12px" v-if="showColumnsType == 'checkbox'" @visible-change="handleDropdownVisibleChange">
|
||||
<el-button size="mini" circle icon="el-icon-menu" />
|
||||
<el-dropdown-menu slot="dropdown" style="max-height: calc(100% - 320px); overflow: auto;">
|
||||
<el-dropdown-menu slot="dropdown" style="max-height: calc(100% - 320px);min-height: 200px; overflow: auto;">
|
||||
<!-- 全选/反选 按钮 -->
|
||||
<el-dropdown-item>
|
||||
<el-checkbox :indeterminate="isIndeterminate" v-model="isChecked" @change="toggleCheckAll"> 列展示 </el-checkbox>
|
||||
@@ -38,6 +38,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addColumnList, getColumnList} from "@/api/menu";
|
||||
export default {
|
||||
name: "RightToolbar",
|
||||
data() {
|
||||
@@ -76,6 +77,10 @@ export default {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
modelIdent: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
style() {
|
||||
@@ -120,6 +125,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.fnColumnList();
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
toggleSearch() {
|
||||
@@ -172,6 +180,41 @@ export default {
|
||||
// Object.values(this.columns).forEach((col) => (col.visible = newValue))
|
||||
}
|
||||
this.$emit("columnsChange", this.columns);
|
||||
},
|
||||
// 获取列
|
||||
fnColumnList() {
|
||||
let newCol = JSON.parse(JSON.stringify(this.columns));
|
||||
getColumnList({pageRoute: this.modelIdent}).then(res => {
|
||||
if (res && res.data && res.data.columnConfig) {
|
||||
let newData = JSON.parse(res.data.columnConfig);
|
||||
Object.keys(newCol).forEach(keyName => {
|
||||
if (newData[keyName]) {
|
||||
newCol[keyName].visible = true;
|
||||
} else {
|
||||
newCol[keyName].visible = false;
|
||||
}
|
||||
this.$set(this.columns, keyName, newCol[keyName]);
|
||||
});
|
||||
this.$emit("columnsChange", null, newCol);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$emit("columnsChange", null, this.columns);
|
||||
});
|
||||
},
|
||||
// 列选项栏关闭时
|
||||
handleDropdownVisibleChange(isVisible) {
|
||||
let params = {userId: this.$store.state.user.id, pageRoute: this.modelIdent};
|
||||
if (!isVisible) {
|
||||
let columnVisible = {};
|
||||
Object.keys(this.columns).forEach(keyName => {
|
||||
if (this.columns[keyName] && this.columns[keyName].visible) {
|
||||
columnVisible[keyName] = true;
|
||||
}
|
||||
});
|
||||
params['columnConfig'] = JSON.stringify(columnVisible);
|
||||
addColumnList(params).then(res => {
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -65,35 +65,39 @@
|
||||
},
|
||||
methods: {
|
||||
getList(title, dataXY) {
|
||||
console.log('dataXY===',dataXY);
|
||||
const lineDataListIntance = echarts.init(document.getElementById('lineChart' + this.num));
|
||||
let titleList = {text: title, x: '50%', y: '3%', textAlign: 'center',textStyle: {fontSize: 16}};
|
||||
if (dataXY && dataXY.titleVal) {
|
||||
titleList = Object.assign({},titleList, dataXY.titleVal);
|
||||
let titleList = [{text: title, x: '50%', y: '3%', textAlign: 'center',textStyle: {fontSize: 16}}];
|
||||
if (dataXY && dataXY.titleSubtext) {
|
||||
titleList.push(dataXY.titleSubtext);
|
||||
} else if (dataXY && dataXY.titleVal) {
|
||||
titleList[0] = Object.assign({},titleList[0], dataXY.titleVal);
|
||||
}
|
||||
let legendData = dataXY && dataXY.legend ? dataXY.legend : {};
|
||||
if (dataXY && dataXY.legend && dataXY.legend.formatter) {
|
||||
let formatData = {
|
||||
// formatter: function(params) {
|
||||
// const customSuffix = 'xxxxx';
|
||||
// return `${params} ${customSuffix}`;
|
||||
// },
|
||||
formatter: function(params) {
|
||||
const customSuffix = dataXY && dataXY.content && dataXY.content[params] || ' ';
|
||||
return `${params} ${customSuffix}`;
|
||||
},
|
||||
};
|
||||
legendData = Object.assign({}, legendData, formatData);
|
||||
}
|
||||
let series = [];
|
||||
if (dataXY && dataXY.dataList && dataXY.dataList.length > 0) {
|
||||
dataXY.dataList.forEach(item => {
|
||||
series.push({
|
||||
let str = {
|
||||
name: item && item.name || '',
|
||||
type: 'line',
|
||||
// showSymbol: false,
|
||||
symbol: 'circle',
|
||||
areaStyle: {
|
||||
opacity: 0.6
|
||||
},
|
||||
data: item && item.data || []
|
||||
});
|
||||
};
|
||||
if (!(item && item.areaStyleNone)) {
|
||||
str['areaStyle'] = {
|
||||
opacity: 0.6
|
||||
};
|
||||
}
|
||||
series.push(str);
|
||||
});
|
||||
} else {
|
||||
series = [{
|
||||
@@ -106,7 +110,7 @@
|
||||
}];
|
||||
}
|
||||
let option = {
|
||||
title: [titleList],
|
||||
title: titleList,
|
||||
legend: legendData,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
@@ -135,6 +139,7 @@
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: function(value) {
|
||||
if (value) {
|
||||
// 每4个字符换一行(根据实际文本长度调整)
|
||||
const maxLength = 11;
|
||||
let result = '';
|
||||
@@ -147,6 +152,7 @@
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
},
|
||||
// lineHeight: 10, // 行高(确保换行后不重叠)
|
||||
},
|
||||
@@ -154,7 +160,7 @@
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: dataXY?.yAxisName || '单位Mbps',
|
||||
name: dataXY?.yAxisName || ' ',
|
||||
min: 0, // 自定义最小刻度(根据业务需求调整,如 0)
|
||||
max: dataXY && dataXY.data && dataXY.data.length > 0 ? null : dataXY && dataXY.dataList && dataXY.dataList[0] && dataXY.dataList[0].data.length > 0 ? null : 100,
|
||||
splitLine: {
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
v-model="ruleForm[key]"
|
||||
class="w100"
|
||||
:ref="(el) => { if (el) this.cascaderRefs[key] = el; }"
|
||||
:props="{ multiple: true, checkStrictly: true }"
|
||||
:props="{ multiple: true}"
|
||||
:options="formVal.options"
|
||||
:disabled="toBoolean(formVal.disabled || formItem.config.readonly)"
|
||||
:placeholder="toBoolean(formVal.disabled || formItem.config.readonly) ? null : formVal.placeholder || `请选择${formVal.label}`"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<el-button :type="item.type" plain size="mini" :icon="item.icon" @click="handleClick(item,{})" :hasPermi="[item.hasPermi]">{{item.content}}</el-button>
|
||||
</el-col>
|
||||
</template>
|
||||
<right-toolbar v-if="!(config && config.colTopHiddenIcon)" :showSearch.sync="showSearch" @queryTable="renderList" @columnsChange="columnsChange" :columns="columns"></right-toolbar>
|
||||
<right-toolbar v-if="!(config && config.colTopHiddenIcon)" :modelIdent="this.modelIdent" :showSearch.sync="showSearch" @queryTable="renderList" @columnsChange="columnsChange" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
<!-- 表格数据 -->
|
||||
<el-table v-loading="loading" :data="tableList" :ref="config && config.tableKey ? `tableRef_${config.tableKey}` : `selChangeList`" :key="tableKey" highlight-selection-row @select-all="handleSelectAll" @select="handleSelectionChange">
|
||||
@@ -89,6 +89,10 @@
|
||||
export default {
|
||||
name: 'table-list',
|
||||
props: {
|
||||
modelIdent: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
tableList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
@@ -134,6 +138,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!(this.config && this.config.colTopHiddenIcon)) {
|
||||
this.$modal.loading();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 所有方法都抛出到父组件里去
|
||||
handleClick(result, row) {
|
||||
@@ -272,7 +281,10 @@
|
||||
this.$emit("fnRenderList");
|
||||
},
|
||||
// columns改变时触发,重新计算样式并渲染列表(解决:新增列,多选框和操作按钮错位)
|
||||
columnsChange() {
|
||||
columnsChange(val, col) {
|
||||
if (col) {
|
||||
this.$modal.closeLoading();
|
||||
}
|
||||
this.tableKey++;
|
||||
},
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</el-form>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<TableList class="w100 h100" :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList class="w100 h100" :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempDay="{ valueKey, row, column }">
|
||||
<span v-if="row && row[valueKey]">{{row[valueKey]}}/{{row.createTime}}</span>
|
||||
</template>
|
||||
|
||||
@@ -61,9 +61,13 @@
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$modal.loading();
|
||||
switchNameTree().then(val => {
|
||||
this.switchNameList = val && val;
|
||||
this.formList[0].controls.includedResources['options'] = val && val.data;
|
||||
this.$modal.closeLoading();
|
||||
}).catch(() => {
|
||||
this.$modal.closeLoading();
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -104,8 +108,15 @@
|
||||
break;
|
||||
case 'submit':
|
||||
dataVal['calculationMode'] = this.paramsData.calculationMode;
|
||||
if (dataVal.includedResources) {
|
||||
let newArr = [];
|
||||
dataVal.includedResources.forEach(item => {
|
||||
newArr.push(item[1]);
|
||||
});
|
||||
dataVal.includedResources = newArr.toString();
|
||||
}
|
||||
if (dataVal.includedResourcesTree) {
|
||||
dataVal.includedResources = dataVal.includedResources.toString();
|
||||
dataVal.includedResources = dataVal.includedResourcesTree.toString();
|
||||
delete dataVal.includedResourcesTree;
|
||||
}
|
||||
if (dataVal && dataVal.businessName) {
|
||||
@@ -115,7 +126,6 @@
|
||||
dataVal.startTime = dataVal.endTime[0];
|
||||
dataVal.endTime = dataVal.endTime[1];
|
||||
}
|
||||
console.log('dataVal===',dataVal);
|
||||
addTaskStatic(dataVal).then(response => {
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
this.$router.push("/earnManage/busValueCount");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane v-for="item of timeList" label="item" name="item"></el-tab-pane>
|
||||
<el-tab-pane v-for="item of timeList" :label="item" :name="item"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<TableList :columns="columns" :config="{colTopHiddenIcon: true}" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList">
|
||||
<template #tempBusinessName="{ row, column }">
|
||||
@@ -84,19 +84,21 @@
|
||||
created() {
|
||||
this.paramsData = this.$route.query && this.$route.query;
|
||||
this.columsList();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleClick(){
|
||||
this.getList();
|
||||
this.getList(this.activeName);
|
||||
},
|
||||
rowDataChange(row) {
|
||||
this.$set(row, 'editStatus', true);
|
||||
},
|
||||
columsList(num) {
|
||||
if (num && num === '4') {
|
||||
this.timeList = ['2025-10-01', '2025-10-02', '2025-10-03', '2025-10-04', '2025-10-05'];
|
||||
if (this.paramsData && this.paramsData.calculationType === '2') {
|
||||
this.timeList = this.getCurrentMonthDates();
|
||||
this.activeName = this.timeList[0];
|
||||
this.getList(this.activeName);
|
||||
} else {
|
||||
this.getList();
|
||||
}
|
||||
// 服务器
|
||||
if (this.paramsData && this.paramsData.resourceType === '1') {
|
||||
@@ -108,25 +110,29 @@
|
||||
};
|
||||
} else {
|
||||
this. columns = {
|
||||
businessCode: {label: `交换机接口`, minWidth: '220',visible: true},
|
||||
name: {label: `交换机接口`, minWidth: '220',visible: true},
|
||||
createTime: {label: `时间`,minWidth: '160',visible: true},
|
||||
putSpeed: {label: `总接收流量值(bit/s)`, minWidth: '150', visible: true},
|
||||
inSpeed: {label: `总接收流量值(bit/s)`, minWidth: '150', visible: true},
|
||||
outSpeed: {label: `总发送流量值(bit/s)`, minWidth: '150', visible: true},
|
||||
totalSpeed: {label: `流量值最大值(bit/s)`, minWidth: '150', slotName: 'tempTotalSpeed',visible: true},
|
||||
maxSpeed: {label: `流量值最大值(bit/s)`, minWidth: '150', slotName: 'tempTotalSpeed',visible: true},
|
||||
};
|
||||
}
|
||||
},
|
||||
/** 查询角色列表 */
|
||||
getList() {
|
||||
getList(time) {
|
||||
this.loading = true;
|
||||
taskRelate(Object.assign( this.queryParams, {id: this.paramsData && this.paramsData.id}, {calculationMode: this.paramsData.calculationMode})).then(response => {
|
||||
let params = {calculationMode: this.paramsData.calculationMode};
|
||||
if (time) {
|
||||
params['avgTime'] = time;
|
||||
}
|
||||
taskRelate(Object.assign( this.queryParams, {id: this.paramsData && this.paramsData.id}, params)).then(response => {
|
||||
this.loading = false;
|
||||
this.roleList = response && response.rows;
|
||||
this.queryParams.total = response.total;
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
this.$router.go(-1);
|
||||
this.$router.push("/earnManage/busValueCount");
|
||||
},
|
||||
callback(result, rowData, selectChange) {
|
||||
if (result && result.fnCode) {
|
||||
@@ -139,6 +145,9 @@
|
||||
needSpeed: rowData.outSpeed,
|
||||
needTime: rowData.createTime
|
||||
};
|
||||
if (this.paramsData && this.paramsData.resourceType === '2') {
|
||||
params['needSpeed'] = rowData.maxSpeed;
|
||||
}
|
||||
updateRelate(params).then(res => {
|
||||
this.$set(rowData, 'editStatus', false);
|
||||
this.getList();
|
||||
@@ -152,6 +161,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
// 补零函数:将单个数字(1-9)转为两位数(01-09)
|
||||
padZero(num) {
|
||||
return num < 10 ? `0${num}` : num;
|
||||
},
|
||||
// 获取当前月所有日期的函数
|
||||
getCurrentMonthDates() {
|
||||
return getAvgTimeList({id: this.paramsData && this.paramsData.id}).then(res => {
|
||||
console.log(res);
|
||||
return res;
|
||||
});
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div style="height: calc(100vh)!important">
|
||||
<EchartsLine :lineData="lineDataParams" :title="lineDataParams.title" style="height: 400px;" class="w100 mt20 mb20"></EchartsLine>
|
||||
<EchartsLine :lineData="lineDataParams && lineDataParams.chart || {}" :title="lineDataParams.chart && lineDataParams.chart.title || ''" style="height:500px;" class="w100 mt20 mb20"></EchartsLine>
|
||||
<div style="float: right;margin-top: 20px;">
|
||||
<el-button type="primary" @click="goBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -15,16 +18,20 @@
|
||||
paramsData: {},
|
||||
echartData: {
|
||||
title: 'tux',
|
||||
titleSubtext: {subtext: '', bottom: '14%', x: '50%', textAlign: 'center', subtextStyle: {fontWeight: 'bold', fontSize: 14}},
|
||||
yAxisName: '',
|
||||
legend: {orient: 'vertical',bottom: '1%', formatter: true},
|
||||
gridBotm: '10%',
|
||||
content: {},
|
||||
legend: {orient: 'vertical',bottom: '0%', formatter: true},
|
||||
gridBotm: '20%',
|
||||
hiddenTime: true,
|
||||
lineXData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sa', 'Sun'],
|
||||
dataList: [
|
||||
{name: '总发送流量值', data: []},
|
||||
{name: '总接收流量值', data: []},
|
||||
{name: '95带宽值', areaStyleNone: true, data: []},
|
||||
]
|
||||
},
|
||||
lineDataParams: {},
|
||||
lineDataParams: {chart: {}},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -33,18 +40,41 @@
|
||||
},
|
||||
methods: {
|
||||
chartList() {
|
||||
taskRraphical({id: this.paramsData.id}).then(res => {
|
||||
console.log('res====',res);
|
||||
if(res && res.data) {
|
||||
let content = '最后一个值:' + res.data.other.lastInSpeedGb;
|
||||
this.echartData.title = '【' + this.paramsData.taskName + '】';
|
||||
this.echartData.yAxisName = '单位' + res.data.other.recommendedUnit || '';
|
||||
this.echartData.lineXData = res.data.xData || [];
|
||||
this.echartData.dataList[0].data = res.data.yData['netOutSpeedData'] || [];
|
||||
let newChartData = JSON.parse(JSON.stringify(this.echartData));
|
||||
if (this.paramsData && this.paramsData.resourceType === '1') {
|
||||
newChartData.dataList.splice(1,1);
|
||||
}
|
||||
this.lineDataParams = this.echartData;
|
||||
|
||||
if (this.paramsData && this.paramsData.calculationType === '2') {
|
||||
newChartData.dataList[newChartData.dataList.length - 1].name = '月均日95值';
|
||||
}
|
||||
taskRraphical({id: this.paramsData.id}).then(res => {
|
||||
if(res && res.data) {
|
||||
let outContent = `最后一个值:${res && res.data && res.data.other && res.data.other.lastOutSpeedGb ? res.data.other.lastOutSpeedGb + 'G' : '0'} 平均值:${res && res.data && res.data.other && res.data.other.avgOutSpeedGb ? res.data.other.avgOutSpeedGb + 'G' : '0'} 最大值:${res && res.data && res.data.other && res.data.other.maxOutSpeedGb ? res.data.other.maxOutSpeedGb + 'G' : '0'}`;
|
||||
let inContent = `最后一个值:${res && res.data && res.data.other && res.data.other.lastInSpeedGb ? res.data.other.lastInSpeedGb + 'G' : '0'} 平均值:${res && res.data && res.data.other && res.data.other.avgInSpeedGb ? res.data.other.avgInSpeedGb + 'G' : '0'} 最大值:${res && res.data && res.data.other && res.data.other.maxInSpeedGb ? res.data.other.maxInSpeedGb + 'G' : '0'}`;
|
||||
let kdContent = `(${res && res.data && res.data.percentile95 ? res.data.percentile95 + 'mbit' : '0'} out)`;
|
||||
newChartData.title = '【' + this.paramsData.taskName + '】';
|
||||
newChartData.titleSubtext.subtext = res && res.data && res.data.timeRange || ' ';
|
||||
newChartData.content[newChartData.dataList[0].name] = outContent;
|
||||
newChartData.yAxisName = res && res.data && res.data.other && res.data.other.recommendedUnit ? '单位' + res.data.other.recommendedUnit : '';
|
||||
newChartData.lineXData = res && res.data && res.data.xData || [];
|
||||
newChartData.dataList[0].data = res && res.data && res.data.yData && res.data.yData['netOutSpeedData'] || [];
|
||||
if (this.paramsData && this.paramsData.resourceType === '1') {
|
||||
newChartData.content[newChartData.dataList[1].name] = kdContent;
|
||||
newChartData.dataList[1].data = res && res.data && res.data.yData && res.data.yData['percentile95'] || [];
|
||||
} else {
|
||||
newChartData.content[newChartData.dataList[1].name] = inContent;
|
||||
newChartData.content[newChartData.dataList[2].name] = kdContent;
|
||||
newChartData.dataList[1].data = res && res.data && res.data.yData && res.data.yData['netInSpeedData'] || [];
|
||||
newChartData.dataList[2].data = res && res.data && res.data.yData && res.data.yData['percentile95'] || [];
|
||||
}
|
||||
}
|
||||
this.$set(this.lineDataParams, 'chart', newChartData);
|
||||
});
|
||||
},
|
||||
goBack() {
|
||||
this.$router.push("/earnManage/busValueCount");
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :modelIdent="this.$options.name" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempBusinessName="{ row, column }">
|
||||
<div>
|
||||
<!-- 非编辑状态:显示文本 -->
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :modelIdent="this.$options.name" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempBusinessName="{ row, column }">
|
||||
<div>
|
||||
<!-- 非编辑状态:显示文本 -->
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :modelIdent="this.$options.name" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempStatus="{ row, column }">
|
||||
<dict-tag :options="dict.type.eps_business_review_status" :value="row.reviewStatus"/>
|
||||
</template>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange"></TableList>
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange"></TableList>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</el-col>
|
||||
</el-form>
|
||||
<!-- 表格数据 -->
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange"></TableList>
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange"></TableList>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
// 列显隐信息
|
||||
columns: {
|
||||
id: {label: `ID`, visible: false},
|
||||
createTime: {label: `修改时间`, visible: true},
|
||||
updateTime: {label: `修改时间`, visible: true},
|
||||
clientId: {label: `ClientID`, minWidth: '130', visible: true},
|
||||
hardwareSn: {label: `硬件SN`},
|
||||
changeContent: {label: `修改内容`, minWidth: '350', visible: true},
|
||||
creatBy: {label: `修改人`, width: '80', visible: true},
|
||||
updateBy: {label: `修改人`, width: '80', visible: true},
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<div style="height: calc(100vh)!important">
|
||||
<div style="height: 90px;">
|
||||
<el-form ref="noticeRef" :model="form" label-width="80px">
|
||||
<el-form-item label="节点名称" prop="noticeType">
|
||||
<el-form-item label="ClientID" prop="clientId">
|
||||
<!-- allow-create default-first-option: 搜索下拉框中没有的数据并展示查询 -->
|
||||
<el-select v-model="form.noticeType" multiple filterable placeholder="请选择节点名称" @change="handleChange">
|
||||
<el-select v-model="form.clientId" multiple filterable placeholder="请选择ClientID" @change="handleChange">
|
||||
<el-option
|
||||
v-for="item in selectChangeList"
|
||||
:key="item.value"
|
||||
@@ -19,26 +19,31 @@
|
||||
<el-date-picker
|
||||
v-model="timeList[item.value]"
|
||||
:style="{width: '300px!important', marginRight: '10px'}"
|
||||
:type="item.value === '1' ? 'datetimerange' : 'monthrange'"
|
||||
:type="item.value === '1' ? 'daterange' : 'monthrange'"
|
||||
:start-placeholder="item.value === '2' ? '开始日期' : '开始时间'"
|
||||
:end-placeholder="item.value === '2' ? '结束日期' : '结束时间'"
|
||||
range-separator="至"
|
||||
:format="item.value === '2' ? 'yyyy-MM' : 'yyyy-MM-dd HH:mm:ss'"
|
||||
:value-format="item.value === '2' ? 'yyyy-MM' : 'yyyy-MM-dd HH:mm:ss'"
|
||||
:default-time="item.value === '1' ? ['12:00:00', '12:00:00'] : null"
|
||||
:format="item.value === '2' ? 'yyyy-MM' : 'yyyy-MM-dd'"
|
||||
:value-format="item.value === '2' ? 'yyyy-MM' : 'yyyy-MM-dd'"
|
||||
@change="(val) => dateChange(val, item.value)"/>
|
||||
</template>
|
||||
</div>
|
||||
<div style="height: calc(100vh - 160px);overflow: scroll;">
|
||||
<template v-for="(item,index) of echartListData">
|
||||
<template v-if="item && item.dateShowType === 'day'">
|
||||
<EchartsLine v-show="switchData[item.indexVal].checkType" :chartData="(valData) => chartDataEvent(valData, item.fnEvent)" :dateShowType="item.dateShowType"
|
||||
:lineData="item.resultData" :title="item.titleList + switchData[item.indexVal].label" class="w100 h40 mt20 mb20" style="border: 1.5px solid #878787;"></EchartsLine>
|
||||
</template>
|
||||
<template v-if="item && item.dateShowType === 'month'">
|
||||
<EchartsBar v-show="switchData[item.indexVal].checkType" :chartData="(valData) => chartDataEvent(valData, item.fnEvent)" :dateShowType="item.dateShowType"
|
||||
:barData="item.resultData" :title="item.titleList + switchData[item.indexVal].label" class="w100 h40 mt20 mb20" style="border: 1.5px solid #878787;"></EchartsBar>
|
||||
<!-- <template v-for="(item,index) of echartListData">-->
|
||||
<!-- <template v-if="item && item.dateShowType === 'day'">-->
|
||||
<!-- <EchartsLine v-show="switchData[item.indexVal].checkType" :chartData="(valData) => chartDataEvent(valData, item.fnEvent)" :dateShowType="item.dateShowType"-->
|
||||
<!-- :lineData="item.resultData" :title="item.titleList + switchData[item.indexVal].label" class="w100 h40 mt20 mb20" style="border: 1.5px solid #878787;"></EchartsLine>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-if="item && item.dateShowType === 'month'">-->
|
||||
<!-- <EchartsBar v-show="switchData[item.indexVal].checkType" :chartData="(valData) => chartDataEvent(valData, item.fnEvent)" :dateShowType="item.dateShowType"-->
|
||||
<!-- :barData="item.resultData" :title="item.titleList + switchData[item.indexVal].label" class="w100 h40 mt20 mb20" style="border: 1.5px solid #878787;"></EchartsBar>-->
|
||||
<!-- </template>-->
|
||||
<!-- </template>-->
|
||||
<template v-for="(item,index) of echartListData['day']">
|
||||
<EchartsLine v-show="switchData[item.indexVal].checkType" :lineData="item" :title="item.title" class="w100 mt20 mb20" style="border: 1.5px solid #878787;height:60%;"></EchartsLine>
|
||||
</template>
|
||||
<template v-for="(item,index) of echartListData['month']">
|
||||
<EchartsLine v-show="switchData[item.indexVal].checkType" :lineData="item" :title="item.title " class="w100 mt20 mb20" style="border: 1.5px solid #878787;height:60%;"></EchartsLine>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,8 +53,8 @@
|
||||
import Form from '@/components/form/index.vue';
|
||||
import EchartsLine from "@/components/echartsList/line.vue";
|
||||
import EchartsBar from "@/components/echartsList/bar.vue";
|
||||
import {graPackage, graMonthly, graEffectiveMonthly, graEffectiveDaily, graEffectiveAvgMonthly, graDaily, graAvgMonthly} from "@/api/disRevenue/earnManage"
|
||||
import {listAllResourList} from "@/api/disRevenue/resource";
|
||||
import {graPackage, graMonthly, graEffectiveMonthly, graEffectiveDaily, graEffectiveAvgMonthly, graDaily, graAvgMonthly, serverGraphDaily, serverGraphMonth, switchGraphDaily, switchGraphMonth} from "@/api/disRevenue/earnManage"
|
||||
import {listAllResourList, getRegistList} from "@/api/disRevenue/resource";
|
||||
export default {
|
||||
name: 'AnalysisChart',
|
||||
components: {Form, EchartsLine, EchartsBar},
|
||||
@@ -59,7 +64,7 @@
|
||||
type: String,
|
||||
default: "1000"
|
||||
},
|
||||
noticeType: {
|
||||
clientId: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
@@ -81,15 +86,27 @@
|
||||
storageKey: '',
|
||||
selectChangeList: [],
|
||||
switchData: [],
|
||||
disabledList: {},
|
||||
echartListData: [],
|
||||
echartListData: {},
|
||||
typeObj: {},
|
||||
paramsVal: {},
|
||||
resourceType: '',
|
||||
lineDataParams: {
|
||||
lineXData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sa', 'Sun'],
|
||||
data: [120, 132, 101, 134, 90, 230, 210]
|
||||
echartData: {
|
||||
title: 'tux',
|
||||
titleSubtext: {subtext: '', bottom: '14%', x: '50%', textAlign: 'center', subtextStyle: {fontWeight: 'bold', fontSize: 14}},
|
||||
yAxisName: ' ',
|
||||
content: {},
|
||||
legend: {orient: 'vertical',bottom: '0%', formatter: true},
|
||||
gridTop: '60px',
|
||||
gridBotm: '25%',
|
||||
hiddenTime: true,
|
||||
lineXData: [],
|
||||
dataList: [
|
||||
{name: '发送流量值', data: []},
|
||||
{name: '金山API记录的发送流量值', data: []},
|
||||
{name: '95带宽值/日', areaStyleNone: true, data: []},
|
||||
]
|
||||
},
|
||||
lineDataParams: {chart: {}},
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
@@ -121,27 +138,21 @@
|
||||
}
|
||||
},
|
||||
fnNodeName(type){
|
||||
listAllResourList({resourceType: type}).then(val => {
|
||||
this.selectChangeList = val && val.map(item => {
|
||||
return Object.assign({label: item.resourceName, value: item.resourceName});
|
||||
getRegistList({resourceType: type}).then(val => {
|
||||
this.selectChangeList = val && val.data.map(item => {
|
||||
return Object.assign({label: item.clientId, value: item.clientId});
|
||||
});
|
||||
});
|
||||
},
|
||||
// 下拉数据改变时触发
|
||||
handleChange(eventVal) {
|
||||
if (this.resourceType === 1) {
|
||||
this.paramsVal = {
|
||||
nodeNames: eventVal
|
||||
clientIds: eventVal.toString()
|
||||
};
|
||||
} else {
|
||||
this.paramsVal = {
|
||||
switchNames: eventVal
|
||||
};
|
||||
}
|
||||
this.echartListData = [];
|
||||
this.echartListData = {};
|
||||
this.paramsVal['calculationMode'] = this.activeName;
|
||||
let dayList = this.getDaysOfPreviousMonth();
|
||||
let monthList = this.getLastMonths();
|
||||
let dayList = {startTime: this.timeList['1'][0], endTime: this.timeList['1'][1]};
|
||||
let monthList = {startTime: this.timeList['2'][0], endTime: this.timeList['2'][1]};
|
||||
this.graDailyList(dayList);
|
||||
this.graMonthlyList(monthList);
|
||||
// this.graPackageList(dayList);
|
||||
@@ -152,7 +163,20 @@
|
||||
},
|
||||
// 时间变化时
|
||||
dateChange(val, idNum){
|
||||
console.log('id=====',idNum, 'val===',val);
|
||||
// console.log('id=====',idNum, 'val===',val);
|
||||
this.paramsVal['calculationMode'] = this.activeName;
|
||||
let timeStr = {startTime: val[0], endTime: val[1]};
|
||||
if (idNum === '1') {
|
||||
this.timeList['1'] = val;
|
||||
if (this.paramsVal && this.paramsVal.clientIds) {
|
||||
this.graDailyList(timeStr);
|
||||
}
|
||||
} else if (idNum === '2') {
|
||||
this.timeList['2'] = val;
|
||||
if (this.paramsVal && this.paramsVal.clientIds) {
|
||||
this.graMonthlyList(timeStr);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 初始化
|
||||
processData(list) {
|
||||
@@ -160,42 +184,56 @@
|
||||
let nameListArr = [];
|
||||
let showNameList = [];
|
||||
list.forEach(item => {
|
||||
let name = this.resourceType === 1 ? item.nodeName : item.uplinkSwitch;
|
||||
if (this.paramsData && this.paramsData.resourceType === '1') {
|
||||
if (item && item.clientId) {
|
||||
let name = item.clientId;
|
||||
if (!nameArr.includes(name)) {
|
||||
item.label = name;
|
||||
item.value = name;
|
||||
nameArr.push(name);
|
||||
nameListArr.push(item);
|
||||
}
|
||||
}
|
||||
} else if (this.paramsData && this.paramsData.resourceType === '2') {
|
||||
if (item && item.serverClientId) {
|
||||
let name = item.serverClientId;
|
||||
if (!nameArr.includes(name)) {
|
||||
item.label = name;
|
||||
item.value = name;
|
||||
nameArr.push(name);
|
||||
nameListArr.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if (this.noticeType && this.noticeType.length > 0) {
|
||||
this.form.noticeType = this.noticeType;
|
||||
if (this.clientId && this.clientId.length > 0) {
|
||||
this.form.clientId = this.clientId;
|
||||
} else {
|
||||
if (nameArr && nameArr.length > 0) {
|
||||
if (nameListArr.length >=2) {
|
||||
this.form.noticeType = [nameListArr[0].label, nameListArr[1].label];
|
||||
this.form.clientId = [nameListArr[0].label, nameListArr[1].label];
|
||||
} else {
|
||||
this.form.noticeType = [nameListArr[0].label];
|
||||
this.form.clientId = [nameListArr[0].label];
|
||||
}
|
||||
}
|
||||
}
|
||||
showNameList = this.form.noticeType;
|
||||
this.echartListData = [];
|
||||
showNameList = this.form.clientId;
|
||||
this.echartListData = {};
|
||||
let dayList = this.getBeforDay();
|
||||
let monthList = this.getLastMonths(2);
|
||||
this.timeList['1'] = [dayList.startTime, dayList.endTime];
|
||||
this.timeList['2'] = [monthList.startTime, monthList.endTime];
|
||||
if (showNameList && showNameList.length > 0) {
|
||||
if (this.resourceType === 1) {
|
||||
this.paramsVal = {
|
||||
nodeNames: showNameList
|
||||
clientIds: showNameList.toString()
|
||||
};
|
||||
} else {
|
||||
this.paramsVal = {
|
||||
switchNames: showNameList
|
||||
clientIds: showNameList.toString()
|
||||
};
|
||||
}
|
||||
this.paramsVal['calculationMode'] = this.activeName;
|
||||
let dayList = this.getBeforDay();
|
||||
let monthList = this.getLastMonths(2);
|
||||
this.timeList['1'] = [dayList.startTime + ' 00:00:00', dayList.endTime + ' 00:00:00'];
|
||||
this.timeList['2'] = [monthList.startTime, monthList.endTime];
|
||||
this.graDailyList(dayList);
|
||||
this.graMonthlyList(monthList);
|
||||
// this.graPackageList(dayList);
|
||||
@@ -205,38 +243,70 @@
|
||||
// this.graEffectiveAvgMonthlyList(dayList);
|
||||
}
|
||||
},
|
||||
// 95带宽值Mbps/日---图表
|
||||
// 95带宽值Mbps/日---图表 serverGraphDaily, serverGraphMonth, switchGraphDaily, switchGraphMonth
|
||||
graDailyList(timeArr){
|
||||
graDaily(Object.assign({resourceType: this.resourceType, bandwidthType: 1} ,this.paramsVal, timeArr)).then(res => {
|
||||
let fnType = serverGraphDaily;
|
||||
if (this.resourceType === 2) {
|
||||
fnType = switchGraphDaily;
|
||||
}
|
||||
let newChartData = JSON.parse(JSON.stringify(this.echartData));
|
||||
fnType(Object.assign({} ,this.paramsVal, timeArr)).then(res => {
|
||||
if (res && res.data && res.data.length > 0) {
|
||||
let chartList = [];
|
||||
res.data.forEach((item, index) => {
|
||||
item.titleList = this.resourceType === 1 ? '【' + item.nodeName + '】【' + item.businessName + '】' : '【' + item.nodeName + '】【' + item.interfaceName + '】【' + item.businessName + '】';
|
||||
item.resultData['hiddenTime'] = true;
|
||||
let dataList = Object.assign({dateShowType: 'day', fnEvent: 'graDailyList'},item, this.typeObj[1]);
|
||||
this.$set(this.echartListData, index * 7, dataList);
|
||||
this.$set(this.disabledList, index * 7, dataList);
|
||||
let outContent = `最后一个值:${item && item.other && item.other.lastOutSpeedGb ? item.other.lastOutSpeedGb + 'G' : '0'} 平均值:${item && item.other && item.other.avgOutSpeedGb ? item.other.avgOutSpeedGb + 'G' : '0'} 最大值:${item && item.other && item.other.maxOutSpeedGb ? item.other.maxOutSpeedGb + 'G' : '0'}`;
|
||||
let inContent = `最后一个值:${item && item.other && item.other.lastInSpeedGb ? item.other.lastInSpeedGb + 'G' : '0'} 平均值:${item && item.other && item.other.avgInSpeedGb ? item.other.avgInSpeedGb + 'G' : '0'} 最大值:${item && item.other && item.other.maxInSpeedGb ? item.other.maxInSpeedGb + 'G' : '0'}`;
|
||||
let kdContent = `(${item && item.percentile95 ? item.percentile95 + 'mbit' : '0'} out)`;
|
||||
newChartData.title = item && item.name;
|
||||
newChartData.yAxisName = item && item.other && item.other.recommendedUnit ? '单位' + item.other.recommendedUnit : ' ';
|
||||
newChartData.titleSubtext.subtext = item && item.timeRange || ' ';
|
||||
newChartData.content[newChartData.dataList[0].name] = outContent;
|
||||
newChartData.content[newChartData.dataList[1].name] = inContent;
|
||||
newChartData.content[newChartData.dataList[2].name] = kdContent;
|
||||
newChartData.lineXData = item && item.xData || [];
|
||||
newChartData.dataList[0].data = item && item.yData && item.yData['netOutSpeedData'] || [];
|
||||
newChartData.dataList[1].data = item && item.yData && item.yData['netInSpeedData'] || [];
|
||||
newChartData.dataList[2].data = item && item.yData && item.yData['percentile95'] || [];
|
||||
let dataList = Object.assign({}, newChartData, this.typeObj[1]);
|
||||
chartList.push(dataList);
|
||||
});
|
||||
this.disabledList[1] = {disabled: false};
|
||||
this.$set(this.echartListData, 'day', chartList);
|
||||
} else {
|
||||
this.disabledList[1] = {disabled: true};
|
||||
this.$set(this.echartListData, 0, {});
|
||||
this.$set(this.echartListData, 'day', []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 95带宽值Mbps/月---图表
|
||||
// 95带宽值Mbps/月---图表 serverGraphDaily, serverGraphMonth, switchGraphDaily, switchGraphMonth
|
||||
graMonthlyList(timeArr){
|
||||
graMonthly(Object.assign({resourceType: this.resourceType, bandwidthType: 2}, this.paramsVal, timeArr)).then(res => {
|
||||
let fnType = serverGraphMonth;
|
||||
if (this.resourceType === 2) {
|
||||
fnType = switchGraphMonth;
|
||||
}
|
||||
let newChartData = JSON.parse(JSON.stringify(this.echartData));
|
||||
newChartData.dataList[newChartData.dataList.length - 1].name = '95带宽值/月';
|
||||
fnType(Object.assign({}, this.paramsVal, timeArr)).then(res => {
|
||||
if (res && res.data && res.data.length > 0) {
|
||||
let chartList = [];
|
||||
res.data.forEach((item, index) => {
|
||||
item.titleList = this.resourceType === 1 ? '【' + item.nodeName + '】【' + item.businessName + '】' : '【' + item.nodeName + '】【' + item.interfaceName + '】【' + item.businessName + '】';
|
||||
item.resultData['hiddenTime'] = true;
|
||||
let dataList = Object.assign({dateShowType: 'month', fnEvent: 'graMonthlyList'},item, this.typeObj[2]);
|
||||
this.$set(this.echartListData, index * 7 + 1, dataList);
|
||||
let outContent = `最后一个值:${item && item.other && item.other.lastOutSpeedGb ? item.other.lastOutSpeedGb + 'G' : '0'} 平均值:${item && item.other && item.other.avgOutSpeedGb ? item.other.avgOutSpeedGb + 'G' : '0'} 最大值:${item && item.other && item.other.maxOutSpeedGb ? item.other.maxOutSpeedGb + 'G' : '0'}`;
|
||||
let inContent = `最后一个值:${item && item.other && item.other.lastInSpeedGb ? item.other.lastInSpeedGb + 'G' : '0'} 平均值:${item && item.other && item.other.avgInSpeedGb ? item.other.avgInSpeedGb + 'G' : '0'} 最大值:${item && item.other && item.other.maxInSpeedGb ? item.other.maxInSpeedGb + 'G' : '0'}`;
|
||||
let kdContent = `(${item && item.percentile95 ? item.percentile95 + 'mbit' : '0'} out)`;
|
||||
newChartData.title = item && item.name;
|
||||
newChartData.yAxisName = item && item.other && item.other.recommendedUnit ? '单位' + item.other.recommendedUnit : ' ';
|
||||
newChartData.titleSubtext.subtext = item && item.timeRange || ' ';
|
||||
newChartData.content[newChartData.dataList[0].name] = outContent;
|
||||
newChartData.content[newChartData.dataList[1].name] = inContent;
|
||||
newChartData.content[newChartData.dataList[2].name] = kdContent;
|
||||
newChartData.lineXData = item && item.xData || [];
|
||||
newChartData.dataList[0].data = item && item.yData && item.yData['netOutSpeedData'] || [];
|
||||
newChartData.dataList[1].data = item && item.yData && item.yData['netInSpeedData'] || [];
|
||||
newChartData.dataList[2].data = item && item.yData && item.yData['percentile95'] || [];
|
||||
let dataList = Object.assign({}, newChartData, this.typeObj[2]);
|
||||
chartList.push(dataList);
|
||||
});
|
||||
// let dataList = Object.assign({dateShowType: 'month', fnEvent: 'graMonthlyList'},res.data, this.typeObj[2]);
|
||||
// this.$set(this.echartListData, 1, dataList);
|
||||
this.$set(this.echartListData, 'month', chartList);
|
||||
} else {
|
||||
this.$set(this.echartListData, 1, {});
|
||||
this.$set(this.echartListData, 'month', []);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -338,8 +408,8 @@
|
||||
const month = String(new Date().getMonth() + 1).padStart(2, '0'); // 0=1月,11=12月
|
||||
const day = String(new Date().getDate()).padStart(2, '0'); // 当前日(如8)
|
||||
const prevDay = String(new Date().getDate() - 1).padStart(2, '0');
|
||||
startData = `${year}-${month}-${prevDay} 00:00:00`;
|
||||
endData = `${year}-${month}-${day} 00:00:00`;
|
||||
startData = `${year}-${month}-${prevDay}`;
|
||||
endData = `${year}-${month}-${day}`;
|
||||
return {startTime: startData, endTime: endData};
|
||||
},
|
||||
// 获取前一个月的所有日期
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div class="app-container" style="height: calc(100vh)!important">
|
||||
<el-tabs class="h100" v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="1000计算方式" name="1000">
|
||||
<AnalysisChart ref="childRef" v-if="activeName === '1000'" :activeName="activeName" :noticeType="noticeType"></AnalysisChart>
|
||||
<AnalysisChart ref="childRef" v-if="activeName === '1000'" :activeName="activeName" :clientId="clientId"></AnalysisChart>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="1024计算方式" name="1024">
|
||||
<AnalysisChart ref="childRef" v-if="activeName === '1024'" :activeName="activeName" :noticeType="noticeType"></AnalysisChart>
|
||||
<AnalysisChart ref="childRef" v-if="activeName === '1024'" :activeName="activeName" :clientId="clientId"></AnalysisChart>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
@@ -20,7 +20,7 @@
|
||||
data() {
|
||||
return {
|
||||
activeName: '',
|
||||
noticeType: [],
|
||||
clientId: [],
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
@@ -53,7 +53,7 @@
|
||||
// },
|
||||
methods: {
|
||||
handleClick() {
|
||||
this.noticeType = this.$refs.childRef.form.noticeType;
|
||||
this.clientId = this.$refs.childRef.form.clientId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- 表格数据 -->
|
||||
<el-table v-loading="loading" :data="roleList">
|
||||
<template v-for="(item,index) of columns">
|
||||
<el-table-column :label="item.label" :prop="item.prop" :sortable="item.sortable" :width="item.width" v-if="item.visible" :show-overflow-tooltip="true">
|
||||
<el-table-column :label="item.label" :prop="item.prop" :sortable="item.sortable" :width="item.width" :minWidth="item.minWidth" v-if="item.visible" :show-overflow-tooltip="true">
|
||||
<template v-if="item.slotName" #default="scope">
|
||||
<span v-if="scope.row && scope.row[item.prop]">{{scope.row[item.prop]}}/{{scope.row.createTime}}</span>
|
||||
</template>
|
||||
@@ -52,9 +52,9 @@
|
||||
{label: `95带宽值/日(Mbit)`, prop: 'bandwidth95Daily', slotName: true, visible: type},
|
||||
// {label: `有效95带宽值Mbps/日`, prop: 'effectiveAvgMonthlyBandwidth95', slotName: true, visible: type},
|
||||
// {label: `包端带宽值Mbps/日`, prop: 'packageBandwidthDaily', slotName: true, visible: type},
|
||||
{label: `流量端口`, prop: 'name', width: '550', visible: !type},
|
||||
{label: `流量端口`, prop: 'name', minWidth: '350', visible: !type},
|
||||
{label: `发送流量值(bytes/s)`, minWidth: '150', prop: 'outSpeed', visible: !type},
|
||||
{label: `金山API记录的发送流量值(bites/s)`, minWidth: '250', prop: 'machineCode', visible: !type},
|
||||
{label: `金山API记录的发送流量值(bites/s)`, minWidth: '220', prop: 'machineCode', visible: !type},
|
||||
];
|
||||
},
|
||||
/** 查询角色列表 */
|
||||
@@ -64,7 +64,9 @@
|
||||
this.loading = false;
|
||||
this.roleList = response && response.rows;
|
||||
this.total = response && response.total || response && response.data.length;
|
||||
})
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
goBack() {
|
||||
this.$router.go(-1);
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
</el-form>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<TableList class="w100 h100" :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList class="w100 h100" :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempDay="{ valueKey, row, column }">
|
||||
<span v-if="row && row[valueKey]">{{row[valueKey]}}/{{row.createTime}}</span>
|
||||
</template>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</el-col>
|
||||
</el-form>
|
||||
<!-- 表格数据 -->
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempRevenue="{ row, column }">
|
||||
<dict-tag :options="dict.type.eps_revenue_method" :value="row.revenueMethod"/>
|
||||
</template>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- 表格数据 -->
|
||||
<el-table v-loading="loading" :data="roleList">
|
||||
<template v-for="(item,index) of columns">
|
||||
<el-table-column :label="item.label" :prop="item.prop" :sortable="item.sortable" :width="item.width" v-if="item.visible" :show-overflow-tooltip="true">
|
||||
<el-table-column :label="item.label" :prop="item.prop" :sortable="item.sortable" :width="item.width" :minWidth="item.minWidth" v-if="item.visible" :show-overflow-tooltip="true">
|
||||
<template v-if="item.slotName" #default="scope">
|
||||
<span v-if="scope.row && scope.row[item.prop]">{{scope.row[item.prop]}}/{{scope.row.createTime}}</span>
|
||||
</template>
|
||||
@@ -68,7 +68,9 @@
|
||||
this.loading = false;
|
||||
this.roleList = response && response.rows;
|
||||
this.total = response && response.total || response && response.data.length;
|
||||
})
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
goBack() {
|
||||
this.$router.back();
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
</el-form>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<!-- 资源类型 -->
|
||||
<template #tempType="{ row, column }">
|
||||
<dict-tag :options="dict.type.rm_topology_type" :value="row.interfaceLinkDeviceType"/>
|
||||
@@ -213,13 +213,12 @@
|
||||
uplinkSwitch: { label: `交换机名称`, minWidth: '180', visible: true },
|
||||
hardwareSn: { label: `硬件SN`, minWidth: '200'},
|
||||
interfaceName: { label: `接口名称`, minWidth: '120',visible: true },
|
||||
interfaceLinkDeviceType: { label: `接口连接设备类型`, slotName: 'tempType',minWidth: '180',
|
||||
slotHeaderName: '不同的类型统计方式不一样,当类型是服务器时,使用的是接口的接收流量,95带宽值Mbs/日和95带宽值Mbs/月统计的是交换机接口的接收流量;当类型是机房出口的时候,95带宽值Mbs/日和95带宽值Mbs/月统计的是交换机接口的发送流量', visible: true },
|
||||
interfaceLinkDeviceType: { label: `接口连接设备类型`, slotName: 'tempType',minWidth: '180', visible: true },
|
||||
interfaceRemark: {label: `接口备注`,minWidth: '150'},
|
||||
bandwidth95Daily: { label: `95带宽值/日(Mbit)`, minWidth: '200', slotName: 'tempDay', visible: true },
|
||||
bandwidth95Monthly: { label: `95带宽值/月(Mbit)`, minWidth: '200', slotName: 'tempMonth', visible: true},
|
||||
avgMonthlyBandwidth95: {label: `月均日95值(Mbit`, minWidth: '200', slotName: 'tempDay', visible: true},
|
||||
clientId: {label: `ClientID`,minWidth: '150'},
|
||||
serverClientId: {label: `ClientID`,minWidth: '150'},
|
||||
businessId: {label: `业务代码`,minWidth: '150'},
|
||||
businessName: {label: `业务名称`,minWidth: '100'},
|
||||
// nodeName: { label: `服务器节点名称`, minWidth: '200'},
|
||||
@@ -237,7 +236,7 @@
|
||||
top: [
|
||||
{content: '导出', fnCode: 'export', type: 'warning', icon: 'el-icon-download', hasPermi: 'earnManage:switch:export'},
|
||||
{content: '图形分析', fnCode: 'echartView', type: 'success', icon: 'el-icon-data-analysis', hasPermi: 'earnManage:switch:graphicAnalysis'},
|
||||
{content: '生成接口月均日95值', fnCode: 'createData', type: 'success', icon: 'el-icon-data-analysis', hasPermi: 'earnManage:switch:add'},
|
||||
// {content: '生成接口月均日95值', fnCode: 'createData', type: 'success', icon: 'el-icon-data-analysis', hasPermi: 'earnManage:switch:add'},
|
||||
],
|
||||
line: [
|
||||
{content: '相关数据', fnCode: 'edit', type: 'text', icon: 'el-icon-tickets', hasPermi: 'earnManage:switch:relevantData'},
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempStatus="{ row, column }">
|
||||
<dict-tag :options="dict.type.rm_register_online_state" :value="row.status"/>
|
||||
</template>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempType="{ row, column }">
|
||||
<dict-tag :options="dict.type.rm_topology_type" :value="row.connectedDeviceType"/>
|
||||
</template>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempType="{ row, column }">
|
||||
<dict-tag :options="dict.type.rm_topology_type" :value="row.connectedDeviceType"/>
|
||||
</template>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</el-col>
|
||||
</el-form>
|
||||
<input type="file" ref="fileInput" @change="handleFileChange" style="display: none;">
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange"></TableList>
|
||||
<TableList :columns="columns" :modelIdent="this.$options.name" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange"></TableList>
|
||||
<!-- 新建文件夹 -->
|
||||
<el-dialog title="新建文件夹" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="noticeRef" :rules="rules" :model="formList" label-width="90px">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<!-- <template #tempTooltip="{ row, column }">-->
|
||||
<!-- <span class="verticalAlign">{{column.label}}</span>-->
|
||||
<!-- <el-tooltip trigger="click" effect="dark" placement="top">-->
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempStatus="{ row, column }">
|
||||
<dict-tag :options="dict.type.policy_status" :value="row.status"/>
|
||||
</template>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempType="{ row, column }">
|
||||
<dict-tag :options="dict.type.rm_topology_type" :value="row.connectedDeviceType"/>
|
||||
</template>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
</el-form>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<!-- 资源类型 -->
|
||||
<template #tempType="{ row, column }">
|
||||
<dict-tag :options="dict.type.rm_register_resource_type" :value="row.resourceType"/>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</el-col>
|
||||
</el-form>
|
||||
<input type="file" ref="fileInput" @change="handleFileChange" style="display: none;">
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<!-- <template v-slot:tableExpand="slotProps">-->
|
||||
<!-- <div v-for="(val, key) of expandList" style="padding: 5px 0 5px 70px;">-->
|
||||
<!-- <div style="width: 150px;" class="ml10 disInlineBlock">{{val}}</div>-->
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempType="{ row, column }">
|
||||
<div @click="fnDetails(row, '1')">
|
||||
<a href="javascript:;" style="color: #51afff;text-decoration: underline;">{{row.connectedDeviceType}}</a>
|
||||
|
||||
@@ -221,8 +221,8 @@
|
||||
policyName: {label: '策略名称', span: 12, type: 'input', required: true},
|
||||
priority: {label: '优先级', span: 12, type: 'input', hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
||||
status: {label: '策略状态', span: 12, type: 'select',options: this.dict.type.policy_status, hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
||||
deployTime: {label: '下发策略时间', span: 12, type: 'date', hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
||||
createTime: {label: '创建时间', span: 12, type: 'date', hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
||||
deployTime: {label: '下发策略时间', span: 12, type: 'datetime', hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
||||
createTime: {label: '创建时间', span: 12, type: 'datetime', hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
||||
createBy: {label: '创建人', span: 12, type: 'input',hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
||||
deployDevice: {label: '部署设备', span: 12, type: 'textarea', rows:15, required: true},
|
||||
description: {label: '描述', span: 12, type: 'textarea'},
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempStatus="{ row, column }">
|
||||
<dict-tag :options="dict.type.policy_status" :value="row.status"/>
|
||||
</template>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</el-form>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<!-- 多公网IP状态 -->
|
||||
<template #tempMultipubStatus="{ row, column }">
|
||||
<dict-tag :options="dict.type.rm_moreip_status" :value="row.multiPublicIpStatus"/>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
titleVal: {textAlign: 'left', left: '1%'},
|
||||
yAxisName: ' ',
|
||||
gridTop: '35%',
|
||||
legend: {top: '15%', left: '10%'},
|
||||
legend: {top: '22%', left: '10%'},
|
||||
lineXData: [],
|
||||
dataList: [
|
||||
{name: 'CPU正常运行时间', data: []},
|
||||
@@ -133,7 +133,6 @@
|
||||
titleVal: {textAlign: 'left', left: '1%'},
|
||||
yAxisName: ' ',
|
||||
gridTop: '35%',
|
||||
gridLeft: '-7%',
|
||||
legend: {top: '15%', left: '10%'},
|
||||
lineXData: [],
|
||||
dataList: [
|
||||
@@ -226,7 +225,7 @@
|
||||
formList: {type: '接口类型', status: '运行状态', speed: '速度'},
|
||||
formModel: {},
|
||||
echartFors: [
|
||||
{title: '的流量(Kbps)', oneName: '入站流量', twoName: '出站流量'},
|
||||
{title: '的流量', oneName: '入站流量', twoName: '出站流量'},
|
||||
{title: '的丢包数(个)', oneName: '入站丢包', twoName: '出站丢包'},
|
||||
],
|
||||
echartList: []
|
||||
@@ -302,7 +301,7 @@
|
||||
this.formData = {formFirst: this.formFirst};
|
||||
serverMonitorData({clientId: this.paramsData.clientId}).then(res => {
|
||||
if (res && res.data) {
|
||||
this.formData['formValue'] = res.data;
|
||||
this.$set(this.formData, 'formValue', res.data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -404,6 +403,9 @@
|
||||
memoryUtilizaData.dataVal.lineXData = res && res.data && res.data['xData'] && res.data['xData'].length > 0 ? res.data['xData'] :
|
||||
this.firstChartTrans && this.firstChartTrans['timeList'] && this.firstChartTrans['timeList'].length > 0 ? this.firstChartTrans['timeList'] : [];
|
||||
memoryUtilizaData.dataVal.dataList[0].data = res && res.data && res.data['yData'] && res.data['yData']['memoryUtilizationData'] && res.data['yData']['memoryUtilizationData'].length > 0 ? res.data['yData']['memoryUtilizationData'] : [];
|
||||
if (memoryUtilizaData.dataVal.dataList[0].data.length > 0 && memoryUtilizaData.dataVal.dataList[0].data.some(num => num < 0)) {
|
||||
memoryUtilizaData.dataVal.gridLeft = '-7%';
|
||||
}
|
||||
}
|
||||
// this.firstChartList[2] = powerData;
|
||||
this.$set(this.firstChartList, 5, memoryUtilizaData);
|
||||
@@ -922,6 +924,7 @@
|
||||
// 检查函数是否存在,避免报错
|
||||
if (typeof this[fnName] === 'function') {
|
||||
this.defaultTimes = valData.timeArr;
|
||||
this.firstTabTimeArr = valData.timeArr;
|
||||
// 调用实际函数,并传递参数(如选中的值、当前项)
|
||||
this[fnName]({startTime: valData.timeArr[0], endTime: valData.timeArr[1]}, tabName);
|
||||
} else {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempMethod="{ row, column }">
|
||||
<dict-tag :options="dict.type.policy_method" :value="row.executionMethod"/>
|
||||
</template>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
、、<template>
|
||||
<div class="app-container">
|
||||
<Form ref="formRef" :formList="formList" :ruleFormData="ruleForm" :config="this.paramsData && this.paramsData.readonly ? {labelWidth: '140px', buttonGroup: []} : {labelWidth: '140px'}" @fnClick="callback"></Form>
|
||||
<el-button v-if="this.paramsData && this.paramsData.readonly" style="float: right;margin-top: 12px;margin-left: 10px;" @click="callback({fnCode: 'cancel'})">返回</el-button>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempFirst="{ row, column }">
|
||||
<div @click="fnDetails(1,row)">
|
||||
<a href="javascript:;" style="color: #51afff;text-decoration: underline;">{{row.offlineNum}}</a>
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
getMonitorPolicy(id).then(val => {
|
||||
if (val && val.data) {
|
||||
if (val.data && val.data.policy){
|
||||
val.data.policy['deployDevice'] = val.data.policy.deployDevice.split('/n');
|
||||
val.data.policy['deployDevice'] = val.data.policy.deployDevice.split('\n');
|
||||
// val.data.policy['status'] = Number(val.data.policy.status);
|
||||
this.ruleFormData = val.data.policy;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempType="{ row, column }">
|
||||
<dict-tag :options="dict.type.switch_type" :value="row.switchType"/>
|
||||
</template>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</el-form>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<!-- 资源类型 -->
|
||||
<template #tempType="{ row, column }">
|
||||
<dict-tag :options="dict.type.rm_register_resource_type" :value="row.resourceType"/>
|
||||
@@ -208,7 +208,7 @@
|
||||
case 'echartView':
|
||||
this.$router.push({
|
||||
path:'/resource/switchRegister/monitorChart',
|
||||
query: {clientId: rowData.hardwareSn}
|
||||
query: {clientId: rowData.clientId}
|
||||
});
|
||||
break;
|
||||
case 'monitorStrategy':
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
formModel: {},
|
||||
echartFors: [
|
||||
{title: '的丢包数', oneName: '入站丢包', twoName: '出站丢包'},
|
||||
{title: '的Bites总数', oneName: '端口发送Bites总数', twoName: '端口接收Bites总数'},
|
||||
// {title: '的Bites总数', oneName: '端口发送Bites总数', twoName: '端口接收Bites总数'},
|
||||
{title: '的错误包数量', oneName: '错误的入站数据包数量', twoName: '错误的出战数据包数量'},
|
||||
{title: '的网络速率', oneName: '端口实时接收速率', twoName: '端口实时发送速率'},
|
||||
],
|
||||
@@ -215,7 +215,7 @@
|
||||
this.formData = {formFirst: this.formFirst};
|
||||
switchMonitorData({clientId: this.paramsData.clientId}).then(res => {
|
||||
if (res && res.data) {
|
||||
this.formData['formValue'] = res.data;
|
||||
this.$set(this.formData, 'formValue', res.data);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -325,19 +325,19 @@
|
||||
switchNetDetails({clientId: this.paramsData.clientId, ifDescr: titleName}).then(async res => {
|
||||
this.secondChartList[keyName].formModel = res && res.data || [];
|
||||
if (await this.getNetDiscards(times ,titleName, keyName)) {
|
||||
if (await this.getNetTotal(times, titleName, keyName)) {
|
||||
// if (await this.getNetTotal(times, titleName, keyName)) {
|
||||
if (await this.getNetErrDisc(times, titleName, keyName)) {
|
||||
this.getNetSpeed(times, titleName, keyName);
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}).catch(async error => {
|
||||
if (await this.getNetDiscards(times ,titleName, keyName)) {
|
||||
if (await this.getNetTotal(times, titleName, keyName)) {
|
||||
// if (await this.getNetTotal(times, titleName, keyName)) {
|
||||
if (await this.getNetErrDisc(times, titleName, keyName)) {
|
||||
this.getNetSpeed(times, titleName, keyName);
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -351,6 +351,7 @@
|
||||
return switchNetDiscards(Object.assign({}, {ifDescr : titleName,clientId: this.paramsData.clientId}, times)).then(res => {
|
||||
if (res && res.data) {
|
||||
netEcharts.title = titleName + content.echartFors[0].title;
|
||||
netEcharts.dataVal.yAxisName = res && res.data && res.data.unit ? '单位' + res.data.unit : ' ';
|
||||
netEcharts.dataVal.lineXData = res.data && res.data.xData.length > 0 ? res.data.xData : this.firstChartTrans && this.firstChartTrans['timeList'] || [];
|
||||
// 入
|
||||
netEcharts.dataVal.dataList[0] = {
|
||||
@@ -380,6 +381,7 @@
|
||||
return switchNeTotal(Object.assign({}, {ifDescr : titleName, clientId: this.paramsData.clientId}, times)).then(res => {
|
||||
if (res && res.data) {
|
||||
netEcharts.title = titleName + content.echartFors[1].title;
|
||||
netEcharts.dataVal.yAxisName = res && res.data && res.data.unit ? '单位' + res.data.unit : ' ';
|
||||
netEcharts.dataVal.lineXData = res.data && res.data.xData.length > 0 ? res.data.xData : this.firstChartTrans && this.firstChartTrans['timeList'] || [];
|
||||
// 入
|
||||
netEcharts.dataVal.dataList[0] = {
|
||||
@@ -408,17 +410,18 @@
|
||||
netEcharts.fnEvent = 'getNetErrDisc';
|
||||
return switchNetErrDiscard(Object.assign({}, {ifDescr : titleName, clientId: this.paramsData.clientId}, times)).then(res => {
|
||||
if (res && res.data) {
|
||||
netEcharts.title = titleName + content.echartFors[2].title;
|
||||
netEcharts.title = titleName + content.echartFors[1].title;
|
||||
netEcharts.dataVal.yAxisName = res && res.data && res.data.unit ? '单位' + res.data.unit : ' ';
|
||||
netEcharts.dataVal.lineXData = res.data && res.data.xData.length > 0 ? res.data.xData : this.firstChartTrans && this.firstChartTrans['timeList'] || [];
|
||||
netEcharts.dataVal.dataList[0] = {
|
||||
name: content.echartFors[2].oneName,
|
||||
name: content.echartFors[1].oneName,
|
||||
data: res.data && res.data.yData['netInErrDiscardsData'] || []
|
||||
};
|
||||
netEcharts.dataVal.dataList[1] = {
|
||||
name: content.echartFors[2].twoName,
|
||||
name: content.echartFors[1].twoName,
|
||||
data: res.data && res.data.yData['netOutErrDiscardsData'] || []
|
||||
};
|
||||
mountCollect['echartList'][2] = netEcharts;
|
||||
mountCollect['echartList'][1] = netEcharts;
|
||||
this.$set(this.secondChartList, keyName, mountCollect);
|
||||
return true;
|
||||
}
|
||||
@@ -435,17 +438,18 @@
|
||||
netEcharts.fnEvent = 'getNetSpeed';
|
||||
return switchNetSpeed(Object.assign({}, {ifDescr : titleName, clientId: this.paramsData.clientId}, times)).then(res => {
|
||||
if (res && res.data) {
|
||||
netEcharts.title = titleName + content.echartFors[3].title;
|
||||
netEcharts.title = titleName + content.echartFors[2].title;
|
||||
netEcharts.dataVal.yAxisName = res && res.data && res.data.unit ? '单位' + res.data.unit : ' ';
|
||||
netEcharts.dataVal.lineXData = res.data && res.data.xData.length > 0 ? res.data.xData : this.firstChartTrans && this.firstChartTrans['timeList'] || [];
|
||||
netEcharts.dataVal.dataList[0] = {
|
||||
name: content.echartFors[3].oneName,
|
||||
name: content.echartFors[2].oneName,
|
||||
data: res.data && res.data.yData['netInSpeedData'] || []
|
||||
};
|
||||
netEcharts.dataVal.dataList[1] = {
|
||||
name: content.echartFors[3].twoName,
|
||||
name: content.echartFors[2].twoName,
|
||||
data: res.data && res.data.yData['netOutSpeedData'] || []
|
||||
};
|
||||
mountCollect['echartList'][3] = netEcharts;
|
||||
mountCollect['echartList'][2] = netEcharts;
|
||||
this.$set(this.secondChartList, keyName, mountCollect);
|
||||
// return true;
|
||||
this.$modal.closeLoading();
|
||||
@@ -499,6 +503,7 @@
|
||||
return moduleLowThreshold(Object.assign({}, {moudleName : titleName,clientId: this.paramsData.clientId}, times)).then(res => {
|
||||
if (res && res.data) {
|
||||
netEcharts.title = titleName + content.echartFors[0].title;
|
||||
netEcharts.dataVal.yAxisName = res && res.data && res.data.unit ? '单位' + res.data.unit : ' ';
|
||||
netEcharts.dataVal.lineXData = res.data && res.data.xData.length > 0 ? res.data.xData : this.firstChartTrans && this.firstChartTrans['timeList'] || [];
|
||||
// 入
|
||||
netEcharts.dataVal.dataList[0] = {
|
||||
@@ -528,6 +533,7 @@
|
||||
return modulePower(Object.assign({}, {moudleName : titleName, clientId: this.paramsData.clientId}, times)).then(res => {
|
||||
if (res && res.data) {
|
||||
netEcharts.title = titleName + content.echartFors[1].title;
|
||||
netEcharts.dataVal.yAxisName = res && res.data && res.data.unit ? '单位' + res.data.unit : ' ';
|
||||
netEcharts.dataVal.lineXData = res.data && res.data.xData.length > 0 ? res.data.xData : this.firstChartTrans && this.firstChartTrans['timeList'] || [];
|
||||
// 入
|
||||
netEcharts.dataVal.dataList[0] = {
|
||||
@@ -597,6 +603,7 @@
|
||||
return mpuCpuUse(Object.assign({}, {mpuName : titleName,clientId: this.paramsData.clientId}, times)).then(res => {
|
||||
if (res && res.data) {
|
||||
netEcharts.title = titleName + content.echartFors[0].title;
|
||||
netEcharts.dataVal.yAxisName = res && res.data && res.data.unit ? '单位' + res.data.unit : ' ';
|
||||
netEcharts.dataVal.lineXData = res.data && res.data.xData.length > 0 ? res.data.xData : this.firstChartTrans && this.firstChartTrans['timeList'] || [];
|
||||
// 入
|
||||
netEcharts.dataVal.dataList[0] = {
|
||||
@@ -621,6 +628,7 @@
|
||||
return mpuMemUse(Object.assign({}, {mpuName : titleName, clientId: this.paramsData.clientId}, times)).then(res => {
|
||||
if (res && res.data) {
|
||||
netEcharts.title = titleName + content.echartFors[1].title;
|
||||
netEcharts.dataVal.yAxisName = res && res.data && res.data.unit ? '单位' + res.data.unit : ' ';
|
||||
netEcharts.dataVal.lineXData = res.data && res.data.xData.length > 0 ? res.data.xData : this.firstChartTrans && this.firstChartTrans['timeList'] || [];
|
||||
// 入
|
||||
netEcharts.dataVal.dataList[0] = {
|
||||
@@ -645,6 +653,7 @@
|
||||
return mpuTemperature(Object.assign({}, {mpuName : titleName, clientId: this.paramsData.clientId}, times)).then(res => {
|
||||
if (res && res.data) {
|
||||
netEcharts.title = titleName + content.echartFors[2].title;
|
||||
netEcharts.dataVal.yAxisName = res && res.data && res.data.unit ? '单位' + res.data.unit : ' ';
|
||||
netEcharts.dataVal.lineXData = res.data && res.data.xData.length > 0 ? res.data.xData : this.firstChartTrans && this.firstChartTrans['timeList'] || [];
|
||||
// 入
|
||||
netEcharts.dataVal.dataList[0] = {
|
||||
@@ -705,6 +714,7 @@
|
||||
return pwrCurrent(Object.assign({}, {pwrName : titleName,clientId: this.paramsData.clientId}, times)).then(res => {
|
||||
if (res && res.data) {
|
||||
netEcharts.title = titleName + content.echartFors[0].title;
|
||||
netEcharts.dataVal.yAxisName = res && res.data && res.data.unit ? '单位' + res.data.unit : ' ';
|
||||
netEcharts.dataVal.lineXData = res.data && res.data.xData.length > 0 ? res.data.xData : this.firstChartTrans && this.firstChartTrans['timeList'] || [];
|
||||
// 入
|
||||
netEcharts.dataVal.dataList[0] = {
|
||||
@@ -729,6 +739,7 @@
|
||||
return pwrVoltage(Object.assign({}, {pwrName : titleName, clientId: this.paramsData.clientId}, times)).then(res => {
|
||||
if (res && res.data) {
|
||||
netEcharts.title = titleName + content.echartFors[1].title;
|
||||
netEcharts.dataVal.yAxisName = res && res.data && res.data.unit ? '单位' + res.data.unit : ' ';
|
||||
netEcharts.dataVal.lineXData = res.data && res.data.xData.length > 0 ? res.data.xData : this.firstChartTrans && this.firstChartTrans['timeList'] || [];
|
||||
// 入
|
||||
netEcharts.dataVal.dataList[0] = {
|
||||
@@ -798,6 +809,7 @@
|
||||
// 检查函数是否存在,避免报错
|
||||
if (typeof this[fnName] === 'function') {
|
||||
this.defaultTimes = valData.timeArr;
|
||||
this.firstTabTimeArr = valData.timeArr;
|
||||
// 调用实际函数,并传递参数(如选中的值、当前项)
|
||||
this[fnName]({startTime: valData.timeArr[0], endTime: valData.timeArr[1]}, tabName, key);
|
||||
} else {
|
||||
|
||||
@@ -123,13 +123,15 @@
|
||||
this.fnInterFaceNameList({switchIp: switchIp});
|
||||
break;
|
||||
case 'serverClientId':
|
||||
let serverIp = '';
|
||||
this.serverNameList.find(item => {
|
||||
if (item.clientId === dataVal) {
|
||||
serverIp = item.ipAddress;
|
||||
if (dataVal) {
|
||||
// let serverIp = '';
|
||||
// this.serverNameList.find(item => {
|
||||
// if (item.clientId === dataVal) {
|
||||
// serverIp = item.ipAddress;
|
||||
// }
|
||||
// });
|
||||
this.fnServerPortList({clientId: dataVal});
|
||||
}
|
||||
});
|
||||
this.fnServerPortList({serverIp: serverIp});
|
||||
break;
|
||||
case 'submit':
|
||||
this.switchNameList.find(item => {
|
||||
@@ -138,8 +140,8 @@
|
||||
}
|
||||
});
|
||||
this.serverNameList.find(item => {
|
||||
if (item.resourceName === dataVal['serverClientId'] || item.resourceName === dataVal['serverClientId']) {
|
||||
dataVal['serverClientId'] = item.resourceName;
|
||||
if (item.clientId === dataVal['serverClientId']) {
|
||||
dataVal['serverClientId'] = item.clientId;
|
||||
dataVal['serverSn'] = item.hardwareSn;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempType="{ row, column }">
|
||||
<dict-tag :options="dict.type.rm_topology_type" :value="row.connectedDeviceType"/>
|
||||
</template>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<TableList :columns="columns" :config="config" :modelIdent="this.$options.name" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
||||
<template #tempTitle="{ row, column }">
|
||||
<div @click="fnDetails(row)">
|
||||
<a href="javascript:;" style="color: #51afff;">{{row.title}}</a>
|
||||
|
||||
Reference in New Issue
Block a user