修改bug

This commit is contained in:
康冉冉
2025-09-28 19:02:28 +08:00
parent 3729bdda81
commit c7d6196f46
29 changed files with 96 additions and 59 deletions

View File

@@ -145,7 +145,7 @@ aside {
//main-container全局样式 //main-container全局样式
.app-container { .app-container {
height: calc(100vh - 85px); //height: calc(100vh - 85px);
padding: 8px 20px 20px; padding: 8px 20px 20px;
overflow: auto; overflow: auto;
} }

View File

@@ -186,11 +186,11 @@
this.ids = this.ids.concat(res.id); this.ids = this.ids.concat(res.id);
} }
} }
this.isProcessing = false;
}); });
this.selectList.forEach(val => { this.selectList.forEach(val => {
this.$refs[`tableRef_${this.config.tableKey}`].toggleRowSelection(val,true); this.$refs[`tableRef_${this.config.tableKey}`].toggleRowSelection(val,true);
}); });
this.isProcessing = false;
} else { } else {
this.selectList = selection; this.selectList = selection;
this.ids = selection.map(item => item.id); this.ids = selection.map(item => item.id);
@@ -205,6 +205,15 @@
} else { } else {
this.selectAllRows(); // 全选 this.selectAllRows(); // 全选
} }
} else {
if (tabAll && tabAll.length > 0) {
this.selectList = tabAll;
this.ids = tabAll.map(tabId => tabId.id);
} else {
// 清空
this.selectList = [];
this.ids = [];
}
} }
}, },
// 提供给父组件调用的方法:返回当前表格的选中数据 资源监控策略和资源监控模块使用 // 提供给父组件调用的方法:返回当前表格的选中数据 资源监控策略和资源监控模块使用

View File

@@ -7,7 +7,7 @@
v-model="queryParams.clientId" v-model="queryParams.clientId"
placeholder="请输入客户端ID" placeholder="请输入客户端ID"
clearable clearable
@keyup.enter="handleQuery"> @keyup.enter.native="handleQuery">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -7,7 +7,7 @@
v-model="queryParams.clientId" v-model="queryParams.clientId"
placeholder="请输入客户端ID" placeholder="请输入客户端ID"
clearable clearable
@keyup.enter="handleQuery"> @keyup.enter.native="handleQuery">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -7,7 +7,7 @@
v-model="queryParams.name" v-model="queryParams.name"
placeholder="请输入容器名称" placeholder="请输入容器名称"
clearable clearable
@keyup.enter="handleQuery"> @keyup.enter.native="handleQuery">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -7,7 +7,7 @@
v-model="queryParams.clientId" v-model="queryParams.clientId"
placeholder="请输入客户端ID" placeholder="请输入客户端ID"
clearable clearable
@keyup.enter="handleQuery"> @keyup.enter.native="handleQuery">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -7,7 +7,7 @@
v-model="queryParams.clientId" v-model="queryParams.clientId"
placeholder="请输入客户端ID" placeholder="请输入客户端ID"
clearable clearable
@keyup.enter="handleQuery"> @keyup.enter.native="handleQuery">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -7,7 +7,7 @@
v-model="queryParams.clientId" v-model="queryParams.clientId"
placeholder="请输入客户端ID" placeholder="请输入客户端ID"
clearable clearable
@keyup.enter="handleQuery"> @keyup.enter.native="handleQuery">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -7,7 +7,7 @@
v-model="queryParams.businessName" v-model="queryParams.businessName"
placeholder="请输入业务名称" placeholder="请输入业务名称"
clearable clearable
@keyup.enter="handleQuery"/> @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">

View File

@@ -21,7 +21,7 @@
v-model="queryParams.hardwareSn" v-model="queryParams.hardwareSn"
placeholder="请输入硬件SN" placeholder="请输入硬件SN"
clearable clearable
@keyup.enter="handleQuery"/> @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">

View File

