|
|
@ -70,8 +70,8 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column v-if="dataRank == 1" prop="value_3" label="收入"></el-table-column> |
|
|
|
<el-table-column v-if="dataRank == 1" prop="value_4" label="成本"></el-table-column> |
|
|
|
<el-table-column v-if="dataRank == 1 && dataType == 'check_type'" prop="value_3" label="收入"></el-table-column> |
|
|
|
<el-table-column v-if="dataRank == 1 && dataType == 'check_type'" prop="value_4" label="成本"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="1" :label="rank_type_desc[dataRank]" sortable="custom"> |
|
|
|
<template v-slot="{ row, $index }"> |
|
|
@ -90,20 +90,27 @@ |
|
|
|
<div class="flex-between flex pop-top"> |
|
|
|
<h3> |
|
|
|
{{ text }} {{ row.name }} {{ rank_type_desc[dataRank] }} |
|
|
|
<span @click="goLookMoreData(row.id)">查看更多</span> |
|
|
|
<span @click="goLookAgentMoreRank(row.id)">查看更多</span> |
|
|
|
</h3> |
|
|
|
<span class="flex point" @click="closePop(row,'id')"> |
|
|
|
关闭<img src="@/assets/register/close.svg"> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<el-table :data="tableData1" style="width: 100%"> |
|
|
|
<el-table-column prop="value_1" width="208" label="日期"></el-table-column> |
|
|
|
<el-table-column prop="value_2" width="208" :label="rank_type_desc[dataRank]"></el-table-column> |
|
|
|
<el-table-column prop="name" width="208" label="服务名称"></el-table-column> |
|
|
|
<el-table-column prop="rate" width="208" label="毛利占比"></el-table-column> |
|
|
|
<el-table-column prop="value_1" width="208" label="毛利润"></el-table-column> |
|
|
|
<el-table-column prop="value_2" width="208" label="订单数"></el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="flex" slot="reference"> |
|
|
|
{{ row.value_1 }} |
|
|
|
<!--代理商利润排行 展示查看代理商产品排行--> |
|
|
|
<HoverImage v-if="row.value_1 != 0 && dataRank == 1 && dataType == 'agent' && show_detail_index == row.sort" |
|
|
|
@click="handleClick3(row, $index, 'id')" |
|
|
|
:normal="require('@/assets/super/list-detail.svg')" |
|
|
|
:hover="require('@/assets/super/list-detail-hover.svg')"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
</el-popover> |
|
|
@ -390,6 +397,17 @@ export default { |
|
|
|
query: query |
|
|
|
}).href, '_blank') |
|
|
|
}, |
|
|
|
goLookAgentMoreRank(id) { |
|
|
|
let query = {} |
|
|
|
query.date = this.text |
|
|
|
query.rank_type = this.dataRank |
|
|
|
query.type = 'check_type' |
|
|
|
query.aid = id |
|
|
|
window.open(this.$router.resolve({ |
|
|
|
path: '/super/ranking/list', |
|
|
|
query: query |
|
|
|
}).href, '_blank') |
|
|
|
}, |
|
|
|
closePop(row, type) { |
|
|
|
row[type + '_popover'] = false; |
|
|
|
row[type + '_popover_2'] = false; |
|
|
@ -440,6 +458,26 @@ export default { |
|
|
|
} |
|
|
|
this.getRankingDetail(obj); |
|
|
|
}, |
|
|
|
handleClick3(row, index, type) { |
|
|
|
// 关闭其他行的弹框 |
|
|
|
this.tableData.forEach((item, i) => { |
|
|
|
item[type + '_popover'] = false; |
|
|
|
if (i !== index) { |
|
|
|
item[type + '_popover_2'] = false; |
|
|
|
} |
|
|
|
}); |
|
|
|
// 打开当前行的弹框 |
|
|
|
row[type + '_popover_2'] = true; |
|
|
|
|
|
|
|
let obj = {} |
|
|
|
if (this.dataType == 'agent') { |
|
|
|
obj.aid = row.id |
|
|
|
} |
|
|
|
if (this.dataType == 'ver_type') { |
|
|
|
obj.ver_type = row.id |
|
|
|
} |
|
|
|
this.getAgentTypeRankingList(); |
|
|
|
}, |
|
|
|
popshow() { |
|
|
|
var ariaEls = document.querySelectorAll('.el-popover') |
|
|
|
ariaEls.forEach((item) => { |
|
|
@ -597,6 +635,23 @@ export default { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
getAgentTypeRankingList(obj) { |
|
|
|
const that = this |
|
|
|
that.tableData1 = [] |
|
|
|
this.$http('POST', '/supernew/ajax_get_type_rank_list', { |
|
|
|
date: that.text, |
|
|
|
rank_type: that.dataRank, |
|
|
|
cur_page: 1, |
|
|
|
page_size: 5, |
|
|
|
...obj |
|
|
|
}).then(response => { |
|
|
|
this.$nextTick(() => { |
|
|
|
that.tableData1 = response.data.list.slice(0, 5) |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
getLossList() { |
|
|
|
const that = this |
|
|
|
that.tableData = [] |
|
|
|