Authored by zhangtianqi

快照概览、快照概览优化

... ... @@ -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,
... ... @@ -134,10 +133,10 @@ layui.define(['commonDetail', 'common', 'sessions'], function (exports) {
//定时任务
var timer = setInterval(function () {
findAllSnapshot()
}, commonDetail.timerTime);
commonDetail.detailTimer.push(timer);
// 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"
... ...
... ... @@ -96,6 +96,8 @@ export default {
batchNo: batchNo.toString()
}
deleteSnapshot(params);
}else{
proxy.$global.showMsg('请至少选择一条数据','error')
}
}
//删除
... ...
... ... @@ -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'
},
]
})
... ...
... ... @@ -22,7 +22,7 @@ export default {
label: '资源类型',
sortable: true,
align: 'center',
width: '220',
width: '120',
},
{
prop: 'resName',
... ... @@ -48,7 +48,7 @@ export default {
label: '所属业务系统',
sortable: true,
align: 'center',
width: '280'
width: '420'
},
{
prop: 'nickname',
... ... @@ -68,7 +68,8 @@ export default {
prop: 'createTime',
label: '快照创建时间',
sortable: true,
align: 'center'
align: 'center',
width: '200'
},
]
})
... ... @@ -206,8 +207,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 +250,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 +263,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 +310,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'
... ...