@@ -7,7 +7,7 @@
v-model="queryParams.nodeName" v-model="queryParams.nodeName"
placeholder="节点名称" placeholder="节点名称"
clearable clearable
@keyup.enter="handleQuery"> @keyup.enter.native="handleQuery">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -114,7 +114,7 @@
v-model="queryParams.hardwareSn" v-model="queryParams.hardwareSn"
placeholder="请输入硬件SN" placeholder="请输入硬件SN"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -21,7 +21,7 @@
v-model="queryParams.hardwareSn" v-model="queryParams.hardwareSn"
placeholder="请输入硬件SN" placeholder="请输入硬件SN"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -36,7 +36,7 @@
v-model="queryParams.hardwareSn" v-model="queryParams.hardwareSn"
placeholder="请输入硬件SN" placeholder="请输入硬件SN"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -7,7 +7,7 @@
v-model="queryParams.queryName" v-model="queryParams.queryName"
placeholder="请输入资源名称/内网IP地址" placeholder="请输入资源名称/内网IP地址"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -7,7 +7,7 @@
v-model="queryParams.switchName" v-model="queryParams.switchName"
placeholder="请输入告警关键字" placeholder="请输入告警关键字"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -7,7 +7,7 @@
v-model="queryParams.switchName" v-model="queryParams.switchName"
placeholder="请输入模版名称/资源组名/监控模版名称" placeholder="请输入模版名称/资源组名/监控模版名称"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -22,7 +22,7 @@
v-model="queryParams.switchName" v-model="queryParams.switchName"
placeholder="请输入名称" placeholder="请输入名称"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -7,7 +7,7 @@
v-model="queryParams.groupName" v-model="queryParams.groupName"
placeholder="请输入资源组名称" placeholder="请输入资源组名称"
clearable clearable
@keyup.enter="handleQuery"/> @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">

View File

@@ -7,7 +7,7 @@
v-model="queryParams.queryName" v-model="queryParams.queryName"
placeholder="请输入策略名称/资源组名/监控模版名称" placeholder="请输入策略名称/资源组名/监控模版名称"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -103,13 +103,13 @@
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.$modal.loading(); // this.$modal.loading();
listMonitorPolicy(this.queryParams).then(response => { listMonitorPolicy(this.queryParams).then(response => {
this.tableList = response.rows; this.tableList = response.rows;
this.queryParams.total = response.total; this.queryParams.total = response.total;
this.$modal.closeLoading(); // this.$modal.closeLoading();
}).catch(err => { }).catch(err => {
this.$modal.closeLoading(); // this.$modal.closeLoading();
}) })
}, },
// 处理子组件传递的新值 // 处理子组件传递的新值

View File

