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