Authored by 王涛

Merge branch 'master-500-dev-ztq1' into 'master-500-dev'

Master 500 dev ztq1



See merge request !756
... ... @@ -19,14 +19,13 @@ layui.define(['commonDetail', 'common', 'sessions'], function (exports) {
resId = data.resId;
batchNo = data.batchNo;
}
// 删除所有的子元素
$('#table_arr_body').empty();
findAllSnapshot();
commonDetail.bindTips();
function findAllSnapshot() {
// 删除所有的子元素
$('#table_arr_body').empty();
let url = common.domainName + '/api-web/snapshot/info?resId='+ resId + '&batchNo='+batchNo +'&access_token='+sessions.getToken().access_token;
$.ajax({
url: url,
... ... @@ -34,11 +33,11 @@ layui.define(['commonDetail', 'common', 'sessions'], function (exports) {
async: false,
success: function (res) {
if (res.success){
if (res.object.snapshotResState.length>0){
if (res.object.snapshotResState.length > 0){
commonDetail.snapshotRenderResHealth(res.object.snapshotResState);
}
commonDetail.anapshotRenderTextCols('hostminicomputerpartition_jbxx',res.object.snapshotBaseInformationList,2);
if (res.object.importantInformationList > 0){
if (res.object.importantInformationList.length > 0){
commonDetail.anapshotRenderTextCols('hostminicomputerpartition_sysfile',res.object.importantInformationList,2);
}else {
$("#hostminicomputerpartition_sysfile").html('<div style="text-align:center;"><span style="line-height: 150px; padding:20px;font-style:normal;">暂无数据</span></div>')
... ... @@ -132,5 +131,12 @@ layui.define(['commonDetail', 'common', 'sessions'], function (exports) {
}
//定时任务
// var timer = setInterval(function () {
// findAllSnapshot()
// }, commonDetail.timerTime);
// commonDetail.detailTimer.push(timer);
});
});
... ...
... ... @@ -29,12 +29,16 @@
<el-form-item>
<el-button :size="$global.elementConfig.size.button" type="primary" @click="getDataList">查询</el-button>
</el-form-item>
</div>
</div>
<div class="search">
<div class="condition ping">
<el-form-item>
<el-button :size="$global.elementConfig.size.button" @click="deleteHistory">删除</el-button>
<el-button type="danger" :size="$global.elementConfig.size.button" @click="deleteHistory">删除</el-button>
</el-form-item>
</div>
</div>
<div class="search-table">
<div class="search-table" style="padding: 0 10px;">
<cm-table-page :columns="tableData.columns" :dataList="tableData.dataList" :height="(height - 110)"
:loading="false" :pageSize="search.pageSize" :showBorder="true"
:showIndex="true" :showPage="true" :showSelection="true"
... ...
... ... @@ -27,7 +27,7 @@ export default {
label: '资源类型',
sortable: true,
align: 'center',
width: '220',
width: '120',
},
{
prop: 'resName',
... ... @@ -53,7 +53,7 @@ export default {
label: '所属业务系统',
sortable: true,
align: 'center',
width: '280'
width: '420'
},
{
prop: 'nickname',
... ... @@ -73,7 +73,8 @@ export default {
prop: 'createTime',
label: '快照创建时间',
sortable: true,
align: 'center'
align: 'center',
width: '200'
},
]
})
... ...
... ... @@ -57,19 +57,19 @@ export default {
width: '140'
},
{
prop: 'createTime',
label: '快照创建时间',
prop: 'createUser',
label: '快照创建人',
sortable: true,
align: 'center',
width: '170'
width: '130'
},
{
prop: 'createUser',
label: '快照创建人',
prop: 'createTime',
label: '快照创建时间',
sortable: true,
align: 'center',
width: '120'
}
width: '170'
},
]
})
... ... @@ -206,8 +206,10 @@ export default {
bizCharts = echarts.init(bizChartsRefs.value);
let bizOption = {
grid:{
top:"14%",
bottom:"8%"
top:"8%",
bottom:"4%",
left:"2%",
containLabel:true,
},
tooltip: {
trigger: 'item'
... ... @@ -247,8 +249,10 @@ export default {
devCharts = echarts.init(devChartsRefs.value);
let devOption = {
grid:{
top:"14%",
bottom:"8%"
top:"8%",
bottom:"4%",
left:"2%",
containLabel:true,
},
tooltip: {
trigger: 'item'
... ... @@ -258,6 +262,23 @@ export default {
type: 'category',
data: [],
axisTick:false,
axisLabel: {
// x轴文本换行
formatter: function (params,index) {
if (params.length>10){
var newParamsName = '' // 最终拼接成的字符串
let end1 = Math.ceil(params.length / 2);
let end2 = params.length-end1;
let str1 = params.substr(0,end1);
let str2 = params.substr(end1+1,end2);
newParamsName = str1+'\n'+str2;
// console.log(params.length,params);
return newParamsName
}else {
return params
}
}
}
},
yAxis: {
type: 'value',
... ... @@ -288,8 +309,10 @@ export default {
snapshotCharts = echarts.init(snapshotChartsRefs.value);
let shapshotOption = {
grid:{
top:"14%",
bottom:"8%"
top:"8%",
bottom:"8%",
left:"2%",
containLabel:true,
},
tooltip: {
trigger: 'item'
... ...