@@ -110,7 +110,7 @@
paramsData: {}, paramsData: {},
tempContent: {}, tempContent: {},
active: 0, active: 0,
activeNames: [0, 1,2,3], activeNames: [0, 1,2,3, 4],
activeTypeName: 'linux', // 两个系统 activeTypeName: 'linux', // 两个系统
linuxActiveName: 'monitorItem', // linux系统下的两个栏 linuxActiveName: 'monitorItem', // linux系统下的两个栏
hwActiveName: 'monitorItem', // 华为交换机下的两个栏 hwActiveName: 'monitorItem', // 华为交换机下的两个栏
@@ -191,25 +191,24 @@
config: {tableKey: 'web1', colTopHiddenIcon: true, selectable: true} config: {tableKey: 'web1', colTopHiddenIcon: true, selectable: true}
}, },
{ {
firstTitle: '华为交换机', secondTitle: '自动发现项',title: 'MPU发现', classType: 'checkHidden', firstTitle: '华为交换机', secondTitle: '自动发现项',title: '光模块发现', classType: 'checkHidden',
tableList: [], tableList: [],
config: {tableKey: 'web2', colTopHiddenIcon: true, selectable: true} config: {tableKey: 'web2', colTopHiddenIcon: true, selectable: true}
}, },
// { {
// firstTitle: '华为交换机', secondTitle: '自动发现项',title: '电源发现', classType: 'checkHidden', firstTitle: '华为交换机', secondTitle: '自动发现项',title: 'MPU发现', classType: 'checkHidden',
// tableList: [ tableList: [],
// {id: 1, ident: 'sysDescr', name: '系统描述', monitor: '1.3.6.1.2.1.1.1', filter: '', explain: ''}, config: {tableKey: 'web3', colTopHiddenIcon: true, selectable: true}
// {id: 2, ident: 'sysObjectID', name: '系统Object ID', monitor: '1.3.6.1.2.1.1.2', filter: '', explain: ''}, },
// {id: 3, ident: 'sysUpTime', name: '系统运行时间', monitor: '1.3.6.1.2.1.1.1', filter: '', explain: ''}, {
// {id: 4, ident: 'sysContact', name: '系统联系信息', monitor: '1.3.6.1.2.1.1.1', filter: '', explain: '', relevance: {id: [2]}}, firstTitle: '华为交换机', secondTitle: '自动发现项',title: '电源发现', classType: 'checkHidden',
// {id: 5, ident: 'sysName', name: '系统名称', monitor: '1.3.6.1.2.1.1.1', filter: '', explain: ''}, tableList: [],
// ], config: {tableKey: 'web4', colTopHiddenIcon: true, selectable: true}
// config: {tableKey: 'web3', colTopHiddenIcon: true, selectable: true} },
// },
{ {
firstTitle: '华为交换机', secondTitle: '自动发现项',title: '风扇发现', classType: 'checkHidden', firstTitle: '华为交换机', secondTitle: '自动发现项',title: '风扇发现', classType: 'checkHidden',
tableList: [], tableList: [],
config: {tableKey: 'web3', colTopHiddenIcon: true, selectable: true} config: {tableKey: 'web5', colTopHiddenIcon: true, selectable: true}
}, },
]}, ]},
} }
@@ -246,6 +245,7 @@
}); });
}, },
fnGetMonitorTempList(params) { fnGetMonitorTempList(params) {
this.$modal.loading();
getMonitorTempList(params).then(res => { getMonitorTempList(params).then(res => {
// console.log('data====',res,'params==',params); // console.log('data====',res,'params==',params);
if (this.activeTypeName === 'linux') { if (this.activeTypeName === 'linux') {
@@ -360,6 +360,7 @@
} }
} else { } else {
if (this.paramsData && this.paramsData.id) { if (this.paramsData && this.paramsData.id) {
// 网络
if (this.tempContent['switch'] && this.tempContent['switch'].switchNet && this.tempContent['switch'].switchNet.length > 0) { if (this.tempContent['switch'] && this.tempContent['switch'].switchNet && this.tempContent['switch'].switchNet.length > 0) {
this.monitorTable.nodeTow[0].tableList = this.tempContent['switch'].switchNet; this.monitorTable.nodeTow[0].tableList = this.tempContent['switch'].switchNet;
setTimeout(() => { setTimeout(() => {
@@ -368,6 +369,7 @@
} else { } else {
this.monitorTable.nodeTow[0].tableList = res.data.switchNet; this.monitorTable.nodeTow[0].tableList = res.data.switchNet;
} }
// 光模块
if (this.tempContent['switch'] && this.tempContent['switch'].switchModule && this.tempContent['switch'].switchModule.length > 0) { if (this.tempContent['switch'] && this.tempContent['switch'].switchModule && this.tempContent['switch'].switchModule.length > 0) {
this.monitorTable.nodeTow[1].tableList = this.tempContent['switch'].switchModule; this.monitorTable.nodeTow[1].tableList = this.tempContent['switch'].switchModule;
setTimeout(() => { setTimeout(() => {
@@ -376,26 +378,50 @@
} else { } else {
this.monitorTable.nodeTow[1].tableList = res.data.switchModule; this.monitorTable.nodeTow[1].tableList = res.data.switchModule;
} }
if (this.tempContent['switch'] && this.tempContent['switch'].switchFan && this.tempContent['switch'].switchFan.length > 0) { // MPU
this.monitorTable.nodeTow[2].tableList = this.tempContent['switch'].switchFan; if (this.tempContent['switch'] && this.tempContent['switch'].switchMpu && this.tempContent['switch'].switchMpu.length > 0) {
this.monitorTable.nodeTow[2].tableList = this.tempContent['switch'].switchMpu;
setTimeout(() => { setTimeout(() => {
this.$refs[`tableRef_web3`][0].selectAllRows(); this.$refs[`tableRef_web3`][0].selectAllRows();
},500); },500);
} else { } else {
this.monitorTable.nodeTow[2].tableList = res.data.switchFan; this.monitorTable.nodeTow[2].tableList = res.data.switchMpu;
}
// 电源
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;
}
// 风扇
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 { } else {
this.monitorTable.nodeTow[0].tableList = res.data.switchNet; this.monitorTable.nodeTow[0].tableList = res.data.switchNet;
this.monitorTable.nodeTow[1].tableList = res.data.switchModule; this.monitorTable.nodeTow[1].tableList = res.data.switchModule;
this.monitorTable.nodeTow[2].tableList = res.data.switchFan; this.monitorTable.nodeTow[2].tableList = res.data.switchMpu;
this.monitorTable.nodeTow[3].tableList = res.data.switchPwr;
this.monitorTable.nodeTow[4].tableList = res.data.switchFan;
setTimeout(() => { setTimeout(() => {
this.$refs[`tableRef_web1`][0].selectAllRows(); this.$refs[`tableRef_web1`][0].selectAllRows();
this.$refs[`tableRef_web2`][0].selectAllRows(); this.$refs[`tableRef_web2`][0].selectAllRows();
this.$refs[`tableRef_web3`][0].selectAllRows(); this.$refs[`tableRef_web3`][0].selectAllRows();
this.$refs[`tableRef_web4`][0].selectAllRows();
this.$refs[`tableRef_web5`][0].selectAllRows();
},500); },500);
} }
} }
} }
this.$modal.closeLoading();
}); });
}, },
async next(num) { async next(num) {

View File

@@ -7,7 +7,7 @@
v-model="queryParams.templateName" v-model="queryParams.templateName"
placeholder="请输入模版名称" placeholder="请输入模版名称"
clearable clearable
@keyup.enter="handleQuery"/> @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@@ -83,11 +83,11 @@
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.$modal.loading(); // this.$modal.loading();
listMonitorTemp(this.queryParams).then(response => { listMonitorTemp(this.queryParams).then(response => {
this.tableList = response.rows; this.tableList = response.rows;
this.queryParams.total = response.total; this.queryParams.total = response.total;
this.$modal.closeLoading(); // this.$modal.closeLoading();
}) })
}, },
// 处理子组件传递的新值 // 处理子组件传递的新值

View File

@@ -21,9 +21,9 @@
securityLevel: '1', securityLevel: '1',
rwPermission: '1', rwPermission: '1',
encryption: '1', encryption: '1',
agentWeek: '5秒', // agentWeek: '5秒',
agentNum: '3次', // agentNum: '3次',
agentOID: '1.3.6.1.2.1.1.5' // agentOID: '1.3.6.1.2.1.1.5'
}, },
formList: [], formList: [],
paramsData: {} paramsData: {}
@@ -67,9 +67,9 @@
agentVersion: {label: 'AGENT版本', span: 12, type: 'input',hidden: objVal && objVal.id ? false : true, disabled: objVal && objVal.id ? true : false}, agentVersion: {label: 'AGENT版本', span: 12, type: 'input',hidden: objVal && objVal.id ? false : true, disabled: objVal && objVal.id ? true : false},
// customerName: {label: '设备业务客户', span: 12, type: 'input'}, // customerName: {label: '设备业务客户', span: 12, type: 'input'},
// serviceNumber: {label: '业务号', span: 12, type: 'input'}, // serviceNumber: {label: '业务号', span: 12, type: 'input'},
agentWeek: {label: 'Agent与交换机心跳检测周期', span: 12, type: 'input', disabled: true}, // agentWeek: {label: 'Agent与交换机心跳检测周期', span: 12, type: 'input', disabled: true},
agentNum: {label: 'Agent与交换机心跳检测次数', span: 12, type: 'input', disabled: true}, // agentNum: {label: 'Agent与交换机心跳检测次数', span: 12, type: 'input', disabled: true},
agentOID: {label: 'Agent与交换机心跳检测OID', span: 12, type: 'input', disabled: true}, // agentOID: {label: 'Agent与交换机心跳检测OID', span: 12, type: 'input', disabled: true},
} }
}]; }];
}, },

