Authored by 王涛
Showing 18 changed files with 438 additions and 79 deletions
... ... @@ -35,6 +35,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
//绑定检索事件
bindSearchEvent();
var collProtocols = "";
form.render(null, 'biz-reslist-form');
... ... @@ -123,7 +124,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
linkState: $("#biz_reslist_link_state").val(),
state: $("#biz_reslist_state").val(),
// hostState: $("#biz_reslist_host_state").val(),
powerState: $("#biz_reslist_power_state").val()
powerState: $("#biz_reslist_power_state").val(),
collProtocols: collProtocols
}
, height: 'full-165'
... ... @@ -168,6 +170,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
}
//树表格
function renderTreeTable(bizId, resType, reloadFlag) {
... ... @@ -175,7 +178,10 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
$(".biz_reslist_treetable_search").show();
$("#bizResListTableContent").hide();
$("#bizResTreeTableContent").show();
if (collProtocols) {
xmSelect.get('#collProtocolSelect', true).setValue([]);
collProtocols = '';
}
// 如果是虚拟机或者物理主机,展示电源状态查询条件
if ((resType === 'VIRTUALIZATION_VMWARE_VHOST' || resType === 'VIRTUALIZATION_VMWARE_PHYSICSHOST') && !reloadFlag) {
$('#biz_reslist_treetable_power_state').val('poweredOn');
... ... @@ -222,7 +228,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
state: $("#biz_reslist_treetable_state").val(),
linkState: $('#biz_reslist_treetable_link_state').val(),
powerState: $("#biz_reslist_treetable_power_state").val(),
serverState: $("#biz_reslist_server_state").val()
serverState: $("#biz_reslist_server_state").val(),
collProtocols: collProtocols
}
, done: function (res) {
if (res.code == 0) {
... ... @@ -380,6 +387,10 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
form.on('select(biz_reslist_res_colony)', function (data) {
reloadTable();
});
//资源池选择事件
form.on('select(aliyun_plantform)', function (data) {
reloadTable();
});
//资源连接状态选择事件
form.on('select(biz_reslist_platform)', function (data) {
... ... @@ -409,11 +420,23 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
$('#biz_reslist_resStatus').val('');
$('#biz_reslist_res_colony').val('');
$('#biz_reslist_res_cluster').val('');
$("#aliyun_plantform").val('');
if (collProtocols) {
xmSelect.get('#collProtocolSelect', true).setValue([]);
collProtocols = '';
}
form.render('select');
var targetId = '';
var searchType = "";
var optons = "";
//阿里云显示平台
if(/ALI_CLOUD/.test(resType)){
$("#aliyun_plantform").parent().parent().removeClass("hide");
form.render("select");
}else{
$("#aliyun_plantform").parent().parent().addClass("hide");
}
//华为云物理机,加载华为云集群查询条件
if (resType == 'HUAWEI_CLOUD_PHYSICSHOST') {
optons = "<option value=''>=所属集群=</option>"
... ... @@ -428,6 +451,54 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
} else {
$("#biz_reslist_res_cluster_id").hide();
}
if(/HUAWEI_CLOUD_VIRTUALHOST/.test(resType) || /ALI_CLOUD_ECS/.test(resType) || /VIRTUALIZATION_VMWARE_VHOST/.test(resType)) {
//绑定采集协议
admin.req({
url: common.domainName + '/api-web/manage/protocol/page',
data: {
access_token: accessToken,
startTime: '',
endTime: '',
keyword: '',
hasParam: '',
limit: -1
}
}).done(function (res) {
xmSelect.render({
el: '#collProtocolSelect'
, filterable: true
, tips: '=采集协议='
, name: 'collProtocols'
, prop: {
name: 'protocolName',
value: 'protocolCode',
}
, model: {
label: {
type: 'block',
block: {
//最大显示数量, 0:不限制
showCount: 1,
//是否显示删除图标
showIcon: true,
}
}
}
, data: res.data
, hide: function () {
var selectValue = xmSelect.get('#collProtocolSelect', true).getValue('value');
collProtocols = selectValue.join(',');
form.render()
reloadTable();
if (collProtocols) {
xmSelect.get('#collProtocolSelect', true).setValue([]);
collProtocols = '';
form.render();
}
}
})
})
}
//华为云的集群、虚拟化物理机,查询条件绑定资源池
if (resType == 'HUAWEI_CLOUD_CLUSTER' || resType == 'VIRTUALIZATION_VMWARE_PHYSICSHOST') {
... ... @@ -506,7 +577,9 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
platform: platform,
subResType: $("#biz_reslist_sub_restype").val(),
powerState: $("#biz_reslist_power_state").val(),
serverState: $("#biz_reslist_server_state").val()
serverState: $("#biz_reslist_server_state").val(),
collProtocols: collProtocols,
platform: $("#aliyun_plantform").val()
}
})
}
... ...
... ... @@ -420,8 +420,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
templet: '#resindex_resName'
},
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
// {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
// {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
{field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
{field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
... ... @@ -437,8 +437,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
templet: '#resindex_resName'
},
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
// {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
// {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
{field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
{field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
... ...
... ... @@ -84,11 +84,11 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
return '测试通知'
break;
default:
return '告警通知'
return '系统通知'
break;
}
}else {
return '告警通知'
return '系统通知'
}
}}
, {field: 'way', title: '通知方式', align: 'center', sort: true, width:120,
... ...
... ... @@ -39,9 +39,57 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
if(bizId!=''){
bizId.substring(0,bizId.length-1);
}
reloadTable();
}
});
var collProtocols = '';
initProtocolSelect()
//获取全部协议
function initProtocolSelect() {
admin.req({
url: domainName + '/api-web/manage/protocol/page',
data: {
access_token: accessToken,
startTime: '',
endTime: '',
keyword: '',
hasParam: '',
limit: -1
}
}).done(function (res) {
xmSelect.render({
el: '#collProtocolSelect'
, filterable: true
, tips: '=采集协议='
, name: 'collProtocols'
, prop: {
name: 'protocolName',
value: 'protocolCode',
}
, model: {
label: {
type: 'block',
block: {
//最大显示数量, 0:不限制
showCount: 1,
//是否显示删除图标
showIcon: true,
}
}
}
, data: res.data
,hide: function () {
var selectValue = xmSelect.get('#collProtocolSelect', true).getValue('value');
collProtocols = selectValue.join(',');
form.render()
reloadTable();
}
})
})
}
function autoHeight(el) {
// var height = el.parents('.layui-card').height();
// el.css('min-height', height - 75);
... ... @@ -794,6 +842,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
, id: 'resManageTable'
, url: common.domainName + '/api-web/home/res-list/' + resType
, where: {
access_token: accessToken,
editMode: 'true',
resName: $("#resManageIndexForm").find("input[name='resName']").val() ? $("#resManageIndexForm").find("input[name='resName']").val() : searchId,
... ... @@ -803,7 +852,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
busId: $("#resManageIndexForm").find("input[name='busId']").val(),
state: $("#resManageIndexForm").find("select[name='state']").val(),
parentId: $("#resManageIndexForm").find("select[name='parentId']").val(),
collectionState: $("#resManageIndexForm").find("select[name='collectionState']").val()
collectionState: $("#resManageIndexForm").find("select[name='collectionState']").val(),
collProtocols: collProtocols
}
, height: 'full-200'
, cellMinWidth: 80
... ...
... ... @@ -33,7 +33,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
var bizId='';
var busIdSelect;
var busTypeList = [];
var collProtocols = '';
var editFlag = false;
if (data.choose == '1') {
... ... @@ -68,7 +68,49 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
$('#resindex-leftree-shrink').hide();
});
});
//获取全部协议
function initProtocolSelect() {
admin.req({
url: common.domainName + '/api-web/manage/protocol/page',
data: {
access_token: accessToken,
startTime: '',
endTime: '',
keyword: '',
hasParam: '',
limit: -1
}
}).done(function (res) {
xmSelect.render({
el: '#collProtocolSelect'
, filterable: true
, tips: '=采集协议='
, name: 'collProtocols'
, prop: {
name: 'protocolName',
value: 'protocolCode',
}
, model: {
label: {
type: 'block',
block: {
//最大显示数量, 0:不限制
showCount: 1,
//是否显示删除图标
showIcon: true,
}
}
}
, data: res.data
,hide: function () {
var selectValue = xmSelect.get('#collProtocolSelect', true).getValue('value');
collProtocols = selectValue.join(',');
form.render()
reloadTable();
}
})
})
}
//树展开事件
$("#resindex-leftree_btn").on("click",function () {
$("#resindex-leftree_btn").hide();
... ... @@ -312,6 +354,52 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
// form.render("select");
// });
//$('#treetableBizTypes').val('');
//绑定采集协议
admin.req({
url: domainName + '/api-web/manage/protocol/page',
data: {
access_token: accessToken,
startTime: '',
endTime: '',
keyword: '',
hasParam: '',
limit: -1
}
}).done(function (res) {
xmSelect.render({
el: '#collProtocolSelect'
, filterable: true
, tips: '=采集协议='
, name: 'collProtocols'
, prop: {
name: 'protocolName',
value: 'protocolCode',
}
, model: {
label: {
type: 'block',
block: {
//最大显示数量, 0:不限制
showCount: 1,
//是否显示删除图标
showIcon: true,
}
}
}
, data: res.data
,hide: function () {
var selectValue = xmSelect.get('#collProtocolSelect', true).getValue('value');
collProtocols = selectValue.join(',');
form.render()
reloadTable();
if (collProtocols) {
xmSelect.get('#collProtocolSelect', true).setValue([]);
collProtocols='';
form.render();
}
}
})
})
//绑定业务下拉选择数据
admin.req({
url: domainName + '/api-web/home/business/findAllBusType',
... ... @@ -566,6 +654,11 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
// renderList(currentResType);
reloadTable();
});
//阿里云平台选择事件
form.on('select(aliyun_plantform)', function (data) {
// renderList(currentResType);
reloadTable();
});
//厂商选择事件
form.on('select(res_vendor)', function (data) {
// renderList(currentResType);
... ... @@ -645,7 +738,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
keyWords: $("#treetable_keyword").val(),
health: $("#treetable_resStatus").val(),
state: $("#treetable_res_state").val(),
resCategory: 'resources'
resCategory: 'resources',
collProtocols : collProtocols
}
, done: function (res) {
layer.close(index);
... ... @@ -1123,11 +1218,12 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
if(xmSelect.get("#resListBizTypes") && xmSelect.get("#resListBizTypes")[0]){
xmSelect.get("#resListBizTypes")[0].setValue([]);
}
$("#aliyun_plantform").val('');
$('#res_colony').val('');
$('#res_cluster').val('');
$('#state').val('');
$('#link_state').val('');
//虚拟化查询条件清空
$("#virtual_platForm_select").val('');
$("#treetable_resStatus").val('');
... ... @@ -1135,6 +1231,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
if(xmSelect.get("#treetableBizTypes") && xmSelect.get("#treetableBizTypes")[0]){
xmSelect.get("#treetableBizTypes")[0].setValue([]);
}
// if(xmSelect.get("#collProtocolSelect") && xmSelect.get("#collProtocolSelect")[0]){
// xmSelect.get("#collProtocolSelect")[0].setValue([]);
// }
$("#treetable_keyword").val('');
$("#treetable_state").val('');
... ... @@ -1152,6 +1251,13 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
var targetId = '';
var searchType = "";
var optons = "";
//阿里云显示平台
if(/ALI_CLOUD/.test(resType)){
$("#aliyun_plantform").parent().parent().removeClass("hide");
form.render("select");
}else{
$("#aliyun_plantform").parent().parent().addClass("hide");
}
//华为云物理机,加载华为云集群查询条件
if (resType == 'HUAWEI_CLOUD_PHYSICSHOST') {
optons = "<option value=''>=所属集群=</option>"
... ... @@ -1218,7 +1324,54 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
} else {
$("#res_vendor").parent().parent().addClass("hide");
}
if(/HUAWEI_CLOUD_VIRTUALHOST/.test(resType) || /ALI_CLOUD_ECS/.test(resType) || /VIRTUALIZATION_VMWARE_VHOST/.test(resType)){
//绑定采集协议
admin.req({
url: domainName + '/api-web/manage/protocol/page',
data: {
access_token: accessToken,
startTime: '',
endTime: '',
keyword: '',
hasParam: '',
limit: -1
}
}).done(function (res) {
xmSelect.render({
el: '#collProtocolSelect'
, filterable: true
, tips: '=采集协议='
, name: 'collProtocols'
, prop: {
name: 'protocolName',
value: 'protocolCode',
}
, model: {
label: {
type: 'block',
block: {
//最大显示数量, 0:不限制
showCount: 1,
//是否显示删除图标
showIcon: true,
}
}
}
, data: res.data
, hide: function () {
var selectValue = xmSelect.get('#collProtocolSelect', true).getValue('value');
collProtocols = selectValue.join(',');
form.render()
reloadTable();
if (collProtocols) {
xmSelect.get('#collProtocolSelect', true).setValue([]);
collProtocols = '';
form.render();
}
}
})
})
}
if (resType === 'HOST_MINICOMPUTER_PARTITION') {
$("#res_minicomputer").parent().parent().removeClass("hide");
var minicomputerStr = '';
... ... @@ -1260,9 +1413,11 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
form.render("select");
})
}
if(subflag && !resTypeSelectExclude.includes(resType)){
if(/ALI_CLOUD_/.test(resType) || /HUAWEI_CLOUD_/.test(resType)) {
return
return;
}
$("#res_sub_restype").parent().parent().removeClass("hide");
$(".top-head-info").removeClass("hide");
... ... @@ -1380,7 +1535,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
ptId: $("#res_platform").val(),
subResType:$("#res_sub_restype").val(),
provider: $("#res_vendor").val(),
resCategory: 'resources'
resCategory: 'resources',
collProtocols:collProtocols,
platform: $("#aliyun_plantform").val(),
}
})
}
... ...
... ... @@ -52,6 +52,12 @@
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline layui-input-inline--long" style="width: 180px;">
<div id="collProtocolSelect" class="xm-select">
</div>
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
<select name="parentId" id="slt_res_manage_superior" lay-filter="slt_res_manage_superior">
... ...
... ... @@ -94,6 +94,7 @@
</select>
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
<select name="label" id="biz_reslist_state" lay-filter="biz_reslist_state">
... ... @@ -105,6 +106,20 @@
</select>
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline layui-input-inline--long" style="width: 180px;">
<div id="collProtocolSelect" class="xm-select">
</div>
</div>
</div>
<div class="layui-inline hide">
<div class="layui-input-inline">
<select name="platform" id="aliyun_plantform" lay-filter="aliyun_plantform">
<option value="">=阿里回迁云平台=</option>
<option value="阿里云">=阿里云平台=</option>
</select>
</div>
</div>
</div>
<!--树表格的检索条件-->
... ...
... ... @@ -153,6 +153,12 @@
</select>
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline layui-input-inline--long" style="width: 180px;">
<div id="collProtocolSelect" class="xm-select">
</div>
</div>
</div>
<div class="layui-inline hide" >
<div class="layui-input-inline">
<select name="label" id="res_sub_restype" lay-filter="sub_restype">
... ... @@ -174,6 +180,14 @@
</select>
</div>
</div>
<div class="layui-inline hide">
<div class="layui-input-inline">
<select name="platform" id="aliyun_plantform" lay-filter="aliyun_plantform">
<option value="">=阿里回迁云平台=</option>
<option value="阿里云">=阿里云平台=</option>
</select>
</div>
</div>
</div>
</form>
</div>
... ... @@ -228,15 +242,11 @@
</div>
</div>
<div class="layui-inline">
<!-- <div class="layui-input-inline">-->
<!-- <select name="label" id="treetableBizTypes" lay-filter="treetableBizTypes">-->
<!-- <option value="">=所属业务=</option>-->
<!-- </select>-->
<!-- </div>-->
<div class="layui-input-inline layui-input-inline--long">
<div id="treetableBizTypes" class="xm-select-demo"></div>
</div>
</div>
<div class="layui-inline" id="virtual_platform_div_id">
<div class="layui-input-inline">
<select name="label" id="virtual_platForm_select" lay-filter="virtual_platForm_select">
... ...
... ... @@ -4,7 +4,7 @@
<div class="layui-tab layui-tab-card" lay-filter="detail-tab">
<ul class="layui-tab-title">
<li class="layui-this">数据库信息</li>
<li>RAC信息</li>
<!--<li>RAC信息</li>-->
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
... ...
... ... @@ -124,7 +124,7 @@
position: absolute;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-top: 8px;
margin-top: 10px;
color: #3d96de;
padding-top: 6px;
... ... @@ -138,34 +138,48 @@
.yxqk .items li.list-2{
background-image: url('/vue3/src/assets/images/zjdp/bg-li-r-3.png');
}
.yxqk .items li.list-3{
background-image: url('/vue3/src/assets/images/zjdp/bg-li-r-4.png');
}
.yxqk .items li.list-4{
background-image: url('/vue3/src/assets/images/zjdp/bg-li-l-2.png');
background-image: url('/vue3/src/assets/images/zjdp/bg-li-l-1.png');
}
.yxqk .items li.list-5{
background-image: url('/vue3/src/assets/images/zjdp/bg-li-l-2.png');
}
.yxqk .items li.list-6{
background-image: url('/vue3/src/assets/images/zjdp/bg-li-l-3.png');
}
.yxqk .items li.list-0,.yxqk .items li.list-1,.yxqk .items li.list-2{
.yxqk .items li.list-7{
background-image: url('/vue3/src/assets/images/zjdp/bg-li-l-4.png');
}
.yxqk .items li.list-0,.yxqk .items li.list-1,.yxqk .items li.list-2,.yxqk .items li.list-3{
right:0;
}
.yxqk .items li.list-3,.yxqk .items li.list-4,.yxqk .items li.list-5{
.yxqk .items li.list-4,.yxqk .items li.list-5,.yxqk .items li.list-6,.yxqk .items li.list-7{
left:0;
}
.yxqk .items li.list-0,.yxqk .items li.list-3{
top:15px;
.yxqk .items li.list-0,.yxqk .items li.list-4{
top:12px;
width:37%;
}
.yxqk .items li.list-1,.yxqk .items li.list-5{
top:63px;
}
.yxqk .items li.list-1,.yxqk .items li.list-4{
top:70px;
.yxqk .items li.list-2,.yxqk .items li.list-6{
top:113px;
}
.yxqk .items li.list-2,.yxqk .items li.list-5{
top:126px;
.yxqk .items li.list-3,.yxqk .items li.list-7{
top:164px;
width: 37%;
}
.yxqk .items li.list-0 img,.yxqk .items li.list-1 img,.yxqk .items li.list-2 img{
.yxqk .items li.list-0 img,.yxqk .items li.list-1 img,.yxqk .items li.list-2 img,.yxqk .items li.list-3 img{
left:20px;
}
.yxqk .items li.list-0 p,.yxqk .items li.list-1 p,.yxqk .items li.list-2 p{
.yxqk .items li.list-0 p,.yxqk .items li.list-1 p,.yxqk .items li.list-2 p,.yxqk .items li.list-3 p{
left:49px;
}
.yxqk .items li.list-3 .listNum,.yxqk .items li.list-4 .listNum,.yxqk .items li.list-5 .listNum{
.yxqk .items li.list-4 .listNum,.yxqk .items li.list-5 .listNum,.yxqk .items li.list-6 .listNum,.yxqk .items li.list-7 .listNum{
right:20px;
}
.yxqk .items li p{
... ...
... ... @@ -123,8 +123,7 @@ const routes = [{
{
path: '/fault/index',
name: 'faultIndex',
// component: () => myImport('views/faultDiagnosis/index')
component: () => myImport('views/faultDiagnosis/components/faultForm/index')
component: () => myImport('views/faultDiagnosis/index')
},
{
path: '/fault/faultForm',
... ...
... ... @@ -4,7 +4,8 @@ export default {
components: {},
data () {
return {
// chartInstance: null
timer: null,
domainName:sessionStorage.getItem('domainName'),
titleFontSize: 80,
// 千万位数
mustBit: 0,
... ... @@ -82,11 +83,12 @@ export default {
},
mounted () {
// this.startInterval()
// this.initChart()
this.getData(this)
window.addEventListener('resize', this.screenAdapter)
this.screenAdapter()
this.startInterval()
},
unmounted () {
window.removeEventListener('resize', this.screenAdapter)
... ... @@ -146,12 +148,12 @@ export default {
}
},
getData (that) {
const { proxy } = Vue.getCurrentInstance();
// const { proxy } = Vue.getCurrentInstance();
var params = {
kipValue1: that.kipValue1,
kipValue2: that.kipValue2
};
proxy.$http.get("/api-web/bigScreen/digitalBoardData", params, function (res) {
$.get(that.domainName +"/api-web/bigScreen/digitalBoardData"+'?access_token='+localStorage.getItem('access_token'), params, function (res) {
if(res.success){
const map = res.map
// 左边数
... ... @@ -176,11 +178,17 @@ export default {
this.titleFontSize = document.getElementById('digitalboard_down_ref').offsetWidth / 100 * 3.6
},
startInterval () {
let that=this;
if (this.timer) {
clearInterval(this.timer)
}
// 单元测试 数字板增长
setInterval(() => {
this.declaredAmountNumber += 10
this.initChart()
}, 2000)
that.getData(that)
}, 10000)
},
numberFilter(val,places = 2) {
//value为传进来的数据 比如 12345.6789
... ...
... ... @@ -4,7 +4,8 @@ export default {
components: {},
data () {
return {
// chartInstance: null
timer: null,
domainName:sessionStorage.getItem('domainName'),
titleFontSize: 80,
// 千万位数
mustBit: 0,
... ... @@ -87,8 +88,11 @@ export default {
this.getData(this)
window.addEventListener('resize', this.screenAdapter)
this.screenAdapter()
this.startInterval()
},
unmounted () {
clearInterval(this.timer)
window.removeEventListener('resize', this.screenAdapter)
},
methods: {
... ... @@ -146,12 +150,12 @@ export default {
}
},
getData (that) {
const { proxy } = Vue.getCurrentInstance();
// const { proxy } = Vue.getCurrentInstance();
var params = {
kipValue1: that.kipValue1,
kipValue2: that.kipValue2
};
proxy.$http.get("/api-web/bigScreen/digitalBoardData", params, function (res) {
$.get(that.domainName +"/api-web/bigScreen/digitalBoardData"+'?access_token='+localStorage.getItem('access_token'), params, function (res) {
if(res.success){
const map = res.map
// 左边数
... ... @@ -176,11 +180,16 @@ export default {
this.titleFontSize = document.getElementById('digitalboard_top_ref').offsetWidth / 100 * 3.6
},
startInterval () {
let that=this;
if (this.timer) {
clearInterval(this.timer)
}
// 单元测试 数字板增长
setInterval(() => {
this.declaredAmountNumber += 10
this.initChart()
}, 2000)
this.timer=setInterval(() => {
that.declaredAmountNumber += 10
that.getData(that)
}, 10000)
},
numberFilter(val,places = 2) {
//value为传进来的数据 比如 12345.6789
... ...
... ... @@ -39,7 +39,7 @@
<div id="yxqk__banner">
<ul id="yxjk_resource_type_count_id">
<div id="yxjk_resource_type_count_id_tmpl">
<li :class="'list-'+index" v-for="(item,index) in assetOverviewData">
<li :class="'list-'+index" v-for="(item,index) in assetOverviewDataAll">
<img :src="'src/assets/images/zjdp/'+item.code+'.png'">
<div style="margin-left: .02rem;">
<p>{{item.name}}</p>
... ...
... ... @@ -8,6 +8,7 @@ export default {
},
data(){
return {
timer:null,//定时刷新
domainName:sessionStorage.getItem('domainName'),
apiUrl:'/api-web/bigScreen/digitalBoardData',//本月已申报/未申报
apiUrl1:'/api-web/bigScreen/findPortfolio',//今日业务量
... ... @@ -69,29 +70,8 @@ export default {
}
});
$.get(proxy.domainName +proxy.apiUrl+'?kipValue1=KPIDA0ACBBF&kipValue2=KPIDA0ACBBD'+'&access_token='+localStorage.getItem('access_token'),function (res) {
const data = res;
if(data && data.map){
let reportableMonth=data.map.rightNumber;
proxy.declaredMonth=data.map.leftNumber;
proxy.reportableMonth=proxy.numberFilter(reportableMonth,-1);
// let reportable=parseInt(data.map.rightNumber)+parseInt(data.map.leftNumber);
// proxy.reportable=proxy.numberFilter(reportable,-1);
}
})
$.get(proxy.domainName +proxy.apiUrl+'?kipValue1=KPIDA0ACBBS&kipValue2=KPIDA0ACBBE'+'&access_token='+localStorage.getItem('access_token'),function (res) {
const data = res;
if(data && data.map){
let reportableToday=data.map.rightNumber;
proxy.declaredToday=data.map.leftNumber;
proxy.reportableToday=proxy.numberFilter(reportableToday,-1);
}
})
proxy.getDeclareData();
proxy.startInterval();
//业务量
$.get(proxy.domainName +proxy.apiUrl1+'?access_token='+localStorage.getItem('access_token'),function (res) {
... ... @@ -135,6 +115,39 @@ export default {
})
})
const startInterval=()=>{
if (proxy.timer) {
clearInterval(proxy.timer)
}
proxy.timer=setInterval(function (){
proxy.getDeclareData();
},10000)
}
const getDeclareData=()=>{
$.get(proxy.domainName +proxy.apiUrl+'?kipValue1=KPIDA0ACBBF&kipValue2=KPIDA0ACBBD'+'&access_token='+localStorage.getItem('access_token'),function (res) {
const data = res;
if(data && data.map){
let reportableMonth=data.map.rightNumber;
proxy.declaredMonth=data.map.leftNumber;
proxy.reportableMonth=proxy.numberFilter(reportableMonth,-1);
// let reportable=parseInt(data.map.rightNumber)+parseInt(data.map.leftNumber);
// proxy.reportable=proxy.numberFilter(reportable,-1);
}
})
$.get(proxy.domainName +proxy.apiUrl+'?kipValue1=KPIDA0ACBBS&kipValue2=KPIDA0ACBBE'+'&access_token='+localStorage.getItem('access_token'),function (res) {
const data = res;
if(data && data.map){
let reportableToday=data.map.rightNumber;
proxy.declaredToday=data.map.leftNumber;
proxy.reportableToday=proxy.numberFilter(reportableToday,-1);
}
})
}
const eleWidthNum=(num,maxNum)=>{
let widthNum=Math.ceil((num*150)/maxNum)
let widthData=0;
... ... @@ -170,7 +183,12 @@ export default {
return{
numberFilter,
eleWidthNum
eleWidthNum,
getDeclareData,
startInterval
}
}
},
unmounted () {
clearInterval(this.timer)
},
}
... ...
... ... @@ -86,7 +86,7 @@ export default {
proxy.clickNext()
}else{
proxy.checkId=listArray[index-1]
if(index==5){
if(index%5==0){
proxy.preNext()
}
}
... ...