Authored by XuHaoJie

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

Showing 22 changed files with 342 additions and 28 deletions
... ... @@ -24,6 +24,7 @@ layui.define(['xmSelect', 'md5'], function (exports) {
domainAssetsManage: sessionStorage.getItem('domainAssetsManage'), // 资产系统地址
graphEditorOrigin: sessionStorage.getItem('graphEditorOrigin'), // 拓扑系统地址
workflowName: sessionStorage.getItem('workflow'),//流程系统地址
domainCMDBName: "http://120.236.178.177:7180/HGKJCMDB", //杭州咨源老cmdb系统地址
lineTimer: null,//性能曲线图全局定时器
detailTimer: [],//详细页的全局定时器
alarmTimer: null,//首页告警刷新定时器
... ...
... ... @@ -2151,7 +2151,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
renderStoreAlarms:function (tableId,resId){
var alarmlist = table.render({
elem: '#' + tableId
, url: common.domainName + '/api-web/bResultRealtimeCollector/getStore'
, url: common.domainName + '/api-web/busType/getStore'
, where: {
access_token: obj.sessions.getToken().access_token,
ResId: resId
... ...
... ... @@ -61,10 +61,11 @@
<button type="button" id="searchBtn" class="layui-btn layui-btn-sm layuiadmin-btn-comm">筛选
</button>
</div>
<div class="work-tab-right">
<button type="button" id="workIndexFlowBtn" class="layui-btn layui-btn-sm layui-btn-primary">发起流程
</button>
</div>
<!--去除发起流程 joke add 20211130-->
<!-- <div class="work-tab-right">-->
<!-- <button type="button" id="workIndexFlowBtn" class="layui-btn layui-btn-sm layui-btn-primary">发起流程-->
<!-- </button>-->
<!-- </div>-->
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<div class="mt15" id="workIndexFlowByMe"></div>
... ...
... ... @@ -4,7 +4,9 @@
<div style="border-radius: 3px;background-color: white"
:style="{'height':height+'px','max-height':height + 'px','overflow':'auto'}">
<div style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold">
<el-link type="info" :underline="false"><i class="iconfont icon-ziliaoku"></i> 文档管理</el-link>
<slot name="title">
<el-link type="info" :underline="false"><i class="iconfont icon-ziliaoku"></i> 文档管理</el-link>
</slot>
</div>
<!---->
<el-tree ref="tree" style="padding:6px;" :props="props" :data="treeData" node-key="id"
... ... @@ -65,7 +67,7 @@
</el-button>
</div>
<div class="select-all">
<div class="select-all" v-if="isSelect">
<el-button type="primary" :size="$global.elementSize" @click="selectAll()" v-if="activeBtn == 'view'" >
{{selectText}}
... ... @@ -73,7 +75,7 @@
</div>
<!-- <div style="text-align: right;width: 150px">
<div style="text-align: right;width: 150px">
<el-button-group>
<el-button :size="$global.elementSize" :type="activeBtn == 'view' ? 'primary' : ''"
... ... @@ -85,7 +87,7 @@
<i class="iconfont icon-liebiao"></i>
</el-button>
</el-button-group>
</div>-->
</div>
</div>
<!--列表-->
<div v-if="activeBtn == 'list'">
... ...
... ... @@ -42,6 +42,11 @@ export default {
type: Boolean,
default: false
},
//是否展示全选按钮
isSelect:{
type:Boolean,
default:false
}
},
data() {
return {
... ...
/**
* @desc 华为云网络设备(防火墙、交换机)
* @author wangfeng
* @date 2020/2/4 14:36
**/
layui.define(['commonDetail','common'], function (exports) {
var commonDetail = layui.commonDetail;
var common = layui.common;
//对外暴露的接口
exports('huawei_cloud_nethardware', function (data) {
var resId = '';
var resType = '';
var showFlag = common.getUrlParam("show");
if(showFlag && showFlag == '0'){
resId = common.getUrlParam("resId");
resType = common.getUrlParam("resType");
}else{
resId = data.resId;
resType = data.resType;
}
commonDetail.bindTips();
//基本信息
var jbxxKpi = "KPIE13DD9A3,KPIF74D9D2B,KPIFABFD741,KPIB718ADEC,KPI5858832B,KPI2DC9105C,KPI4419E8A1,KPIA47DE8B4,KPI7E81DFB5,KPI6F17667E, KPIF21A9F60, KPI81BAB2C4, KPI5364695E, KPI14E5F9B4, KPIC70A1E3D";
reload()
//渲染页面
function reload() {
//基本信息
commonDetail.renderTextCols("hauwei_cloude_nethardware_baseinfo",resId,jbxxKpi,2);
//维保信息 joke add 20200528
commonDetail.renderMaintenanceInfo('hauwei_cloude_nethardware_wbinfo',resId,resType);
//CPU平均使用率
commonDetail.renderGauge("hauwei_cloude_nethardware_cpurate",resId,"KPI961A9688");
//内存平均使用率
commonDetail.renderGauge("hauwei_cloude_nethardware_memrate",resId,"KPIE78B29FF");
// commonDetail.renderCircular("hauwei_cloude_nethardware_memrate",resId,"KPIE78B29FF","内存平均使用率","%");
//响应时长
commonDetail.renderLineCharat("hauwei_cloude_nethardware_responestimes",resId,"KPI7480987F","响应时长","");
//活动告警
commonDetail.renderActiveAlarms("hauwei_cloude_nethardware_activealarms",resId);
}
//定时任务
var timer = setInterval(function () {
reload()
},commonDetail.timerTime);
commonDetail.detailTimer.push(timer);
});
});
\ No newline at end of file
... ...
... ... @@ -55,6 +55,9 @@
{{# } }}
</script>
<li class="layui-nav-item" lay-tips="大屏">
<a href="javascript:;" layadmin-event="toBigScreen" ><img src="/src/style/img/icon-daping.png" style="width: 16px;height: 16px"></a>
</li>
<li class="layui-nav-item" lay-unselect>
<a href="javascript:;" layadmin-event="refresh" title="刷新">
... ... @@ -84,7 +87,8 @@
}}
<li><input type="hidden" id="hq_entrance" value="{{roles}}"></li>
<dl class="layui-nav-child">
<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>
<!--调整到刷新旁边,此处去掉 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>
<!--调整到首页旁边,此处去掉 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>-->
... ... @@ -109,11 +113,11 @@
<li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
<a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
</li>
<li class="layui-nav-item layui-hide-xs" lay-unselect>
<!-- <li class="layui-nav-item layui-hide-xs" lay-unselect>
<a href="javascript:;" layadmin-event="theme">
<i class="layui-icon layui-icon-theme"></i>
</a>
</li>
</li>-->
<li class="layui-nav-item layui-hide-xs" lay-unselect>
<a href="javascript:;" layadmin-event="fullscreen">
<i class="layui-icon layui-icon-screen-full"></i>
... ...
<!--华为网络设备-->
<article class="page-container template">
<div class="page-panel">
<div class="main">
<div class="layui-card template_detail_content">
<div class="layui-card-body">
<div class="lay-row">
<div class="lay-row-item lay-row-item--auto-width">
<h5 class="lay-row-title">基本信息<i data-id="hauwei_cloude_nethardware_baseinfo" class="iconfont detail_base_info">&#xe61e;</i></h5>
<ul class="info-table" id="hauwei_cloude_nethardware_baseinfo"></ul>
</div>
<div class="lay-row-item lay-row-item--small">
<h5 class="lay-row-title">维保信息</h5>
<ul class="info-table" id="hauwei_cloude_nethardware_wbinfo"></ul>
</div>
</div>
<div class="lay-row">
<div class="lay-row-item lay-row-item--small">
<h5 class="lay-row-title">CPU平均使用率</h5>
<ul id="hauwei_cloude_nethardware_cpurate" class="pie-wrap dasboard">
<li data-degree="83" class="pie-half pie-half-border-color-3">
<div class="pie-half-text">
<b>0%</b>
<span>CPU平均使用率</span>
</div>
</li>
</ul>
</div>
<div class="lay-row-item lay-row-item--small">
<h5 class="lay-row-title">内存平均使用率</h5>
<!-- <div id="hauwei_cloude_nethardware_memrate" class="detail_circular_chart"></div>-->
<!--<div class="circular-half-text">-->
<!--<span>内存使用率</span>-->
<!--</div>-->
<ul id="hauwei_cloude_nethardware_memrate" class="pie-wrap dasboard">
<li data-degree="83" class="pie-half pie-half-border-color-3">
<div class="pie-half-text">
<b>0%</b>
<span>内存使用率</span>
</div>
</li>
</ul>
</div>
<div class="lay-row-item lay-row-item--auto-width">
<h5 class="lay-row-title">响应时长</h5>
<div id="hauwei_cloude_nethardware_responestimes" class="detail_line_chart"></div>
</div>
</div>
<div class="lay-row">
<div class="lay-row-item">
<h5 class="lay-row-title">实时告警动态</h5>
<div id="hauwei_cloude_nethardware_activealarms"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</article>
<textarea id="huawei_cloud_nethardware_param_id" style="display: none;">{{d}}</textarea>
<script>
layui.use('huawei_cloud_nethardware', function (fn) {
var $ = layui.$;
var parm = $("#huawei_cloud_nethardware_param_id").val();
if(parm.indexOf('{{d') != -1){
fn();
}else{
fn(JSON.parse(parm));
}
});
</script>
\ No newline at end of file
... ...
<div>
<span class="el-dropdown-link" @click="showMachineRoomDialog(true)" >
{{textString}}
</span>
<cm-dialog title="收藏" width="500px" :showDialogVisible="dialogFlg" @hidedialog="showMachineRoomDialog">
<template v-slot>
<GetMachineRoom v-if="commandNameData" :commandNameData="commandNameData"></GetMachineRoom>
</template>
</cm-dialog>
</div>
... ...
export default {
name: 'machineRoomComponents',
template: '',
components: {
'GetMachineRoom': Vue.defineAsyncComponent(
() => myImport('views/commonComponents/getMachineRoom/index')
),
},
props: {
// 资源名称
textString: {
type: String,
default: 0
},
resId: {
type: String,
default: ''
},
resTypeId: {
type: String,
default: ''
},
resType: {
type: String,
default: ''
},
optionData: {
type: Array,
default: []
}
},
data() {
return {}
},
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
let dialogFlg = Vue.ref(false);
let commandNameData = Vue.ref([
{
name: '萧山IDC二号机房',
htmlName: 'xiaoshansecond',//html页面的名称
val: 'one'
},
{
name: '萧山IDC三号机房',
htmlName: 'xiaoshanthird',
val: 'two'
},
{
name: '萧山IDC七号机房',
htmlName: 'xiaoshanseven',
val: 'three'
}
]);
let showMachineRoomDialog = (flg) => {
dialogFlg.value = flg;
debugger
console.log(props.optionData);
}
return {
dialogFlg,
commandNameData,
showMachineRoomDialog,
}
}
}
... ...
<div>
<span class="el-dropdown-link" @click="showMachineRoomDialog(true)" >
{{textString}}
</span>
<cm-dialog title="收藏" width="500px" :showDialogVisible="dialogFlg" @hidedialog="showMachineRoomDialog">
<template v-slot>
<GetMachineRoom v-if="commandNameData" :commandNameData="commandNameData"></GetMachineRoom>
</template>
</cm-dialog>
</div>
... ...
export default {
name: 'machineRoomDetailComponents',
template: '',
components: {
'GetMachineRoom': Vue.defineAsyncComponent(
() => myImport('views/commonComponents/getMachineRoom/index')
),
},
props: {
// 资源名称
textString: {
type: String,
default: 0
},
resId: {
type: String,
default: ''
},
resTypeId: {
type: String,
default: ''
},
resType: {
type: String,
default: ''
},
optionData: {
type: Array,
default: []
}
},
data() {
return {}
},
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
let dialogFlg = Vue.ref(false);
let commandNameData = Vue.ref([
{
name: '萧山IDC二号机房',
htmlName: 'xiaoshansecond',//html页面的名称
val: 'one'
},
{
name: '萧山IDC三号机房',
htmlName: 'xiaoshanthird',
val: 'two'
},
{
name: '萧山IDC七号机房',
htmlName: 'xiaoshanseven',
val: 'three'
}
]);
let showMachineRoomDialog = (flg) => {
dialogFlg.value = flg;
}
return {
dialogFlg,
commandNameData,
showMachineRoomDialog,
}
}
}
... ...
... ... @@ -23,6 +23,10 @@ export default {
type: String,
default: 0
},
optionData: {
type: Array,
default: []
}
},
data() {
return {
... ...
... ... @@ -33,6 +33,10 @@ export default {
type: String,
default: ''
},
optionData: {
type: Array,
default: []
}
},
data() {
... ... @@ -110,25 +114,14 @@ export default {
return;
}
// 查询topoId
// proxy.$http.get(`/api-web/mxgraph/generateByResId`, {resId: props.resId}, function (res) {
// if (res && res.success) {
// let topoId = res.str;
// proxy.$global.openGraphEditor(topoId)
// } else {
// proxy.$global.showMsg('生成资源拓扑失败!', "error");
// }
// });
proxy.$global.viewResTopo(props.resId)
}
let openDetail = () => {
debugger
if (props.resId == '') {
proxy.$global.showMsg("资源编号不存在,请确认!","warning")
return;
}
proxy.$global.openDetail(props.resId,props.resType,props.title);
}
... ...
... ... @@ -18,6 +18,10 @@ export default {
type: String,
default: ''
},
optionData: {
type: Array,
default: []
}
},
data() {
... ...
... ... @@ -77,6 +77,8 @@
<el-option label="资源名称" :value="'resNameComponents'"></el-option>
<el-option label="状态组件" :value="'statusComponents'"></el-option>
<el-option label="使用率组件" :value="'rateComponents'"></el-option>
<el-option label="机房组件" :value="'machineRoomComponents'"></el-option>
<el-option label="机柜组件" :value="'machineRoomDetailComponents'"></el-option>
</el-select>
</div>
... ...
... ... @@ -203,6 +203,12 @@ export default {
'statusComponents': Vue.defineAsyncComponent(
() => myImport('components/page/res/statusComponents/index')
),
'machineRoomComponents': Vue.defineAsyncComponent(
() => myImport('components/page/res/machineRoomComponents/index')
),
'machineRoomDetailComponents': Vue.defineAsyncComponent(
() => myImport('components/page/res/machineRoomDetailComponents/index')
),
},
data() {
return {
... ...
... ... @@ -113,7 +113,7 @@
<cm-table-page :columns="columns" :dataList="tabSecondList" @loaddata="loadSecondList"
:showIndex="true"
:showBorder="true" :loading="false"
:showPage="false" :showTools="true" :height="(height - 500)">
:showPage="true" :showTools="true" :height="(height - 500)">
<template #tools="{scope}">
<el-button type="text" size="small" @click.prevent="addRes(scope.row,scope.$index)">
<i class="el-icon-plus"/> 添加
... ...
<div class="container">
<cm-document :isRecycle="true"></cm-document>
<cm-document :isRecycle="true">
<template #title>
<el-link type="info" :underline="false"><i class="iconfont icon-ziliaoku"></i> 文档回收站</el-link>
</template>
</cm-document>
</div>
... ...
<div class="container">
<cm-document></cm-document>
<cm-document :isSelect="true"></cm-document>
</div>
... ...
... ... @@ -35,7 +35,8 @@
<component v-if="row[prop] && row[prop].props && row[prop].props.colComponents != null && row[prop].props.colComponents != ''" v-bind:is="row[prop].props.colComponents"
:resId="row.resId"
:resTypeId="currentNode.id"
:textString="row[prop] == undefined ? '' : row[prop].value"></component>
:textString="row[prop] == undefined ? '' : row[prop].value"
:optionData="row"></component>
<el-link v-else :underline="false" @click="item.click(scope.row)">{{row[prop] == undefined ? '' : row[prop].value }}</el-link>
</template>
</cm-table-page>
... ...
... ... @@ -181,7 +181,8 @@ export default {
}
}
const goJump=()=>{
proxy.$router.push({path:'/zj/dp',query: {access_token:localStorage.getItem('access_token')}})
// proxy.$router.push({path:'/zj/dp',query: {access_token:localStorage.getItem('access_token')}})
window.open(sessionStorage.getItem("ythView") + '?access_token=' + localStorage.getItem("access_token"));
}
return{
... ...