|
|
|
|
@ -16,7 +16,10 @@ |
|
|
|
|
:row-class-name="tableRowClassName"> |
|
|
|
|
<el-table-column prop="name" label="企业名称" width="200%"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span style="font-size: 0.14rem;">{{ scope.row.name }}</span> |
|
|
|
|
<el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top"> |
|
|
|
|
<div class="rankname" style="font-size: 0.14rem;">{{ scope.row.name }}</div> |
|
|
|
|
</el-tooltip> |
|
|
|
|
|
|
|
|
|
<span class="rank" v-if="scope.$index <= 2" :style="rankStyle(scope.$index)">TOP.{{ scope.$index + 1 }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
@ -35,7 +38,7 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import {getEnterprisePower} from "@/api/energySourcesProvince/energySourcesProvince"; |
|
|
|
|
import { getEnterprisePower } from "@/api/energySourcesProvince/energySourcesProvince"; |
|
|
|
|
import tit from "./tit.vue"; |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
@ -47,9 +50,9 @@ export default { |
|
|
|
|
], |
|
|
|
|
timeActiveIndex1: 0, |
|
|
|
|
tableData: [], |
|
|
|
|
today:this.$moment().format('YYYY-MM-DD'), |
|
|
|
|
month:this.$moment().format('YYYY-MM'), |
|
|
|
|
year:this.$moment().format('YYYY'), |
|
|
|
|
today: this.$moment().format('YYYY-MM-DD'), |
|
|
|
|
month: this.$moment().format('YYYY-MM'), |
|
|
|
|
year: this.$moment().format('YYYY'), |
|
|
|
|
timeFun: null, |
|
|
|
|
params: null |
|
|
|
|
}; |
|
|
|
|
@ -58,7 +61,7 @@ export default { |
|
|
|
|
tit |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
this.params = {currentYear:this.year} |
|
|
|
|
this.params = { currentYear: this.year } |
|
|
|
|
this.getData() |
|
|
|
|
this.timeFun = setInterval(() => { |
|
|
|
|
this.getData() |
|
|
|
|
@ -69,9 +72,9 @@ export default { |
|
|
|
|
clearInterval(this.timeFun) |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getData(){ |
|
|
|
|
getEnterprisePower(this.params).then(res =>{ |
|
|
|
|
console.log('res ===>',res) |
|
|
|
|
getData() { |
|
|
|
|
getEnterprisePower(this.params).then(res => { |
|
|
|
|
console.log('res ===>', res) |
|
|
|
|
this.tableData = res.data.data |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
@ -86,8 +89,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
timeClick(index) { |
|
|
|
|
this.timeActiveIndex1 = index; |
|
|
|
|
this.params = index == 0 ? {currentYear:this.year} : index == 1 ? {currentMonth:this.month} : index == 2 ? {today:this.today} : '' |
|
|
|
|
console.log('params ====>',this.params) |
|
|
|
|
this.params = index == 0 ? { currentYear: this.year } : index == 1 ? { currentMonth: this.month } : index == 2 ? { today: this.today } : '' |
|
|
|
|
console.log('params ====>', this.params) |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
tableRowClassName({ row, rowIndex }) { |
|
|
|
|
@ -124,10 +127,11 @@ export default { |
|
|
|
|
border: 0 !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.statistics /deep/ .el-table td span{ |
|
|
|
|
.statistics /deep/ .el-table td span { |
|
|
|
|
font-size: 0.18rem; |
|
|
|
|
font-family: Acumin-Pro-Condensed-Regular-2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.statistics /deep/ .el-table::before { |
|
|
|
|
height: 0 !important; |
|
|
|
|
} |
|
|
|
|
@ -179,6 +183,15 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.rankname { |
|
|
|
|
display: inline-block; |
|
|
|
|
max-width: 78%; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
overflow: hidden; |
|
|
|
|
text-overflow: ellipsis; |
|
|
|
|
vertical-align: middle; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.rank { |
|
|
|
|
display: inline-block; |
|
|
|
|
width: 0.32rem; |
|
|
|
|
@ -190,7 +203,7 @@ export default { |
|
|
|
|
color: #FFFFFF; |
|
|
|
|
// padding: 0.04rem 0.06rem; |
|
|
|
|
border-radius: 0.08rem; |
|
|
|
|
margin-left: 0.1rem; |
|
|
|
|
margin-left: 0.04rem; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|