...
This commit is contained in:
@@ -359,6 +359,14 @@ export function listRegisterList(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 通过资源查包含设备
|
||||
export function listArrRegisterList(data) {
|
||||
return request({
|
||||
url: '/system/resourceMonitor/getAllRegisterListByGroupId',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
/** ----------------AGENT更新------------ */
|
||||
// 查询列表
|
||||
export function listAgentManage(query) {
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<el-select
|
||||
v-model="ruleForm[key]"
|
||||
:multiple="formVal.multiple"
|
||||
:collapse-tags="formVal.collapseTags"
|
||||
:disabled="toBoolean(formVal.disabled || formItem.config.readonly)"
|
||||
:placeholder="toBoolean(formVal.disabled || formItem.config.readonly) ? null : formVal.placeholder || `请输入${formVal.label}`"
|
||||
:clearable="formVal.clearable !== false"
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
type = true;
|
||||
}
|
||||
this. columns = [
|
||||
{label: `时间`, prop: 'createTime', visible: !type},
|
||||
{label: `业务代码`, prop: 'businessId',visible: true},
|
||||
{label: `时间`,minWidth: '160', prop: 'createTime', visible: !type},
|
||||
{label: `业务代码`, minWidth: '120', prop: 'businessId',visible: true},
|
||||
{label: `95带宽值Mbps/日`, 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: `发送流量值(bytes/s)`, prop: 'outSpeed', visible: !type},
|
||||
{label: `发送流量值(bytes/s)`, minWidth: '150', prop: 'outSpeed', visible: !type},
|
||||
];
|
||||
},
|
||||
/** 查询角色列表 */
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
},
|
||||
// 第二节点 2栏 列显隐信息
|
||||
switchColumns: {
|
||||
id: { label: `ID`},
|
||||
id: { label: `ID`, visible: true},
|
||||
metricKey: { label: `监控标识`, visible: true},
|
||||
metricName: { label: `监控名称`, visible: true},
|
||||
oid: { label: `监控OID`, visible: true },
|
||||
@@ -361,49 +361,40 @@
|
||||
} else {
|
||||
if (this.paramsData && this.paramsData.id) {
|
||||
// 网络
|
||||
this.monitorTable.nodeTow[0].tableList = res.data.switchNet;
|
||||
if (this.tempContent['switch'] && this.tempContent['switch'].switchNet && this.tempContent['switch'].switchNet.length > 0) {
|
||||
this.monitorTable.nodeTow[0].tableList = this.tempContent['switch'].switchNet;
|
||||
setTimeout(() => {
|
||||
this.$refs[`tableRef_web1`][0].selectAllRows();
|
||||
},500);
|
||||
} else {
|
||||
this.monitorTable.nodeTow[0].tableList = res.data.switchNet;
|
||||
}
|
||||
// 光模块
|
||||
this.monitorTable.nodeTow[1].tableList = res.data.switchModule;
|
||||
if (this.tempContent['switch'] && this.tempContent['switch'].switchModule && this.tempContent['switch'].switchModule.length > 0) {
|
||||
this.monitorTable.nodeTow[1].tableList = this.tempContent['switch'].switchModule;
|
||||
setTimeout(() => {
|
||||
this.$refs[`tableRef_web2`][0].selectAllRows();
|
||||
},500);
|
||||
} else {
|
||||
this.monitorTable.nodeTow[1].tableList = res.data.switchModule;
|
||||
}
|
||||
// MPU
|
||||
this.monitorTable.nodeTow[2].tableList = res.data.switchMpu;
|
||||
if (this.tempContent['switch'] && this.tempContent['switch'].switchMpu && this.tempContent['switch'].switchMpu.length > 0) {
|
||||
this.monitorTable.nodeTow[2].tableList = this.tempContent['switch'].switchMpu;
|
||||
setTimeout(() => {
|
||||
this.$refs[`tableRef_web3`][0].selectAllRows();
|
||||
},500);
|
||||
} else {
|
||||
this.monitorTable.nodeTow[2].tableList = res.data.switchMpu;
|
||||
}
|
||||
// 电源
|
||||
this.monitorTable.nodeTow[3].tableList = res.data.switchPwr;
|
||||
if (this.tempContent['switch'] && this.tempContent['switch'].switchPwr && this.tempContent['switch'].switchPwr.length > 0) {
|
||||
this.monitorTable.nodeTow[3].tableList = this.tempContent['switch'].switchPwr;
|
||||
setTimeout(() => {
|
||||
this.$refs[`tableRef_web4`][0].selectAllRows();
|
||||
},500);
|
||||
} else {
|
||||
this.monitorTable.nodeTow[3].tableList = res.data.switchPwr;
|
||||
}
|
||||
// 风扇
|
||||
this.monitorTable.nodeTow[4].tableList = res.data.switchFan;
|
||||
if (this.tempContent['switch'] && this.tempContent['switch'].switchFan && this.tempContent['switch'].switchFan.length > 0) {
|
||||
this.monitorTable.nodeTow[4].tableList = this.tempContent['switch'].switchFan;
|
||||
setTimeout(() => {
|
||||
this.$refs[`tableRef_web5`][0].selectAllRows();
|
||||
},500);
|
||||
} else {
|
||||
this.monitorTable.nodeTow[4].tableList = res.data.switchFan;
|
||||
}
|
||||
} else {
|
||||
this.monitorTable.nodeTow[0].tableList = res.data.switchNet;
|
||||
|
||||
@@ -19,7 +19,12 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="包含设备" prop="includedDevicesName">
|
||||
<el-input v-model="form.includedDevicesName" :disabled="readonly" clearable></el-input>
|
||||
<template v-if="readonly">
|
||||
{{form.includedDevicesName}}
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input v-model="form.includedDevicesName" :disabled="readonly" clearable></el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
import Form from '@/components/form/index.vue';
|
||||
import TableList from "@/components/table/index.vue"
|
||||
import DynamicForm from './dynamicForm'
|
||||
import {getPolicy, addPolicy, updatePolicy, getResMonitorGroup, resNameList} from "@/api/disRevenue/resource"
|
||||
import {getPolicy, addPolicy, updatePolicy, getResMonitorGroup, resNameList, listArrRegisterList} from "@/api/disRevenue/resource"
|
||||
export default {
|
||||
name: 'ServerScriptDetails',
|
||||
components: {Form, TableList, DynamicForm},
|
||||
@@ -46,7 +46,10 @@
|
||||
active: 0,
|
||||
synthesisList: {},
|
||||
// 第一节点
|
||||
ruleFormData: {},
|
||||
ruleFormData: {
|
||||
resourceGroupId: '',
|
||||
includedDevicesDataList: []
|
||||
},
|
||||
config: {
|
||||
buttonGroup: []
|
||||
},
|
||||
@@ -76,8 +79,8 @@
|
||||
id: {label: 'ID',hidden: true},
|
||||
policyName: {label: '策略名称', span: 12, type: 'input', rules: [{required: true, message: '请输入模版名称', trigger: 'blur'}]},
|
||||
description: {label: '描述', span: 12, type: 'textarea'},
|
||||
resourceGroupId: {label: '关联资源组', span: 12, type: 'select', options:[]},
|
||||
includedDevicesDataList: {label: '包含设备', span: 12, type: 'select', options:[], multiple: true}
|
||||
resourceGroupId: {label: '关联资源组', span: 12, eventName: 'change', type: 'select', options:[]},
|
||||
includedDevicesDataList: {label: '包含设备', span: 12, type: 'select', eventName: 'change', options:[], multiple: true, collapseTags: true}
|
||||
}
|
||||
}];
|
||||
},
|
||||
@@ -97,7 +100,7 @@
|
||||
if (val) {
|
||||
this.formList[0].controls['includedDevicesDataList']['options']= val && val.map(item => {
|
||||
this.includedDevicesList[item.id] = item;
|
||||
return Object.assign({label: item.resourceName, value: item.id});
|
||||
return Object.assign({label: item.id + '_' + item.resourceName, value: item.id});
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
@@ -235,8 +238,20 @@
|
||||
callback(result, dataVal, formVal) {
|
||||
if (result && result.fnCode) {
|
||||
switch (result.fnCode) {
|
||||
case 'submit':
|
||||
console.log('dataVal===',dataVal);
|
||||
case 'resourceGroupId':
|
||||
this.ruleFormData['resourceGroupId'] = dataVal;
|
||||
this.ruleFormData['includedDevicesDataList'] = [];
|
||||
listArrRegisterList({id: dataVal}).then(res => {
|
||||
if (res && res.data) {
|
||||
res.data.forEach(item => {
|
||||
this.ruleFormData['includedDevicesDataList'].push(Number(item.id));
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'includedDevicesDataList':
|
||||
this.ruleFormData['resourceGroupId'] = null;
|
||||
this.ruleFormData['includedDevicesDataList'] = dataVal;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user