Authored by XuHaoJie

Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-V32-XuHaoJie

Showing 23 changed files with 117 additions and 173 deletions
... ... @@ -76,7 +76,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
});
//绑定业务下拉选择数据
admin.req({
url: domainName + '/api-web/home/business/findAllBusType',
url: domainName + '/api-web/home/business/findUserBusTypeAll?table=b_alarm',
success: function (response) {
if (response && response.success) {
busTypeList = response.data;
... ... @@ -102,7 +102,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
show: true,
list: ['ALL', 'REVERSE', 'CLEAR']
},
height: 'auto',
height: '170px',
tree: {
show: true,
showFolderIcon: true,
... ...
... ... @@ -55,7 +55,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
//绑定业务下拉选择数据
admin.req({
url: domainName + '/api-web/home/business/findAllBusType',
url: domainName + '/api-web/home/business/findUserBusTypeAll?table=b_alarm_his',
success: function (response) {
if (response && response.success) {
busTypeList = response.data;
... ... @@ -80,7 +80,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
show: true,
list: ['ALL', 'REVERSE', 'CLEAR']
},
height: 'auto',
height: '170px',
tree: {
show: true,
showFolderIcon: true,
... ...
... ... @@ -30,7 +30,7 @@ layui.define(['laytpl', 'layer'], function(exports){
//加载中
view.loading = function(elem){
elem.append(
this.elemLoad = $('<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon layui-icon-loading layadmin-loading"></i>')
this.elemLoad = $('<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon layadmin-loading"></i>')
);
};
... ...
... ... @@ -4,7 +4,7 @@
@Author:贤心
@Site:http://www.layui.com/admin/
@License:LPPL
*/
html #layuicss-layuiAdmin {
... ... @@ -174,21 +174,21 @@ html {
/* 重置表格风格 */
/*
.layui-table th,
.layui-table td,
.layui-table th,
.layui-table td,
.layui-table[lay-skin="line"],
.layui-table[lay-skin="row"],
.layui-table-view,
.layui-table[lay-skin="row"],
.layui-table-view,
.layui-table-header,
.layui-table-tool,
.layui-table-page,
.layui-table-fixed-r,
.layui-table-tips-main{border-color: #f6f6f6;}
.layui-table thead tr,
.layui-table-header,
.layui-table thead tr,
.layui-table-header,
.layui-table-tool,
.layui-table-patch,
.layui-table-patch,
.layui-table-mend{background-color: #fff;}
.layui-table[lay-even] tr:nth-child(even),
... ... @@ -237,6 +237,10 @@ html {
margin: -16px -15px;
font-size: 30px;
color: #c2c2c2;
background: url(/start/layui/css/modules/layer/default/loading-mj.png) no-repeat center;
background-size: 100% 100%;
width: 70px;
height: 70px;
}
.layadmin-fixed {
... ... @@ -759,9 +763,9 @@ html {
}
/*
格局
*/
.layui-fluid {
... ... @@ -803,9 +807,9 @@ html {
}
/*
控制台
*/
/* 重置轮播样式 */
... ... @@ -1040,9 +1044,9 @@ html {
}
/********************************
其它主页开始 By star1029
*******************************/
/* 主页示例一 by star1029 */
... ... @@ -1291,7 +1295,7 @@ html {
/*
应用
*/
/* 消息中心 */
... ... @@ -1330,9 +1334,9 @@ html {
}
/*
系统
*/
/* 头部图标重置 */
... ...
... ... @@ -63,7 +63,7 @@ export default {
let hideElDialog = () =>{
emit('hidedialog');
emit('hidedialog',false);
}
let okFunc = () =>{
... ...
... ... @@ -17,13 +17,13 @@
{{node.label }}
</div>
<div v-if="isAdmin()" :style="{'width':isAdmin()?'60px':'0px'}">
<a @click="editType(data)" style="margin-right: 10px;">
<a @click="editType(data)" v-if="!data.root" style="margin-right: 10px;">
<i class="el-icon-edit"></i>
</a>
<a @click="showFolder(true,false,node) " style="margin-right: 10px;">
<i class="el-icon-plus"></i>
</a>
<a @click="deleteDocument(data.id,'folder')">
<a @click="deleteDocument(data.id,'folder')" v-if="!data.root">
<i class="el-icon-delete"></i>
</a>
</div>
... ... @@ -164,7 +164,7 @@
</el-col>
</el-row>
<cm-dialog :title="addDialogTitle" width="500px" :showDialogVisible="addDialogVisible" :showFooter="false">
<cm-dialog :title="addDialogTitle" width="500px" :showDialogVisible="addDialogVisible" @hidedialog="showFolder" :showFooter="false">
<template v-slot>
<el-form
label-width="120px"
... ...
... ... @@ -246,11 +246,16 @@ export default {
// // 加载第一个节点数据
// getPage(first.id);
let root = {
id: '0',
name: '文档管理',
root:'root',
children: res.data
}
if(props.isRecycle){
root.name = '文档回收站';
}
defaultExpandedKeys.value = [root.id];
addHistoryNode(root);
... ... @@ -481,12 +486,12 @@ export default {
sort: 100
});
let showFolder = (flg, isUser,node) => {
addDialogVisible.value = flg;
let title="";
if(node){
currentNodeData.value = node.data;
title =`修改树节点“${currentNodeData.value.name}“子文件夹`;
}
docForm.value = {
id:'',
name: '',
... ... @@ -494,10 +499,11 @@ export default {
type: '',
sort: 100
};
isUserFolder.value = isUser;
addDialogVisible.value = flg;
if(isUser != undefined){
isUserFolder.value = isUser;
}
if (addDialogVisible.value) {
if (addDialogVisible.value != undefined) {
title = `新建自定义文件夹`;
}
addDialogTitle.value = title
... ...
... ... @@ -90,7 +90,7 @@
<dl class="layui-nav-child">
<!--调整到刷新旁边,此处去掉 lu 屏蔽 20211130-->
<!-- <dd layadmin-event="toBigScreen" style="text-align: left;"><a><img src="/src/style/img/icon-daping.png" style="width: 16px;height: 16px">&nbsp;&nbsp;大屏</a></dd>-->
<dd layadmin-event="toDZSWJScreen" style="text-align: left;"><a><img src="/src/style/img/icon-dianzishuiwuju.png" style="width: 16px;height: 16px">&nbsp;&nbsp;电子税务大屏</a></dd>
<dd layadmin-event="toDZSWJScreen" style="text-align: left;"><a><img src="/src/style/img/icon-dianzishuiwuju.png" style="width: 16px;height: 16px">&nbsp;&nbsp;电子税务大屏</a></dd>
<!--调整到首页旁边,此处去掉 joke 屏蔽 20211129-->
<!-- <dd layadmin-event="toYTHViewScreen" style="text-align: left;"><a><img src="/src/style/img/icon-yitihuadaping.png" style="width: 16px;height: 16px">&nbsp;&nbsp;一体化视图</a></dd>-->
<dd layadmin-event="toBiZhEalZhSYS" style="text-align: left;"><a><img src="/src/style/img/icon-YWJKD.png" style="width: 16px;height: 16px">&nbsp;&nbsp;业务健康度</a></dd>
... ...
... ... @@ -3,9 +3,11 @@
{{textString}}
</span>
<cm-dialog title="收藏" width="500px" :showDialogVisible="dialogFlg" @hidedialog="showMachineRoomDialog">
<cm-dialog title="机房布局" :showFooter="false" :showDialogVisible="dialogFlg" @hidedialog="showMachineRoomDialog">
<template v-slot>
<GetMachineRoom v-if="commandNameData" :commandNameData="commandNameData"></GetMachineRoom>
<div style="overflow: auto">
<GetMachineRoom v-if="commandNameData" :commandNameData="commandNameData"></GetMachineRoom>
</div>
</template>
</cm-dialog>
... ...
... ... @@ -3,9 +3,9 @@
{{textString}}
</span>
<cm-dialog title="收藏" width="500px" :showDialogVisible="dialogFlg" @hidedialog="showMachineRoomDialog">
<cm-dialog title="机柜" :showFooter="false" :showDialogVisible="dialogFlg" @hidedialog="showMachineRoomDialog">
<template v-slot>
<GetMachineRoom v-if="commandNameData" :commandNameData="commandNameData"></GetMachineRoom>
<machineRoomDetail v-if="isDetailShow" :detailData="detailData" :machineData="machineData"></machineRoomDetail>
</template>
</cm-dialog>
... ...
... ... @@ -2,8 +2,8 @@ export default {
name: 'machineRoomDetailComponents',
template: '',
components: {
'GetMachineRoom': Vue.defineAsyncComponent(
() => myImport('views/commonComponents/getMachineRoom/index')
'machineRoomDetail': Vue.defineAsyncComponent(
() => myImport('views/commonComponents/machineRoomDetail/index')
),
},
props: {
... ...
<div class="machine-room">
<div class="room-top">
<el-tabs type="card" @tab-click="handleCommand" v-model="commandVal">
<el-tab-pane v-for="item in commandNameData" :label="item.name" :name="item.val"></el-tab-pane>
<el-tab-pane v-for="item in commandNameData" :label="item.machineRoomName" :name="item.machineRoomCode"></el-tab-pane>
</el-tabs>
<!--<el-dropdown @command="handleCommand" class="elSelf" :popper-append-to-body="false">
<span class="el-dropdown-link">
{{commandName}}
<i class="icon-arrow"></i>
</span>
<template #dropdown>
<el-dropdown-menu class="cpuDropdown">
<el-dropdown-item v-for="item in commandNameData" :command="item.val">{{item.name}}</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>-->
</div>
<div class="room-html">
<el-row>
<el-col class="video-item" :span="24" >
<MachineRoom v-if="src" :src="src" ref="machineRoom" ></MachineRoom>
<MachineRoom v-if="src" :src="src" :commandNameDataItem="commandNameDataItem" ref="machineRoom" ></MachineRoom>
</el-col>
</el-row>
</div>
... ...
... ... @@ -22,7 +22,7 @@ export default {
return {
domainName:sessionStorage.getItem('domainName'),
accessToken:localStorage.getItem('access_token'),
commandName:'',//下拉选择默认显示名称
// commandName:'',//下拉选择默认显示名称
htmlName:'',//机房组件名称-html名称
commandVal:'',//下拉选择选中值
src:'',//机房布局html地址
... ... @@ -34,30 +34,34 @@ export default {
const {proxy} = Vue.getCurrentInstance();
proxy.htmlName=Vue.ref();
proxy.commandVal=Vue.ref()
proxy.commandName=Vue.ref();
// proxy.commandName=Vue.ref();
proxy.src=Vue.ref();
const commandNameDataItem=Vue.ref();
const allComponents=Vue.ref();
// 获取状态
const { changeIndex} = indirectManage()
// 挂载完
Vue.onMounted(() => {
proxy.commandVal='one';
proxy.commandVal=props.commandNameData[0].machineRoomCode;
proxy.getMachine(proxy.commandVal);
})
//初始获取默认机房选择信息
const getMachine=(command)=>{
//commandNameData机房机柜数据
let allComponent=[];
props.commandNameData.map((item,index)=>{
if(command==item.val){
proxy.htmlName=item.htmlName;
proxy.commandName=item.name;
proxy.commandVal=item.val;
if(command==item.machineRoomCode){
// proxy.htmlName=item.htmlName;
// proxy.commandName=item.name;
proxy.commandVal=item.machineRoomCode;
proxy.commandNameDataItem=item;
}
})
// proxy.src='/h5/machineroom/'+proxy.htmlName+'.html?access_token='+proxy.accessToken+'&changeIndex='+proxy.changeIndex
//根据htmlName确定引入的机房
proxy.src=proxy.htmlName
proxy.src=proxy.commandVal
}
const handleCommand=(command,event)=>{
... ... @@ -70,7 +74,9 @@ export default {
return{
getMachine,
handleCommand
handleCommand,
commandNameDataItem,
allComponents
}
}
}
\ No newline at end of file
... ...
<!--<iframe v-if="src" style="width:90%;height:720px;" :src="src" frameborder="0" ref="machineIframe" ></iframe>-->
<HuzhouOne v-if="showNum==1" :src="machineData"></HuzhouOne>
<HuzhouTwo v-if="showNum==2" :src="machineData"></HuzhouTwo>
<HuzhouThree v-if="showNum==3" :src="machineData"></HuzhouThree>
<Xiaoshansecond v-if="showNum==4" :src="machineData"></Xiaoshansecond>
<Xiaoshanthird v-if="showNum==5" :src="machineData"></Xiaoshanthird>
<Xiaoshanseven v-if="showNum==6" :src="machineData"></Xiaoshanseven>
<component :is="srcName" :src="machineData" />
\ No newline at end of file
... ...
... ... @@ -19,23 +19,16 @@ export default {
),
'Xiaoshanseven': Vue.defineAsyncComponent(
() => myImport('views/commonComponents/xiaoshanseven/index')
),
)
},
props:['src'],
props:['src','commandNameDataItem'],
data(){
return {
domainName:sessionStorage.getItem('domainName'),
accessToken:localStorage.getItem('access_token'),
isDetailShow:false,//详情页
// changeIndexNav:this.changeIndex,//nav是否点击变化
htmmlNameData:[
{name:'huzhouzaibeione',val:'湖州灾备机房一'},
{name:'huzhouzaibeitwo',val:'湖州灾备机房二'},
{name:'huzhouzaibeithree',val:'湖州灾备机房三'},
{name:'xiaoshansecond',val:'萧山IDC二号机房'},
{name:'xiaoshanthird',val:'萧山IDC三号机房'},
{name:'xiaoshanseven',val:'萧山IDC七号机房'},
],
srcName:this.src,
machineData:'',//机房信息数据
// src:'/h5/machineroom/huzhouzaibeione.html?access_token='+this.accessToken
... ... @@ -54,27 +47,24 @@ export default {
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
const showNum=Vue.ref()
const componentName=Vue.ref();
// 挂载完
Vue.onMounted(() => {
proxy.getName();
})
const getName=()=>{
proxy.htmmlNameData.map((item,index)=>{
if(proxy.srcName==item.name){
proxy.showNum=index+1;
proxy.machineData=item;
}
})
console.log("src",proxy.src,proxy.showNum)
console.log("accept",proxy.srcName, props.commandNameDataItem)
proxy.machineData= props.commandNameDataItem;
}
return{
// src:'/h5/machineroom/'+props.htmlName+'.html?access_token='+proxy.accessToken
getName,
showNum
showNum,
componentName
}
}
... ...
... ... @@ -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.provider}}</div>
<div class='img-serve-text'>{{item.resName}}</div>
<div class='lamp'>
<img src="/vue3/src/assets/images/machineRoom/icon-weblogical.png" alt="" class='img-weblog'>
<div class='img-lamp'>
... ... @@ -35,7 +35,7 @@
<div class='info-contain'>
<div class='info-text'>机柜信息</div>
<div class='info-text-bot'>
<p>机 房:{{machineData.val}}</p>
<p>机 房:{{machineData.machineRoomName}}</p>
<p>机柜编号:{{detailData.name}}</p>
<p>机柜容量:{{infoData.cabinetCapacity}}</p>
<p>设备数量:{{infoData.deviceNum}}台</p>
... ...
... ... @@ -14,7 +14,8 @@ export default {
isCenter:false,//是否居中--true代表湖州机房,false代表萧山机房
serviceData:[],//机柜的服务器数据
deviceDataInfo:'',//设备详细信息
deviceDatas: [
deviceDatas:[],
/* deviceDatas: [
{
name:'E12',//机柜名称
... ... @@ -158,7 +159,7 @@ export default {
deviceNum:'1',
cabinetCapacity :'42U',
},
],//服务器设备信息
],//服务器设备信息*/
infoData:'',//设备详细信息
// isShowDevice:false,//是否显示设备信息
... ... @@ -173,26 +174,17 @@ export default {
// 挂载完
Vue.onMounted(() => {
if(props.machineData.name.indexOf('huzhou')!=-1){
proxy.isCenter=true;
proxy.theirRoom='湖州灾备';
}else{
proxy.isCenter=false;
proxy.theirRoom='兴议机房';
console.log('&&&',proxy.machineData)
}
proxy.getData();
// proxy.getDeviceInfo();
})
const getData=()=>{
let parmas={
theirRoom:proxy.theirRoom,
theirRoomId:props.machineData.machineRoomId,
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=[];
... ... @@ -204,7 +196,6 @@ export default {
deviceData:resData
})
proxy.deviceDatas=deviceDatas;
console.log("devdats",proxy.deviceDatas)
proxy.getDeviceInfo()
}
... ... @@ -232,7 +223,7 @@ export default {
itemD.serviceClass='img-serve-'+serveNum;//设备的css的class
itemD.uClass='';
if(leftStr>1){
let bottom=(leftStr-1)*17;
let bottom=(leftStr-1)*16;
itemD.uClass='bottom:'+bottom+'px';
}
... ...
... ... @@ -50,8 +50,8 @@
<div class="grid-content bg-purple-light com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 31%;color: #FEFEFE;" v-if="tenThousandBitFalg > 0">{{tenThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 31%;color: #97969B;" v-if="tenThousandBitFalg == 0">{{tenThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 32%;color: #FEFEFE;" v-if="tenThousandBitFalg > 0">{{tenThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 32%;color: #97969B;" v-if="tenThousandBitFalg == 0">{{tenThousandBit}}</span>
</span>
</div>
</el-col>
... ...
... ... @@ -50,8 +50,8 @@
<div class="grid-content bg-purple-light com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 31%;color: #FEFEFE;" v-if="tenThousandBitFalg > 0">{{tenThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 31%;color: #97969B;" v-if="tenThousandBitFalg == 0">{{tenThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 32%;color: #FEFEFE;" v-if="tenThousandBitFalg > 0">{{tenThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 32%;color: #97969B;" v-if="tenThousandBitFalg == 0">{{tenThousandBit}}</span>
</span>
</div>
</el-col>
... ...
... ... @@ -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
}
}
}
... ...
... ... @@ -81,7 +81,7 @@ export default {
geo: {
show: true,
map: 'echarts',
roam: true,
roam: false,
zoom: 1.25,
aspectScale:1,//地图的宽高比
// 地图中心点的坐标, 可调节显示的偏移量
... ...