Commit aa6cad4f authored by 张俊's avatar 张俊

运行状态日期排序

parent 758d6cab
...@@ -643,6 +643,7 @@ export default { ...@@ -643,6 +643,7 @@ export default {
this.get_micro_service() this.get_micro_service()
}, },
compare(property){ compare(property){
debugger
return function(a,b){ return function(a,b){
var value1 = a[property]; var value1 = a[property];
var value2 = b[property]; var value2 = b[property];
...@@ -657,8 +658,6 @@ export default { ...@@ -657,8 +658,6 @@ export default {
console.log(response); console.log(response);
var _this = this var _this = this
let data = response.data.data; let data = response.data.data;
// this.image_arr = data.imagearr;
// console.log(data.list.sort(_this.compare('date')))
data.list.forEach(e => { data.list.forEach(e => {
data.runnings.forEach(el => { data.runnings.forEach(el => {
if(e.tag==el.tag){ if(e.tag==el.tag){
...@@ -666,7 +665,12 @@ export default { ...@@ -666,7 +665,12 @@ export default {
} }
}); });
}); });
this.$set(this.image_arr[this.image_select],'data',data.list.sort(this.compare('date'))) data.list.forEach(e => {
e['num']=parseInt(e.date.replace(/-/g,'').replace(/:/g,'').replace(' ',''))
});
var temp_arr = data.list.sort(this.compare('num'))
console.log(temp_arr);
this.$set(this.image_arr[this.image_select],'data',temp_arr)
this.now_image_version = [] this.now_image_version = []
this.image_arr[this.image_select].data.forEach((e,idx)=> { this.image_arr[this.image_select].data.forEach((e,idx)=> {
if(e.subsets){ if(e.subsets){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment