Authored by xwx

Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/hg-monitor-w…

…eb into master-500-dev-xwx
Showing 26 changed files with 788 additions and 532 deletions
${AnsiColor.BRIGHT_YELLOW}
${application.title} ${application.version} Base On Spring Boot ${spring-boot.version}
当前版本:5.2.0 访问地址:http://localhost:${server.port}/
----------------------------------------------------------------------------------------------------------
\\\ /// .-. \\\ ///wW Ww(o)__(o) .-. )) (O)) ((O) _ 2022
((O) (O)) c(O_O)c ((O)(O))(O)(O)(__ __)c(O_O)c (Oo)-. || || wWw /||_
| \ / | ,'.---.`, | \ || (..) ( ) ,'.---.`, | (_)) || /\ || (O)_ /`_)
||\\//||/ /|_|_|\ \||\\|| || )( / /|_|_|\ \ | .' ||//\\|| .' __)| `.
|| \/ ||| \_____/ ||| \ | _||_ ( )| \_____/ | )|\\ / / \ \( _) | (_))
|| ||'. `---' .`|| || (_/\_) )/ '. `---' .`(/ \) ( / \ )`.__) (.'-'
(_/ \_) `-...-' (_/ \_) ( `-...-' ) ) ( )
______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______
|______|______|______|______|______|______|______|______|______|______|______|______|______|______|______|
... ...
... ... @@ -393,7 +393,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
var resStyle = obj.alarmEleMatchStyle(ar.flag, ar.kpiId);
span += ' <span ' + menuId + ' style="text-align:left;width:40%">' + ar.kpiName + '</span>' +
'<span title="' + titleStr + '" style="width:60%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' + resStyle + '">'
+ $html + valueStr + '</span>';
+ $html + valueStr +(ar.unit?ar.unit:'')+ '</span>';
//补充空白区域
if (v.length < cols) {
var l = cols - v.length;
... ... @@ -2726,20 +2726,20 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
'<input type="radio" name="noticeFlag" value="true" title="是">&nbsp;是' +
'<input type="radio" name="noticeFlag" value="false" title="否" checked="" style="margin-left: 20px;">&nbsp;否</div> ');
}
//start lsq 添加状态指标下探 2022-06-09
$("[lay-id='" + tableId + "']").find(".layui-table-cell").hover(function () {
var $that = $(this)
var $btn = $that.find(".detail_row_menu");
if ($btn.length > 0) {
$(".layui-card-body").find(".detail_row_menu:not(.hide)").addClass("hide")
$btn.removeClass("hide");
}
})
filterSuppressMonitor(resId);
//end lsq 2022-06-09
}
})
});
//start lsq 添加状态指标下探 2022-06-09
$("[lay-id='" + tableId + "']").find(".layui-table-cell").hover(function () {
var $that = $(this)
var $btn = $that.find(".detail_row_menu");
if ($btn.length > 0) {
$(".layui-card-body").find(".detail_row_menu:not(.hide)").addClass("hide")
$btn.removeClass("hide");
}
})
filterSuppressMonitor(resId);
//end lsq 2022-06-09
}
});
if ($('.layui-show').find(".detail-left-panel").length == 0) {
... ...
... ... @@ -518,7 +518,7 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'laydate', 'elem
kpiIdent: e.kpiIdent
},
isUnique: '0',
sort: i,
sort: kpiFlagTableData.length+1,
createUser: form.val('form-flag-edit').createUser,
createTime: common.getToday('')
});
... ...
... ... @@ -22,6 +22,24 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', "commonDe
reloadTable();
}
});
//回车事件
$('#kpiflag_describe').keydown(function (e) {
if (e.keyCode === 13) {
reloadTable();
}
});
//回车事件
$('#kpiflag_kpis').keydown(function (e) {
if (e.keyCode === 13) {
reloadTable();
}
});
//回车事件
$('#kpiflag_restypes').keydown(function (e) {
if (e.keyCode === 13) {
reloadTable();
}
});
$("#kpiflagQueryBtn").unbind().on("click", function () {
reloadTable();
})
... ... @@ -53,6 +71,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', "commonDe
, where: {
access_token: accessToken,
keyWord: $("#kpiflag_keyword").val(),
describe: $("#kpiflag_describe").val(),
kpis: $("#kpiflag_kpis").val(),
restypes: $("#kpiflag_restypes").val(),
dimension: $('select[name="dimension"]').val()
}
, height: 'full-200'
... ... @@ -173,6 +194,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', "commonDe
, where: {
access_token: accessToken,
keyWord: $("#kpiflag_keyword").val(),
describe: $("#kpiflag_describe").val(),
kpis: $("#kpiflag_kpis").val(),
restypes: $("#kpiflag_restypes").val(),
dimension: $('select[name="dimension"]').val()
}
});
... ...
... ... @@ -91,24 +91,27 @@ layui.define(['laypage', 'commonDetail', 'common', 'element', 'admin'], function
}
})
for (let nodeInfo of nodeInfoList) {
// lsq 详情页节电池样式修改 2022-08-08
htmlStr += `<div class="detail-loadbalancing-vs" data-flag="${nodeInfo.flag}">
<div class="vs-title">
<p>${nodeInfo.nodeName}</p>
</div>
<div class="vs-icon-div ${nodeInfo.healthStatus == 'normal' ? 'vs-icon-up' : 'vs-icon-down'}">
<div class="vs-icon"></div>
<div class="vs-flex">
<div class="vs-icon-div ${nodeInfo.healthStatus == 'normal' ? 'vs-icon-up' : 'vs-icon-down'}">
<div class="vs-icon"></div>
</div>
<ul class="vs-info">
<li>
${nodeInfo.configStatus == 'enable' ? '<i class="iconfont icon-size good">\ue659</i> 已启用' : '<i class="iconfont icon-size serious">\ue668</i> 未启用'}
</li>
<li>
当前连接数: ${nodeInfo.currentConnections}
</li>
<li>
新增连接数: ${nodeInfo.newConnections}
</li>
</ul>
</div>
<ul class="vs-info">
<li>
${nodeInfo.configStatus == 'enable' ? '<i class="iconfont icon-size good">\ue659</i> 已启用' : '<i class="iconfont icon-size serious">\ue668</i> 未启用'}
</li>
<li>
当前连接数: ${nodeInfo.currentConnections}
</li>
<li>
新增连接数: ${nodeInfo.newConnections}
</li>
</ul>
</div>`
}
$vsDiv.html(htmlStr)
... ... @@ -168,27 +171,30 @@ layui.define(['laypage', 'commonDetail', 'common', 'element', 'admin'], function
}
})
for (let nodeInfo of nodeInfoList) {
// lsq 详情页节电池样式修改 2022-08-08
htmlStr += `<div class="detail-loadbalancing-vs" data-flag="${nodeInfo.flag}">
<div class="vs-title">
<p>${nodeInfo.nodeName}</p>
</div>
<div class="node-icon-div ${nodeInfo.healthStatus == 'normal' ? 'vs-icon-up' : 'vs-icon-down'}">
<div class="node-icon"></div>
<div class="vs-flex">
<div class="node-icon-div ${nodeInfo.healthStatus == 'normal' ? 'vs-icon-up' : 'vs-icon-down'}">
<div class="node-icon"></div>
</div>
<ul class="vs-info">
<li>
${nodeInfo.configStatus == 'enable' ? '<i class="iconfont icon-size good">\ue659</i> 已启用' : '<i class="iconfont icon-size serious">\ue668</i> 未启用'}
</li>
<li>
当前连接数: ${nodeInfo.currentConnections}
</li>
<li>
新增连接数: ${nodeInfo.newConnections}
</li>
<li>
${nodeInfo.ipAddr}:${nodeInfo.port}
</li>
</ul>
</div>
<ul class="vs-info">
<li>
${nodeInfo.configStatus == 'enable' ? '<i class="iconfont icon-size good">\ue659</i> 已启用' : '<i class="iconfont icon-size serious">\ue668</i> 未启用'}
</li>
<li>
当前连接数: ${nodeInfo.currentConnections}
</li>
<li>
新增连接数: ${nodeInfo.newConnections}
</li>
<li>
${nodeInfo.ipAddr}:${nodeInfo.port}
</li>
</ul>
</div>`
}
$vsDiv.html(htmlStr)
... ...
... ... @@ -537,16 +537,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
resType: resType,
isSend: $('#notice_search_isSend').val()
};
var typeName = new Map();
typeName.set("10", "告警通知");
typeName.set("11", "告警消除");
//2021-10-15 添加合并通知 XuHaoJie
typeName.set("13", "合并通知");
typeName.set("20", "巡检报表通知");
typeName.set("30", "系统通知");
typeName.set("40", "工单通知");
typeName.set("99", "测试通知");
typeName.set("0", "测试通知");
//lsq 分类分组统计的x轴标签显示undefined修改 2022-08-08
$.ajax({
url: `${common.domainName}/api-web/notice/groupByType`,
method: 'GET',
... ... @@ -556,7 +547,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
var yData = [];
if (res && res.map) {
$.each(res.map.typeList, function (i, v) {
xData.push(typeName.get(v))
//lsq 分类分组统计的x轴标签显示undefined修改 2022-08-08
xData.push(v)
})
yData = res.map.countList;
}
... ...
layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTable', 'cron'], function (exports) {
layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTable','cron'], function (exports) {
var $ = layui.$;
var form = layui.form;
var layer = layui.layer;
... ... @@ -36,7 +37,27 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
noticeTimely.sendState = noticeTimely.sendState == 1 ? 1 : 0;
noticeTimely.state = noticeTimely.state == 2 ? 1 : 0;
form.val('form-noticeTimely-add', noticeTimely);
bloatedSite(noticeTimely.site);
$('[name="templates"]').val(noticeTimely.templates);
var setting = noticeTimely.msgSetting;
if(setting){
try{
// "[{\"fieldName\":\"noticeType\",\"condition\":\"2\",\"conditionVal\":\"2\",\"msgLevel\":\"3\"}]"
var arr = JSON.parse(setting);
if(arr){
$(arr).each(function (i,v){
addCondition(v);
})
}
}catch (e) {
}
}
//bloatedSite(noticeTimely.site);
bloatedParameter(noticeTimely);
if (response.data) {
$.each(response.data, function (i, v) {
... ... @@ -45,13 +66,13 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
}
}
});
} else {
}else{
//状态是否为开启
$("#switch_noticeTimely_state").attr("checked", "true");
$("#switch_noticeTimely_state").attr("checked","true");
}
form.render();
//corn表达式
$("#show_corn_info_frequency").on("click", function () {
$("#show_corn_info_frequency").on("click",function (){
layer.open({
type: 1
, title: 'Cron表达式示例'
... ... @@ -71,72 +92,117 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
},
});
//响应声音事件
form.on('select(noticeTimely_voice)', function (data) {
var url = '../src/style/mp3/' + data.value + '.mp3';
var audio = common.audioPlayer(url);
audio.playclip();
});
// form.on('select(noticeTimely_voice)', function(data){
// var url='../src/style/mp3/'+data.value+'.mp3';
// var audio=common.audioPlayer(url);
// audio.playclip();
// });
//选择用户
$("#noticeTimely-form-select-users").on("click", function () {
$("#noticeTimely-form-select-users").on("click",function (){
//获取
var selectedNames = $("#select_noticeTimely_id_user").find("span");
var set = new Set();
var set=new Set();
selectedNames.each(function () {
set.add($(this).data("username"));
});
common.openWin("/template/user/userlist", "选择用户", {oldUsers: Array.from(set)}, ["选择", "取消"], function () {
common.openWin("/template/user/userlist","选择用户", {oldUsers: Array.from(set)},["选择","取消"], function () {
var data = table.checkStatus('userlist-table').data;
if (data && data.length > 0) {
if(data && data.length > 0){
//清除之前的
$("#select_noticeTimely_id_user").empty();
$.each(data, function (i, v) {
$.each(data,function (i,v){
writeTagsInfo(v)
});
return true;
} else {
layer.msg('只能选择用户!', {icon: 7, time: 3000});
}else{
layer.msg('只能选择用户!', {icon: 7,time:3000});
return false;
}
});
});
//添加消息状态
$("#editNoticeTimelyParamBtn").on("click", function () {
// 播放mp3
$("#playMp3").on("click",function () {
var name = $('#noticeTimely_voice').val();
var mp3Url = `/src/style/mp3/${name}.mp3`;
var player = new Audio(mp3Url);
player.play();
});
function addCondition(defVal){
var settingItem = $('#notice_timely_param_level');
var html = $("#noticeTimelyParamAddRowHtml").html();
$('#notice_timely_param_level').append(html);
settingItem.append(html);
$('#notice_timely_param_sql').removeClass('hide');
$('#notice_timely_param_level').removeClass('hide');
var number = $('#notice_timely_param_level').find('.notice_time_select_sql_value').length;
settingItem.removeClass('hide');
var number = settingItem.find('.notice_time_select_sql_value').length;
getRowName();
var ht = '';
rowNames.forEach(item => {
ht += '<option value="' + item + '">' + item + '</option>'
})
$('#notice_timely_param_level').find('.notice_time_select_sql_value').eq(number - 1).append(ht);
settingItem.find('.notice_time_select_sql_value').eq(number - 1).append(ht);
if (identifying == 0) {
$('#notice_timely_param_level').find('.notice_time_select_colour').eq(0).val(grade);
settingItem.find('.notice_time_select_colour').eq(0).val(grade);
identifying = 1;
}
})
settingItem.find('.delete-condition').eq(0).attr('id','id'+(new Date()).getTime());
settingItem.find('.delete-condition').on('click',function (){
var that = $(this);
layer.confirm('确认要删除吗?', {icon: 3}, function (index) {
that.parent().parent().remove();
layer.close(index);
});
})
if(defVal){
// 设置默认值
settingItem.find('.notice_time_select_sql_value').val(defVal.fieldName);
settingItem.find('.notice_time_select_symbol').val(defVal.condition);
settingItem.find('.layui-notice-time-btn').val(defVal.conditionVal);
settingItem.find('.notice_time_select_colour').val(defVal.msgLevel);
setDetailsTags(rowNames);
}
}
//添加消息状态
$("#editNoticeTimelyParamBtn").on("click",function () {
var rowNames = getRowName();
if(rowNames && rowNames.length == 0){
let testStatus = $('#layui-notice_timely_sql_test').attr('test-status');
if(!testStatus || testStatus != 'success'){
layer.msg('请先测试脚本!', {icon: 7,time:3000});
return;
}
}
addCondition();
})
//写入标签内容
function writeTagsInfo(data) {
var tags = `
<span id="tags_span_${data.id}" data-id="${data.id}" data-username="${data.username}"
<span id="tags_span_${data.id}" style="margin: 3px;" data-id="${data.id}" data-username="${data.username}"
data-nickname="${data.nickname}" data-phone="${data.phone}" ><em>${data.nickname}</em>
<button type="button" value="${data.id}" class="tagsclose close">×</button>
</span>
`;
if (data.username) {
var flag = true;
if(data.username){
var flag=true;
var selectedNames = $("#select_noticeTimely_id_user").find("span");
selectedNames.each(function () {
var id = $(this).data("id");
if (data.id == id) {
flag = false;
var id=$(this).data("id");
if(data.id==id){
flag=false;
return false;
}
});
if (flag == true) {
if(flag==true){
//拼接标签
$("#select_noticeTimely_id_user").append(tags);
//绑定标签的删除事件
... ... @@ -144,34 +210,29 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
}
}
}
//删除标签事件
function bindTagesDelEvent() {
//删除已选主体的页签
$("button.tagsclose").on("click", function () {
$("button.tagsclose").on("click",function () {
var id = $(this).attr("value");
$("#tags_span_" + id).remove();
$("#tags_span_"+id).remove();
});
}
//状态转换
function statusChange(v) {
var x = parseInt(v);
var y = 2;
function statusChange(v){
var x=parseInt(v);
var y=2;
switch (x) {
case 0:
y = 1;
break;
case 1:
y = 2;
break;
case 0: y=1;
break;
case 1: y=2;
break;
}
return y;
}
//保存
$("#btn-noticeTimely-submit").on("click", function () {
var userNames = [];
$("#btn-noticeTimely-submit").on("click",function (){
var userNames=[];
//获取用户
var selectedTags = $("#select_noticeTimely_id_user").find("span");
var contents = [];
... ... @@ -184,30 +245,44 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
Object.assign(noticeTimely, form.val('form-noticeTimely-add'));
//状态是否为开启
noticeTimely.state = statusChange(document.querySelector("#switch_noticeTimely_state").checked ? 1 : 0);
noticeTimely.broadcast = statusChange(document.querySelector("#switch_noticeTimely_broadcast").checked ? 0 : 1);
noticeTimely.retry = statusChange(document.querySelector("#switch_noticeTimely_retry").checked ? 0 : 1);
noticeTimely.sendState = statusChange(document.querySelector("#switch_noticeTimely_sendState").checked ? 0 : 1);
// 是否广播消息 1是,2否
noticeTimely.broadcast = 2;//statusChange(document.querySelector("#switch_noticeTimely_broadcast").checked ? 0 : 1);
// 是否重发 1重发,2不重发
noticeTimely.retry = 2;//statusChange(document.querySelector("#switch_noticeTimely_retry").checked ? 0 : 1); //
// 发送状态 1已发送,2未发送
noticeTimely.sendState = 2;//statusChange(document.querySelector("#switch_noticeTimely_sendState").checked ? 0 : 1);
noticeTimely.noticeNames = userNames;
var noticeStateList = [];
//获取消息状态列表
$.each($('#editNoticeTimely_add_table').find('tbody tr'), function (i, v) {
var noticeState = {};
noticeState.noticeName = $(this).find('input[name="noticeName"]').val();
noticeState.sendTime = $(this).find('input[name="sendTime"]').val();
noticeState.sendContent = $(this).find('input[name="sendContent"]').val();
noticeState.noticeState = $(this).find('select[name="noticeState"]').val();
noticeStateList.push(noticeState);
});
noticeTimely.noticeStateList = noticeStateList;
// var noticeStateList = [];
// //获取消息状态列表
// $.each($('#editNoticeTimely_add_table').find('tbody tr'), function (i, v) {
// var noticeState = {};
// noticeState.noticeName = $(this).find('input[name="noticeName"]').val();
// noticeState.sendTime = $(this).find('input[name="sendTime"]').val();
// noticeState.sendContent = $(this).find('input[name="sendContent"]').val();
// noticeState.noticeState = $(this).find('select[name="noticeState"]').val();
// noticeStateList.push(noticeState);
// });
// noticeTimely.noticeStateList = noticeStateList;
if (!noticeTimely.noticeNames) {
layer.msg('请选择用户', {icon: 7, time: 3000});
return false;
}
noticeTimely.site = $('#notice_timely_select').val() + $('#notice_timely_site').val();
//获取配置参数
var map = getParam();
noticeTimely.grade = map.grade;
if(!map){
return false;
}
if(map.msgSetting && map.msgSetting != '' && map.msgSetting != null){
noticeTimely.msgSetting = JSON.stringify(map.msgSetting);
}
noticeTimely.templates = map.templates;
if (!noticeTimely.templates || noticeTimely.templates == '' || noticeTimely.templates == null) {
layer.msg('请配置自定义展示中的展示内容', {icon: 7, time: 3000});
return false;
}
layer.load(2);
admin.req({
url: domainName + '/api-web/noticeTimely/save?access_token=' + accessToken,
... ... @@ -329,15 +404,21 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
}
//测试按钮点击
$('#layui-notice_timely_sql_test').unbind("click").on("click", function () {
$('#layui-notice_timely_sql_test').unbind("click").on("click", function (e) {
e.preventDefault();
var sql = $('#layui-notice_timely_sql').val();
var type = $('#noticeTimely_type').val();
admin.req({
url: common.domainName + '/api-web/noticeTimely/executeSql'
, data: {
sql: sql
sql: sql,
type:type
}
, success: function (res) {
if (res && res.data && res.data.length > 0) {
// 增加测试成功属性
$('#layui-notice_timely_sql_test').attr('test-status','success');
//更新行数
var list = res.data;
//默认取值第一个
... ... @@ -350,57 +431,99 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
$(this).empty();
$(this).append(html);
})
layer.msg('验证SQL通过!', {icon: 1, time: 3000});
setDetailsTags(keys);
layer.msg('脚本验证通过!', {icon: 1, time: 3000});
} else {
layer.msg('验证SQL失败!', {icon: 7, time: 3000});
layer.msg('脚本验证失败,请检查!', {icon: 7, time: 3000});
}
}
});
});
function setDetailsTags(arr){
$('#details_tags').find('.layui-badge').remove();
var details_tags = '';
arr.forEach(item => {
details_tags += `<span id="tags_span_${item}" class="layui-badge layui-bg-blue" style="margin: 3px;" ><em>${item}</em></span>`;
})
$('#details_tags').append(details_tags);
$('#details_tags span').on('click',function (){
$('[name="templates"]').val($('[name="templates"]').val() + '#{'+$(this).text() + '}');
});
}
//获取配置参数
function getParam() {
var map = getRowName();
var pa = '';
map.rowNameList.forEach(item => {
pa += '#{' + item + '},';
})
if (pa != '') {
pa = pa.substring(0, pa.length - 1);
}
//获取模板和等级
var str = {
grade: '1',
templates: pa
var obj = {
msgSetting: '',
templates: $('#notice_timely_param_sql').find('textarea[name="templates"]').eq(0).val()
};
var errMsg = '';
if (!$('#notice_timely_param_sql').hasClass('hide')) {
//获取模板信息
var val = $('#notice_timely_param_sql').find('textarea[name="details"]').eq(0).val();
str.templates = val ? val : pa;
var btn = $('#notice_timely_param_level').find('.layui-notice-time-btn').eq(0).val();
if (btn) {
//获取颜色
//行名
var row = $('#notice_timely_param_level').find('.notice_time_select_sql_value').eq(0).val();
//条件
var condition = $('#notice_timely_param_level').find('.notice_time_select_symbol').eq(0).val();
//值1
var value1 = btn;
//颜色
var colour = $('#notice_timely_param_level').find('.notice_time_select_colour').eq(0).val();
//值2
var value2 = map.dataList[0][row] ? map.dataList[0][row] : '';
var sign = compareSize(value2, condition, value1);
//判断类型
if (sign) {
str.grade = colour;
// 获取模板信息
var val = obj.templates;
if(!val || val == '' || val == null){
var map = getRowName();
var exp = [];
var templatesVal = '';
map.rowNameList.forEach(item => {
exp.push('#{' + item + '}')
})
if (exp.length > 0) {
templatesVal = exp.join(",");
}
} else {
var colour = $('#notice_timely_param_level').find('.notice_time_select_colour').eq(0).val();
str.grade = colour;
val = templatesVal;
}
obj.templates = val;
var arr = [];
// 获取条件行
var msgSettings = $('#notice_timely_param_level').find('.msgSetting');
if(msgSettings && msgSettings.length > 0){
$(msgSettings).each(function (i,v){
if(v){
var settingItem = $(v);
var fieldName = settingItem.find('.notice_time_select_sql_value').val();
var condition = settingItem.find('.notice_time_select_symbol').val();
var conditionVal = settingItem.find('.layui-notice-time-btn').val();
var msgLevel = settingItem.find('.notice_time_select_colour').val();
if(fieldName == '' || condition =='' || conditionVal ==''|| msgLevel =='' ||
fieldName == null || condition == null || conditionVal == null|| msgLevel == null){
if(errMsg != ''){
errMsg = "请完善展示设置的条件!";
}
return;
}
arr.push({
fieldName:fieldName,
condition:condition,
conditionVal:conditionVal,
msgLevel:msgLevel,
})
}
})
}
if(arr.length > 0){
obj.msgSetting = arr;
}
}
return str;
if(errMsg != ''){
layer.msg(errMsg.join('<br/>'), {icon: 7, time: 3000});
return undefined;
}
// 验证数据
return obj;
}
//比大小
... ...
... ... @@ -113,7 +113,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
elem: '#table-noticeTimely-state-list',
url: domainName + '/api-web/noticeTimely/statePage',
where: params,
height: 'full',
height: 'full-450',
limit: common.limit,
limits: common.limits,
page: {
... ... @@ -154,13 +154,13 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
deleteStateById(ids);
});
//全部删除
$('#btn-notice-state-delete').unbind("click").on('click', function () {
$('#btn-notice-state-delete').unbind("click").on('click',function () {
//获取选中数据
var checks = table.checkStatus('table-noticeTimely-state-list').data;
var list = checks.map(item => item.id);
if (list.length > 0) {
var list= checks.map(item => item.id);
if(list.length>0){
deleteStateById(list);
} else {
}else{
layer.msg('请最少选择一项数据', {icon: 7, time: 2000});
}
})
... ... @@ -186,46 +186,48 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
cols: [[{
type: 'checkbox'
}, {
field: 'name', title: '名称', align: 'center', width: '250',
field: 'name', title: '名称', align: 'center', minWidth: '100',
templet:
'<div>' +
' <span data-id="{{d.id}}" class="link link-noticeTimely-edit">{{d.name}}</span>' +
'</div>'
}, {
field: 'details', title: '内容', align: 'left', minWidth: '650',
field: 'details', title: '内容', align: 'left', width: '15%',
templet: function (d) {
// return '<input type="text" class="layui-input" style= "background-color:transparent;border:0;padding-bottom: 10px" readonly="readonly" name="details" value="' + d.details + '">'
return '<code>' + d.details + '</code>'
}
}, {
field: 'frequency', title: '频率', align: 'center', width: '130'
field: 'frequency', title: '频率', align: 'center', minWidth: '120'
}, {
field: 'noticeNicknames', title: '用户', align: 'center', minWidth: '180'
}, {
field: 'state', title: '是否启用', align: 'center', width: '100',
templet: function (d) {
var checked = d.state == 2 ? 'checked' : '';
return '<div><input type="checkbox" data-id="' + d.id + '" lay-filter="switch_noticeTimely_checkbox_state" name="state" lay-skin="switch" lay-text="启用|禁用" ' + checked + ' ></div>'
field: 'lastSendTime', title: '最后发送时间', align: 'center', minWidth: '170',templet: function (d) {
if(d.noticeStateNew && d.noticeStateNew.sendTime){
return d.noticeStateNew.sendTime;
}
return '';
}
}, {
field: 'broadcast', title: '是否广播', align: 'center', width: '100',
templet: function (d) {
var checked = d.broadcast == 1 ? 'checked' : '';
return '<div><input type="checkbox" data-id="' + d.id + '" lay-filter="switch_noticeTimely_checkbox_broadcast" name="broadcast" lay-skin="switch" lay-text="是|否" ' + checked + ' ></div>'
},{
field: 'lastSendContent', title: '最后发送内容', align: 'center', minWidth: '200',templet: function (d) {
if(d.noticeStateNew && d.noticeStateNew.sendContent){
return d.noticeStateNew.sendContent;
}
return '';
}
}, {
field: 'retry', title: '是否轮循', align: 'center', width: '100',
},{
field: 'state', title: '是否启用', align: 'center', minWidth: '60',
templet: function (d) {
var checked = d.retry == 1 ? 'checked' : '';
return '<div><input type="checkbox" data-id="' + d.id + '" lay-filter="switch_noticeTimely_checkbox_retry" name="retry" lay-skin="switch" lay-text="重发|不重发" ' + checked + ' ></div>'
var checked = d.state == 2 ? 'checked' : '';
return '<div><input type="checkbox" data-id="' + d.id + '" lay-filter="switch_noticeTimely_checkbox_state" name="state" lay-skin="switch" lay-text="启用|禁用" ' + checked + ' ></div>'
}
}, {
title: '操作', align: 'center', minWidth: '150', fixed: 'right',
templet:
'<div>' +
' <button data-id="{{d.id}}" class="layui-btn layui-btn-xs layui-btn-normal link-noticeTimely-delete" lay-tips="删除"><i class="layui-icon">&#xe640;</i></button>' +
' <button data-id="{{d.id}}" class="layui-btn layui-btn-xs layui-btn-normal link-noticeTimely-history" lay-tips="历史记录"><i class="layui-icon">&#xe705;</i></button>' +
'</div>'
title: '操作', align: 'center', minWidth: '80', fixed: 'right',
templet:
'<div>' +
' <button data-id="{{d.id}}" class="layui-btn layui-btn-xs layui-btn-normal link-noticeTimely-delete" lay-tips="删除"><i class="layui-icon">&#xe640;</i></button>' +
' <button data-id="{{d.id}}" class="layui-btn layui-btn-xs layui-btn-normal link-noticeTimely-history" lay-tips="历史记录"><i class="layui-icon">&#xe60e;</i></button>' +
'</div>'
}]],
done: function (res) {
// 点击名称编辑事件
... ... @@ -246,7 +248,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
layer.open({
title: "已发送消息",
content: $("#noticeTimely-state-html").html(),
area: ['80%', '70%'],
area: ['80%', '670px'],
btns: ['确认', '取消'],
success: function (index) {
loadStateTable(id);
... ...
... ... @@ -325,7 +325,20 @@ layui.define(['admin', 'form', 'table', 'element', 'sessions', 'common', 'echart
color: '#333',
show: true,
interval: 0,
rotate: 15
rotate: 15,
formatter: val => {
// 一行字数
const max = 6
// 标签长度
const valLength = val.length
// 换行数
const rowNum = valLength / 6
if (valLength > 6) {
return val.slice(0,5) + '...';
} else {
return val
}
}
},
axisLine: {
lineStyle: {
... ...
... ... @@ -249,7 +249,7 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'laydate', 'elem
console.log(JSON.stringify(e));
var flag = true;
$.each(restypepageFlagTableData, function (j, k) {
if (e.flagId == k.flagId) {
if (e.id == k.flagId) {
flag = false;
}
});
... ... @@ -263,7 +263,7 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'laydate', 'elem
flagDimension: e.dimension,
flagId: e.id,
type: 'base',
sort: i,
sort: restypepageFlagTableData.length+1,
createUser: form.val('form-restypepage-edit').createUser,
createTime: common.getToday('')
});
... ...
... ... @@ -118,12 +118,18 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
cols: [[
{ type: 'checkbox' }
, {field: 'index', title: '序号', align: 'center', type: 'numbers',width: 50}
, { field: 'keyword', title: '辅助关键字', align: 'center',width: 200}
, { field: 'resTypeName', title: '资源类型', align: 'center',width: 150}
, {
field: 'name', title: '页面名称', align: 'center', sort: true,width: 400,
templet: '<div>' +
'<span restypepage-data-edit="{{d.id}}" data-flag="{{d.flag}}" class="layui-table-link">{{d.name}}</span>' +
'</div>'
}
, { field: 'resTypeName', title: '资源类型', align: 'center',width: 250}
, { field: 'osName', title: '操作系统', align: 'center',width: 100}
, { field: 'provderName', title: '厂商', align: 'center',width: 100}
, { field: 'protocolName', title: '采集协议', align: 'center',width: 100}
, { field: 'model', title: '型号', align: 'center',width: 100}
, { field: 'protocolName', title: '采集协议', align: 'center',width: 200}
, { field: 'model', title: '型号', align: 'center',width: 200}
, { field: 'keyword', title: '辅助关键字', align: 'center',width: 200}
, { field: 'flags', title: '配置指标组', align: 'left',width: 300}
, { field: 'kpis', title: '配置指标', align: 'left',width: 300}
, { field: 'remark', title: '备注', align: 'left',width: 300}
... ... @@ -136,6 +142,14 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
'</div>'
}]],
done: function (res) {
//点击协议名称 进行编辑
$('[restypepage-data-edit]').on('click', function () {
if ($.inArray('back:restypepage:add', checkList) == -1) {
layer.msg('暂无权限!', {icon: 7, time: 3000});
return;
}
openEditHtml($(this).attr("restypepage-data-edit"));
});
// 点击编辑事件
$('.link-restypepage-edit').click(function () {
if ($.inArray('back:restypepage:add', checkList) == -1) {
... ...
... ... @@ -452,7 +452,7 @@ layui.extend({
new msgTips({
dom: ".right-bottom-tips",
title: "告警消息",
message: `<p style="line-height: 40px">${v.alarmContent}</p>`,
message: `<p style="line-height: 20px">${v.alarmContent}</p>`,
duration: 10000,
space: 10,
firstSpace: 8,
... ... @@ -551,6 +551,60 @@ layui.extend({
}
}
var progressObject = {
}
let progressHandel = (element,obj) =>{
let id = obj.id;
if(!progressObject[id]){
progressObject[id] = {
start:null,
list:[],
proup:null
}
}
let progressBase = $('#progressBase')
if (progressBase == null || progressBase.length == 0) {
$(document.body).append(`<div id="progressBase" style="position: absolute;width: 100%;height: 100%;background: #b4b1b1;opacity: 0.5;z-index: 10000;"> </div>
<div id="progressView" style="position: absolute;right: calc((100% - 300px)/2);top: 40%;z-index: 11000;width: 300px;padding: 5px;height: auto;background: #ffffff;opacity: 1;border-radius: 10px;margin-right: 6px;color: black;"></div>`);
}
if (!progressObject[id].start) {
$('#'+id).remove();
let item = `<div id="${id}" style="padding: 5px;">${obj.title}</div><div class="layui-progress layui-progress-big" lay-showPercent="true" lay-filter="${id}">
<div class="layui-progress-bar layui-bg-green" lay-percent="0/1"></div>
</div>
<div id="content_${id}" style="padding: 10px 10px 0px 10px;font-size: 12px"></div></div>`;
if(!$('#progressView').find('.layui-progress:last')){
$('#progressView').find('.layui-progress:last').append(item);
} else {
$('#progressView').append(item);
}
element.progress(id, '0%');
progressObject[id].start = obj;
return;
}
progressObject[id].list.push(obj);
let count = progressObject[id].start.count;
let size = progressObject[id].list.length
if(count == size){
element.progress(id, '100%')
setTimeout(function () {
$('#progressView').find(id).remove();
delete progressObject[id];
if(Object.keys(progressObject)){
$('#progressBase').remove();
$('#progressView').remove();
}
$('a[layadmin-event="refresh"]').click();
},1000)
} else {
element.progress(id, ((size/count)*100).toFixed(2) + '%')
$('#progressView').find('#content_'+id).text(obj.content);
}
}
// 订阅实时消息
stompClient.subscribe('/realTime/', function (respnose) {
... ... @@ -574,6 +628,9 @@ layui.extend({
}, function () {
view.exit();
});
} else if (obj.msgType == 'PROGRESS') {
var element = layui.element;
progressHandel(element,obj);
} else {
showTips(obj.content, obj.title, obj.msgType.toLowerCase(), obj.href, 1000, obj.queryResult);
if (typeof (obj.msgType) != "undefined") {
... ... @@ -595,15 +652,22 @@ layui.extend({
connectFlg = false;
if (location.hash.indexOf('#/user/login') == -1) {
// 调用测试接口,出现过期则会跳转到登录页面
admin.req({
url: domainName + "/api-web/common/test"
, type: "get"
, async: false
, done: function (data) {
tryFunc();
}
});
try {
admin.req({
url: domainName + "/api-web/common/test"
, type: "get"
, async: false
, done: function (data) {
tryFunc();
}
});
}catch (e) {
tryIndex = 1;
// 服务异常:服务重启,网络问题等不可访问等因素
tryFunc();
}
} else {
tryIndex = 1;
tryFunc();
}
})
... ...
... ... @@ -16,6 +16,8 @@ layui.define(['element', 'admin'], function (exports) {
init: function () {
var that = this;
that.bindClickEvent();
if (that.data.contextmenus.length > 0) {
that.bindContextMenuEvent();
return that.data.contextmenus;
... ... @@ -74,6 +76,20 @@ layui.define(['element', 'admin'], function (exports) {
}
})
},
/**
* 鼠标点击事件
*/
bindClickEvent(){
var eventKeys = ['a','button','[data-bizid]','.layui-table-link'];
// 菜单点击
$('#LAY-system-side-menu li a').click(function (e){
console.log($(this).text());
e.preventDefault();
});
},
/**
* 绑定鼠标右键事件
*/
bindContextMenuEvent() {
var that = this;
var contextmenus = that.data.contextmenus;
... ...
... ... @@ -7992,12 +7992,13 @@ table.table-duty tbody td div.table-duty-td-day .duty-td-div-now {
/*通知页面中间统计图布局样式*/
.detail-loadbalancing-vs {
width: calc(12.5% - 22px);
/*lsq 详情页节电池样式修改 2022-08-08*/
width: calc(14% - 0px);
height: 115px;
margin: 5px;
float: left;
border: 1px solid #dcdcdc;
padding: 10px 20px;
padding: 10px;
border-radius: 5px;
cursor: pointer;
}
... ... @@ -8006,15 +8007,20 @@ table.table-duty tbody td div.table-duty-td-day .duty-td-div-now {
font-size: 15px;
font-weight: bold;
height: 30px;
word-wrap: break-word;
}
.detail-loadbalancing-vs .vs-title {
margin-bottom: 10px;
}
/*lsq 详情页节点池样式修改 2022-08-08*/
.detail-loadbalancing-vs .vs-flex{
display: flex;
align-items: center;
}
.detail-loadbalancing-vs div.vs-icon-div {
width: 55px;
height: 55px;
width: 45px;
height: 45px;
padding: 4px;
float: left;
border-radius: 10px;
... ... @@ -8030,8 +8036,8 @@ table.table-duty tbody td div.table-duty-td-day .duty-td-div-now {
}
.detail-loadbalancing-vs div.vs-icon {
width: 50px;
height: 50px;
width: 40px;
height: 40px;
background-repeat: no-repeat;
background-position: center;
background-image: url(/src/style/img/icon-db.png);
... ... @@ -8062,6 +8068,8 @@ table.table-duty tbody td div.table-duty-td-day .duty-td-div-now {
width: 61%;
float: left;
padding-left: 10px;
/*lsq 详情页节点池样式修改 2022-08-08*/
flex:1;
}
.detail-loadbalancing-vs .vs-info li {
... ... @@ -8552,3 +8560,6 @@ form.layui-card-header.layuiadmin-card-header-auto {
.res .layui-card-body{
background: #ffffff;
}
.layui-layer-tips{
word-break: break-all;
}
... ...
... ... @@ -45,7 +45,7 @@
<div class="inline-half layui-inline">
<label class="layui-form-label">创建时间</label>
<div class="layui-input-inline">
<input type="text" name="createTime" required lay-verify="required" disabled placeholder="请输入创建人" class="layui-input">
<input type="text" name="createTime" disabled class="layui-input">
</div>
</div>
</div>
... ...
... ... @@ -10,7 +10,28 @@
<div class="layui-inline">
<div class="layui-input-inline layui-input-inline--long">
<input type="text" id="kpiflag_keyword" name="kpiflag_keyword" placeholder="输入关键字,回车搜索" autocomplete="off"
lay-tips="关键字检索包含: </br>指标组名称</br>flag</br>备注</br>绑定资源类型</br>绑定指标"
lay-tips="关键字检索包含: </br>指标组名称</br>flag</br>备注</br>绑定资源类型</br>绑定指标</br>指标组描述</br>创建人"
class="layui-input">
<input type="text" style="display: none">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline layui-input-inline--long">
<input type="text" id="kpiflag_describe" name="kpiflag_describe" placeholder="输入指标组描述,回车搜索" autocomplete="off"
class="layui-input">
<input type="text" style="display: none">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline layui-input-inline--long">
<input type="text" id="kpiflag_kpis" name="kpiflag_kpis" placeholder="输入指标名称,回车搜索" autocomplete="off"
class="layui-input">
<input type="text" style="display: none">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline layui-input-inline--long">
<input type="text" id="kpiflag_restypes" name="kpiflag_restypes" placeholder="输入资源类型,回车搜索" autocomplete="off"
class="layui-input">
<input type="text" style="display: none">
</div>
... ... @@ -48,4 +69,9 @@
layui.use('kpiflagIndex', function (fn) {
fn();
});
</script>
\ No newline at end of file
</script>
<style>
.layui-status .layui-input-inline--long {
width: 190px !important;
}
</style>
\ No newline at end of file
... ...
<article class="page-container">
<form action="" class="layui-form layui-form-pane" lay-filter="form-noticeTimely-add" onsubmit="return false;">
<form class="layui-form layui-form-pane" onsubmit="return false;" action="" lay-filter="form-noticeTimely-add">
<fieldset class="layui-elem-field layui-field-title">
<legend>消息配置</legend>
</fieldset>
... ... @@ -7,120 +7,108 @@
<div class="inline-half layui-inline">
<label class="layui-form-label">名称</label>
<div class="layui-input-inline">
<input class="layui-input" lay-verify="required" name="name" placeholder="请输入名称" type="text">
<input type="text" name="name" lay-verify="required" placeholder="请输入名称" class="layui-input">
</div>
</div>
<div class="inline-half layui-inline">
<label class="layui-form-label">频率</label>
<div class="layui-input-inline">
<input class="layui-input" id="sentFrequency_input_noticeTimely" lay-verify="required" name="frequency"
placeholder="请输入频率" type="text">
</div>
<div class="layui-form-mid layui-word-aux" id="show_corn_info_frequency"
style="padding: 0!important;position: relative;line-height: 38px;display: flex;justify-content: center;margin: 0px;margin-left: 5px;">
<i class="layui-icon form-btn-icon">&#xe702;</i>
</div>
</div>
</div>
<div class="layui-form-item" style="display: flex;justify-content: space-between;">
<div class="layui-inline" style="flex: 1;">
<label class="layui-form-label">状态</label>
<div class="layui-input-inline" style="margin-left: 20px;;width: 100px">
<!-- <div class="layui-input-inline" style="width: calc(20vw - 142px);margin-right:65px;margin-left: 50px;">-->
<input id="switch_noticeTimely_state" lay-skin="switch" lay-text="启用|禁用" name="state"
type="checkbox" value="0">
</div>
</div>
<div class="layui-inline" style="flex: 1;">
<label class="layui-form-label">是否广播</label>
<div class="layui-input-inline" style="margin-left: 20px;width: 100px">
<input id="switch_noticeTimely_broadcast" lay-skin="switch" lay-text="是|否" name="broadcast"
type="checkbox" value="0">
</div>
</div>
<div class="layui-inline" style="">
<label class="layui-form-label">是否轮循</label>
<div class="layui-input-inline" style="margin-left: 20px;width: 100px">
<input id="switch_noticeTimely_retry" lay-skin="switch" lay-text="轮循|不轮循" name="retry"
type="checkbox" value="0">
</div>
</div>
<div class="layui-inline" style="display: none !important;">
<label class="layui-form-label">发送状态</label>
<div class="layui-input-inline" style="width: calc(20vw - 142px);margin-right:0px;margin-left: 50px;">
<input id="switch_noticeTimely_sendState" lay-skin="switch" lay-text="已发送|未发送" name="sendState"
type="checkbox" value="0">
<div class="layui-input-inline" style="padding-left: 6px">
<input type="checkbox" id="switch_noticeTimely_state" name="state" lay-skin="switch" lay-text="启用|禁用" value="0" >
</div>
</div>
</div>
<div class="layui-form-item">
<div class="inline-half layui-inline" style="display: none!important;">
<label class="layui-form-label" style="font-size: 12px">重发延迟时间</label>
<div class="layui-input-inline">
<input class="layui-input" name="retryTime" placeholder="请输入重发延迟时间(秒)" type="text">
<div class="inline-half layui-inline" style="width: 100%">
<label class="layui-form-label">频率</label>
<div style="width: calc(100% - 110px)">
<div class="layui-input-inline" style="width: calc(100% - 10px);display: inline-flex;">
<input type="text" id="sentFrequency_input_noticeTimely" name="frequency" lay-verify="required"
placeholder="请输入频率" class="layui-input">
<i id="show_corn_info_frequency" class="layui-icon form-btn-icon" style="line-height: 32px;margin-left: 5px;">&#xe702;</i>
</div>
</div>
</div>
</div>
<!--添砖地址功能待优化-->
<!--<div class="layui-form-item">
<div class="inline-half layui-inline" style="width: 100%">
<label class="layui-form-label">跳转地址</label>
<div style="width: 95%">
<div class="layui-input-inline" style="width: 46%;">
<div style="width: calc(100% - 110px)">
<div class="layui-input-inline" style="width: 200px;">
<select id="notice_timely_select">
<option disabled="disabled" selected="selected" style='display: none' value=''></option>
<option selected="selected" disabled="disabled" style='display: none' value=''></option>
</select>
</div>
<div class="layui-input-inline" style="margin-left: 1px;width: 52%;">
<input class="layui-input" id="notice_timely_site" name="site" placeholder="请输入详情页地址"
type="text">
<div class="layui-input-inline" style="width: calc(100% - 210px);display: inline-flex;">
<input type="text" name="site" id="notice_timely_site" placeholder="请输入详情页地址" class="layui-input">
<i id="show_corn_info_state" class="layui-icon form-btn-icon" style="line-height: 32px;margin-left: 5px;">&#xe702;</i>
</div>
<div class="layui-form-mid layui-word-aux" id="show_corn_info_state"
style="padding: 0!important;position: relative;line-height: 38px;display: flex;justify-content: center;margin: 0px;margin-left: 5px;">
<i class="layui-icon form-btn-icon">&#xe702;</i>
</div>
</div>
</div>-->
<div class="layui-form-item">
<div class="inline-half layui-inline" style="width: 100%">
<label class="layui-form-label">发送用户</label>
<div style="width: calc(100% - 110px)">
<div class="layui-input-inline" style="width: calc(100% - 10px);display: inline-flex;">
<div class="tags" id="select_noticeTimely_id_user" style="width: calc(100% - 20px);border: solid 1px #D2D2D2;margin-top: 0px;height: 36px;"></div>
<i class="layui-icon form-btn-icon" id="noticeTimely-form-select-users" style="line-height: 36px;margin-left: 5px;">&#xe615;</i>
</div>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="inline-half layui-inline" style="display: none!important;">
<div class="inline-half layui-inline">
<label class="layui-form-label">响应声音</label>
<div class="layui-input-inline">
<select id="noticeTimely_voice" lay-filter="noticeTimely_voice" name="voice">
<option value="咳咳">咳咳</option>
<option value="微信提醒">微信提醒</option>
<option value="滑稽">滑稽</option>
</select>
<div style="display: flex">
<div style=" width: calc(100% - 60px);">
<select name="voice" id="noticeTimely_voice" lay-filter="noticeTimely_voice" >
<option value="14039">叮咚</option>
<option value="咳咳">咳咳</option>
<option value="微信提醒">微信提醒</option>
<option value="滑稽">滑稽</option>
</select>
</div>
<button type="button" class="layui-btn layui-btn-primary" id="playMp3" style="margin-left: 2px">
<i class="layui-icon">&#xe652;</i>
</button>
</div>
</div>
</div>
<div class="inline-half layui-inline" style="display: none!important;">
<div class="inline-half layui-inline">
<label class="layui-form-label">类型</label>
<div class="layui-input-inline">
<input class="layui-input" name="type" placeholder="请输入类型" readonly="readonly" type="text"
value="sql">
<select name="type" id="noticeTimely_type" lay-filter="noticeTimely_type">
<option value="SQL">监控数据库</option>
<option value="TEXT">文本</option>
<option value="ES">es</option>
<option value="INFLUXDB">时序</option>
<!-- <option value="tdEngine">tdEngine</option>-->
</select>
<div style="padding: 3px">
文本支持:#{now} 当前时间格式:yyyy-MM-dd HH:mm:ss
</div>
</div>
</div>
</div>
<div class="layui-form-item layui-form-item-flex">
<label class="layui-form-label" style="height:42px;">用户</label>
<!-- lsq 输入框没在一行 2022-06-29 <div class="layui-input-block tags-input" style="height: auto;width: 90% !important;">-->
<div class="tags-input" style="height: auto;">
<div class="tags" id="select_noticeTimely_id_user"></div>
</div>
<div class="layui-form-mid layui-word-aux"
style="margin-left: 10px; ">
<i class="layui-icon form-btn-icon" id="noticeTimely-form-select-users">&#xe615;</i></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label textarea-label">内容</label>
<div class="layui-input-block" style="display: flex;flex-direction: column;align-items: flex-end;">
<textarea class="layui-textarea" id="layui-notice_timely_sql" name="details" placeholder="请输入内容(SQL)"
style="width: 100%"></textarea>
<div style="width: 100px;height: auto;">
<div id="layui-notice_timely_sql_test"
style="background-color: #1E9FFF;width: 90px;float: right;display: flex;justify-content: center;height: 40px;line-height: 40px;margin-top: 30px; color: #fff;">测试
</div>
<textarea name="details" placeholder="请输入脚本内容" class="layui-textarea" id="layui-notice_timely_sql" style="width: 100%"></textarea>
<div style="width: 100%;padding: 10px 0px;">
<button id="layui-notice_timely_sql_test" class="layui-btn layui-btn-normal">测试脚本</button>
<span style="color: red">* 脚本尽量添加条件,否则一次性查询内容过多导致发送消息失败!(建议发送内容不超过200个汉字)</span>
</div>
</div>
</div>
<button class="hide" id="btn-noticeTimely-submit" lay-filter="btn-noticeTimely-submit" lay-submit>提交</button>
<button id="btn-noticeTimely-submit" class="hide" lay-submit lay-filter="btn-noticeTimely-submit">提交</button>
</form>
<div class="layui-card-body layui-form-pane editNoticeTimelyParam-list" style="padding-top: 0px;">
<fieldset class="layui-elem-field layui-field-title">
... ... @@ -135,16 +123,18 @@
<div class="layui-form-item hide" id="notice_timely_param_sql">
<label class="layui-form-label textarea-label">展示内容</label>
<div class="layui-input-block" style="display: flex;">
<textarea class="layui-textarea" name="details" placeholder="请输入展示内容" style=""></textarea>
<textarea name="templates" placeholder="请输入展示内容" class="layui-textarea" style=""></textarea>
</div>
<div id="details_tags" style="width: 100%;display: flex;flex-wrap: wrap;"></div>
</div>
<div class="layui-form-item hide" id="notice_timely_param_level">
<label class="layui-form-label">展示设置</label>
<span style="color: red;line-height:36px">* 列表数据的状态设置办法:获取“第一条”数据的内容进行判断。</span>
</div>
</div>
</article>
<script id="noticeTimelyParamAddRowHtml" type="text/html">
<div class="layui-form-item">
<script type="text/html" id="noticeTimelyParamAddRowHtml">
<div class="layui-form-item msgSetting">
<div class="layui-inline" style="margin-left: 110px">
<div class="layui-notice-time-lable">当数据集中的</div>
<select class="layui-notice-time-select notice_time_select_sql_value">
... ... @@ -152,8 +142,8 @@
</select>
<div class="layui-notice-time-lable" style="width: 40px;">的值</div>
<select class="layui-notice-time-select notice_time_select_symbol">
<option value="0">大于</option>
<option value="1">小于</option>
<option value="0">大于(适用于数字类型、日期类型)</option>
<option value="1">小于(适用于数字类型、日期类型)</option>
<option value="2">等于</option>
</select>
<input type="text" class="layui-notice-time-btn" value="">
... ... @@ -163,109 +153,66 @@
<option value="2">重要(黄色)</option>
<option value="3">严重(红色)</option>
</select>
<div class="layui-notice-time-lable" style="width: 40px;">提示</div>
<div class="layui-notice-time-lable delete-condition" style="width: 40px;">删除</div>
</div>
</div>
</script>
<!--及时消息配置SQL示例-->
<script id="notice_timely_template" type="text/html">
<script type="text/html" id="notice_timely_template">
<div id="cronContent" style="color:#000000">
<p style="margin: 10px auto; padding: 0px;">
  <strong style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);">展示内容用法详解</span></strong>
  <strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);">展示内容用法详解</span></strong>
</p>
<p style="margin: 10px auto; padding: 0px;">
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">1</span></span><strong
style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">如配置SQL为:select content,way from b_notice_his LIMIT 0,5</span></strong>&nbsp;&nbsp;</span>&nbsp;表示有两列数据,分别为content和way
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">1</span></span><strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">如配置SQL为:select content,way from b_notice_his LIMIT 0,5</span></strong>&nbsp;&nbsp;</span>&nbsp;表示有两列数据,分别为content和way
</p>
<p style="margin: 10px auto; padding: 0px;">
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">2</span></span><strong
style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">若展示内容为:测试,发送内容为#{content},发送类型为#{way}</span></strong>&nbsp;&nbsp;</span>&nbsp;发送的内容就是拼接起来的内
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">2</span></span><strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">若展示内容为:测试,发送内容为#{content},发送类型为#{way}</span></strong>&nbsp;&nbsp;</span>&nbsp;发送的内容就是拼接起来的内
</p>
<p style="margin: 10px auto; padding: 0px;">
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">3</span></span><strong
style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">只支持Mysql语法,且查询结果多行时,默认使用第一行数据</span></strong>&nbsp;&nbsp;</span>&nbsp;可嵌入&lt;/br&gt;进行换行
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">3</span></span><strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">只支持Mysql语法,且查询结果多行时,默认使用第一行数据</span></strong>&nbsp;&nbsp;</span>&nbsp;可嵌入&lt;/br&gt;进行换行
</p>
<p style="margin: 10px auto; padding: 0px;">
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">4</span></span><strong
style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">#{}里面只支持单个参数,展示内容可以不填</span></strong>&nbsp;&nbsp;</span>&nbsp;默认为所有列加逗号的拼
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">4</span></span><strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">#{}里面只支持单个参数,展示内容可以不填</span></strong>&nbsp;&nbsp;</span>&nbsp;默认为所有列加逗号的拼
</p>
<p>
&nbsp;
</p>
<p style="margin: 10px auto; padding: 0px;">
  <strong style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);">展示配置用法详解</span></strong>
  <strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);">展示配置用法详解</span></strong>
</p>
<p style="margin: 10px auto; padding: 0px;">
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">1</span></span><strong
style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">自定义展示设置可只选颜色,也可自定义条件。若不满足条件默认为绿色</span></strong>&nbsp;&nbsp;</span>&nbsp;展示设置中的颜色默认为绿
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">1</span></span><strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">自定义展示设置可只选颜色,也可自定义条件。若不满足条件默认为绿色</span></strong>&nbsp;&nbsp;</span>&nbsp;展示设置中的颜色默认为绿
</p>
<p style="margin: 10px auto; padding: 0px;">
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">2</span></span><strong
style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">当自定义展示设置多天记录时,只会采用第一条</span></strong>&nbsp;&nbsp;</span>&nbsp;自动识别两者比较大小——数字或字符
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">2</span></span><strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">当自定义展示设置多天记录时,只会采用第一条</span></strong>&nbsp;&nbsp;</span>&nbsp;自动识别两者比较大小——数字或字符
</p>
<p style="margin: 10px auto; padding: 0px;">
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">3</span></span><strong
style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">颜色的选择和弹出声音有关系</span></strong>&nbsp;&nbsp;</span>&nbsp;每种颜色对应不同的声
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">3</span></span><strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">颜色的选择和弹出声音有关系</span></strong>&nbsp;&nbsp;</span>&nbsp;每种颜色对应不同的声
</p>
</div>
</script>
<!--及时消息跳转地址示例-->
<script id="notice_timely_site_template" type="text/html">
<script type="text/html" id="notice_timely_site_template">
<div id="cronContent_site" style="color:#000000">
<p style="margin: 10px auto; padding: 0px;">
  <strong style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);">跳转地址用法详解</span></strong>
  <strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);">跳转地址用法详解</span></strong>
</p>
<p style="margin: 10px auto; padding: 0px;">
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">1</span></span><strong
style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">跳转地址的文本框也支持模板配置</span></strong>&nbsp;&nbsp;</span>&nbsp;参数必须是SQL
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">1</span></span><strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">跳转地址的文本框也支持模板配置</span></strong>&nbsp;&nbsp;</span>&nbsp;参数必须是SQL
</p>
<p style="margin: 10px auto; padding: 0px;">
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">2</span></span><strong
style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">跳转地址的下拉框数据在数据字典中配置</span></strong>&nbsp;&nbsp;</span>&nbsp;必须以http://https://开头
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">2</span></span><strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">跳转地址的下拉框数据在数据字典中配置</span></strong>&nbsp;&nbsp;</span>&nbsp;必须以http://https://开头
</p>
<p style="margin: 10px auto; padding: 0px;">
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">3</span></span><strong
style="margin: 0px; padding: 0px;"><span
style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">跳转地址的实际数据是下拉框跟文本框拼接的内容</span></strong>&nbsp;&nbsp;</span>&nbsp;即时消息弹窗点击后会跳转该路
  <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">3</span></span><strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);">跳转地址的实际数据是下拉框跟文本框拼接的内容</span></strong>&nbsp;&nbsp;</span>&nbsp;即时消息弹窗点击后会跳转该路
</p>
</div>
</script>
<script>
layui.use('noticeTimelyAdd', function (fn) {
fn({{ d }});
fn({{d}});
});
</script>
... ...
<title>及时消息配置</title>
<article class="page-container">
<div class="page-panel">
<div class="main commonDiv">
<div class="main">
<div class="layui-card">
<div class="layui-card-header">
<div class="layui-status">
<form class="layui-card-header layuiadmin-card-header-auto layui-form" lay-filter="form-noticeTimely-condition"
onsumit="return false">
<form class="layui-card-header layuiadmin-card-header-auto layui-form" onsumit="return false" lay-filter="form-noticeTimely-condition">
<div class="layui-form-item">
<div class="layui-inline">
<div class="layui-input-inline layui-input-inline--long">
<input autocomplete="off" class="layui-input" lay-tips="关键字检索包含:</br>名称" name="keyword"
placeholder="输入关键字,回车搜索" type="text">
<input type="text" name="keyword" placeholder="输入关键字,回车搜索" autocomplete="off" class="layui-input" lay-tips="关键字检索包含:</br>名称">
</div>
</div>
<button class="layui-btn layui-btn-normal" id="noticeTimelyQueryBtn" type="button">
<!--lsq 查询按钮取消掉图标 2022-06-29-->
查询
</button>
<div class="layui-inline">
<button id="noticeTimelyQueryBtn" type="button" class="layui-btn layui-btn-normal" >查询
</button>
</div>
</div>
</form>
</div>
... ... @@ -40,7 +38,7 @@
</div>
</div>
</article>
<script id="noticeTimely-state-html" type="text/html">
<script type="text/html" id="noticeTimely-state-html" >
<div class="layui-card-body">
<div class="warn-btns">
<button class="layui-btn layui-btn-sm layui-btn-normal" id="btn-notice-state-delete">
... ...
... ... @@ -5,6 +5,12 @@
</fieldset>
<div class="layui-form-item">
<div class="inline-half layui-inline">
<label class="layui-form-label">页面名称<span style="color: red">*</span></label>
<div class="layui-input-inline">
<input type="text" name="name" lay-verify="required" placeholder="请输入页面名称" class="layui-input">
</div>
</div>
<div class="inline-half layui-inline">
<label class="layui-form-label">资源类型<span style="color: red">*</span></label>
<div class="layui-input-inline">
<select name="resType" lay-verify="required" lay-search="" id="restypepagekpi_select_resType" class="layui-select">
... ... @@ -12,6 +18,8 @@
</select>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="inline-half layui-inline">
<label class="layui-form-label">操作系统</label>
<div class="layui-input-inline">
... ... @@ -20,8 +28,6 @@
</select>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="inline-half layui-inline">
<label class="layui-form-label">厂商</label>
<div class="layui-input-inline">
... ... @@ -30,6 +36,8 @@
</select>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="inline-half layui-inline">
<label class="layui-form-label">采集协议</label>
<div class="layui-input-inline">
... ... @@ -38,28 +46,28 @@
</select>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="inline-half layui-inline">
<label class="layui-form-label">型号</label>
<div class="layui-input-inline">
<input type="text" name="model" placeholder="请输入型号" class="layui-input">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="inline-half layui-inline">
<label class="layui-form-label">排序<span style="color: red">*</span></label>
<div class="layui-input-inline">
<input class="layui-input" lay-verify="required" name="sort" value="1" placeholder="请输入排序" type="number">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="inline-half layui-inline">
<label class="layui-form-label">辅助关键字<span style="color: red">*</span></label>
<label class="layui-form-label">辅助关键字</label>
<div class="layui-input-inline">
<input type="text" name="keyword" lay-verify="required" placeholder="请输入辅助关键字" class="layui-input">
<input type="text" name="keyword" placeholder="请输入辅助关键字" class="layui-input">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="inline-half layui-inline">
<label class="layui-form-label">创建人<span style="color: red">*</span></label>
<div class="layui-input-inline">
... ...
... ... @@ -10,7 +10,7 @@
<div class="layui-form-item">
<div class="layui-inline">
<div class="layui-input-inline layui-input-inline--long">
<input autocomplete="off" class="layui-input" name="keywords" placeholder="输入关键字,回车搜索" lay-tips="关键字检索包含:</br>型号</br>关键字</br>备注</br>指标组名称</br>指标名称"
<input autocomplete="off" class="layui-input" name="keywords" placeholder="输入关键字,回车搜索" lay-tips="关键字检索包含:</br>页面名称</br>型号</br>关键字</br>备注</br>指标组名称</br>指标名称"
type="text">
</div>
</div>
... ...
/*! Element Plus v2.2.5 */
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define("element/locale/zh-cn", ["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.ElementPlus.lang = global.ElementPlus.lang || {};
global.ElementPlus.lang.zhCn = mod.exports.default;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
"use strict";
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ElementPlusLocaleZhCn = factory());
})(this, (function () { 'use strict';
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
var _default = {
name: 'zh-cn',
el: {
colorpicker: {
confirm: '确定',
clear: '清空'
},
datepicker: {
now: '此刻',
today: '今天',
cancel: '取消',
clear: '清空',
confirm: '确定',
selectDate: '选择日期',
selectTime: '选择时间',
startDate: '开始日期',
startTime: '开始时间',
endDate: '结束日期',
endTime: '结束时间',
prevYear: '前一年',
nextYear: '后一年',
prevMonth: '上个月',
nextMonth: '下个月',
year: '年',
month1: '1 月',
month2: '2 月',
month3: '3 月',
month4: '4 月',
month5: '5 月',
month6: '6 月',
month7: '7 月',
month8: '8 月',
month9: '9 月',
month10: '10 月',
month11: '11 月',
month12: '12 月',
// week: '周次',
weeks: {
sun: '日',
mon: '一',
tue: '二',
wed: '三',
thu: '四',
fri: '五',
sat: '六'
},
months: {
jan: '一月',
feb: '二月',
mar: '三月',
apr: '四月',
may: '五月',
jun: '六月',
jul: '七月',
aug: '八月',
sep: '九月',
oct: '十月',
nov: '十一月',
dec: '十二月'
}
},
select: {
loading: '加载中',
noMatch: '无匹配数据',
noData: '无数据',
placeholder: '请选择'
},
cascader: {
noMatch: '无匹配数据',
loading: '加载中',
placeholder: '请选择',
noData: '暂无数据'
},
pagination: {
goto: '前往',
pagesize: '条/页',
total: '共 {total} 条',
pageClassifier: '页',
deprecationWarning: '你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档'
},
messagebox: {
title: '提示',
confirm: '确定',
cancel: '取消',
error: '输入的数据不合法!'
},
upload: {
deleteTip: '按 delete 键可删除',
delete: '删除',
preview: '查看图片',
continue: '继续上传'
},
table: {
emptyText: '暂无数据',
confirmFilter: '筛选',
resetFilter: '重置',
clearFilter: '全部',
sumText: '合计'
},
tree: {
emptyText: '暂无数据'
},
transfer: {
noMatch: '无匹配数据',
noData: '无数据',
titles: ['列表 1', '列表 2'],
filterPlaceholder: '请输入搜索内容',
noCheckedFormat: '共 {total} 项',
hasCheckedFormat: '已选 {checked}/{total} 项'
},
image: {
error: '加载失败'
},
pageHeader: {
title: '返回'
},
popconfirm: {
confirmButtonText: '确定',
cancelButtonText: '取消'
}
var zhCn = {
name: "zh-cn",
el: {
colorpicker: {
confirm: "\u786E\u5B9A",
clear: "\u6E05\u7A7A"
},
datepicker: {
now: "\u6B64\u523B",
today: "\u4ECA\u5929",
cancel: "\u53D6\u6D88",
clear: "\u6E05\u7A7A",
confirm: "\u786E\u5B9A",
selectDate: "\u9009\u62E9\u65E5\u671F",
selectTime: "\u9009\u62E9\u65F6\u95F4",
startDate: "\u5F00\u59CB\u65E5\u671F",
startTime: "\u5F00\u59CB\u65F6\u95F4",
endDate: "\u7ED3\u675F\u65E5\u671F",
endTime: "\u7ED3\u675F\u65F6\u95F4",
prevYear: "\u524D\u4E00\u5E74",
nextYear: "\u540E\u4E00\u5E74",
prevMonth: "\u4E0A\u4E2A\u6708",
nextMonth: "\u4E0B\u4E2A\u6708",
year: "\u5E74",
month1: "1 \u6708",
month2: "2 \u6708",
month3: "3 \u6708",
month4: "4 \u6708",
month5: "5 \u6708",
month6: "6 \u6708",
month7: "7 \u6708",
month8: "8 \u6708",
month9: "9 \u6708",
month10: "10 \u6708",
month11: "11 \u6708",
month12: "12 \u6708",
weeks: {
sun: "\u65E5",
mon: "\u4E00",
tue: "\u4E8C",
wed: "\u4E09",
thu: "\u56DB",
fri: "\u4E94",
sat: "\u516D"
},
months: {
jan: "\u4E00\u6708",
feb: "\u4E8C\u6708",
mar: "\u4E09\u6708",
apr: "\u56DB\u6708",
may: "\u4E94\u6708",
jun: "\u516D\u6708",
jul: "\u4E03\u6708",
aug: "\u516B\u6708",
sep: "\u4E5D\u6708",
oct: "\u5341\u6708",
nov: "\u5341\u4E00\u6708",
dec: "\u5341\u4E8C\u6708"
}
};
_exports.default = _default;
});
},
select: {
loading: "\u52A0\u8F7D\u4E2D",
noMatch: "\u65E0\u5339\u914D\u6570\u636E",
noData: "\u65E0\u6570\u636E",
placeholder: "\u8BF7\u9009\u62E9"
},
cascader: {
noMatch: "\u65E0\u5339\u914D\u6570\u636E",
loading: "\u52A0\u8F7D\u4E2D",
placeholder: "\u8BF7\u9009\u62E9",
noData: "\u6682\u65E0\u6570\u636E"
},
pagination: {
goto: "\u524D\u5F80",
pagesize: "\u6761/\u9875",
total: "\u5171 {total} \u6761",
pageClassifier: "\u9875",
deprecationWarning: "\u4F60\u4F7F\u7528\u4E86\u4E00\u4E9B\u5DF2\u88AB\u5E9F\u5F03\u7684\u7528\u6CD5\uFF0C\u8BF7\u53C2\u8003 el-pagination \u7684\u5B98\u65B9\u6587\u6863"
},
messagebox: {
title: "\u63D0\u793A",
confirm: "\u786E\u5B9A",
cancel: "\u53D6\u6D88",
error: "\u8F93\u5165\u7684\u6570\u636E\u4E0D\u5408\u6CD5!"
},
upload: {
deleteTip: "\u6309 delete \u952E\u53EF\u5220\u9664",
delete: "\u5220\u9664",
preview: "\u67E5\u770B\u56FE\u7247",
continue: "\u7EE7\u7EED\u4E0A\u4F20"
},
table: {
emptyText: "\u6682\u65E0\u6570\u636E",
confirmFilter: "\u7B5B\u9009",
resetFilter: "\u91CD\u7F6E",
clearFilter: "\u5168\u90E8",
sumText: "\u5408\u8BA1"
},
tree: {
emptyText: "\u6682\u65E0\u6570\u636E"
},
transfer: {
noMatch: "\u65E0\u5339\u914D\u6570\u636E",
noData: "\u65E0\u6570\u636E",
titles: ["\u5217\u8868 1", "\u5217\u8868 2"],
filterPlaceholder: "\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",
noCheckedFormat: "\u5171 {total} \u9879",
hasCheckedFormat: "\u5DF2\u9009 {checked}/{total} \u9879"
},
image: {
error: "\u52A0\u8F7D\u5931\u8D25"
},
pageHeader: {
title: "\u8FD4\u56DE"
},
popconfirm: {
confirmButtonText: "\u786E\u5B9A",
cancelButtonText: "\u53D6\u6D88"
}
}
};
return zhCn;
}));
... ...
... ... @@ -7,14 +7,15 @@ Promise.all([
import('./script/global.js' + ver),
import('./script/http.js' + ver),
]).then((res) => {
// element plus 切换语言
// https://element-plus.org/zh-CN/guide/i18n.html#configprovider
// 创建vue3的实例
const app = Vue.createApp(res[2].default)
.use(res[0].default) // 挂载vuex
.use(res[1].default) // 挂载路由
.use(ElementPlus, {
locale: ElementPlus.lang.zhCn
locale: ElementPlusLocaleZhCn
})
.use(ElementPlus) // 加载ElementPlus
.use(vant) // 加载vant
... ...
... ... @@ -24,7 +24,7 @@
</dependencies>
<build>
<finalName>nxweb-0.0.1-SNAPSHOT</finalName>
<finalName>nxweb_${timestamp}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
... ... @@ -35,6 +35,22 @@
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<timestampFormat>yyyyMMdd</timestampFormat>
</configuration>
<executions>
<execution>
<goals>
<goal>create-timestamp</goal>
</goals>
</execution>
</executions>
<inherited>false</inherited>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
... ...
... ... @@ -24,7 +24,7 @@
</dependencies>
<build>
<finalName>qhweb</finalName>
<finalName>qhweb_${timestamp}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
... ... @@ -35,6 +35,22 @@
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<timestampFormat>yyyyMMdd</timestampFormat>
</configuration>
<executions>
<execution>
<goals>
<goal>create-timestamp</goal>
</goals>
</execution>
</executions>
<inherited>false</inherited>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
... ...
... ... @@ -1135,6 +1135,8 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
});
//告警级别
form.on('select(alarmLevelSearch)', function (data) {
//lsq 切换告警级别时,获取统计告警量接口的参数更改 2022-08-08
alarmLevel = $("#alarmLevelSearchBox").val()
reloadTable();
});
// 告警确认
... ...
... ... @@ -921,6 +921,8 @@
class="layui-btn layui-btn-danger layui-bg-red layui-btn-radius layui-btn-xs p-0-15 cant-click">
失败
</button>`;
/*lsq 连接失败时tips显示连接失败 2022-08-08*/
linkStateTips='连接失败';
}
}
}}
... ...