View File

@@ -7,7 +7,7 @@
v-model="queryParams.resourceName" v-model="queryParams.resourceName"
placeholder="请输入交换机名称/服务器名称" placeholder="请输入交换机名称/服务器名称"
clearable clearable
@keyup.enter="handleQuery"/> @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@@ -53,9 +53,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="交换机在线状态" title="交换机在线状态" prop="onlineStatus"> <el-form-item label="交换机在线状态" title="交换机在线状态" prop="switchStatus">
<el-select <el-select
v-model="queryParams.onlineStatus" v-model="queryParams.switchStatus"
placeholder="请选择交换机在线状态" placeholder="请选择交换机在线状态"
clearable> clearable>
<el-option <el-option

View File

@@ -68,7 +68,7 @@
<!-- 新建文件夹 --> <!-- 新建文件夹 -->
<el-dialog title="命令执行结果" :visible.sync="open" width="800px" append-to-body> <el-dialog title="命令执行结果" :visible.sync="open" width="800px" append-to-body>
<div class="block"> <div class="block">
<el-timeline reverse="true"> <el-timeline :reverse="true">
<el-timeline-item v-for="item of timelineList" :timestamp="item.createTime" placement="top"> <el-timeline-item v-for="item of timelineList" :timestamp="item.createTime" placement="top">
<pre>{{item.content}}</pre> <pre>{{item.content}}</pre>
</el-timeline-item> </el-timeline-item>

