Browse Source

Merge pull request '排行榜相关bug修复' (#127) from wpd_superrank into master

Reviewed-on: #127
master
pengda 3 weeks ago
parent
commit
de50d7b3a9
  1. 6
      src/router/index.js
  2. 4
      src/views/super/Ranking/RankBatchList.vue
  3. 28
      src/views/super/Ranking/RankList.vue

6
src/router/index.js

@ -361,7 +361,7 @@ const routes = [{
props: { props: {
pageTitle: '产品 - 毛利润排行', pageTitle: '产品 - 毛利润排行',
rank_type: 1, rank_type: 1,
type: 'check_type' type: 'ver_type'
}, },
meta: { meta: {
hideBreadcrumb: true // 一级页面不显示面包屑 hideBreadcrumb: true // 一级页面不显示面包屑
@ -374,7 +374,7 @@ const routes = [{
props: { props: {
pageTitle: '产品 - 订单数排行', pageTitle: '产品 - 订单数排行',
rank_type: 2, rank_type: 2,
type: 'check_type' type: 'ver_type'
}, },
meta: { meta: {
hideBreadcrumb: true // 一级页面不显示面包屑 hideBreadcrumb: true // 一级页面不显示面包屑
@ -387,7 +387,7 @@ const routes = [{
props: { props: {
pageTitle: '产品 - 退单数排行', pageTitle: '产品 - 退单数排行',
rank_type: 3, rank_type: 3,
type: 'check_type' type: 'ver_type'
}, },
meta: { meta: {
hideBreadcrumb: true // 一级页面不显示面包屑 hideBreadcrumb: true // 一级页面不显示面包屑

4
src/views/super/Ranking/RankBatchList.vue

@ -52,8 +52,8 @@
sortable="custom" min-width="170"> sortable="custom" min-width="170">
<!--产品利润排行展示查看更多--> <!--产品利润排行展示查看更多-->
<template v-if="index == 3 && dataRank == 1" v-slot="{ row, $index }"> <template v-if="index == 3 && dataRank == 1" scope="{ row, $index }">
<el-popover v-model="row.id_popover" :ref="`popover-${row.id}`" <el-popover v-model="row.id_popover" :ref="`popover-${row.id}`"
placement="bottom" trigger="manual" :append-to-body="false" :visible-arrow="true" placement="bottom" trigger="manual" :append-to-body="false" :visible-arrow="true"
popper-class="custom-popover" @show="popshow" > popper-class="custom-popover" @show="popshow" >

28
src/views/super/Ranking/RankList.vue

@ -35,11 +35,8 @@
</div> </div>
<el-form> <el-form>
<el-table :data="tableData" <GuipTable :tableData="tableData" style="width: 100%" :border="true" @sort-change="handleSortChange"
:key="dataRank" :loading="loading" @cell-mouse-enter="handleRowHover">
style="width: 100%"
@sort-change="handleSortChange"
@cell-mouse-enter="handleRowHover">
<el-table-column prop="sort" label="排序" width="100"></el-table-column> <el-table-column prop="sort" label="排序" width="100"></el-table-column>
@ -48,7 +45,7 @@
:key="selectedType" :key="selectedType"
:label="type_select[selectedType]"> :label="type_select[selectedType]">
<template slot="header"> <template slot="header">
<el-select class="custom-select" popper-class="custom-select-dropdown" v-model="selectedType" @change="changeRankType"> <el-select class="custom-select tableHeaderSelect" popper-class="custom-select-dropdown" v-model="selectedType" @change="changeRankType">
<el-option v-for="(item,type) in type_select" <el-option v-for="(item,type) in type_select"
:key="type" :key="type"
:label="item" :label="item"
@ -201,7 +198,7 @@
</el-popover> </el-popover>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </GuipTable>
<el-pagination v-if="dataType == 'agent' || dataType == 'loss'" background <el-pagination v-if="dataType == 'agent' || dataType == 'loss'" background
@size-change='handleSizeChange' @size-change='handleSizeChange'
@ -220,6 +217,7 @@
import DateSelect from '@/components/super/DateSelect.vue'; import DateSelect from '@/components/super/DateSelect.vue';
import CustomDropdown from '@/components/CustomDropdown.vue'; import CustomDropdown from '@/components/CustomDropdown.vue';
import HoverImage from "@/components/super/HoverImage.vue"; import HoverImage from "@/components/super/HoverImage.vue";
import GuipTable from "@/components/GuipTable.vue";
export default { export default {
name: 'rank_list', name: 'rank_list',
@ -246,12 +244,14 @@ export default {
}, },
}, },
components: { components: {
GuipTable,
HoverImage, HoverImage,
DateSelect, DateSelect,
CustomDropdown CustomDropdown
}, },
data() { data() {
return { return {
loading: false,
rank_type_desc: { rank_type_desc: {
1: '毛利润', 1: '毛利润',
2: '订单数', 2: '订单数',
@ -512,6 +512,7 @@ export default {
this.show_detail_index = row.sort this.show_detail_index = row.sort
}, },
getRankingData() { getRankingData() {
this.loading = true;
if (this.dataType == 'agent') { if (this.dataType == 'agent') {
this.getAgentRanking() this.getAgentRanking()
} }
@ -539,6 +540,7 @@ export default {
cur_page: that.currentPage, cur_page: that.currentPage,
page_size: that.pageSize, page_size: that.pageSize,
}).then(response => { }).then(response => {
this.loading = false;
this.$nextTick(() => { this.$nextTick(() => {
that.tableData = response.data.list that.tableData = response.data.list
that.total_value = response.data.total_value that.total_value = response.data.total_value
@ -564,6 +566,7 @@ export default {
cur_page: that.currentPage, cur_page: that.currentPage,
page_size: that.pageSize, page_size: that.pageSize,
}).then(response => { }).then(response => {
this.loading = false;
this.$nextTick(() => { this.$nextTick(() => {
that.tableData = response.data.list that.tableData = response.data.list
that.total_value = response.data.total_value that.total_value = response.data.total_value
@ -590,6 +593,7 @@ export default {
cur_page: that.currentPage, cur_page: that.currentPage,
page_size: that.pageSize, page_size: that.pageSize,
}).then(response => { }).then(response => {
this.loading = false;
this.$nextTick(() => { this.$nextTick(() => {
that.tableData = response.data.list that.tableData = response.data.list
that.total_value = response.data.total_value that.total_value = response.data.total_value
@ -665,6 +669,7 @@ export default {
cur_page: that.currentPage, cur_page: that.currentPage,
page_size: that.pageSize, page_size: that.pageSize,
}).then(response => { }).then(response => {
this.loading = false;
this.$nextTick(() => { this.$nextTick(() => {
that.tableData = response.data.list that.tableData = response.data.list
that.total_value = response.data.total_value that.total_value = response.data.total_value
@ -745,4 +750,13 @@ export default {
} }
} }
.tableHeaderSelect ::v-deep .el-input__inner {
font-size: 14px;
font-weight: normal;
letter-spacing: 0.08em;
font-family: Microsoft YaHei UI;
color: #1E2226;
height: 100%;
}
</style> </style>
Loading…
Cancel
Save