排行榜修改

This commit is contained in:
tx 2024-08-28 17:25:04 +08:00
parent 19a1fb2409
commit 89f8f8744e
2 changed files with 71 additions and 71 deletions

View File

@ -328,7 +328,6 @@
</div> </div>
<div class="rights"> <div class="rights">
<div class="check_li"> <div class="check_li">
<span>时间</span> <span>时间</span>
<el-select <el-select
v-model="data" v-model="data"
@ -344,14 +343,14 @@
:value="item.value" :value="item.value"
></el-option> ></el-option>
</el-select> </el-select>
<span>类型</span> <span>类型</span>
<el-select <el-select
v-model="type" v-model="type"
filterable filterable
placeholder="请选择排序类型" placeholder="请选择排序类型"
clearable clearable
@change="changetype" @change="changetype"
> >
<el-option <el-option
v-for="item in optionss" v-for="item in optionss"
@ -361,34 +360,36 @@
></el-option> ></el-option>
</el-select> </el-select>
</div> </div>
<div class="li">
<div class="li" v-for="(item,index) in leaderboardList" :key="index"> <div class="li_txt" style="width: 34%;justify-content: flex-start;">运营区</div>
<img src="https://lxnapi.ccttiot.com/bike/img/static/uM68bA3PUCCXFEkIZJ6c" alt="" v-if="index==0"> <div class="li_txt">订单金额</div>
<img src="https://lxnapi.ccttiot.com/bike/img/static/u5drfWtvysvsCjN8IuAE" alt="" v-if="index==1"> <div class="li_txt">订单数</div>
<img src="https://lxnapi.ccttiot.com/bike/img/static/u35XPUX5r0HrV2IWit5F" alt="" v-if="index==2"> <div class="li_txt">进行中的订单</div>
<div class="paim" v-if="index!=0&&index!=1&&index!=2"> </div>
{{index+1}} <div class="li" v-for="(item, index) in leaderboardList" :key="index">
</div> <div class="li_txt" style="width: 34%;justify-content: flex-start;">
<div class="li_txt">
{{item.areaName}} <div class="paim" >
{{ index + 1 }}
</div>
{{ item.areaName }}
</div> </div>
<div class="li_txt"> <div class="li_txt">
订单金额:{{item.orderFee}} {{ item.orderFee }}
</div> </div>
<div class="li_txt"> <div class="li_txt">
订单数:{{item.orderCount}} {{ item.orderCount }}
</div> </div>
<div class="li_txt"> <div class="li_txt">
进行中的订单:{{item.inProgressOrderCount}} {{ item.inProgressOrderCount }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getAdminStatistics,getleaderboard } from "@/api/system/area"; import { getAdminStatistics, getleaderboard } from "@/api/system/area";
import * as echarts from "echarts"; import * as echarts from "echarts";
export default { export default {
name: "Index", name: "Index",
@ -408,8 +409,8 @@ export default {
label: "本周", label: "本周",
}, },
], ],
optionss: [ optionss: [
{ {
value: "1", value: "1",
label: "订单数", label: "订单数",
}, },
@ -417,14 +418,14 @@ export default {
value: "2", value: "2",
label: "订单金额", label: "订单金额",
}, },
{ {
value: "3", value: "3",
label: "进行中的订单", label: "进行中的订单",
}, },
], ],
type:"2", type: "2",
leaderboardList:[] leaderboardList: [],
}; };
}, },
created() {}, created() {},
@ -432,7 +433,7 @@ export default {
this.userName = this.$store.state.user.name; this.userName = this.$store.state.user.name;
this.AdminStatistics(); this.AdminStatistics();
window.addEventListener("resize", this.handleResize); window.addEventListener("resize", this.handleResize);
this.getlibord() this.getlibord();
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener("resize", this.handleResize); window.removeEventListener("resize", this.handleResize);
@ -441,13 +442,13 @@ export default {
} }
}, },
methods: { methods: {
changetype(value){ changetype(value) {
this.getlibord() this.getlibord();
console.log('点击了',value); console.log("点击了", value);
}, },
changetime(value){ changetime(value) {
this.getlibord() this.getlibord();
console.log('点击了',value); console.log("点击了", value);
}, },
AdminStatistics() { AdminStatistics() {
getAdminStatistics().then((response) => { getAdminStatistics().then((response) => {
@ -461,8 +462,8 @@ export default {
}); });
}, },
getlibord() { getlibord() {
getleaderboard(this.type,this.data).then((response) => { getleaderboard(this.type, this.data).then((response) => {
this.leaderboardList=response.data this.leaderboardList = response.data;
// this.StatisticsInfo = response.data; // this.StatisticsInfo = response.data;
// this.StatisticsInfo.incomeVoList.reverse(); // this.StatisticsInfo.incomeVoList.reverse();
// setTimeout(() => { // setTimeout(() => {
@ -568,47 +569,52 @@ export default {
align-content: flex-start; align-content: flex-start;
flex-direction: row; flex-direction: row;
.check_li{ .check_li {
padding: 0 1rem; padding: 0 1rem;
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: nowrap; flex-wrap: nowrap;
height: 3rem; height: 3rem;
span{ span {
width: 3.5rem; width: 3.5rem;
font-size: 0.8rem; font-size: 0.8rem;
} }
} }
.li { .li {
margin-top: 1rem; margin-top: 0.5rem;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
width: 90%; width: 90%;
height: 3rem; height: 2.5rem;
background: #fff; background: #fff;
box-shadow: 0px 10px 64px 0px rgba(0, 0, 0, 0.08); // box-shadow: 0px 10px 64px 0px rgba(0, 0, 0, 0.08);
border-radius: 10%; border-radius: 10%;
img{
width: 37px;
height: 23.6px;
}
.li_txt{
width: 20%;
font-size: 0.6rem;
}
.paim{
display: flex;
align-items: center;
justify-content: center;
width: 37px;
height: 37px;
border-radius: 50%;
// background-color: #ccc;
.li_txt {
display: flex;
flex-wrap: nowrap;
align-items: center;
// text-align: center;
justify-content: center;
width: 22%;
font-size: 0.8rem;
img {
width: 37px;
height: 23.6px;
}
.paim {
display: flex;
align-items: center;
justify-content: center;
width: 37px;
height: 37px;
border-radius: 50%;
// background-color: #ccc;
}
} }
} }
} }

View File

@ -118,8 +118,9 @@
v-loading="loading" v-loading="loading"
:data="parkingList" :data="parkingList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
ref="myTable"
:cell-style="columnbackgroundStyle" :cell-style="columnbackgroundStyle"
@current-change="handleCurrentChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="parkingId" /> <el-table-column label="id" align="center" prop="parkingId" />
@ -310,6 +311,7 @@ export default {
form: {}, form: {},
highlightedId: null, // highlightedId: null, //
showtable: true, showtable: true,
currentRow: null,
// //
rules: { rules: {
parkingName: [ parkingName: [
@ -740,21 +742,13 @@ export default {
}, },
highlightRow(parkingId) { highlightRow(parkingId) {
this.$set(this, "highlightedId", parkingId); this.$set(this, "highlightedId", parkingId);
this.showtable = false; // this.showtable = false;
this.$refs.myTable.setCurrentRow(this.parkingList[6]);
this.$nextTick(() => {
this.showtable = true;
// DOM
this.$nextTick(() => {
const rowElement = this.$refs['row_' + parkingId];
if (rowElement && rowElement[0]) {
rowElement[0].scrollIntoView({ behavior: "smooth", block: "center" });
}
});
});
}, },
handleCurrentChange(val) {
this.currentRow = val;
},
columnbackgroundStyle({ row }) { columnbackgroundStyle({ row }) {
if (row.parkingId == this.highlightedId) { if (row.parkingId == this.highlightedId) {
//1 //1