View File

@@ -38,7 +38,7 @@
v-model="queryParams.switchName" v-model="queryParams.switchName"
placeholder="请输入硬件SN/资源名称/IP地址" placeholder="请输入硬件SN/资源名称/IP地址"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -7,7 +7,7 @@
v-model="queryParams.policyName" v-model="queryParams.policyName"
placeholder="请输入策略名称" placeholder="请输入策略名称"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@@ -168,7 +168,9 @@
formValid.model['includedDevicesName'] = []; formValid.model['includedDevicesName'] = [];
if (formValid.model && formValid.model.includedDevicesDataList && formValid.model.includedDevicesDataList.length > 0) { if (formValid.model && formValid.model.includedDevicesDataList && formValid.model.includedDevicesDataList.length > 0) {
formValid.model.includedDevicesDataList.forEach(item => { formValid.model.includedDevicesDataList.forEach(item => {
formValid.model['includedDevicesName'].push(this.includedDevicesList[item].resourceName); if (this.includedDevicesList[item]) {
formValid.model['includedDevicesName'].push(this.includedDevicesList[item].resourceName);
}
}); });
} }
formValid.model['includedDevicesId'] = formValid.model['includedDevicesDataList'].join(); formValid.model['includedDevicesId'] = formValid.model['includedDevicesDataList'].join();

View File

@@ -7,7 +7,7 @@
v-model="queryParams.switchName" v-model="queryParams.switchName"
placeholder="请输入交互机名称" placeholder="请输入交互机名称"
clearable clearable
@keyup.enter="handleQuery"/> @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">

View File

@@ -8,7 +8,7 @@
placeholder="请输入标题" placeholder="请输入标题"
clearable clearable
style="width: 220px" style="width: 220px"
@keyup.enter="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-col> </el-col>
</el-form-item> </el-form-item>