|
@@ -94,6 +94,7 @@ |
|
|
<el-table |
|
|
<el-table |
|
|
:header-cell-style="{ background: '#F5F7FA', color: '#333333' }" |
|
|
:header-cell-style="{ background: '#F5F7FA', color: '#333333' }" |
|
|
:data="tableData" |
|
|
:data="tableData" |
|
|
|
|
|
@sort-change="customTabLast" |
|
|
stripe |
|
|
stripe |
|
|
style="width: 100%" |
|
|
style="width: 100%" |
|
|
> |
|
|
> |
|
@@ -961,22 +962,21 @@ export default { |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.sta_men_downLoad = this.permissions["sta_men_downLoad"]; |
|
|
this.sta_men_downLoad = this.permissions["sta_men_downLoad"]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.$route.query.types) { |
|
|
if (this.$route.query.types) { |
|
|
let arr = this.$route.query.types.split(","); |
|
|
let arr = this.$route.query.types.split(","); |
|
|
this[arr[0]] = arr[1]; |
|
|
this[arr[0]] = arr[1]; |
|
|
console.log(arr); |
|
|
console.log(arr); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.$route.query.date) { |
|
|
if (this.$route.query.date) { |
|
|
let time = this.$route.query.date.split(","); |
|
|
let time = this.$route.query.date.split(","); |
|
|
this.statDateStart = time[0] |
|
|
|
|
|
this.statDateEnd = time[1] |
|
|
|
|
|
|
|
|
this.statDateStart = time[0]; |
|
|
|
|
|
this.statDateEnd = time[1]; |
|
|
this.dateType = 7; |
|
|
this.dateType = 7; |
|
|
this.customtime = time |
|
|
|
|
|
|
|
|
this.customtime = time; |
|
|
console.log("时间"); |
|
|
console.log("时间"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.role = localStorage.getItem("orgType"); |
|
|
this.role = localStorage.getItem("orgType"); |
|
@@ -990,6 +990,13 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// 排序触发 |
|
|
|
|
|
customTabLast(e) { |
|
|
|
|
|
console.log(e, "触发了"); |
|
|
|
|
|
let index = this.tableData.findIndex((item) => item.accountName == ""); |
|
|
|
|
|
let obj = this.tableData.splice(index, 1); |
|
|
|
|
|
this.tableData.push(obj); |
|
|
|
|
|
}, |
|
|
// 排名颜色 |
|
|
// 排名颜色 |
|
|
topThreeColor(index) { |
|
|
topThreeColor(index) { |
|
|
let str = ""; |
|
|
let str = ""; |
|
@@ -1202,7 +1209,7 @@ export default { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
if (type == 1) { |
|
|
if (type == 1) { |
|
|
arr = this.dealData(arr); |
|
|
|
|
|
|
|
|
arr = this.dealData(arr); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (type == 2) { |
|
|
if (type == 2) { |
|
@@ -1394,14 +1401,12 @@ export default { |
|
|
this.deailDate(); |
|
|
this.deailDate(); |
|
|
}, |
|
|
}, |
|
|
dealData(arr) { |
|
|
dealData(arr) { |
|
|
console.log(arr, "arr"); |
|
|
|
|
|
let num = Math.max.apply( |
|
|
let num = Math.max.apply( |
|
|
Math, |
|
|
Math, |
|
|
arr.map(function (o) { |
|
|
arr.map(function (o) { |
|
|
return o.zxl; |
|
|
return o.zxl; |
|
|
}) |
|
|
}) |
|
|
); //结果:3 |
|
|
); //结果:3 |
|
|
console.log(num, "nums"); |
|
|
|
|
|
arr.map((item) => { |
|
|
arr.map((item) => { |
|
|
if (num != 0) { |
|
|
if (num != 0) { |
|
|
item.zxl1 = Math.floor((item.zxl / num) * 100); |
|
|
item.zxl1 = Math.floor((item.zxl / num) * 100); |
|
@@ -1409,7 +1414,6 @@ export default { |
|
|
item.zxl1 = 0; |
|
|
item.zxl1 = 0; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
console.log(arr, "arr2"); |
|
|
|
|
|
return arr; |
|
|
return arr; |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|