diff --git a/src/api/disRevenue/resource.js b/src/api/disRevenue/resource.js
index ab0c2b7..35e7f7b 100644
--- a/src/api/disRevenue/resource.js
+++ b/src/api/disRevenue/resource.js
@@ -1027,3 +1027,30 @@ export function delAlarmPush(Ids) {
method: 'delete'
})
}
+
+/** ----------------监控看板概览 ------------ */
+// 新增
+export function addMonitorConfig(data) {
+ return request({
+ url: '/system/monitorConfig',
+ method: 'post',
+ data: data
+ })
+}
+// 修改
+export function updateMonitorConfig(data) {
+ return request({
+ url: '/system/monitorConfig',
+ method: 'put',
+ data: data
+ })
+}
+// 配置下拉
+export function monitorConfigList(data) {
+ return request({
+ url: '/system/monitorConfig/list',
+ method: 'post',
+ data: data
+ })
+}
+
diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss
index 7eb01f4..8d62ee4 100644
--- a/src/assets/styles/index.scss
+++ b/src/assets/styles/index.scss
@@ -73,6 +73,10 @@ div:focus {
padding-left: 5px;
}
+.plr-10 {
+ padding: 0 10px;
+}
+
.plr-20 {
padding: 0 20px;
}
diff --git a/src/views/earnManage/busValueCount/details.vue b/src/views/earnManage/busValueCount/details.vue
index 5e95995..6984ffe 100644
--- a/src/views/earnManage/busValueCount/details.vue
+++ b/src/views/earnManage/busValueCount/details.vue
@@ -3,7 +3,7 @@
-
+
@@ -12,7 +12,7 @@
-
+
@@ -61,7 +61,9 @@
logicalNodeList: [],
currentNodeKey: '',
tableColChange: {},
+ submitChangeVal: {},
changeName: null,
+ treeShow: false,
tableList: [],
// 列显隐信息
columns: {
@@ -79,12 +81,22 @@
this.fnLogicalNode();
},
methods: {
- handleClick(tab, event) {
- if (this.changeName) {
- this.tableColChange[this.changeName] = this.tableColChange[this.changeName] ? this.tableColChange[this.changeName].concat(this.$refs.tabRef.selectList) : this.$refs.tabRef.selectList;
+ handleClick(num) {
+ this.treeShow = false;
+ setTimeout(() => {
+ this.treeShow = true;
+ },100);
+ if (this.$refs.tabRef) {
+ this.$refs.tabRef.selectList = [];
}
- this.deptOptions = [];
- this.currentNodeKey = null;
+ if (num && num === 1) {
+ this.tableColChange = {};
+ } else if (this.submitChangeVal && this.submitChangeVal.activeName) {
+ this.tableColChange = this.submitChangeVal && this.submitChangeVal.content && Object.keys(this.submitChangeVal.content).length > 0 ? this.submitChangeVal.content : {};
+ this.activeName = this.submitChangeVal.activeName;
+ }
+ this.deptOptions = null;
+ this.currentNodeKey = '';
if (this.activeName === 'first') {
this.deptOptions = this.busNameListData;
} else {
@@ -92,30 +104,69 @@
}
if (this.deptOptions.length > 1) {
this.changeName = null;
+ this.currentNodeKey = this.deptOptions[0].id;
this.handleNodeClick(this.deptOptions[0]);
}
},
// 逻辑节点标识
fnLogicalNode() {
getLogicalNode().then(val => {
- this.logicalNodeList = val && val.map(item => {
- return Object.assign({}, item,{label: item.logicalNodeId, id: item.logicalNodeId});
- });
+ if (val && val.length > 0) {
+ val.push({logicalNodeId: '空标识'});
+ this.logicalNodeList = val && val.map(item => {
+ return Object.assign({}, item,{label: item.logicalNodeId, id: item.logicalNodeId});
+ });
+ }
});
},
// 节点单击事件
handleNodeClick(data) {
- this.currentNodeKey = data.id;
if (this.changeName) {
- this.tableColChange[this.changeName] = this.tableColChange[this.changeName] ? this.tableColChange[this.changeName].concat(this.$refs.tabRef.selectList) : this.$refs.tabRef.selectList;
+ this.removeDup();
}
- let params = {logicalNodeId: data.id};
+ let params = {};
if (this.activeName === 'first') {
- params = {businessName: data.id};
+ if (data.id === '空标识') {
+ params = {businessEmpty: true};
+ } else {
+ params = {businessName: data.id};
+ }
+ } else {
+ if (data.id === '空标识') {
+ params = {logicalNodeEmpty: true};
+ } else {
+ params = {logicalNodeId: data.id};
+ }
}
this.changeName = data.id;
this.getList(params,data.id);
},
+ // 去重复
+ removeDup() {
+ if (this.$refs.tabRef.selectList.length > 0) {
+ if (this.tableColChange[this.changeName] && this.tableColChange[this.changeName].length > 0) {
+ let newArr = [];
+ this.$refs.tabRef.selectList.forEach(item => {
+ let index = 0;
+ this.tableColChange[this.changeName].some(val => {
+ if (item.id === val.id) {
+ index = 1;
+ return true;
+ }
+ });
+ if (index === 0) {
+ newArr.push(item);
+ }
+ });
+ this.tableColChange[this.changeName] = this.tableColChange[this.changeName].concat(newArr);
+ } else {
+ this.tableColChange[this.changeName] = this.$refs.tabRef.selectList;
+ }
+ this.$refs.tabRef.selectList = [];
+ } else {
+ this.tableColChange[this.changeName] = {};
+ }
+ },
getList(val,changeVal) {
this.$modal.loading();
getRegistList(Object.assign({}, {resourceType: 1}, val)).then(val => {
@@ -150,11 +201,14 @@
},
switchList() {
listAllBusinessList().then(val => {
+ let sideBus = [];
this.formList[0].controls.businessName['options'] = val && val.data.map(item => {
- this.busNameListData.push(Object.assign({}, item, {id: item.businessName, label: item.businessName}));
+ sideBus.push(Object.assign({}, item, {id: item.businessName, label: item.businessName}));
this.busNameList[item.businessName] = item;
return Object.assign({label: item.businessName, value: item.businessName});
});
+ sideBus.push({label: '空业务', id: '空标识'});
+ this.busNameListData = sideBus;
});
},
// 包含资源
@@ -177,16 +231,21 @@
}
},
submitPubilc() {
- this.tableColChange[this.changeName] = this.tableColChange[this.changeName] ? this.tableColChange[this.changeName].concat(this.$refs.tabRef.selectList) : this.$refs.tabRef.selectList;
+ this.removeDup();
this.open = false;
- console.log('tableColChange===',this.tableColChange);
+ this.treeShow = false;
let valList = [];
- Object.keys(this.tableColChange).forEach(key => {
- if (this.tableColChange[key] && this.tableColChange[key].length > 0) {
- valList = valList.concat(this.tableColChange[key].map(item => item.clientId));
- }
- });
- console.log('valList==',valList);
+ if (Object.keys(this.tableColChange).length > 0) {
+ this.submitChangeVal = {activeName: this.activeName, content: this.tableColChange};
+ Object.keys(this.tableColChange).forEach(key => {
+ if (this.tableColChange[key] && this.tableColChange[key].length > 0) {
+ valList = valList.concat(this.tableColChange[key].map(item => item.clientId));
+ }
+ });
+ } else {
+ this.submitChangeVal = {activeName: 'first'};
+ }
+ this.$set(this.ruleForm, 'includedResourcesTree', valList.toString());
},
// 监听事件
callback(result, dataVal, formVal) {
@@ -201,8 +260,8 @@
} else if (dataVal === '2') {
this.formList[0].controls.includedResources['hidden'] = false;
this.formList[0].controls.includedResourcesTree['hidden'] = true;
+ this.includeDataList(dataVal);
}
- // this.includeDataList(dataVal);
} else {
this.formList[0].controls.includedResourcesTree['hidden'] = true;
this.formList[0].controls.changeClientId['hidden'] = true;
@@ -227,7 +286,7 @@
break;
case 'changeClientId':
this.open = true;
- this.tableColChange = {};
+ this.treeShow = true;
this.handleClick();
break;
case 'submit':
@@ -240,7 +299,7 @@
dataVal.includedResources = newArr.toString();
}
if (dataVal.includedResourcesTree) {
- dataVal.includedResources = dataVal.includedResourcesTree.toString();
+ dataVal.includedResources = dataVal.includedResourcesTree;
delete dataVal.includedResourcesTree;
}
if (dataVal && dataVal.businessName) {
diff --git a/src/views/resource/monitorBoard/dialogMonitor.vue b/src/views/resource/monitorBoard/dialogMonitor.vue
new file mode 100644
index 0000000..6402e05
--- /dev/null
+++ b/src/views/resource/monitorBoard/dialogMonitor.vue
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/resource/monitorBoard/monitorBoard.vue b/src/views/resource/monitorBoard/monitorBoard.vue
new file mode 100644
index 0000000..d5f20c7
--- /dev/null
+++ b/src/views/resource/monitorBoard/monitorBoard.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+ 配置名称1
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/resource/serverScriptStrat/details.vue b/src/views/resource/serverScriptStrat/details.vue
index 4c4a12f..76e144c 100644
--- a/src/views/resource/serverScriptStrat/details.vue
+++ b/src/views/resource/serverScriptStrat/details.vue
@@ -119,6 +119,7 @@
let dataListVal = this.scriptList[dataVal];
this.$set(this.ruleForm, 'scriptPath', dataListVal['scriptPath']);
this.$set(this.ruleForm, 'defaultParams', dataListVal['defaultParams']);
+ this.$set(this.ruleForm, 'scriptId', dataListVal['id']);
}
break;
case 'executionMethod':
diff --git a/src/views/resource/switchRegister/monitorChart.vue b/src/views/resource/switchRegister/monitorChart.vue
index dbea8f5..53a1fac 100644
--- a/src/views/resource/switchRegister/monitorChart.vue
+++ b/src/views/resource/switchRegister/monitorChart.vue
@@ -126,9 +126,9 @@
formModel: {},
echartFors: [
{title: '的网络速率', oneName: '端口实时接收速率', twoName: '端口实时发送速率', unitSel: [{label: 'Kb', value: 'Kb'},{label: 'Mb', value: 'Mb'}, {label: 'Gb', value: 'Gb'}]},
- {title: '的丢包数', oneName: '入站丢包', twoName: '出站丢包'},
+ {title: '的丢包率(个/秒)', oneName: '入站丢包率', twoName: '出站丢包率'},
// {title: '的Bites总数', oneName: '端口发送Bites总数', twoName: '端口接收Bites总数'},
- {title: '的错误包数量', oneName: '错误的入站数据包数量', twoName: '错误的出战数据包数量'},
+ {title: '的包错误率(个/秒)', oneName: '入站包错误率', twoName: '出站包错误率'},
],
echartList: []
},
diff --git a/src/views/resource/topology/details.vue b/src/views/resource/topology/details.vue
index 12b2774..2845898 100644
--- a/src/views/resource/topology/details.vue
+++ b/src/views/resource/topology/details.vue
@@ -21,6 +21,7 @@
serverNameList: [],
serverPortList: [],
interfaceNameList: [],
+ formModel: {},
}
},
created() {
@@ -30,8 +31,8 @@
} else {
this.switchList();
this.fnServerNameList();
+ this.fnFormList();
}
- this.fnFormList();
},
methods: {
@@ -43,9 +44,11 @@
id: {label: 'ID',hidden: true},
clientId: {label: '交换机名称', span: 12, type: 'select', eventName: 'change', options:[], required: true},
interfaceName: {label: '接口名称', span: 12, type: 'select', options:[],required: true},
- connectedDeviceType: {label: '接口连接设备类型', span: 12, type: 'radio', options:this.dict.type.rm_topology_type, required: true},
- serverClientId: {label: '服务器ClientID', span: 12, eventName: 'change', options:[], type: 'select'},
- serverPort: {label: '服务器网口', span: 12, options:[], type: 'select'},
+ connectedDeviceType: {label: '接口连接设备类型', span: 12, type: 'radio', eventName: 'change', options:this.dict.type.rm_topology_type, required: true},
+ serverClientId: {label: '服务器ClientID', span: 12, eventName: 'change', options:[], type: 'select', hidden: this.ruleForm.connectedDeviceType === '1' ? false : true},
+ serverPort: {label: '服务器网口', span: 12, options:[], type: 'select', hidden: this.ruleForm.connectedDeviceType === '1' ? false : true},
+ peerSwitchName: {label: '对端交换机名称', span: 12, options:[], type: 'select', eventName: 'change', hidden: this.ruleForm.connectedDeviceType === '3' || this.ruleForm.connectedDeviceType === '4' ? false : true},
+ peerSwitchInterface: {label: '对端交换机端口', span: 12, options:[], type: 'select', hidden: this.ruleForm.connectedDeviceType === '3' || this.ruleForm.connectedDeviceType === '4' ? false : true},
}
}];
},
@@ -54,24 +57,33 @@
listAllSwitchName({}).then(val => {
if(val && val.data) {
this.switchNameList = val && val.data;
- this.formList[0].controls.clientId['options'] = val && val.data.map(item => {
+ let newDataList = val && val.data.map(item => {
if (this.paramsData && this.paramsData.id) {
if (item.clientId === this.ruleForm.clientId) {
this.fnInterFaceNameList({clientId: item.clientId});
}
+ if (item.clientId === this.ruleForm.peerSwitchName) {
+ this.fnInterFaceNameList({clientId: item.clientId}, '1');
+ }
}
return Object.assign({label: item.switchName, value: item.clientId});
});
+ this.formList[0].controls.clientId['options'] = newDataList;
+ this.formList[0].controls.peerSwitchName['options'] = newDataList;
}
});
},
// 接口名称
- fnInterFaceNameList(val) {
+ fnInterFaceNameList(val, num) {
postInterFaceName(Object.assign({},{resourceType: 2}, val)).then(res => {
this.interfaceNameList = res;
- this.formList[0].controls.interfaceName['options'] = res && res.map(item => {
+ let newDataList = res && res.map(item => {
return Object.assign({label: item.interfaceName, value: item.interfaceName});
});
+ this.formList[0].controls.interfaceName['options'] = newDataList;
+ if (num === '1') {
+ this.formList[0].controls.peerSwitchInterface['options'] = newDataList;
+ }
});
},
// 获取服务器下拉
@@ -101,8 +113,10 @@
getFormDataList(id) {
getTopology(id).then(val => {
this.ruleForm = val && val.data;
+ this.formModel = JSON.parse(JSON.stringify(val && val.data));
this.switchList();
this.fnServerNameList();
+ this.fnFormList();
}).catch(() => {
this.$modal.msgError("操作失败")
});
@@ -111,6 +125,32 @@
callback(result, dataVal, formVal) {
if (result && result.fnCode) {
switch (result.fnCode) {
+ case 'connectedDeviceType':
+ if (dataVal && dataVal === '1') {
+ this.formList[0].controls.serverClientId['hidden'] = false;
+ this.formList[0].controls.serverPort['hidden'] = false;
+ this.formList[0].controls.peerSwitchName['hidden'] = true;
+ this.formList[0].controls.peerSwitchInterface['hidden'] = true;
+ } else if (dataVal && (dataVal === '3' || dataVal === '4')) {
+ if (this.formModel.connectedDeviceType != dataVal) {
+ this.ruleForm.peerSwitchName = '';
+ this.ruleForm.peerSwitchInterface = '';
+ } else {
+ this.ruleForm.peerSwitchName = this.formModel.peerSwitchName;
+ this.ruleForm.peerSwitchInterface = this.formModel.peerSwitchInterface;
+ }
+ this.ruleForm.connectedDeviceType = dataVal;
+ this.formList[0].controls.serverClientId['hidden'] = true;
+ this.formList[0].controls.serverPort['hidden'] = true;
+ this.formList[0].controls.peerSwitchName['hidden'] = false;
+ this.formList[0].controls.peerSwitchInterface['hidden'] = false;
+ } else {
+ this.formList[0].controls.serverClientId['hidden'] = true;
+ this.formList[0].controls.serverPort['hidden'] = true;
+ this.formList[0].controls.peerSwitchName['hidden'] = true;
+ this.formList[0].controls.peerSwitchInterface['hidden'] = true;
+ }
+ break;
case 'clientId':
this.ruleForm = Object.assign({}, this.ruleForm, this.$refs.formRef.$refs.ruleForm.model);
let clientId = '';
@@ -122,17 +162,28 @@
this.ruleForm['interfaceName'] = '';
this.fnInterFaceNameList({clientId: clientId});
break;
- case 'serverClientId':
- if (dataVal) {
- // let serverIp = '';
- // this.serverNameList.find(item => {
- // if (item.clientId === dataVal) {
- // serverIp = item.ipAddress;
- // }
- // });
- this.fnServerPortList({clientId: dataVal});
+ case 'peerSwitchName':
+ this.ruleForm = Object.assign({}, this.ruleForm, this.$refs.formRef.$refs.ruleForm.model);
+ let peerVal = '';
+ this.switchNameList.find(item => {
+ if (item.clientId === dataVal) {
+ peerVal = item.clientId;
}
- break;
+ });
+ this.ruleForm['peerSwitchInterface'] = '';
+ this.fnInterFaceNameList({clientId: peerVal}, '1');
+ break;
+ case 'serverClientId':
+ if (dataVal) {
+ // let serverIp = '';
+ // this.serverNameList.find(item => {
+ // if (item.clientId === dataVal) {
+ // serverIp = item.ipAddress;
+ // }
+ // });
+ this.fnServerPortList({clientId: dataVal});
+ }
+ break;
case 'submit':
this.switchNameList.find(item => {
if (item.clientId === dataVal['clientId']) {