|
|
|
@ -29,7 +29,6 @@ |
|
|
|
<el-table-column fixed="left" |
|
|
|
v-if="(dataRank == 1 || dataRank == 2) && (dataType == 'ver_type' || dataType == 'check_type')" |
|
|
|
prop="name" :key="selectedType" :label="type_select[selectedType]" min-width="120"> |
|
|
|
|
|
|
|
<template slot="header"> |
|
|
|
<el-select class="custom-select tableHeaderSelect" popper-class="custom-select-dropdown" |
|
|
|
v-model="selectedType" @change="changeRankType"> |
|
|
|
@ -50,13 +49,11 @@ |
|
|
|
:prop="String(index + 1)" |
|
|
|
:render-header=" (h, scope) => index == 3 ? renderHeaderWithIcon(h, scope, require('@/assets/require.svg')) : scope.column.label" |
|
|
|
sortable="custom" min-width="170"> |
|
|
|
|
|
|
|
<!--产品利润排行展示查看更多--> |
|
|
|
<template v-if="index == 3 && dataRank == 1" scope="{ row, $index }"> |
|
|
|
<el-popover v-model="row.id_popover" :ref="`popover-${row.id}`" |
|
|
|
placement="bottom" trigger="manual" :append-to-body="false" :visible-arrow="true" |
|
|
|
popper-class="custom-popover" @show="popshow" > |
|
|
|
|
|
|
|
<div v-if="type != 'agent'" class="pop-wrap"> |
|
|
|
<div class="flex-between flex pop-top"> |
|
|
|
<h3> |
|
|
|
@ -69,7 +66,6 @@ |
|
|
|
</div> |
|
|
|
<el-table :data="tableData1" style="width: 100%"> |
|
|
|
<el-table-column prop="value_1" width="200" label="日期"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column width="200" :label="rank_type_desc[dataRank]"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="flex"> |
|
|
|
@ -91,7 +87,6 @@ |
|
|
|
</div> |
|
|
|
<el-table :data="tableData1" style="width: 100%"> |
|
|
|
<el-table-column prop="sort" width="95" label="排序"> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="name" width="250" label="服务名称"></el-table-column> |
|
|
|
<el-table-column prop="rate" width="130" label="毛利占比"> |
|
|
|
@ -111,7 +106,6 @@ |
|
|
|
<el-table-column prop="value_2" width="130" label="订单数"></el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="flex" slot="reference"> |
|
|
|
<!-- {{ row[field] }} --> |
|
|
|
{{ $formatNumber(row[field]) }} |
|
|
|
@ -120,7 +114,6 @@ |
|
|
|
:hoverColor="'#006AFF'" @click="handleClick(row, $index, 'id')" /> |
|
|
|
</div> |
|
|
|
</el-popover> |
|
|
|
|
|
|
|
</template> |
|
|
|
<template v-else slot-scope="scope"> |
|
|
|
<div class="flex"> |
|
|
|
@ -128,7 +121,6 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<!--产品利润排行展示代理商排行--> |
|
|
|
<el-table-column v-if="dataRank == 1 && (dataType == 'ver_type' || dataType == 'check_type')" |
|
|
|
:render-header=" (h, scope) => renderHeaderWithIcon(h, scope, require('@/assets/require.svg')) " |
|
|
|
@ -183,6 +175,7 @@ import GuipTable from '@/components/GuipTable.vue'; |
|
|
|
import CustomDropdown from '@/components/CustomDropdown.vue'; |
|
|
|
import SvgIcon from '@/components/SvgIcon.vue'; |
|
|
|
import GuipToolTip from '@/components/GuipToolTip.vue'; |
|
|
|
import {getDate,getFormattedDate} from "@/utils/common.js" |
|
|
|
// import HoverImage from '@/components/super/HoverImage.vue'; |
|
|
|
export default { |
|
|
|
name: 'rank_batch_list', |
|
|
|
@ -269,8 +262,6 @@ export default { |
|
|
|
this.text = this.getNowDate() |
|
|
|
this.dataType = this.type |
|
|
|
this.dataRank = this.rank_type |
|
|
|
|
|
|
|
|
|
|
|
this.getRankingData(); |
|
|
|
}, |
|
|
|
handleUpdateView(newView) { |
|
|
|
@ -278,32 +269,17 @@ export default { |
|
|
|
}, |
|
|
|
getNowDate() { |
|
|
|
const viewdesc = this.viewDesc[this.view]; |
|
|
|
const now = new Date(); |
|
|
|
const year = now.getFullYear(); |
|
|
|
const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,补零 |
|
|
|
const currentYearMonth = `${year}-${month}`; |
|
|
|
const currentYearMonth = getFormattedDate('YYYY-MM') |
|
|
|
this.textDesc = viewdesc + currentYearMonth; |
|
|
|
return `${currentYearMonth}` |
|
|
|
}, |
|
|
|
getDate(dateStr) { |
|
|
|
const date = new Date(dateStr); |
|
|
|
const year = date.getFullYear(); // 2025 |
|
|
|
const month = date.getMonth() + 1; // 3 (表示3月) |
|
|
|
if (this.view == 'year') { |
|
|
|
return `${year}` |
|
|
|
} else { |
|
|
|
return `${year}-${month}` |
|
|
|
} |
|
|
|
}, |
|
|
|
handleDateChange(date) { |
|
|
|
const viewdesc = this.viewDesc[this.view]; |
|
|
|
this.text = this.getDate(date) |
|
|
|
this.text = this.view == 'year' ? getDate(date,'yyyy') : getDate(date,'yyyy-mm') |
|
|
|
this.textDesc = viewdesc + this.text; |
|
|
|
this.selectedDate = date; |
|
|
|
localStorage.setItem('date', JSON.stringify(date)) |
|
|
|
|
|
|
|
this.$refs.dropdownRef.closeDropdown(); |
|
|
|
|
|
|
|
this.currentPage = 1; |
|
|
|
this.getRankingData() |
|
|
|
}, |
|
|
|
@ -366,7 +342,6 @@ export default { |
|
|
|
}); |
|
|
|
// 打开当前行的弹框 |
|
|
|
row[type + '_popover'] = true; |
|
|
|
|
|
|
|
let obj = {} |
|
|
|
if (this.dataType == 'agent') { |
|
|
|
obj.aid = row.id |
|
|
|
@ -396,7 +371,6 @@ export default { |
|
|
|
}); |
|
|
|
// 打开当前行的弹框 |
|
|
|
row[type + '_popover_2'] = true; |
|
|
|
|
|
|
|
let obj = {} |
|
|
|
if (this.dataType == 'agent') { |
|
|
|
obj.aid = row.id |
|
|
|
@ -414,7 +388,6 @@ export default { |
|
|
|
ariaEls.forEach((item) => { |
|
|
|
item.removeAttribute('aria-hidden') |
|
|
|
}) |
|
|
|
|
|
|
|
ariaEls = document.querySelectorAll('.el-radio__original') |
|
|
|
ariaEls.forEach((item) => { |
|
|
|
item.removeAttribute('aria-hidden') |
|
|
|
@ -464,10 +437,8 @@ export default { |
|
|
|
const date = new Date(this.text); |
|
|
|
const year = date.getFullYear(); |
|
|
|
const month = date.getMonth() + 1; |
|
|
|
|
|
|
|
const currentYear = new Date().getFullYear(); |
|
|
|
const currentMonth = new Date().getMonth() + 1; |
|
|
|
|
|
|
|
this.current_month = ''; |
|
|
|
if (this.view === 'month' && year == currentYear && month == currentMonth) { |
|
|
|
this.current_month = '(当月)'; |
|
|
|
@ -483,7 +454,6 @@ export default { |
|
|
|
for (let i = 3; i >= 0; i--) { |
|
|
|
let m = month - i; |
|
|
|
if (m <= 0) m += 12; |
|
|
|
|
|
|
|
monthLabels.push(m + '月' + this.rank_type_desc[this.rank_type]); |
|
|
|
} |
|
|
|
this.labels = monthLabels; |
|
|
|
@ -700,4 +670,4 @@ export default { |
|
|
|
color: #1E2226; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |