Merge branch 'master-500-dev-ztq1' into 'master-500-dev'
Master 500 dev ztq1 See merge request !756
Showing
4 changed files
with
57 additions
and
23 deletions
@@ -19,14 +19,13 @@ layui.define(['commonDetail', 'common', 'sessions'], function (exports) { | @@ -19,14 +19,13 @@ layui.define(['commonDetail', 'common', 'sessions'], function (exports) { | ||
19 | resId = data.resId; | 19 | resId = data.resId; |
20 | batchNo = data.batchNo; | 20 | batchNo = data.batchNo; |
21 | } | 21 | } |
22 | - // 删除所有的子元素 | ||
23 | - $('#table_arr_body').empty(); | ||
24 | - | ||
25 | findAllSnapshot(); | 22 | findAllSnapshot(); |
26 | 23 | ||
27 | commonDetail.bindTips(); | 24 | commonDetail.bindTips(); |
28 | 25 | ||
29 | function findAllSnapshot() { | 26 | function findAllSnapshot() { |
27 | + // 删除所有的子元素 | ||
28 | + $('#table_arr_body').empty(); | ||
30 | let url = common.domainName + '/api-web/snapshot/info?resId='+ resId + '&batchNo='+batchNo +'&access_token='+sessions.getToken().access_token; | 29 | let url = common.domainName + '/api-web/snapshot/info?resId='+ resId + '&batchNo='+batchNo +'&access_token='+sessions.getToken().access_token; |
31 | $.ajax({ | 30 | $.ajax({ |
32 | url: url, | 31 | url: url, |
@@ -34,11 +33,11 @@ layui.define(['commonDetail', 'common', 'sessions'], function (exports) { | @@ -34,11 +33,11 @@ layui.define(['commonDetail', 'common', 'sessions'], function (exports) { | ||
34 | async: false, | 33 | async: false, |
35 | success: function (res) { | 34 | success: function (res) { |
36 | if (res.success){ | 35 | if (res.success){ |
37 | - if (res.object.snapshotResState.length>0){ | 36 | + if (res.object.snapshotResState.length > 0){ |
38 | commonDetail.snapshotRenderResHealth(res.object.snapshotResState); | 37 | commonDetail.snapshotRenderResHealth(res.object.snapshotResState); |
39 | } | 38 | } |
40 | commonDetail.anapshotRenderTextCols('hostminicomputerpartition_jbxx',res.object.snapshotBaseInformationList,2); | 39 | commonDetail.anapshotRenderTextCols('hostminicomputerpartition_jbxx',res.object.snapshotBaseInformationList,2); |
41 | - if (res.object.importantInformationList > 0){ | 40 | + if (res.object.importantInformationList.length > 0){ |
42 | commonDetail.anapshotRenderTextCols('hostminicomputerpartition_sysfile',res.object.importantInformationList,2); | 41 | commonDetail.anapshotRenderTextCols('hostminicomputerpartition_sysfile',res.object.importantInformationList,2); |
43 | }else { | 42 | }else { |
44 | $("#hostminicomputerpartition_sysfile").html('<div style="text-align:center;"><span style="line-height: 150px; padding:20px;font-style:normal;">暂无数据</span></div>') | 43 | $("#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) { | @@ -132,5 +131,12 @@ layui.define(['commonDetail', 'common', 'sessions'], function (exports) { | ||
132 | } | 131 | } |
133 | 132 | ||
134 | 133 | ||
134 | + | ||
135 | + //定时任务 | ||
136 | + // var timer = setInterval(function () { | ||
137 | + // findAllSnapshot() | ||
138 | + // }, commonDetail.timerTime); | ||
139 | + // commonDetail.detailTimer.push(timer); | ||
140 | + | ||
135 | }); | 141 | }); |
136 | }); | 142 | }); |
@@ -29,12 +29,16 @@ | @@ -29,12 +29,16 @@ | ||
29 | <el-form-item> | 29 | <el-form-item> |
30 | <el-button :size="$global.elementConfig.size.button" type="primary" @click="getDataList">查询</el-button> | 30 | <el-button :size="$global.elementConfig.size.button" type="primary" @click="getDataList">查询</el-button> |
31 | </el-form-item> | 31 | </el-form-item> |
32 | + </div> | ||
33 | + </div> | ||
34 | + <div class="search"> | ||
35 | + <div class="condition ping"> | ||
32 | <el-form-item> | 36 | <el-form-item> |
33 | - <el-button :size="$global.elementConfig.size.button" @click="deleteHistory">删除</el-button> | 37 | + <el-button type="danger" :size="$global.elementConfig.size.button" @click="deleteHistory">删除</el-button> |
34 | </el-form-item> | 38 | </el-form-item> |
35 | </div> | 39 | </div> |
36 | </div> | 40 | </div> |
37 | - <div class="search-table"> | 41 | + <div class="search-table" style="padding: 0 10px;"> |
38 | <cm-table-page :columns="tableData.columns" :dataList="tableData.dataList" :height="(height - 110)" | 42 | <cm-table-page :columns="tableData.columns" :dataList="tableData.dataList" :height="(height - 110)" |
39 | :loading="false" :pageSize="search.pageSize" :showBorder="true" | 43 | :loading="false" :pageSize="search.pageSize" :showBorder="true" |
40 | :showIndex="true" :showPage="true" :showSelection="true" | 44 | :showIndex="true" :showPage="true" :showSelection="true" |
@@ -27,7 +27,7 @@ export default { | @@ -27,7 +27,7 @@ export default { | ||
27 | label: '资源类型', | 27 | label: '资源类型', |
28 | sortable: true, | 28 | sortable: true, |
29 | align: 'center', | 29 | align: 'center', |
30 | - width: '220', | 30 | + width: '120', |
31 | }, | 31 | }, |
32 | { | 32 | { |
33 | prop: 'resName', | 33 | prop: 'resName', |
@@ -53,7 +53,7 @@ export default { | @@ -53,7 +53,7 @@ export default { | ||
53 | label: '所属业务系统', | 53 | label: '所属业务系统', |
54 | sortable: true, | 54 | sortable: true, |
55 | align: 'center', | 55 | align: 'center', |
56 | - width: '280' | 56 | + width: '420' |
57 | }, | 57 | }, |
58 | { | 58 | { |
59 | prop: 'nickname', | 59 | prop: 'nickname', |
@@ -73,7 +73,8 @@ export default { | @@ -73,7 +73,8 @@ export default { | ||
73 | prop: 'createTime', | 73 | prop: 'createTime', |
74 | label: '快照创建时间', | 74 | label: '快照创建时间', |
75 | sortable: true, | 75 | sortable: true, |
76 | - align: 'center' | 76 | + align: 'center', |
77 | + width: '200' | ||
77 | }, | 78 | }, |
78 | ] | 79 | ] |
79 | }) | 80 | }) |
@@ -57,19 +57,19 @@ export default { | @@ -57,19 +57,19 @@ export default { | ||
57 | width: '140' | 57 | width: '140' |
58 | }, | 58 | }, |
59 | { | 59 | { |
60 | - prop: 'createTime', | ||
61 | - label: '快照创建时间', | 60 | + prop: 'createUser', |
61 | + label: '快照创建人', | ||
62 | sortable: true, | 62 | sortable: true, |
63 | align: 'center', | 63 | align: 'center', |
64 | - width: '170' | 64 | + width: '130' |
65 | }, | 65 | }, |
66 | { | 66 | { |
67 | - prop: 'createUser', | ||
68 | - label: '快照创建人', | 67 | + prop: 'createTime', |
68 | + label: '快照创建时间', | ||
69 | sortable: true, | 69 | sortable: true, |
70 | align: 'center', | 70 | align: 'center', |
71 | - width: '120' | ||
72 | - } | 71 | + width: '170' |
72 | + }, | ||
73 | ] | 73 | ] |
74 | }) | 74 | }) |
75 | 75 | ||
@@ -206,8 +206,10 @@ export default { | @@ -206,8 +206,10 @@ export default { | ||
206 | bizCharts = echarts.init(bizChartsRefs.value); | 206 | bizCharts = echarts.init(bizChartsRefs.value); |
207 | let bizOption = { | 207 | let bizOption = { |
208 | grid:{ | 208 | grid:{ |
209 | - top:"14%", | ||
210 | - bottom:"8%" | 209 | + top:"8%", |
210 | + bottom:"4%", | ||
211 | + left:"2%", | ||
212 | + containLabel:true, | ||
211 | }, | 213 | }, |
212 | tooltip: { | 214 | tooltip: { |
213 | trigger: 'item' | 215 | trigger: 'item' |
@@ -247,8 +249,10 @@ export default { | @@ -247,8 +249,10 @@ export default { | ||
247 | devCharts = echarts.init(devChartsRefs.value); | 249 | devCharts = echarts.init(devChartsRefs.value); |
248 | let devOption = { | 250 | let devOption = { |
249 | grid:{ | 251 | grid:{ |
250 | - top:"14%", | ||
251 | - bottom:"8%" | 252 | + top:"8%", |
253 | + bottom:"4%", | ||
254 | + left:"2%", | ||
255 | + containLabel:true, | ||
252 | }, | 256 | }, |
253 | tooltip: { | 257 | tooltip: { |
254 | trigger: 'item' | 258 | trigger: 'item' |
@@ -258,6 +262,23 @@ export default { | @@ -258,6 +262,23 @@ export default { | ||
258 | type: 'category', | 262 | type: 'category', |
259 | data: [], | 263 | data: [], |
260 | axisTick:false, | 264 | axisTick:false, |
265 | + axisLabel: { | ||
266 | + // x轴文本换行 | ||
267 | + formatter: function (params,index) { | ||
268 | + if (params.length>10){ | ||
269 | + var newParamsName = '' // 最终拼接成的字符串 | ||
270 | + let end1 = Math.ceil(params.length / 2); | ||
271 | + let end2 = params.length-end1; | ||
272 | + let str1 = params.substr(0,end1); | ||
273 | + let str2 = params.substr(end1+1,end2); | ||
274 | + newParamsName = str1+'\n'+str2; | ||
275 | + // console.log(params.length,params); | ||
276 | + return newParamsName | ||
277 | + }else { | ||
278 | + return params | ||
279 | + } | ||
280 | + } | ||
281 | + } | ||
261 | }, | 282 | }, |
262 | yAxis: { | 283 | yAxis: { |
263 | type: 'value', | 284 | type: 'value', |
@@ -288,8 +309,10 @@ export default { | @@ -288,8 +309,10 @@ export default { | ||
288 | snapshotCharts = echarts.init(snapshotChartsRefs.value); | 309 | snapshotCharts = echarts.init(snapshotChartsRefs.value); |
289 | let shapshotOption = { | 310 | let shapshotOption = { |
290 | grid:{ | 311 | grid:{ |
291 | - top:"14%", | ||
292 | - bottom:"8%" | 312 | + top:"8%", |
313 | + bottom:"8%", | ||
314 | + left:"2%", | ||
315 | + containLabel:true, | ||
293 | }, | 316 | }, |
294 | tooltip: { | 317 | tooltip: { |
295 | trigger: 'item' | 318 | trigger: 'item' |
-
Please register or login to post a comment