...
|
...
|
@@ -14,46 +14,6 @@ export default { |
|
|
jfdata:'',
|
|
|
dialogMachineName:'',
|
|
|
commandNameData:'',
|
|
|
commandNameDataH:[
|
|
|
{
|
|
|
name:'湖州灾备机房一',
|
|
|
htmlName:'huzhouzaibeione',
|
|
|
val:'one'
|
|
|
},
|
|
|
{
|
|
|
name:'湖州灾备机房二',
|
|
|
htmlName:'huzhouzaibeitwo',
|
|
|
val:'two'
|
|
|
},
|
|
|
{
|
|
|
name:'湖州灾备机房三',
|
|
|
htmlName:'huzhouzaibeithree',
|
|
|
val:'three'
|
|
|
}
|
|
|
],//机房布局html数据
|
|
|
commandNameDataX:[
|
|
|
{
|
|
|
name:'萧山IDC二号机房',
|
|
|
htmlName:'xiaoshansecond',
|
|
|
val:'one'
|
|
|
},
|
|
|
{
|
|
|
name:'萧山IDC三号机房',
|
|
|
htmlName:'xiaoshanthird',
|
|
|
val:'two'
|
|
|
},
|
|
|
{
|
|
|
name:'萧山IDC七号机房',
|
|
|
htmlName:'xiaoshanseven',
|
|
|
val:'three'
|
|
|
}
|
|
|
// {
|
|
|
// name:'兴议二号机房',
|
|
|
// htmlName:'xiaoshansecond',
|
|
|
// val:'one'
|
|
|
// }
|
|
|
],
|
|
|
commandName:'',//下拉选择默认显示名称
|
|
|
htmlName:'',//机房组件名称-html名称
|
|
|
commandVal:'',//下拉选择选中值
|
|
|
src:'',//机房布局html地址
|
...
|
...
|
@@ -63,7 +23,6 @@ export default { |
|
|
const {proxy} = Vue.getCurrentInstance();
|
|
|
proxy.htmlName=Vue.ref();
|
|
|
proxy.commandVal=Vue.ref()
|
|
|
proxy.commandName=Vue.ref();
|
|
|
proxy.src=Vue.ref();
|
|
|
|
|
|
// 挂载完
|
...
|
...
|
@@ -71,22 +30,7 @@ export default { |
|
|
$.get(proxy.domainName +proxy.apiUrl+'?access_token='+localStorage.getItem('access_token'),function (res) {
|
|
|
if(res.data){
|
|
|
proxy.jfdata=res.data;
|
|
|
/* const html = $("#sjzx_machineroom_id_Tmpl").render(res.data);
|
|
|
$("#sjzx_machineroom_id").html(html);
|
|
|
//机房点击事件
|
|
|
$(".sjzx_machineroom").on("click",function () {
|
|
|
const name = $(this).attr("name");
|
|
|
layer.open({
|
|
|
type:2
|
|
|
, shade: 0.6 //遮罩透明度
|
|
|
, maxmin: false //允许全屏最小化
|
|
|
, anim: 1 //0-6的动画形式,-1不开启
|
|
|
, content:['http://127.0.0.1:8081/video.html?type='+name+'','no']
|
|
|
, area:["1100px",'720px']
|
|
|
// , title: true //不显示标题栏
|
|
|
// , title: name
|
|
|
})
|
|
|
});*/
|
|
|
|
|
|
}
|
|
|
})
|
|
|
|
...
|
...
|
@@ -98,12 +42,7 @@ export default { |
|
|
const isShowOuter=(item)=>{
|
|
|
proxy.dialogMachineName=item.machineRoomName;
|
|
|
proxy.outerVisible = true;
|
|
|
if(item.layout == 0){
|
|
|
proxy.commandNameData=proxy.commandNameDataH;//湖州机房布局数据
|
|
|
}else{
|
|
|
proxy.commandNameData=proxy.commandNameDataX;//兴议机房布局数据
|
|
|
|
|
|
}
|
|
|
proxy.getData(item);
|
|
|
}
|
|
|
//关闭弹框时清空数据
|
|
|
const closeDialog=()=>{
|
...
|
...
|
@@ -111,13 +50,38 @@ export default { |
|
|
|
|
|
}
|
|
|
|
|
|
/*获取机房数据
|
|
|
* */
|
|
|
let roomSecondData=Vue.ref([]);//兴议或者湖州下层机房数据
|
|
|
const getData=(roomRow)=>{
|
|
|
proxy.$http.get('/api-web/machineroom/list',{},function (res){
|
|
|
if(res && res.data){
|
|
|
let roomSecondDataArr=res.data;
|
|
|
let roomSecondData=[];
|
|
|
|
|
|
roomSecondDataArr.map((item,index)=>{
|
|
|
if(item.parentId!='0' && roomRow.machineRoomId==item.parentId){
|
|
|
roomSecondData.push(item)
|
|
|
}
|
|
|
})
|
|
|
proxy.roomSecondData=roomSecondData;
|
|
|
|
|
|
proxy.commandNameData=proxy.roomSecondData;//机房布局数据
|
|
|
|
|
|
console.log("下层机房数据",proxy.roomSecondData)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
return{
|
|
|
centerDialogVisible: Vue.ref(false),
|
|
|
outerVisible: Vue.ref(false),
|
|
|
innerVisible: Vue.ref(false),
|
|
|
isShowOuter,
|
|
|
isShow,
|
|
|
closeDialog
|
|
|
closeDialog,
|
|
|
roomSecondData,
|
|
|
getData
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
|