Authored by 王涛

Merge branch 'master' of http://192.168.1.136:82/monitor_v3/hg-monitor-web

 Conflicts:
	hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/res/resNameComponents/index.js
... ... @@ -2546,17 +2546,17 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
},
{field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'},
// {field: 'diskSize', title: '磁盘总大小', minWidth: 120, align: 'center'},
{field: 'fileSysUseRate', title: '文件系统使用率(最大)', align: 'center', minWidth: x_185, templet: '#fileUseRateTpl', sort: true},
{field: 'diskBusyRate', title: '磁盘繁忙率(最大)', minWidth: x_160, align: 'center', sort: true, templet: '<div>{{d.diskBusyRate}}%</div>'},
{field: 'cpuCores', title: '单个CPU核数', align: 'center', minWidth: x_140, sort: true, templet: '#cpuCoresTpl'},
{field: 'cpuNum', title: '主机CPU总核数', align: 'center', minWidth: x_150, sort: true, templet: '#cpuNumTpl'},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_120, templet: '#cpuRateTpl', sort: true},
// {field: 'fileSysUseRate', title: '文件系统使用率(最大)', align: 'center', minWidth: x_185, templet: '#fileUseRateTpl', sort: true},
// {field: 'diskBusyRate', title: '磁盘繁忙率(最大)', minWidth: x_160, align: 'center', sort: true, templet: '<div>{{d.diskBusyRate}}%</div>'},
// {field: 'cpuCores', title: '单个CPU核数', align: 'center', minWidth: x_140, sort: true, templet: '#cpuCoresTpl'},
// {field: 'cpuNum', title: '主机CPU总核数', align: 'center', minWidth: x_150, sort: true, templet: '#cpuNumTpl'},
// {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_120, templet: '#cpuRateTpl', sort: true},
{field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.memorySize}} GB</div>'},
{field: 'cacheUsed', title: '缓存总大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.cacheUsed}} GB</div>'},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_120, templet: '#memoryRateTpl', sort: true},
{field: 'vmmemoryUseRate', title: '虚拟内存使用率', align: 'center', minWidth: x_165, templet: '#vmmemoryRateTpl', sort: true},
{field: 'maxNetCardUpRate', title: '上行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardUpRate}} kb/s</div>'},
{field: 'maxNetCardDownRate', title: '下行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardDownRate}} kb/s</div>'},
// {field: 'cacheUsed', title: '缓存总大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.cacheUsed}} GB</div>'},
// {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_120, templet: '#memoryRateTpl', sort: true},
// {field: 'vmmemoryUseRate', title: '虚拟内存使用率', align: 'center', minWidth: x_165, templet: '#vmmemoryRateTpl', sort: true},
// {field: 'maxNetCardUpRate', title: '上行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardUpRate}} kb/s</div>'},
// {field: 'maxNetCardDownRate', title: '下行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardDownRate}} kb/s</div>'},
{field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true},
{field: 'linkState', title: '连接状态', align: 'center', minWidth: x_110, templet: '#linkStateTpl', sort: true},
{field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
... ... @@ -2572,17 +2572,17 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
},
{field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'},
// {field: 'diskSize', title: '磁盘总大小', minWidth: 120, align: 'center'},
{field: 'fileSysUseRate', title: '文件系统使用率(最大)', align: 'center', minWidth: x_185, templet: '#fileUseRateTpl', sort: true},
{field: 'diskBusyRate', title: '磁盘繁忙率(最大)', minWidth: x_160, align: 'center', sort: true, templet: '<div>{{d.diskBusyRate}}%</div>'},
{field: 'cpuCores', title: '单个CPU核数', align: 'center', minWidth: x_140, sort: true, templet: '#cpuCoresTpl'},
{field: 'cpuNum', title: '主机CPU总核数', align: 'center', minWidth: x_150, sort: true, templet: '#cpuNumTpl'},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_120, templet: '#cpuRateTpl', sort: true},
// {field: 'fileSysUseRate', title: '文件系统使用率(最大)', align: 'center', minWidth: x_185, templet: '#fileUseRateTpl', sort: true},
// {field: 'diskBusyRate', title: '磁盘繁忙率(最大)', minWidth: x_160, align: 'center', sort: true, templet: '<div>{{d.diskBusyRate}}%</div>'},
// {field: 'cpuCores', title: '单个CPU核数', align: 'center', minWidth: x_140, sort: true, templet: '#cpuCoresTpl'},
// {field: 'cpuNum', title: '主机CPU总核数', align: 'center', minWidth: x_150, sort: true, templet: '#cpuNumTpl'},
// {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_120, templet: '#cpuRateTpl', sort: true},
{field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.memorySize}} GB</div>'},
{field: 'cacheUsed', title: '缓存总大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.cacheUsed}} GB</div>'},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_120, templet: '#memoryRateTpl', sort: true},
{field: 'vmmemoryUseRate', title: '虚拟内存使用率', align: 'center', minWidth: x_165, templet: '#vmmemoryRateTpl', sort: true},
{field: 'maxNetCardUpRate', title: '上行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardUpRate}} kb/s</div>'},
{field: 'maxNetCardDownRate', title: '下行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardDownRate}} kb/s</div>'},
// {field: 'cacheUsed', title: '缓存总大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.cacheUsed}} GB</div>'},
// {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_120, templet: '#memoryRateTpl', sort: true},
// {field: 'vmmemoryUseRate', title: '虚拟内存使用率', align: 'center', minWidth: x_165, templet: '#vmmemoryRateTpl', sort: true},
// {field: 'maxNetCardUpRate', title: '上行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardUpRate}} kb/s</div>'},
// {field: 'maxNetCardDownRate', title: '下行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardDownRate}} kb/s</div>'},
{field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true},
{field: 'linkState', title: '连接状态', align: 'center', minWidth: x_110, templet: '#linkStateTpl', sort: true},
{field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
... ...
... ... @@ -74,6 +74,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
case 11:
return '告警消除'
break;
case 13:
return '合并通知'
break;
case 20:
return '巡检报表通知'
break;
... ...
... ... @@ -338,11 +338,11 @@ export default {
*/
let deleteDocument = (id, type) => {
let url = `/inspection-report/file/change`;
let url = `/inspection-report/file/change?status=0`;
let msg = "您确认将该文件放入回收站?";
if (props.isRecycle) {
msg = "您确认永久删除该文件?";
url = `/inspection-report/file/delete`;
url = `/inspection-report/file/delete?status=1`;
}
let info = [];
... ... @@ -416,7 +416,7 @@ export default {
proxy.$global.confirm("是否还原选择的文件?", function () {
proxy.$http.post(`/inspection-report/file/restore`, info, function (res) {
proxy.$http.post(`/inspection-report/file/restore?status=1`, info, function (res) {
if (res && res.code == 0) {
proxy.$global.showMsg('还原成功!');
if (props.isRecycle) {
... ... @@ -626,6 +626,7 @@ export default {
* 文件下载
*/
let downloadFile = () => {
let status = props.isRecycle?1:0;
let arr = getCheckedFile();
let info = [];
... ... @@ -642,7 +643,7 @@ export default {
fileName:fileNameData
}
proxy.$http.downloadFile('/inspection-report/file/download', params);
proxy.$http.downloadFile('/inspection-report/file/download?status=' + status, params);
}
/**
... ...
... ... @@ -64,9 +64,9 @@ export default {
'.jpeg',
'.jpg',
'.json',
'.mp2',
'.mp3',
'.mp4',
// '.mp2',
// '.mp3',
// '.mp4',
'.mpeg',
'.mpg',
'.mpp',
... ...
... ... @@ -125,6 +125,7 @@ export default {
var id = proxy.$global.getQueryVariable('configId') ;
let isSign = Vue.ref(id);//是否编辑 true为编辑,false为新增
let resTypeArr = Vue.ref([]);
let kpiTypeArr = Vue.ref([]);
let busTypeArr = Vue.ref([]);
... ... @@ -166,7 +167,6 @@ export default {
let getResType = (arr) => {
console.log(arr);
var types = arr.map(function (v) {
return v.id;
});
... ... @@ -174,7 +174,6 @@ export default {
loeadTable();
}
let getKpiType = (arr) => {
console.log(arr);
var types = arr.map(function (v) {
e
return v.kpiId;
... ... @@ -183,7 +182,6 @@ export default {
loeadTable();
}
let getBizType = (arr) => {
console.log(arr);
var types = arr.map(function (v) {
return v.busId;
});
... ... @@ -208,13 +206,14 @@ export default {
// if (!reload && tabFirstList.value.length > 0) {
// return false;
// }
proxy.$http.get(`/api-web/ContrastAnalysis/added`, getParams(), function (res) {
if (res && res.success) {
proxy.countFirst = res.count;
tabFirstList.value = res.data;
}
});
if(isSign.value){//true为编辑,false为新增
proxy.$http.get(`/api-web/ContrastAnalysis/added`, getParams(), function (res) {
if (res && res.success) {
proxy.countFirst = res.count;
tabFirstList.value = res.data;
}
});
}
}
let loadSecondList = (reload) => {
... ... @@ -268,8 +267,7 @@ export default {
let addRes = (row, index) => {
tabFirstList.value.push(row);
activeName.value = 'first'
//proxy.$global.showMsg("添加成功!");
proxy.$global.showMsg("添加成功!");
// 加载折线图
getChartData();
... ...
... ... @@ -1494,13 +1494,13 @@ export default {
Vue.onMounted(() => {
})
const goDetail=(item)=>{
proxy.allowClickData.map((itemName,index)=>{
if(item.name==itemName){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy.isDetailShow=true;
console.log("detail",item)
proxy.detailData=item;
}
})
// }
// })
}
... ...
... ... @@ -263,12 +263,12 @@ export default {
})
const goDetail=(item)=>{
proxy.allowClickData.map((itemName,index)=>{
if(item.name==itemName){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy.isDetailShow=true;
proxy.detailData=item;
}
})
// }
// })
}
return{
... ...
... ... @@ -313,12 +313,12 @@ export default {
})
const goDetail=(item)=>{
proxy.allowClickData.map((itemName,index)=>{
if(item.name==itemName){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy.isDetailShow=true;
proxy.detailData=item;
}
})
// }
// })
}
return{
... ...
... ... @@ -12,7 +12,7 @@
<div class='img-serve' >
<img src="/vue3/src/assets/images/machineRoom/icon-state.png" alt="" class='state'>
<div class='img-serve-text'>{{item.name}}</div>
<div class='img-serve-text'>{{item.provider}}</div>
<div class='lamp'>
<img src="/vue3/src/assets/images/machineRoom/icon-weblogical.png" alt="" class='img-weblog'>
<div class='img-lamp'>
... ... @@ -54,7 +54,7 @@
<p>品 牌:{{deviceDataInfo.brandName}}</p>
<p>型 号:{{deviceDataInfo.model}}</p>
<p>序 列 号:{{deviceDataInfo.serialNumber}}</p>
<p>业 务 IP:{{deviceDataInfo.ServiceIP}}</p>
<p>业 务 IP:{{deviceDataInfo.ip}}</p>
<p>用 途:{{deviceDataInfo.purpose}}</p>
</div>
</div>
... ...
... ... @@ -16,23 +16,23 @@ export default {
deviceDataInfo:'',//设备详细信息
deviceDatas: [
{
name:'E12',
name:'E12',//机柜名称
cabinetCapacity :'42U',
deviceData:[
cabinetCapacity :'42U',//机柜总U位数-目前都是42U
deviceData:[//机柜所有的服务器
{
name:'物理服务器',
resName:'管理决策二包(数据集市39)',
brandName:'浪潮',
model:'TS860',
serialNumber:'216365930',
ServiceIP:'80.12.73.39',
purpose:'管理决策二包使用',
uPosition:'1-8U',
name:'物理服务器',//服务器名称
resName:'管理决策二包(数据集市39)',//服务器资源名称
brandName:'浪潮',//品牌
model:'TS860',//型号
serialNumber:'216365930',//序列号
ServiceIP:'80.12.73.39',//业务ip
purpose:'管理决策二包使用',//用途
uPosition:'1-8U',//U位
}
],
deviceNum:'1',
alarmNum:'0'
deviceNum:'1',//设备数量
alarmNum:'0'//警告量
},
{
name:'E13',
... ... @@ -168,37 +168,67 @@ export default {
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
const isShowDevice=Vue.ref(false);
const theirRoom=Vue.ref('');//机房名称
const CabinetNum=props.detailData.name;//机柜编号
// 挂载完
Vue.onMounted(() => {
if(props.machineData.name.indexOf('huzhou')!=-1){
proxy.isCenter=true;
proxy.theirRoom='湖州灾备';
}else{
proxy.isCenter=false;
proxy.theirRoom='兴议机房';
}
proxy.getDeviceInfo();
proxy.getData();
// proxy.getDeviceInfo();
})
const getData=()=>{
let parmas={
theirRoom:proxy.theirRoom,
theirCabinet:CabinetNum
}
$.get(proxy.domainName+'/api-web/v32/res/cabinet?access_token='+proxy.accessToken,parmas,function (res){
console.log("res1",res)
if(res){
let resData=res.data;
let deviceDatas=[];
deviceDatas.push({
name:CabinetNum,//机柜名称
cabinetCapacity :'42U',//机柜总U位数-目前都是42U
deviceNum:resData.length,//设备数量
alarmNum:'0',//警告量
deviceData:resData
})
proxy.deviceDatas=deviceDatas;
console.log("devdats",proxy.deviceDatas)
proxy.getDeviceInfo()
}
})
}
const getDeviceInfo=()=>{
proxy.deviceDatas.map((item,index)=>{
if(CabinetNum==item.name){
proxy.infoData=item;
proxy.serviceData=item.deviceData
item.deviceData.map((itemD,indexD)=>{
let strArr=itemD.uPosition.split("U");//[0]1-4 [1]U
let leftStrArr=strArr[0].split('-');//[0]1 [1]4
let leftStr=leftStrArr[0];
let rightStr=leftStrArr[1];
// let strArr=itemD.uPosition.split("U");//[0]1-4 [1]U
// let leftStrArr=strArr[0].split('-');//[0]1 [1]4
let leftStr=itemD.startU;//leftStrArr[0];
let rightStr=itemD.endU;//leftStrArr[1];
itemD.serviceHeight=rightStr;//nU的设备
let serveNum=1;
if(leftStr==1){
serveNum=rightStr
}else{
serveNum=rightStr-leftStr;
// if(leftStr==1){
// serveNum=rightStr
// }else{
serveNum=rightStr-leftStr+1;
}
// }
itemD.serviceClass='img-serve-'+serveNum;//设备的css的class
itemD.uClass='';
if(leftStr>1){
... ... @@ -219,7 +249,9 @@ export default {
return{
showDevice,
isShowDevice,
getDeviceInfo
getDeviceInfo,
getData,
theirRoom
}
}
}
\ No newline at end of file
... ...
... ... @@ -26,7 +26,7 @@ export default {
detailData:'',//详情数据
htmlName:'xiaoshansecond',
machineData:this.src,
allowClickData:['E12','E13'],//允许进入详情的机柜
allowClickData:['E12','E13','F14'],//允许进入详情的机柜
tableData:[
[
... ... @@ -477,12 +477,12 @@ export default {
})
const goDetail=(item)=>{
proxy.allowClickData.map((itemName,index)=>{
if(item.name==itemName){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy.isDetailShow=true;
proxy.detailData=item;
}
})
// }
// })
}
return{
... ...
... ... @@ -1082,12 +1082,12 @@ export default {
})
const goDetail=(item)=>{
proxy.allowClickData.map((itemName,index)=>{
if(item.name==itemName){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy.isDetailShow=true;
proxy.detailData=item;
}
})
// }
// })
}
return{
... ...
... ... @@ -621,12 +621,12 @@ export default {
})
const goDetail=(item)=>{
proxy.allowClickData.map((itemName,index)=>{
if(item.name==itemName){
// proxy.allowClickData.map((itemName,index)=>{
// if(item.name==itemName){
proxy.isDetailShow=true;
proxy.detailData=item;
}
})
// }
// })
}
return{
... ...