function qurbiztemplate(data) {
var description = "相关信息..."
biztemplateArray.forEach(element => {
if (element._id == data) {
console.log(element.rightsmanage)
description = '<div><li>描述:' +
element.description + '</li><li>' + '管理方式:'
+ (element.managetype == 1 ? +'<span>GOP</span>' : '<span>sdnc</span>') + '</li>' +
'<li>管理通道:' + (element.managetunnel == 1 ? '<span>IF6</span>' : '<span>vxlan over l2tp、双通道</span>') + '</li>' +
'<li>随选平面建立:' + (element.planeenabletrue ? '<span>是</span>' : '<span>否</span>') + '</li>' +
'<li>L3服务:' + (element.vxlantype == 2 ? '<span>L2</span>' : '<span>L3</span>') + '</li>' +
'<li>SFC(单一VCPE):' + element.sfctype + '</li>' +
'<li>分权分域配置:' + (element.rightsmanage == 1 ? '<span>单权限组</span>' : '<span>4权限组</span>') + '</li>' +
'<li>网关:' + element.gatewayconfig + '</li>' +
'<li>SDWAN终端配置:' + element.terminalconfig + '</li>' +
'<li>设备告警:' + (element.warnenable == true ? '<span>是</span>' : '<span>否</span>') + '</li>' +
'<li>基于服务的终端统计:' + (element.summaryenable == true ? '<span>是</span>' : '<span>否</span>') + '</li></div>';
}
});
return description;
}
var tips;
$('#biztemplatediv').on('mouseenter', '.layui-form-selected dl dd', function (obj) {
var data = $(this).attr('lay-value');
var content = qurbiztemplate(data);
console.log(content);
tips = layer.tips('' + content, this, { tips: [2, 'gray'], time: 0 }, function () {
});
})
$('#biztemplatediv').on('mouseout', '.layui-form-selected dl dd', function () {
layer.close(tips);
})
var biztemplateArray = [];
function getbiztemplate(biztemplateselected = '', supportvasarg) {
$.ajax({
url: '/index/accessequipment/api_getbiztemplate',
type: 'get',
dataType: 'JSON',
success: function (res) {
$('#biztemplate').html('');
var biztemplate = '';
var supportvas = '';
if (res.result == 1) {
if (res.data.rows.length > 0) {
$.each(res.data.rows, function (i, index) {
biztemplateArray[i] = index;
if (biztemplateselected == index._id) {
biztemplate += '<option value="' + index._id + '" selected>' + index.name + '</option>'
console.log("******biztemplate****beselected")
getvas(index._id);
if (index.managetype == 1) {
getdomainallvcpe(selectedvcpe = '')
}
else {
}
} else {
biztemplate += '<option value="' + index._id + '">' + index.name + '</option>'
getvas(res.data.rows[0]._id);
}
})
} else {
layer.msg('获取业务员模板失败 code:' + res.result);
}
$('#biztemplate').html(biztemplate);
getsupportvas(supportvasarg);
}
},
error: function () {
layer.msg('获取业务模板失败');
}
})
}
选择后 关闭提示
form.on('select(biztemplate)', function (data) {
getvas(data.value);
console.log(data.value + "biztemplate*************clicked")
layer.close(tips);
});