图形监控优化、业务95值计算和交换机收益管理模块开发

This commit is contained in:
康冉冉
2025-10-29 18:21:41 +08:00
parent 1aa53d7d90
commit 9cc43a8700
20 changed files with 1010 additions and 208 deletions

View File

@@ -0,0 +1,80 @@
<template>
<div class="app-container">
<Form :formList="formList" :ruleFormData="ruleForm" @fnClick="callback"></Form>
</div>
</template>
<script setup>
import Form from '@/components/form/index.vue';
import {listAllBusinessList, calculateAvg, getBandWidth, updateBandWidth} from "@/api/disRevenue/earnManage"
import {listAllResourList} from "@/api/disRevenue/resource"
export default {
name: 'busValueCount_Details',
components: {Form},
dicts: ['rm_topology_type'],
data() {
return {
ruleForm: {},
formList: [],
switchNameList: [],
paramsData: {}
}
},
created() {
this.paramsData = this.$route && this.$route.query;
this.fnFormList();
this.switchList();
},
methods: {
// formList集合
fnFormList(objVal) {
this.formList = [{
config: {title: '基本信息', colSpan: 'disBlock'},
controls: {
id: {label: 'ID',hidden: true},
clientId: {label: '任务名称', span: 12, type: 'input',required: true},
businessName: {label: '业务名称', span: 12, type: 'select', options:[]},
businessId: {label: '包含资源类型', span: 12, type: 'select', options: [],required: true},
monthTime: {label: '包含资源', span: 12, type: 'select', options: [],required: true},
js: {label: '计算类型', span: 12, type: 'select', options: [],required: true},
}
}];
},
// 获取交换机下拉
switchList() {
listAllBusinessList().then(val => {
this.formList[0].controls.businessName['options'] = val && val.data.map(item => {
return Object.assign({label: item.businessName, value: item.id});
});
});
},
// 监听事件
callback(result, dataVal, formVal) {
if (result && result.fnCode) {
switch (result.fnCode) {
case 'submit':
this.switchNameList.find(item => {
if (item.resourceName === dataVal['nodeName']) {
dataVal['hardwareSn'] = item.hardwareSn;
}
});
dataVal['resourceType'] = this.paramsData.resourceType;
calculateAvg(dataVal).then(response => {
this.$modal.msgSuccess(response.msg);
this.$router.push("/earnManage/busValueCount");
}).catch(() => {
this.$modal.msgError("操作失败")
});
break;
case 'cancel':
this.$router.push("/earnManage/busValueCount");
break;
default:
}
}
}
}
}
</script>
<style>
</style>