diff --git a/hg-monitor-web-base/src/main/resources/static/src/controller/domainindex.js b/hg-monitor-web-base/src/main/resources/static/src/controller/domainindex.js index 7395032..409d073 100644 --- a/hg-monitor-web-base/src/main/resources/static/src/controller/domainindex.js +++ b/hg-monitor-web-base/src/main/resources/static/src/controller/domainindex.js @@ -15,7 +15,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' var domainId = '';//当前域Id var curTreeNode = ''; var curDomainResType = '';//当前域所在的资源类型 - + var parentId = 'null'; var sortKey = ''; function autoHeight(el) { @@ -353,6 +353,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' //集群选择事件 form.on('select(domain_res_cluster)', function (data) { // renderList(busId, curBizResType); + parentId = $('#domain_res_cluster').val(); + renderParentList(curDomainResType); reloadTable(); }); //资源池选择事件 @@ -431,214 +433,6 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' form.render(null, 'domain-list-form'); setOpenStow(); - - // var cols = [{type: 'numbers', title: '序号', align: 'center', fixed: 'left'} - // , { - // field: 'resName', title: '资源名称', minWidth: 210, align: 'center', sort: true, - // templet: '<div><span data-zymc="{{ d.resId }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.admin }}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>' - // } - // , {field: 'ip', title: 'IP地址', minWidth: 150, align: 'center', sort: true} - // , {field: 'admin', title: '负责人', minWidth: 100, align: 'center', sort: true} - // , {field: 'resTypeName', title: '资源类型', minWidth: 150, align: 'center', sort: true} - // , { - // field: 'healthDesc', - // title: '健康状态', - // minWidth: 100, - // align: 'center', - // sort: true, - // templet: '#domainhealthTpl' - // }, { - // field: 'state', - // title: '资源状态', - // minWidth: 100, - // align: 'center', - // sort: true, - // templet:'#domainIndexResStateTpl' - // }]; - // // , { - // // field: 'state', - // // title: '连接状态', - // // minWidth: 100, - // // align: 'center', - // // templet: '#ljztDomainListTpl' - // // } - // if (resType && resType != 'PASSWORD_SERVER') { - // cols.push({ - // field: 'linkState', - // title: '连接状态', - // align: 'center', - // minWidth: 100, - // templet: '#ljztDomainListTpl', - // sort: true, - // }); - // } - // //数据库、中间件、动环相关不展示CPU使用率、内存使用率、防火墙、交换机 - // if (resType) { - // if(resType.indexOf("HOST") >-1){ - // cols.push({ - // field: 'fileSysUseRate', - // title: '最大文件系统使用率', - // align: 'center', - // minWidth: 200, - // templet: '#domainFileUseRateTpl', - // sort:true - // }); - // } - // //数据库、中间件、网络社保、动环相关不展示指标信息 - // if (resType.indexOf('MIDDLEWARE_') == -1 && resType.indexOf("GPDXT") == -1 && resType.indexOf("KQTJXT") == -1 - // && resType.indexOf("XFXT") == -1 && resType.indexOf("JFCDHJ") == -1 && resType.indexOf("DATABASE_") == -1 - // && resType.indexOf("STORAGE_") == '-1' && resType.indexOf("HUAWEI_CLOUD_COLONY") == -1 - // && resType.indexOf("HUAWEI_CLOUD_CLUSTER") == -1 && resType.indexOf("HOST_ONECOMPUTER") == -1 - // && resType.indexOf("VIRTUALIZATION_VMWARE_VHOST") == -1 && resType != 'ALI_CLOUD_SLB' && resType != 'ALI_CLOUD_OSS' && resType != 'ALI_ARMS_APP' && resType != 'PASSWORD_SERVER') { - // cols.push({ - // field: 'cpuRate', - // title: 'CPU使用率', - // align: 'center', - // minWidth: 120, - // templet: '#sllDomainListTpl', - // sort: true, - // }); - // cols.push({ - // field: 'memoryRate', - // title: '内存使用率', - // align: 'center', - // minWidth: 120, - // templet: '#ncDomainListTpl', - // sort: true, - // }); - // } else { - // //交换机、防火墙 - // // if (resType.indexOf("_SWITCHBOARD") != '-1' || resType.indexOf("_FIREWALL") != '-1') { - // // cols.push({ - // // field: 'cpuRate', - // // title: 'CPU平均使用率', - // // align: 'center', - // // minWidth: 120, - // // templet: '#cpupjDomainListTpl' - // // }); - // // cols.push({ - // // field: 'memoryRate', - // // title: '内存平均使用率', - // // align: 'center', - // // minWidth: 120, - // // templet: '#ncpjDomainListTpl' - // // }); - // // } - // //数据库 - // if (resType.indexOf("DATABASE") != -1) { - // cols.push({ - // field: 'cpuRate', - // title: '活动会话百分比', - // align: 'center', - // minWidth: 120, - // templet: '#hhDomainListTpl', - // sort: true, - // }); - // cols.push({ - // field: 'tableSpaceUseRate', - // title: '表空间使用率(最大)', - // align: 'center', - // minWidth: 180, - // templet: '#domainTableSpaceUseRateTpl', - // sort: true - // }); - // cols.push({ - // field: 'lockNum', - // title: '当前会话锁数量', - // align: 'center', - // minWidth: 120, - // sort: true - // }); - // } - // //华为云资源池与华为云集群 - // if (resType.indexOf('HUAWEI_CLOUD_COLONY') != -1 || resType.indexOf('HUAWEI_CLOUD_CLUSTER') != -1) { - // cols.push({field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: 120, templet: '#cpusetrateDomainListTpl'}); - // cols.push({field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: 120, templet: '#memsetrateDomainListTpl'}); - // if (resType.indexOf('HUAWEI_CLOUD_COLONY') != -1) { - // cols.push({field: 'storageSetRate', title: '存储分配率', align: 'center', minWidth: 120, templet: '#storagesetrateDomainListTpl'}); - // } - // } - // //vmware虚拟机 joke add 20200528 - // if (resType == 'VIRTUALIZATION_VMWARE_VHOST') { - // cols.push({ - // field: 'cpuRate', - // title: 'CPU使用率', - // align: 'center', - // minWidth: 120, - // templet: '#sllresListTpl', - // sort: true, - // }); - // cols.push({ - // field: 'memoryRate', - // title: '内存使用率', - // align: 'center', - // minWidth: 120, - // templet: '#ncresListTpl', - // sort: true, - // }); - // cols.push({ - // field: 'platform', - // title: '所属平台', - // align: 'center', - // minWidth: 120, - // sort: true, - // }); - // cols.push({ - // field: 'resRemark', - // title: '资源备注', - // align: 'center', - // minWidth: 120, - // sort: true, - // }); - // // cols.push({ - // // field: 'cpuSize', - // // title: 'CPU大小', - // // align: 'center', - // // minWidth: 120 - // // }); - // cols.push({ - // field: 'memorySize', - // title: '内存大小(GB)', - // align: 'center', - // minWidth: 120, - // sort: true, - // }); - // cols.push({ - // field: 'diskSize', - // title: '磁盘大小(GB)', - // align: 'center', - // minWidth: 120, - // sort: true, - // }); - // } - // if (resType == 'ALI_ARMS_APP') { - // cols.push({ - // field: 'createTimeStr', - // title: '创建时间', - // align: 'center', - // minWidth: 180, - // sort: true, - // }); - // cols.push({ - // field: 'updateTimeStr', - // title: '修改时间', - // align: 'center', - // minWidth: 180, - // sort: true, - // }); - // } - // if (resType == 'PASSWORD_SERVER') { - // cols.push({ - // field: 'pingStatus', - // title: 'PING状态', - // align: 'center', - // minWidth: 120, - // templet: '#domainpingTpl', - // sort: true, - // }); - // } - // } - // } var domainName = '', addr = ''; if (domainId.indexOf(',') > 0) { domainName = domainId.substring(0, domainId.indexOf(',')); @@ -677,7 +471,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' domainName: domainName, addr: addr, colonlyId: $("#domain_res_colony").val(), - parentId: $("#domain_res_cluster").val(), + parentId: parentId, linkState: $("#domainlink_state").val(), state: $("#domain_state").val(), resCategory: 'resources' @@ -810,213 +604,6 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' form.render(null, 'domain-list-form'); setOpenStow(); - // var cols = [{type: 'numbers', title: '序号', align: 'center', fixed: 'left'} - // , { - // field: 'resName', title: '资源名称', minWidth: 210, align: 'center', sort: true, - // templet: '<div><span data-zymc="{{ d.resId }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.admin }}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>' - // } - // , {field: 'ip', title: 'IP地址', minWidth: 150, align: 'center', sort: true} - // , {field: 'admin', title: '负责人', minWidth: 100, align: 'center', sort: true} - // , {field: 'resTypeName', title: '资源类型', minWidth: 150, align: 'center', sort: true} - // , { - // field: 'healthDesc', - // title: '健康状态', - // minWidth: 100, - // align: 'center', - // sort: true, - // templet: '#domainhealthTpl' - // }, { - // field: 'state', - // title: '资源状态', - // minWidth: 100, - // align: 'center', - // sort: true, - // templet:'#domainIndexResStateTpl' - // }]; - // // , { - // // field: 'state', - // // title: '连接状态', - // // minWidth: 100, - // // align: 'center', - // // templet: '#ljztDomainListTpl' - // // } - // if (resType && resType != 'PASSWORD_SERVER') { - // cols.push({ - // field: 'linkState', - // title: '连接状态', - // align: 'center', - // minWidth: 100, - // templet: '#ljztDomainListTpl', - // sort: true, - // }); - // } - // //数据库、中间件、动环相关不展示CPU使用率、内存使用率、防火墙、交换机 - // if (resType) { - // if(resType.indexOf("HOST") >-1){ - // cols.push({ - // field: 'fileSysUseRate', - // title: '最大文件系统使用率', - // align: 'center', - // minWidth: 200, - // templet: '#domainFileUseRateTpl', - // sort:true - // }); - // } - // //数据库、中间件、网络社保、动环相关不展示指标信息 - // if (resType.indexOf('MIDDLEWARE_') == -1 && resType.indexOf("GPDXT") == -1 && resType.indexOf("KQTJXT") == -1 - // && resType.indexOf("XFXT") == -1 && resType.indexOf("JFCDHJ") == -1 && resType.indexOf("DATABASE_") == -1 - // && resType.indexOf("STORAGE_") == '-1' && resType.indexOf("HUAWEI_CLOUD_COLONY") == -1 - // && resType.indexOf("HUAWEI_CLOUD_CLUSTER") == -1 && resType.indexOf("HOST_ONECOMPUTER") == -1 - // && resType.indexOf("VIRTUALIZATION_VMWARE_VHOST") == -1 && resType != 'ALI_CLOUD_SLB' && resType != 'ALI_CLOUD_OSS' && resType != 'ALI_ARMS_APP' && resType != 'PASSWORD_SERVER') { - // cols.push({ - // field: 'cpuRate', - // title: 'CPU使用率', - // align: 'center', - // minWidth: 120, - // templet: '#sllDomainListTpl', - // sort: true, - // }); - // cols.push({ - // field: 'memoryRate', - // title: '内存使用率', - // align: 'center', - // minWidth: 120, - // templet: '#ncDomainListTpl', - // sort: true, - // }); - // } else { - // //交换机、防火墙 - // // if (resType.indexOf("_SWITCHBOARD") != '-1' || resType.indexOf("_FIREWALL") != '-1') { - // // cols.push({ - // // field: 'cpuRate', - // // title: 'CPU平均使用率', - // // align: 'center', - // // minWidth: 120, - // // templet: '#cpupjDomainListTpl' - // // }); - // // cols.push({ - // // field: 'memoryRate', - // // title: '内存平均使用率', - // // align: 'center', - // // minWidth: 120, - // // templet: '#ncpjDomainListTpl' - // // }); - // // } - // //数据库 - // if (resType.indexOf("DATABASE") != -1) { - // cols.push({ - // field: 'cpuRate', - // title: '活动会话百分比', - // align: 'center', - // minWidth: 120, - // templet: '#hhDomainListTpl', - // sort: true, - // }); - // cols.push({ - // field: 'tableSpaceUseRate', - // title: '表空间使用率(最大)', - // align: 'center', - // minWidth: 180, - // templet: '#domainTableSpaceUseRateTpl', - // sort: true - // }); - // cols.push({ - // field: 'lockNum', - // title: '当前会话锁数量', - // align: 'center', - // minWidth: 120, - // sort: true - // }); - // } - // //华为云资源池与华为云集群 - // if (resType.indexOf('HUAWEI_CLOUD_COLONY') != -1 || resType.indexOf('HUAWEI_CLOUD_CLUSTER') != -1) { - // cols.push({field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: 120, templet: '#cpusetrateDomainListTpl'}); - // cols.push({field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: 120, templet: '#memsetrateDomainListTpl'}); - // if (resType.indexOf('HUAWEI_CLOUD_COLONY') != -1) { - // cols.push({field: 'storageSetRate', title: '存储分配率', align: 'center', minWidth: 120, templet: '#storagesetrateDomainListTpl'}); - // } - // } - // //vmware虚拟机 joke add 20200528 - // if (resType == 'VIRTUALIZATION_VMWARE_VHOST') { - // cols.push({ - // field: 'cpuRate', - // title: 'CPU使用率', - // align: 'center', - // minWidth: 120, - // templet: '#sllresListTpl', - // sort: true, - // }); - // cols.push({ - // field: 'memoryRate', - // title: '内存使用率', - // align: 'center', - // minWidth: 120, - // templet: '#ncresListTpl', - // sort: true, - // }); - // cols.push({ - // field: 'platform', - // title: '所属平台', - // align: 'center', - // minWidth: 120, - // sort: true, - // }); - // cols.push({ - // field: 'resRemark', - // title: '资源备注', - // align: 'center', - // minWidth: 120, - // sort: true, - // }); - // // cols.push({ - // // field: 'cpuSize', - // // title: 'CPU大小', - // // align: 'center', - // // minWidth: 120 - // // }); - // cols.push({ - // field: 'memorySize', - // title: '内存大小(GB)', - // align: 'center', - // minWidth: 120, - // sort: true, - // }); - // cols.push({ - // field: 'diskSize', - // title: '磁盘大小(GB)', - // align: 'center', - // minWidth: 120, - // sort: true, - // }); - // } - // if (resType == 'ALI_ARMS_APP') { - // cols.push({ - // field: 'createTimeStr', - // title: '创建时间', - // align: 'center', - // minWidth: 180, - // sort: true, - // }); - // cols.push({ - // field: 'updateTimeStr', - // title: '修改时间', - // align: 'center', - // minWidth: 180, - // sort: true, - // }); - // } - // if (resType == 'PASSWORD_SERVER') { - // cols.push({ - // field: 'pingStatus', - // title: 'PING状态', - // align: 'center', - // minWidth: 120, - // templet: '#domainpingTpl', - // sort: true, - // }); - // } - // } - // } var domainName = '', addr = ''; if (domainId.indexOf(',') > 0) { domainName = domainId.substring(0, domainId.indexOf(',')); @@ -1024,8 +611,13 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' } else { domainName = domainId.substring(1); } + let colResType = resType; + if (colResType == 'MIDDLEWARE_WEBLOGIC' && parentId == 'null') { + // 展示控制台的表头 + colResType = 'MIDDLEWARE_WEBLOGICCONSOLE' + } //渲染表格 - var cols = commonCols.resTypeCls[resType]; + var cols = commonCols.resTypeCls[colResType]; //获取配置的列 common.getTableCols({ domId: 'domainParentListTable', @@ -1049,7 +641,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' domainName: domainName, addr: addr, colonlyId: $("#domain_res_colony").val(), - parentId: $("#domain_res_cluster").val(), + parentId: parentId, linkState: $("#domainlink_state").val(), state: $("#domain_state").val(), resCategory: 'resources' @@ -1465,7 +1057,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' targetId = "domain_res_cluster"; $("#domain_res_cluster_id").show(); } else if ("MIDDLEWARE_WEBLOGIC" == resType) { - optons = "<option value=''>=所属控制台=</option>" + optons = "<option value=''>=服务列表=</option>" + optons += "<option value='null'>=控制台列表=</option>" searchType = "MIDDLEWARE_WEBLOGIC"; targetId = 'domain_res_cluster' $("#domain_res_cluster_id").show(); @@ -1512,6 +1105,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' }; if (searchType == 'MIDDLEWARE_WEBLOGIC') { conditon.parentId = 'null'; + conditon.parentType = 'parent'; } admin.req({ url: common.domainName + url, @@ -1523,6 +1117,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' }); } $('#' + targetId).html(optons); + $('#domain_res_cluster').val(parentId); form.render("select"); }) } @@ -1631,7 +1226,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'treeTable' resHealth: $("#domain_resStatus").val(), domainName: domainName, colonlyId: $("#domain_res_colony").val(), - parentId: $("#domain_res_cluster").val(), + parentId: parentId, sortKey: sortKey, addr: addr, state: $("#domain_state").val(), diff --git a/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/doc/index.js b/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/doc/index.js index f884a2a..47174c6 100644 --- a/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/doc/index.js +++ b/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/doc/index.js @@ -63,10 +63,9 @@ export default { // 查询绑定的文件列表 let params = { opsId: props.projectId, - personId: personId, - code: code ? code : props.treeNode.map.nodeType.code + personId: props.parentNode.id, + code: props.treeNode.map.nodeType.code } - proxy.$http.get('/api-web/bOpsFile/search', params, function (res) { if (res && res.code == 0 && res.data && res.data.length > 0) { @@ -91,7 +90,7 @@ export default { id: docIds.join(','), } proxy.$http.get('/api-web/bOpsFile/deleteSearch', param, function (res) { - + emit('callback',true); }) } @@ -108,8 +107,7 @@ export default { proxy.$http.post('/api-web/bOpsFile/fileSynchronization', params, function (res) { if (res && res.code == 0) { - // proxy.$global.showMsg(""); - console.log('执行回调成功', res) + emit('callback',true); } }); } diff --git a/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/ry/index.html b/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/ry/index.html index d18577d..c443c1f 100644 --- a/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/ry/index.html +++ b/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/ry/index.html @@ -1,7 +1,13 @@ <div> <div> <!-- 人员信息总汇--> - <el-divider content-position="left">人员信息汇总</el-divider> + <el-divider content-position="left"> + 人员信息汇总 + <el-tooltip placement="bottom-start" effect="light"> + <template #content> 人员信息统计规则:<br/> • 左侧树:只统计业务下在职运维人员<br/> •人员信息汇总:统计业务下所有运维人员 </template> + <i class="iconfont icon-tishi" style="color:rgb(30,159,255);"></i> + </el-tooltip> + </el-divider> <el-button :size="$global.elementConfig.size.button" @click="deleteUser()" style="float:right;margin-right: 6px;margin-bottom: 6px">删除 </el-button> @@ -31,7 +37,7 @@ :pageSize="pageSize" :parentNode="parentNode" :projectId="projectId" :treeNode="treeNode" @showPopout="showPopout" height="500" - v-bind:is="componentName"></component> + v-bind:is="componentName" @callback="refreshPage"></component> </div> </template> </cm-dialog> diff --git a/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/ry/index.js b/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/ry/index.js index 8efc725..37b1692 100644 --- a/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/ry/index.js +++ b/hg-monitor-web-base/src/main/resources/static/vue3/src/components/page/operationMaintenance/ry/index.js @@ -135,7 +135,8 @@ export default { docType.value = "THREE_PERSONAGE_NDA"; docTypeName.value = "入场资料"; props.parentNode.id = row.id; - // showDialog(true); + props.treeNode.map.nodeType.code ="THREE_PERSONAGE_NDA"; + showDialog(true); }, render: function (row) { if (row.personalSecrecyBook == "YES") { @@ -156,8 +157,8 @@ export default { docType.value = "THREE_MONTHLY_SUMMARY"; docTypeName.value = "月度总结"; props.parentNode.id = row.id; - - // showDialog(true); + props.treeNode.map.nodeType.code ="THREE_MONTHLY_SUMMARY"; + showDialog(true); }, render: function (row) { if (row.monthlySummary == "YES") { @@ -244,7 +245,9 @@ export default { }); } - + let refreshPage= () => { + getPage(); + } // 挂载完 Vue.onMounted(() => { getPage(); @@ -277,7 +280,8 @@ export default { deleteUser, showPopout, selectionChange, - id + id, + refreshPage } } } diff --git a/hg-monitor-web-qh/src/main/resources/static/vue3/src/views/operationMaintenance/index.js b/hg-monitor-web-qh/src/main/resources/static/vue3/src/views/operationMaintenance/index.js index 3d9fdeb..b0a9338 100644 --- a/hg-monitor-web-qh/src/main/resources/static/vue3/src/views/operationMaintenance/index.js +++ b/hg-monitor-web-qh/src/main/resources/static/vue3/src/views/operationMaintenance/index.js @@ -64,6 +64,7 @@ export default { proxy.$http.get("/api-web/bOpsProject/getTree", params, function (res) { if (res && res.data) { dataSource.value = res.data; + projectId.value = res.data[0].dataList[0].id; treeNode.value = res.data[0]; } else { proxy.$global.showMsg('暂无数据!'); @@ -110,7 +111,9 @@ export default { pageSize.value = 10; } getParent(dataSource.value, data.parentId); - projectId.value = data.map.nodeType.projectId; + if (data.level==1){ + projectId.value = data.map.nodeType.projectId; + } treeNode.value = data; componentName.value = comName; }