diff --git a/src/api/disRevenue/earnManage.js b/src/api/disRevenue/earnManage.js
index 7c32ce0..328f2d2 100644
--- a/src/api/disRevenue/earnManage.js
+++ b/src/api/disRevenue/earnManage.js
@@ -66,6 +66,63 @@ export function calculateAvg(data) {
})
}
+// 包端----图
+export function graPackage(data) {
+ return request({
+ url: '/system/bandwidth/graphicalAnalysisPackage',
+ method: 'post',
+ data: data
+ })
+}
+// 95宽带值Mbps/月---图
+export function graMonthly(data) {
+ return request({
+ url: '/system/bandwidth/graphicalAnalysisMonthly',
+ method: 'post',
+ data: data
+ })
+}
+// 有效-95宽带值Mbps/月---图
+export function graEffectiveMonthly(data) {
+ return request({
+ url: '/system/bandwidth/graphicalAnalysisEffectiveMonthly',
+ method: 'post',
+ data: data
+ })
+}
+// 有效-95宽带值Mbps/日---图
+export function graEffectiveDaily(data) {
+ return request({
+ url: '/system/bandwidth/graphicalAnalysisEffectiveDaily',
+ method: 'post',
+ data: data
+ })
+}
+// 有效月均日95值----图
+export function graEffectiveAvgMonthly(data) {
+ return request({
+ url: '/system/bandwidth/graphicalAnalysisEffectiveAvgMonthly',
+ method: 'post',
+ data: data
+ })
+}
+// 95宽带值/日----图
+export function graDaily(data) {
+ return request({
+ url: '/system/bandwidth/graphicalAnalysisDaily',
+ method: 'post',
+ data: data
+ })
+}
+// 月均日95值----图
+export function graAvgMonthly(data) {
+ return request({
+ url: '/system/bandwidth/graphicalAnalysisAvgMonthly',
+ method: 'post',
+ data: data
+ })
+}
+
/** ------------------业务管理------------------- */
// 查询列表
diff --git a/src/api/disRevenue/resource.js b/src/api/disRevenue/resource.js
index 57bc974..b13f48d 100644
--- a/src/api/disRevenue/resource.js
+++ b/src/api/disRevenue/resource.js
@@ -51,6 +51,15 @@ export function updateregisterType(data) {
data: data
})
}
+// 修改注册状态
+export function resNameBtType(data) {
+ return request({
+ url: '/system/registration/selectAllResourceNameByType',
+ method: 'post',
+ data: data
+ })
+}
+
/** ----------------拓扑管理 ------------ */
// 查询列表
@@ -93,6 +102,14 @@ export function delTopology(Ids) {
method: 'delete'
})
}
+// 服务器网口
+export function postInterFaceName(data) {
+ return request({
+ url: '/system/interfaceName/getAllNames',
+ method: 'post',
+ data: data
+ })
+}
/** ----------------资源分组------------ */
// 查询列表
diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss
index 1635c26..78f1085 100644
--- a/src/assets/styles/index.scss
+++ b/src/assets/styles/index.scss
@@ -89,6 +89,9 @@ div:focus {
.p20 {
padding: 20px;
}
+.mtb10 {
+ margin: 10px 0;
+}
.fontSize15 {
font-size: 15px;
}
diff --git a/src/components/echartsList/bar.vue b/src/components/echartsList/bar.vue
index a1c86a9..88803f1 100644
--- a/src/components/echartsList/bar.vue
+++ b/src/components/echartsList/bar.vue
@@ -1,6 +1,6 @@
@@ -20,6 +20,10 @@
type: String,
default: null
},
+ dateShowType: {
+ type: String,
+ default: null
+ },
chartData: {
type: Function,
default: () => {
@@ -44,20 +48,16 @@
methods: {
getList(title, dataXY) {
const barDataListIntance = echarts.init(document.getElementById('barChart' + this.num));
- let titleSet = {};
- if (dataXY && dataXY.titleVal) {
- titleSet = {
+ let option = {
+ title: [{
text: title,
x: dataXY && dataXY.titleVal && dataXY.titleVal.x || '50%',
y: dataXY && dataXY.titleVal && dataXY.titleVal.y || '3%',
textAlign: dataXY && dataXY.titleVal && dataXY.titleVal.textAlign || 'center',
textStyle: {
- fontSize: 14
+ fontSize: dataXY && dataXY.titleVal && dataXY.titleVal.fontSize || 16
},
- };
- }
- let option = {
- title: [titleSet],
+ }],
tooltip: {
trigger: 'axis',
axisPointer: {
@@ -83,7 +83,7 @@
splitLine: { show: false },
// x轴标签样式(保留标签便于阅读)
axisLabel: {
- show: false
+ show: dataXY && dataXY.hidAxisLabel ? false : true
}
}
],
@@ -97,7 +97,7 @@
// 去掉y轴刻度线
axisTick: { show: false },
// 去掉y轴网格线(横向网格)
- splitLine: { show: false },
+ splitLine: { show: dataXY && dataXY.hidSplitLine ? false : true },
// Y轴标签样式(保留标签便于阅读)
axisLabel: {
show: true
@@ -128,7 +128,7 @@
// console.log(props.chartData(val));
// this.getList(this.title, {data: this.barData.data, lineData: days, yAxis: this.barData && this.barData.yAxis});
let newbarData = {...this.barData};
- newbarData['lineData'] = days;
+ newbarData['lineData'] = days && days.length > 0 ? days: this.barData.lineXData;
this.getList(this.title, newbarData);
}
}
diff --git a/src/components/echartsList/dateTimeSelect.vue b/src/components/echartsList/dateTimeSelect.vue
index b2a8562..4c39e7d 100644
--- a/src/components/echartsList/dateTimeSelect.vue
+++ b/src/components/echartsList/dateTimeSelect.vue
@@ -2,18 +2,25 @@
+
- 前7天
- 前15天
- 前一个月
+
+
+ - 前三个月
+ - 前半年
+ - 前一年
+
@@ -22,27 +29,38 @@
import {onMounted} from "vue";
export default {
name: 'dateTimeSelect',
- props: {},
+ props: {
+ dateShowType: {
+ type: String,
+ default: null
+ }
+ },
data() {
return {
dateRange: [],
- isActive: 'DAY'
+ isActive: ''
}
},
// DOM 挂载完成后
mounted() {
// 可以访问 DOM 元素
setTimeout(() => {
- this.getLastDays(6);
+ // this.getLastDays(6);
+ // this.getDaysOfPreviousMonth();
+ this.$emit("dataChange", this.isActive, []);
}, 500);
},
methods: {
toggle(val, num) {
this.isActive = val;
- if (val && val !== 'MONTH') {
- this.getLastDays(num - 1);
- } else {
+ if (val && val === 'MONTH') {
this.getDaysOfPreviousMonth();
+ } else if (val && val === 'THREEMONTH') {
+ this.getLastThreeMonths();
+ } else if (val && val === 'HALFYEAR') {
+ this.getLastSixMonths();
+ } else {
+ this.getLastDays(num - 1);
}
},
dateChange() {
@@ -66,6 +84,7 @@
}
this.$emit("dataChange", this.isActive, dayList);
},
+ // 获取前一个月的所有日期
getDaysOfPreviousMonth(star, end) {
const currentDate = new Date();
const currentYear = currentDate.getFullYear();
@@ -91,7 +110,55 @@
currentDay.setDate(currentDay.getDate() + 1);
}
this.$emit("dataChange", this.isActive, oneMonthDays);
- }
+ },
+ // 获取前三个月的月
+ getLastThreeMonths() {
+ const threeMonths = [];
+ const today = new Date(); // 当前日期
+ const currentYear = today.getFullYear();
+ const currentMonth = today.getMonth(); // 月份从0开始(0=1月,11=12月)
+ // 循环获取前3个月(i=0: 前1个月,i=1: 前2个月,i=2: 前3个月)
+ for (let i = 1; i <= 3; i++) {
+ // 计算目标月份(当前月 - i)
+ let targetMonth = currentMonth - i;
+ let targetYear = currentYear;
+ // 处理月份溢出(如1月-1=12月,年份减1)
+ if (targetMonth < 0) {
+ targetMonth += 12;
+ targetYear -= 1;
+ }
+ // 格式化月份为两位数(如5月→'05')
+ const monthStr = String(targetMonth + 1).padStart(2, '0'); // 加1是因为月份从0开始
+ threeMonths.push(`${targetYear}-${monthStr}`);
+ }
+ console.log('threeMonths===',threeMonths);
+ this.$emit("dataChange", this.isActive, threeMonths);
+ },
+ // 前半年
+ getLastSixMonths() {
+ const result = [];
+ const today = new Date(); // 当前日期
+ const currentYear = today.getFullYear();
+ const currentMonth = today.getMonth(); // 月份从0开始(0=1月,11=12月)
+
+ // 循环获取前6个月(i=1: 前1个月,i=6: 前6个月)
+ for (let i = 1; i <= 6; i++) {
+ let targetMonth = currentMonth - i;
+ let targetYear = currentYear;
+
+ // 处理月份跨年份(如1月-1=12月,年份减1)
+ if (targetMonth < 0) {
+ targetMonth += 12;
+ targetYear -= 1;
+ }
+
+ // 格式化月份为两位数(如5月→'05')
+ const monthStr = String(targetMonth + 1).padStart(2, '0'); // 加1转为实际月份(1-12)
+ result.push(`${targetYear}-${monthStr}`);
+ }
+
+ return result;
+ },
}
}
diff --git a/src/components/echartsList/line.vue b/src/components/echartsList/line.vue
index 55ddc5a..0376caa 100644
--- a/src/components/echartsList/line.vue
+++ b/src/components/echartsList/line.vue
@@ -1,6 +1,6 @@
@@ -20,6 +20,10 @@
type: String,
default: null
},
+ dateShowType: {
+ type: String,
+ default: null
+ },
chartData: {
type: Function,
default: () => {
@@ -81,7 +85,7 @@
type: 'value',
name: '单位Mbps',
splitLine: {
- show: false,
+ show: true,
},
},
series: [
@@ -100,8 +104,8 @@
// })
},
dataChangeValue(val, days) {
- // console.log(props.chartData(val));
- this.getList(this.title, {data: this.lineData.data, lineXData: days});
+ let lineDataList = days && days.length > 0 ? days: this.lineData.lineXData;
+ this.getList(this.title, {data: this.lineData.data, lineXData: lineDataList});
}
}
}
diff --git a/src/components/form/index.vue b/src/components/form/index.vue
index fac0893..addd689 100644
--- a/src/components/form/index.vue
+++ b/src/components/form/index.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/views/disRevenue/earnManage/revenueMethod/index.vue b/src/views/disRevenue/earnManage/revenueMethod/index.vue
index 1020182..a3b9a47 100644
--- a/src/views/disRevenue/earnManage/revenueMethod/index.vue
+++ b/src/views/disRevenue/earnManage/revenueMethod/index.vue
@@ -56,7 +56,7 @@
// 列显隐信息
columns: {
id: {label: `ID`, visible: false},
- lastModifyTime: {label: `修改时间`, visible: true},
+ createTime: {label: `修改时间`, visible: true},
nodeName: {label: `节点名称`, visible: true},
hardwareSn: {label: `硬件SN`},
changeContent: {label: `修改内容`, visible: true},
diff --git a/src/views/disRevenue/earnManage/server/dialogView.vue b/src/views/disRevenue/earnManage/server/dialogView.vue
index 2896c67..823c5a3 100644
--- a/src/views/disRevenue/earnManage/server/dialogView.vue
+++ b/src/views/disRevenue/earnManage/server/dialogView.vue
@@ -3,26 +3,36 @@
-
+
+ :key="item.value"
+ :label="item.label"
+ :value="item.value">
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -38,6 +48,7 @@
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"
export default {
name: 'DialogView',
components: {Form, EchartsLine, EchartsBar},
@@ -50,6 +61,8 @@
selectChangeList: [],
switchData: [],
selectChoose: [],
+ echartListData: [],
+ typeObj: {},
lineDataParams: {
lineXData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
data: [120, 132, 101, 134, 90, 230, 210]
@@ -62,11 +75,12 @@
if (this.storageKey) {
this.paramsData = JSON.parse(localStorage.getItem(this.storageKey));
if (this.paramsData && this.paramsData.dictList) {
- this.switchData = this.paramsData.dictList.map(item => {
+ this.switchData = this.paramsData.dictList.map((item,index) => {
+ this.typeObj[item.value] = {type: item.value, indexVal: index};
let obj = {
label: item.label,
value: item.value,
- type: true
+ checkType: true
};
return obj;
});
@@ -80,20 +94,119 @@
localStorage.removeItem(this.storageKey);
},
methods: {
+ // 下拉数据改变时触发
+ handleChange(eventVal) {
+ let paramsVal = {
+ nodeNames: eventVal
+ };
+ this.graPackageList(paramsVal);
+ this.graMonthlyList(paramsVal);
+ this.graEffectiveMonthlyList(paramsVal);
+ this.graEffectiveDailyList(paramsVal);
+ this.graEffectiveAvgMonthlyList(paramsVal);
+ this.graDailyList(paramsVal);
+ this.graAvgMonthlyList(paramsVal);
+ },
+ // 初始化
processData(list) {
- this.selectChangeList = list;
- if (list.length >=2) {
- this.form.noticeType = [list[0].id, list[1].id];
- } else {
- this.form.noticeType = [list[0].id];
- }
- this.form.noticeType.forEach(item => {
- list.some(val => {
- if (item === val.id) {
- this.selectChoose.push(val);
- return true;
- }
+ let nameArr = [];
+ let nameListArr = [];
+ list.forEach(item => {
+ if (!nameArr.includes(item.nodeName)) {
+ item.label = item.nodeName;
+ item.value = item.nodeName;
+ nameArr.push(item.nodeName);
+ nameListArr.push(item);
+ }
+ });
+ if (nameArr && nameArr.length > 0) {
+ this.selectChangeList = nameListArr;
+ if (nameListArr.length >=2) {
+ this.form.noticeType = [nameListArr[0].label, nameListArr[1].label];
+ } else {
+ this.form.noticeType = [nameListArr[0].label];
+ }
+ this.form.noticeType.forEach(item => {
+ nameListArr.some(val => {
+ if (item === val.label) {
+ this.selectChoose.push(val);
+ return true;
+ }
+ });
});
+ let paramsVal = {
+ nodeNames: nameArr
+ };
+ this.graPackageList(paramsVal);
+ this.graMonthlyList(paramsVal);
+ this.graEffectiveMonthlyList(paramsVal);
+ this.graEffectiveDailyList(paramsVal);
+ this.graEffectiveAvgMonthlyList(paramsVal);
+ this.graDailyList(paramsVal);
+ this.graAvgMonthlyList(paramsVal);
+ }
+ },
+ // 95带宽值Mbps/日---图表
+ graDailyList(nameVal){
+ graDaily(nameVal).then(res => {
+ if (res && res.data && res.data.resultData) {
+ let dataList = Object.assign({dateShowType: 'day'},res.data, this.typeObj[1]);
+ this.echartListData.push(dataList);
+ }
+ });
+ },
+ // 95带宽值Mbps/月---图表
+ graMonthlyList(nameVal){
+ graMonthly(Object.assign({dateShowType: 'month'}, {resourceType: 1, bandwidthType: 2}, nameVal)).then(res => {
+ if (res && res.data && res.data.resultData) {
+ let dataList = Object.assign({},res.data, this.typeObj[2]);
+ this.echartListData.push(dataList);
+ }
+ });
+ },
+ // 包端图表
+ graPackageList(nameVal){
+ graPackage(Object.assign({dateShowType: 'day'}, {resourceType: 1, bandwidthType: 3}, nameVal)).then(res => {
+ if (res && res.data && res.data.resultData) {
+ let dataList = Object.assign({},res.data, this.typeObj[3]);
+ this.echartListData.push(dataList);
+ }
+ });
+ },
+ // 月均日95值Mbps---图表
+ graAvgMonthlyList(nameVal){
+ graAvgMonthly(nameVal).then(res => {
+ if (res && res.data && res.data.resultData) {
+ let dataList = Object.assign({dateShowType: 'month'},res.data, this.typeObj[4]);
+ this.echartListData.push(dataList);
+ }
+ });
+ },
+ // 有效-95带宽值Mbps/日---图表
+ graEffectiveDailyList(nameVal){
+ graEffectiveDaily(nameVal).then(res => {
+ if (res && res.data && res.data.resultData) {
+ let dataList = Object.assign({dateShowType: 'day'},res.data, this.typeObj[5]);
+ this.echartListData.push(dataList);
+ }
+ });
+ },
+ // 有效-95带宽值Mbps/月----图表
+ graEffectiveMonthlyList(nameVal){
+ graEffectiveMonthly(nameVal).then(res => {
+ if (res && res.data && res.data.resultData) {
+ let dataList = Object.assign({dateShowType: 'month'},res.data, this.typeObj[6]);
+ this.echartListData.push(dataList);
+ }
+ });
+ },
+ // 有效-月均日95值Mbps----图表
+ graEffectiveAvgMonthlyList(nameVal){
+ graEffectiveAvgMonthly(nameVal).then(res => {
+ if (res && res.data && res.data.resultData) {
+ let dataList = Object.assign({dateShowType: 'day'},res.data, this.typeObj[7]);
+ this.echartListData.push(dataList);
+ }
});
},
chartDataEvent(val) {
diff --git a/src/views/disRevenue/earnManage/serverRevenue/index.vue b/src/views/disRevenue/earnManage/serverRevenue/index.vue
index 5e8955d..aad1a1e 100644
--- a/src/views/disRevenue/earnManage/serverRevenue/index.vue
+++ b/src/views/disRevenue/earnManage/serverRevenue/index.vue
@@ -8,10 +8,10 @@
placeholder="请选择节点名称"
clearable>
+ v-for="item in nodeNameList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"/>
@@ -33,7 +33,11 @@
-
+
+
+
+
+
@@ -62,9 +66,9 @@
+ :key="item.id"
+ :label="item.interfaceName"
+ :value="item.id"/>
@@ -84,6 +88,7 @@
+
diff --git a/src/views/disRevenue/resource/topology/details.vue b/src/views/disRevenue/resource/topology/details.vue
index d6875b8..a6e78db 100644
--- a/src/views/disRevenue/resource/topology/details.vue
+++ b/src/views/disRevenue/resource/topology/details.vue
@@ -1,63 +1,107 @@
-
+