...
|
...
|
@@ -2,7 +2,7 @@ |
|
|
@Name:通用资源详细信息
|
|
|
@Author:王凤
|
|
|
*/
|
|
|
layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSelect', 'md5'], function (exports) {
|
|
|
layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSelect', 'md5','carousel'], function (exports) {
|
|
|
var $ = layui.$
|
|
|
, table = layui.table
|
|
|
, common = layui.common
|
...
|
...
|
@@ -13,7 +13,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele |
|
|
, form = layui.form
|
|
|
, xmSelect = layui.xmSelect
|
|
|
, admin = layui.admin
|
|
|
, md5 = layui.md5;
|
|
|
, md5 = layui.md5
|
|
|
, carousel = layui.carousel;
|
|
|
//编辑状态时,选中的指标信息集合
|
|
|
var checkedKpiObj = [];
|
|
|
//详情页悬浮提示的index
|
...
|
...
|
@@ -152,7 +153,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele |
|
|
rowMenu.attr('data-nature', 'true');//性能趋势
|
|
|
// rowMenu.attr('data-canca', data.canCA);
|
|
|
// rowMenu.attr('data-incaing', data.inCAing);
|
|
|
// rowMenu.attr('data-restype', data.resType);
|
|
|
rowMenu.attr('data-restype', (data && data[0])?data[0].resType:'');
|
|
|
//监听告警压制等操作配置
|
|
|
$('#' + targetId + "_detail_row_menu").hover(function () {
|
|
|
var $that = $(this);
|
...
|
...
|
@@ -253,6 +254,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele |
|
|
rowMenu.attr("data-unit", "");
|
|
|
rowMenu.attr('data-hidem', 'true');
|
|
|
rowMenu.attr('data-nature', 'true');//性能趋势
|
|
|
rowMenu.attr('data-restype', data[0]?data[0].resType:'');
|
|
|
|
|
|
//监听告警压制等操作配置
|
|
|
$('#' + targetId + "_detail_row_menu").hover(function () {
|
|
|
var $that = $(this);
|
...
|
...
|
@@ -3075,6 +3078,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele |
|
|
layer.alert('该资源只对接TRAP告警信息!',{icon:0});
|
|
|
return;
|
|
|
}
|
|
|
//url(/src/style/img/shutdown.png)
|
|
|
title +=`<span id="title-shutdown" data-id=${resId} style="padding:0 5px;display: inline-block;position: relative;top: 8px;left:20px;"></span>`
|
|
|
obj.openNewWin(url, title, params, editFlag, fn, cancelfn, type,sign_);
|
|
|
},
|
|
|
error: function () {
|
...
|
...
|
@@ -3344,6 +3349,49 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele |
|
|
// layer.close(detailTips);
|
|
|
// }
|
|
|
// })
|
|
|
//start lsq 增加停机状态跑马灯效果 2022-05-24
|
|
|
let resId= $('#title-shutdown').data("id");
|
|
|
admin.req({
|
|
|
url: common.domainName + '/api-web/manage/cutover/findByResId?access_token=' + layui.sessions.getToken().access_token + '&resId=' + resId
|
|
|
, async: false
|
|
|
, done: function (res) {
|
|
|
if(res.data && res.data.length>0){
|
|
|
let listData=res.data;
|
|
|
//
|
|
|
let carouselStr=`
|
|
|
<img src="/src/style/img/shutdown.png" style="position: absolute;top: 0; left: -3px;" alt="">
|
|
|
<div class="layui-carousel shutdown-carousel " id="shutdown-carousel" style="background: transparent;">
|
|
|
<div carousel-item>`;
|
|
|
let boxShadow='0 0 10px';
|
|
|
listData.map((item,index)=>{
|
|
|
carouselStr+=` <div class="layui-row layui-col-space10" style="background: transparent;position: relative;" >
|
|
|
<span style="font-size: 14px;color:#ff0000;padding:0 5px; height:30px;width:100%;position: absolute;top:0;left:0;right:0;">`+item+`</span>
|
|
|
</div>`;
|
|
|
})
|
|
|
carouselStr+=` </div></div>`;
|
|
|
$('.layui-layer-title #title-shutdown').append(carouselStr);
|
|
|
//轮播切换
|
|
|
let options={
|
|
|
width: '630px'
|
|
|
, height:'30px'
|
|
|
, arrow: 'none'
|
|
|
, autoplay: true//自动切换
|
|
|
, interval:5000//自动切换的时间间隔
|
|
|
// , trigger: (layui.device().ios || layui.device().android) ? 'click' : 'hover'
|
|
|
, anim: 'default' //切换动画的方式 fade,default,updown
|
|
|
, index: 0
|
|
|
, indicator:'none'//指示器的位置 outside,inside,none
|
|
|
}
|
|
|
var ins=carousel.render({
|
|
|
elem: '#shutdown-carousel'
|
|
|
});
|
|
|
//重置轮播
|
|
|
ins.reload(options);
|
|
|
//end lsq 2022-05-24
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
},
|
|
|
yes:function (index) {
|
|
|
layer.close(index);
|
...
|
...
|
|