...
|
...
|
@@ -12,43 +12,153 @@ export default { |
|
|
domainName:sessionStorage.getItem('domainName'),
|
|
|
accessToken:localStorage.getItem('access_token'),
|
|
|
isCenter:false,//是否居中--true代表湖州机房,false代表萧山机房
|
|
|
serviceData:[],//服务器数据
|
|
|
deviceData: [
|
|
|
serviceData:[],//机柜的服务器数据
|
|
|
deviceDataInfo:'',//设备详细信息
|
|
|
deviceDatas: [
|
|
|
{
|
|
|
name:'E12',
|
|
|
|
|
|
cabinetCapacity :'42U',
|
|
|
deviceData:[
|
|
|
{
|
|
|
name:'物理服务器',
|
|
|
resName:'管理决策二包(数据集市39)',
|
|
|
brandName:'浪潮',
|
|
|
model:'TS860',
|
|
|
serialNumber:'216365930',
|
|
|
ServiceIP:'80.12.73.39',
|
|
|
purpose:'管理决策二包使用',
|
|
|
cabinetCapacity :'8U',
|
|
|
uPosition:'1-8U',
|
|
|
}
|
|
|
],
|
|
|
deviceNum:'1',
|
|
|
alarmNum:'0'
|
|
|
},
|
|
|
{
|
|
|
name:'E13',
|
|
|
cabinetCapacity :'42U',
|
|
|
deviceData:[
|
|
|
{
|
|
|
name:'物理服务器',
|
|
|
resName:'管理决策二包(数据集市38)',
|
|
|
brandName:'浪潮',
|
|
|
model:'TS860',
|
|
|
serialNumber:'216365928',
|
|
|
ServiceIP:'80.12.73.38',
|
|
|
purpose:'管理决策二包使用',
|
|
|
cabinetCapacity :'8U',
|
|
|
uPosition:'1-8U',
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
deviceNum:'1',
|
|
|
alarmNum:'0'
|
|
|
},
|
|
|
{
|
|
|
name:'FB-3',
|
|
|
deviceData:[
|
|
|
{
|
|
|
name:'物理服务器1',
|
|
|
resName:'1',
|
|
|
brandName:'浪潮',
|
|
|
model:'TS860',
|
|
|
serialNumber:'',
|
|
|
ServiceIP:'',
|
|
|
purpose:'管理决策二包使用',
|
|
|
uPosition:'1-1U',
|
|
|
|
|
|
},
|
|
|
{
|
|
|
name:'物理服务器2',
|
|
|
resName:'2',
|
|
|
brandName:'浪潮',
|
|
|
model:'TS860',
|
|
|
serialNumber:'',
|
|
|
ServiceIP:'',
|
|
|
purpose:'管理决策二包使用',
|
|
|
uPosition:'5-7U',
|
|
|
|
|
|
},
|
|
|
{
|
|
|
name:'物理服务器3',
|
|
|
resName:'3',
|
|
|
brandName:'浪潮',
|
|
|
model:'TS860',
|
|
|
serialNumber:'',
|
|
|
ServiceIP:'',
|
|
|
purpose:'管理决策二包使用',
|
|
|
uPosition:'10-16U',
|
|
|
|
|
|
},
|
|
|
{
|
|
|
name:'物理服务器3',
|
|
|
resName:'3',
|
|
|
brandName:'浪潮',
|
|
|
model:'TS860',
|
|
|
serialNumber:'',
|
|
|
ServiceIP:'',
|
|
|
purpose:'管理决策二包使用',
|
|
|
uPosition:'17-25U',
|
|
|
|
|
|
},
|
|
|
{
|
|
|
name:'物理服务器5',
|
|
|
resName:'5',
|
|
|
brandName:'浪潮',
|
|
|
model:'TS860',
|
|
|
serialNumber:'',
|
|
|
ServiceIP:'',
|
|
|
purpose:'管理决策二包使用',
|
|
|
uPosition:'26-30U',
|
|
|
|
|
|
},
|
|
|
{
|
|
|
name:'物理服务器10',
|
|
|
resName:'5',
|
|
|
brandName:'浪潮',
|
|
|
model:'TS860',
|
|
|
serialNumber:'',
|
|
|
ServiceIP:'',
|
|
|
purpose:'管理决策二包使用',
|
|
|
uPosition:'31-41U',
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
deviceNum:'3',
|
|
|
cabinetCapacity :'4U',
|
|
|
cabinetCapacity :'42U',
|
|
|
},
|
|
|
{
|
|
|
name:'FB-4',
|
|
|
deviceData:[
|
|
|
{
|
|
|
name:'物理服务器',
|
|
|
resName:'',
|
|
|
brandName:'浪潮',
|
|
|
model:'TS860',
|
|
|
serialNumber:'',
|
|
|
ServiceIP:'',
|
|
|
purpose:'管理决策二包使用',
|
|
|
uPosition:'1-4U',
|
|
|
|
|
|
},
|
|
|
{
|
|
|
name:'物理服务器',
|
|
|
resName:'23',
|
|
|
brandName:'浪潮',
|
|
|
model:'TS860',
|
|
|
serialNumber:'',
|
|
|
ServiceIP:'',
|
|
|
purpose:'管理决策二包使用',
|
|
|
uPosition:'6-16U',
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
deviceNum:'1',
|
|
|
cabinetCapacity :'4U',
|
|
|
cabinetCapacity :'42U',
|
|
|
},
|
|
|
],//设备信息
|
|
|
],//服务器设备信息
|
|
|
infoData:'',//设备详细信息
|
|
|
// isShowDevice:false,//是否显示设备信息
|
|
|
|
...
|
...
|
@@ -72,25 +182,38 @@ export default { |
|
|
|
|
|
})
|
|
|
const getDeviceInfo=()=>{
|
|
|
proxy.deviceData.map((item,index)=>{
|
|
|
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];
|
|
|
itemD.serviceHeight=rightStr;//nU的设备
|
|
|
let serveNum=1;
|
|
|
if(leftStr==1){
|
|
|
serveNum=rightStr
|
|
|
}else{
|
|
|
serveNum=rightStr-leftStr;
|
|
|
|
|
|
}
|
|
|
itemD.serviceClass='img-serve-'+serveNum;//设备的css的class
|
|
|
itemD.uClass='';
|
|
|
if(leftStr>1){
|
|
|
let bottom=(leftStr-1)*17;
|
|
|
itemD.uClass='bottom:'+bottom+'px';
|
|
|
|
|
|
}
|
|
|
})
|
|
|
for(let i=0;i<proxy.infoData.deviceNum;i++){
|
|
|
proxy.serviceData.push({
|
|
|
name:'物理服务器'
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
|
|
|
}
|
|
|
const showDevice=()=>{
|
|
|
console.log("iscenter",proxy.isCenter)
|
|
|
if(!proxy.isCenter){
|
|
|
console.log("lalala")
|
|
|
const showDevice=(item)=>{
|
|
|
proxy.isShowDevice=true;
|
|
|
}
|
|
|
|
|
|
proxy.deviceDataInfo=item;
|
|
|
}
|
|
|
|
|
|
return{
|
...
|
...
|
|