|
@ -1,21 +1,34 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="demo-wrap min-flex-right"> |
|
|
<div class="demo-wrap min-flex-right"> |
|
|
<div class="flex-between"> |
|
|
<div class="flex-between"> |
|
|
<h2>{{filterTitle ? filterTitle : pageTitle}}</h2> |
|
|
<h2>{{ filterTitle ? filterTitle : pageTitle }}</h2> |
|
|
<CustomDropdown ref="dropdownRef" :placeholder="'('+viewDesc[this.view]+')'+text" width="280px" v-if="showDateSelect"> |
|
|
<CustomDropdown v-if="showDateSelect" |
|
|
<DateSelect slot="normal" :view="view" :onlyYear="onlyYear" v-model="selectedDate" @update-count="handleUpdateView" @change="handleDateChange" /> |
|
|
ref="dropdownRef" |
|
|
|
|
|
:placeholder="'('+viewDesc[this.view]+')'+text" |
|
|
|
|
|
width="280px"> |
|
|
|
|
|
<DateSelect slot="normal" |
|
|
|
|
|
:view="view" |
|
|
|
|
|
:onlyYear="onlyYear" |
|
|
|
|
|
v-model="selectedDate" |
|
|
|
|
|
@update-count="handleUpdateView" |
|
|
|
|
|
@change="handleDateChange"/> |
|
|
</CustomDropdown> |
|
|
</CustomDropdown> |
|
|
</div> |
|
|
</div> |
|
|
<div class=" flex-common" v-if="type == 'year'"> |
|
|
<div class=" flex-common" v-if="type == 'year'"> |
|
|
<el-form> |
|
|
<el-form> |
|
|
<el-table :data="tableData" style="width: 100%" @sort-change="handleSortChange" @cell-mouse-enter="handleRowHover"> |
|
|
<el-table :data="tableData" |
|
|
|
|
|
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> |
|
|
<!-- 其他列 --> |
|
|
|
|
|
<el-table-column prop="1" label="年份" sortable="custom"> |
|
|
<el-table-column prop="1" label="年份" sortable="custom"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row.value_1 }} |
|
|
{{ scope.row.value_1 }} |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
<el-table-column prop="2" :label="rank_type_desc[dataRank]" sortable="custom"> |
|
|
<el-table-column prop="2" :label="rank_type_desc[dataRank]" sortable="custom"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row.value_2 }} |
|
|
{{ scope.row.value_2 }} |
|
@ -24,11 +37,21 @@ |
|
|
|
|
|
|
|
|
<el-table-column label="代理商排行"> |
|
|
<el-table-column label="代理商排行"> |
|
|
<template v-slot="{ row, $index }"> |
|
|
<template v-slot="{ row, $index }"> |
|
|
<el-popover v-model="row.id_popover" placement="top" trigger="manual" :ref="`popover-${$index}`" @show="popshow"> |
|
|
<el-popover v-model="row.id_popover" |
|
|
|
|
|
placement="top" |
|
|
|
|
|
trigger="manual" |
|
|
|
|
|
:ref="`popover-${$index}`" |
|
|
|
|
|
@show="popshow"> |
|
|
|
|
|
|
|
|
<div class="pop-wrap"> |
|
|
<div class="pop-wrap"> |
|
|
<div class="flex-between flex pop-top"> |
|
|
<div class="flex-between flex pop-top"> |
|
|
<h3>{{ row.value_1 }} {{rank_type_desc[dataRank]}}<span @click="goLookMoreData(row.value_1)">查看更多</span></h3> |
|
|
<h3> |
|
|
<span class="flex point" @click="closePop(row,'id')">关闭 <img src="@/assets/register/close.svg" alt=""></span> |
|
|
{{ row.value_1 }} {{ rank_type_desc[dataRank] }} |
|
|
|
|
|
<span @click="goLookMoreData(row.value_1)">查看更多</span> |
|
|
|
|
|
</h3> |
|
|
|
|
|
<span class="flex point" @click="closePop(row,'id')"> |
|
|
|
|
|
关闭<img src="@/assets/register/close.svg"> |
|
|
|
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
<el-table :data="tableData1" style="width: 100%"> |
|
|
<el-table :data="tableData1" style="width: 100%"> |
|
|
<el-table-column prop="sort" width="100" label="排行"></el-table-column> |
|
|
<el-table-column prop="sort" width="100" label="排行"></el-table-column> |
|
@ -36,11 +59,15 @@ |
|
|
<el-table-column prop="value_1" width="348" label="销售额"></el-table-column> |
|
|
<el-table-column prop="value_1" width="348" label="销售额"></el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 触发弹框的按钮 --> |
|
|
|
|
|
<span v-if="top_list[row.id]" slot="reference" > |
|
|
<span v-if="top_list[row.id]" slot="reference"> |
|
|
No.1 {{ top_list[row.id]['name'] }} |
|
|
No.1 {{ top_list[row.id]['name'] }} |
|
|
<img @click="handleClick(row, $index, 'id')" v-if="show_detail_index == row.sort" class="detail_icon" src="@/assets/super/list-detail.svg" alt=""> |
|
|
<img v-if="show_detail_index == row.sort" |
|
|
|
|
|
@click="handleClick(row, $index, 'id')" |
|
|
|
|
|
class="detail_icon" |
|
|
|
|
|
src="@/assets/super/list-detail.svg"> |
|
|
</span> |
|
|
</span> |
|
|
|
|
|
<span v-else slot="reference">暂无排行</span> |
|
|
</el-popover> |
|
|
</el-popover> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -50,9 +77,13 @@ |
|
|
|
|
|
|
|
|
<div class=" flex-common" v-if="type == 'month'"> |
|
|
<div class=" flex-common" v-if="type == 'month'"> |
|
|
<el-form> |
|
|
<el-form> |
|
|
<el-table :data="tableData" style="width: 100%" @sort-change="handleSortChange" @cell-mouse-enter="handleRowHover"> |
|
|
<el-table :data="tableData" |
|
|
|
|
|
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> |
|
|
<!-- 其他列 --> |
|
|
|
|
|
<el-table-column prop="1" label="月份" sortable="custom"> |
|
|
<el-table-column prop="1" label="月份" sortable="custom"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row.value_1 }} |
|
|
{{ scope.row.value_1 }} |
|
@ -63,19 +94,21 @@ |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div class="flex"> |
|
|
<div class="flex"> |
|
|
{{ scope.row.value_2 }} |
|
|
{{ scope.row.value_2 }} |
|
|
<span class="flex growth-text" v-if="growth_list[scope.row.id]"> |
|
|
<span v-if="growth_list[scope.row.id]" class="flex growth-text"> |
|
|
<span v-if="growth_list[scope.row.id].value>0"> |
|
|
<span v-if="growth_list[scope.row.id].value>0"> |
|
|
<span class="growth-up"> |
|
|
<span class="growth-up"> |
|
|
<img class="edit_icon" src="@/assets/super/growth-up.svg" alt="">{{growth_list[scope.row.id].value}}% |
|
|
<img class="edit_icon" src="@/assets/super/growth-up.svg"> |
|
|
|
|
|
{{ growth_list[scope.row.id].value }}% |
|
|
</span>同比上年 |
|
|
</span>同比上年 |
|
|
</span> |
|
|
</span> |
|
|
<span v-if="growth_list[scope.row.id].value<0"> |
|
|
<span v-if="growth_list[scope.row.id].value<0"> |
|
|
<span class="growth-down"> |
|
|
<span class="growth-down"> |
|
|
<img class="edit_icon" src="@/assets/super/growth-down.svg" alt="">{{growth_list[scope.row.id].value}}% |
|
|
<img class="edit_icon" src="@/assets/super/growth-down.svg"> |
|
|
|
|
|
{{ growth_list[scope.row.id].value }}% |
|
|
</span>同比上年 |
|
|
</span>同比上年 |
|
|
</span> |
|
|
</span> |
|
|
<span v-if="growth_list[scope.row.id].value==0"> |
|
|
<span v-if="growth_list[scope.row.id].value==0"> |
|
|
<img class="edit_icon" src="@/assets/super/growth-flat.svg" alt="">同比上年持平 |
|
|
<img class="edit_icon" src="@/assets/super/growth-flat.svg">同比上年持平 |
|
|
</span> |
|
|
</span> |
|
|
</span> |
|
|
</span> |
|
|
<span class="flex growth-text" v-else>上年无数据</span> |
|
|
<span class="flex growth-text" v-else>上年无数据</span> |
|
@ -85,11 +118,20 @@ |
|
|
|
|
|
|
|
|
<el-table-column label="代理商排行"> |
|
|
<el-table-column label="代理商排行"> |
|
|
<template v-slot="{ row, $index }"> |
|
|
<template v-slot="{ row, $index }"> |
|
|
<el-popover v-model="row.id_popover" placement="top" trigger="manual" :ref="`popover-${$index}`" @show="popshow"> |
|
|
<el-popover v-model="row.id_popover" |
|
|
|
|
|
placement="top" |
|
|
|
|
|
trigger="manual" |
|
|
|
|
|
:ref="`popover-${$index}`" |
|
|
|
|
|
@show="popshow"> |
|
|
<div class="pop-wrap"> |
|
|
<div class="pop-wrap"> |
|
|
<div class="flex-between flex pop-top"> |
|
|
<div class="flex-between flex pop-top"> |
|
|
<h3>{{ row.value_1 }} {{rank_type_desc[dataRank]}}<span @click="goLookMoreData(row.value_1)">查看更多</span></h3> |
|
|
<h3> |
|
|
<span class="flex point" @click="closePop(row,'id')">关闭 <img src="@/assets/register/close.svg" alt=""></span> |
|
|
{{ row.value_1 }} {{ rank_type_desc[dataRank] }} |
|
|
|
|
|
<span @click="goLookMoreData(row.value_1)">查看更多</span> |
|
|
|
|
|
</h3> |
|
|
|
|
|
<span class="flex point" @click="closePop(row,'id')"> |
|
|
|
|
|
关闭<img src="@/assets/register/close.svg"> |
|
|
|
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
<el-table :data="tableData1" style="width: 100%"> |
|
|
<el-table :data="tableData1" style="width: 100%"> |
|
|
<el-table-column prop="sort" width="100" label="排行"></el-table-column> |
|
|
<el-table-column prop="sort" width="100" label="排行"></el-table-column> |
|
@ -97,12 +139,13 @@ |
|
|
<el-table-column prop="value_1" width="348" label="销售额"></el-table-column> |
|
|
<el-table-column prop="value_1" width="348" label="销售额"></el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 触发弹框的按钮 --> |
|
|
|
|
|
<span v-if="top_list[row.id]" slot="reference"> |
|
|
<span v-if="top_list[row.id]" slot="reference"> |
|
|
No.1 {{ top_list[row.id]['name'] }} |
|
|
No.1 {{ top_list[row.id]['name'] }} |
|
|
<img @click="handleClick(row, $index, 'id')" v-if="show_detail_index == row.sort" class="detail_icon" src="@/assets/super/list-detail.svg" alt=""> |
|
|
<img v-if="show_detail_index == row.sort" |
|
|
|
|
|
@click="handleClick(row, $index, 'id')" |
|
|
|
|
|
class="detail_icon" src="@/assets/super/list-detail.svg"> |
|
|
</span> |
|
|
</span> |
|
|
<span slot="reference" v-else>暂无排行</span> |
|
|
<span v-else slot="reference">暂无排行</span> |
|
|
</el-popover> |
|
|
</el-popover> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -113,13 +156,17 @@ |
|
|
<div class=" flex-common" v-if="type == 'day'"> |
|
|
<div class=" flex-common" v-if="type == 'day'"> |
|
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;"> |
|
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;"> |
|
|
<h3 style="margin: 0;"></h3> |
|
|
<h3 style="margin: 0;"></h3> |
|
|
<span style="font-size: 14px; color: #999;">总{{rank_type_desc[dataRank]}}:{{total_value}}</span> |
|
|
<span style="font-size: 14px; color: #999;">总{{ rank_type_desc[dataRank] }}:{{ total_value }}</span> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<el-form> |
|
|
<el-form> |
|
|
<el-table :data="tableData" style="width: 100%" @sort-change="handleSortChange" @cell-mouse-enter="handleRowHover"> |
|
|
<el-table :data="tableData" |
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
@sort-change="handleSortChange" |
|
|
|
|
|
@cell-mouse-enter="handleRowHover"> |
|
|
|
|
|
|
|
|
<el-table-column prop="sort" label="排序"></el-table-column> |
|
|
<el-table-column prop="sort" label="排序"></el-table-column> |
|
|
<!-- 其他列 --> |
|
|
|
|
|
<el-table-column prop="1" label="日期" sortable="custom"> |
|
|
<el-table-column prop="1" label="日期" sortable="custom"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row.value_1 }} |
|
|
{{ scope.row.value_1 }} |
|
@ -131,22 +178,24 @@ |
|
|
<div class="flex"> |
|
|
<div class="flex"> |
|
|
{{ scope.row.value_2 }} |
|
|
{{ scope.row.value_2 }} |
|
|
<template v-if="Object.keys(growth_list).length > 0"> |
|
|
<template v-if="Object.keys(growth_list).length > 0"> |
|
|
<span class="flex growth-text" v-if="growth_list[scope.row.id]"> |
|
|
<span v-if="growth_list[scope.row.id]" class="flex growth-text"> |
|
|
<span v-if="growth_list[scope.row.id].value>0"> |
|
|
<span v-if="growth_list[scope.row.id].value>0"> |
|
|
<span class="growth-up"> |
|
|
<span class="growth-up"> |
|
|
<img class="edit_icon" src="@/assets/super/growth-up.svg" alt="">{{growth_list[scope.row.id].value}}% |
|
|
<img class="edit_icon" src="@/assets/super/growth-up.svg"> |
|
|
|
|
|
{{ growth_list[scope.row.id].value }}% |
|
|
</span>同比上年 |
|
|
</span>同比上年 |
|
|
</span> |
|
|
</span> |
|
|
<span v-if="growth_list[scope.row.id].value<0"> |
|
|
<span v-if="growth_list[scope.row.id].value<0"> |
|
|
<span class="growth-down"> |
|
|
<span class="growth-down"> |
|
|
<img class="edit_icon" src="@/assets/super/growth-down.svg" alt="">{{growth_list[scope.row.id].value}}% |
|
|
<img class="edit_icon" src="@/assets/super/growth-down.svg"> |
|
|
|
|
|
{{ growth_list[scope.row.id].value }}% |
|
|
</span>同比上年 |
|
|
</span>同比上年 |
|
|
</span> |
|
|
</span> |
|
|
<span v-if="growth_list[scope.row.id].value==0"> |
|
|
<span v-if="growth_list[scope.row.id].value==0"> |
|
|
<img class="edit_icon" src="@/assets/super/growth-flat.svg" alt="">同比上年持平 |
|
|
<img class="edit_icon" src="@/assets/super/growth-flat.svg">同比上年持平 |
|
|
</span> |
|
|
</span> |
|
|
</span> |
|
|
</span> |
|
|
<span class="flex growth-text" v-else>上年无数据</span> |
|
|
<span v-else class="flex growth-text">上年无数据</span> |
|
|
</template> |
|
|
</template> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
@ -157,20 +206,27 @@ |
|
|
|
|
|
|
|
|
<div class=" flex-common" v-if="type == 'agentnew'"> |
|
|
<div class=" flex-common" v-if="type == 'agentnew'"> |
|
|
<el-form> |
|
|
<el-form> |
|
|
<el-table :data="tableData" style="width: 100%" @sort-change="handleSortChange" @cell-mouse-enter="handleRowHover"> |
|
|
<el-table :data="tableData" |
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
@sort-change="handleSortChange" |
|
|
|
|
|
@cell-mouse-enter="handleRowHover"> |
|
|
|
|
|
|
|
|
<el-table-column prop="1" label="加盟时间" sortable="custom"> |
|
|
<el-table-column prop="1" label="加盟时间" sortable="custom"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row.regtime }} |
|
|
{{ scope.row.regtime }} |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
<el-table-column prop="nick" label="代理商昵称"></el-table-column> |
|
|
<el-table-column prop="nick" label="代理商昵称"></el-table-column> |
|
|
<el-table-column prop="real_name" label="负责人"></el-table-column> |
|
|
<el-table-column prop="real_name" label="负责人"></el-table-column> |
|
|
<el-table-column prop="phone" label="电话"></el-table-column> |
|
|
<el-table-column prop="phone" label="电话"></el-table-column> |
|
|
|
|
|
|
|
|
<el-table-column prop="2" label="账户余额" sortable="custom"> |
|
|
<el-table-column prop="2" label="账户余额" sortable="custom"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row.remain_money }} |
|
|
{{ scope.row.remain_money }} |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
<el-table-column prop="3" label="累计总额/元" sortable="custom"> |
|
|
<el-table-column prop="3" label="累计总额/元" sortable="custom"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row.total_money }} |
|
|
{{ scope.row.total_money }} |
|
@ -182,7 +238,6 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
// import GuipForm from '@/components/GuipForm.vue' |
|
|
|
|
|
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'; |
|
|
|
|
|
|
|
@ -212,26 +267,26 @@ export default { |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
viewDesc:{ |
|
|
viewDesc: { |
|
|
'month':'月份', |
|
|
'month': '月份', |
|
|
'monthTwo':'月份', |
|
|
'monthTwo': '月份', |
|
|
'year':'年份', |
|
|
'year': '年份', |
|
|
}, |
|
|
}, |
|
|
rank_type_desc:{ |
|
|
rank_type_desc: { |
|
|
1:'毛利润/元', |
|
|
1: '毛利润/元', |
|
|
2:'订单数', |
|
|
2: '订单数', |
|
|
3:'退单数', |
|
|
3: '退单数', |
|
|
}, |
|
|
}, |
|
|
aid:0, |
|
|
aid: 0, |
|
|
ver_type:0, |
|
|
ver_type: 0, |
|
|
check_type:0, |
|
|
check_type: 0, |
|
|
showfilterTitle:false, |
|
|
showfilterTitle: false, |
|
|
filterTitle:"", |
|
|
filterTitle: "", |
|
|
view:'year', |
|
|
view: 'year', |
|
|
onlyYear:true, |
|
|
onlyYear: true, |
|
|
dataRank:'', |
|
|
dataRank: '', |
|
|
text:'',//下拉框显示具体文案 |
|
|
text: '',//下拉框显示具体文案 |
|
|
selectedDate:new Date(),//默认当天日期 |
|
|
selectedDate: new Date(),//默认当天日期 |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
total_value: 0, |
|
|
total_value: 0, |
|
|
tableData1: [], |
|
|
tableData1: [], |
|
@ -243,56 +298,53 @@ export default { |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.init() |
|
|
this.init() |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: {}, |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
watch: { |
|
|
'$route'() { |
|
|
'$route'() { |
|
|
this.init() |
|
|
this.init() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
init(){ |
|
|
init() { |
|
|
if(this.showDateSelect){ |
|
|
this.text = "" |
|
|
this.text = this.getNowYear()//初始赋值 |
|
|
if (this.showDateSelect) this.text = this.getNowYear() |
|
|
} |
|
|
|
|
|
this.dataRank = this.rank_type |
|
|
this.dataRank = this.rank_type |
|
|
this.aid = this.$route.query.aid |
|
|
this.aid = this.$route.query.aid |
|
|
this.ver_type = this.$route.query.ver_type |
|
|
this.ver_type = this.$route.query.ver_type |
|
|
this.check_type = this.$route.query.check_type |
|
|
this.check_type = this.$route.query.check_type |
|
|
if(this.$route.query.date) this.text = this.$route.query.date |
|
|
if (this.$route.query.date) this.text = this.$route.query.date |
|
|
if(this.$route.query.rank_type) this.dataRank = this.$route.query.rank_type |
|
|
if (this.$route.query.rank_type) this.dataRank = this.$route.query.rank_type |
|
|
if(Object.keys(this.$route.query).length > 0) this.showfilterTitle = true |
|
|
if (Object.keys(this.$route.query).length > 0) this.showfilterTitle = true |
|
|
|
|
|
|
|
|
if(this.type == 'agentnew'){ |
|
|
if (this.type == 'agentnew') { |
|
|
this.getAgentNew() |
|
|
this.getAgentNew() |
|
|
return |
|
|
} else { |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.getRankingDetail() |
|
|
this.getRankingDetail() |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
handleUpdateView(newView) { |
|
|
handleUpdateView(newView) { |
|
|
this.view = newView; |
|
|
this.view = newView; |
|
|
}, |
|
|
}, |
|
|
getNowYear(){ |
|
|
getNowYear() { |
|
|
const now = new Date(); |
|
|
const now = new Date(); |
|
|
const year = now.getFullYear(); |
|
|
const year = now.getFullYear(); |
|
|
const currentYearMonth = `${year}`; |
|
|
const currentYearMonth = `${year}`; |
|
|
return `${currentYearMonth}` |
|
|
return `${currentYearMonth}` |
|
|
}, |
|
|
}, |
|
|
getDate(dateStr){ |
|
|
getDate(dateStr) { |
|
|
const date = new Date(dateStr); |
|
|
const date = new Date(dateStr); |
|
|
const year = date.getFullYear(); // 2025 |
|
|
const year = date.getFullYear(); // 2025 |
|
|
const month = date.getMonth() + 1; // 3 (表示3月) |
|
|
const month = date.getMonth() + 1; // 3 (表示3月) |
|
|
if(this.view == 'year'){ |
|
|
if (this.view == 'year') { |
|
|
return `${year}` |
|
|
return `${year}` |
|
|
}else{ |
|
|
} else { |
|
|
return `${year}-${month}` |
|
|
return `${year}-${month}` |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
handleDateChange(date) { |
|
|
handleDateChange(date) { |
|
|
this.text = this.getDate(date) |
|
|
this.text = this.getDate(date) |
|
|
this.selectedDate = date; |
|
|
this.selectedDate = date; |
|
|
localStorage.setItem('date',JSON.stringify(date)) |
|
|
localStorage.setItem('date', JSON.stringify(date)) |
|
|
|
|
|
|
|
|
this.$refs.dropdownRef.closeDropdown(); |
|
|
this.$refs.dropdownRef.closeDropdown(); |
|
|
this.getRankingDetail() |
|
|
this.getRankingDetail() |
|
@ -307,7 +359,7 @@ export default { |
|
|
query: query |
|
|
query: query |
|
|
}).href, '_blank') |
|
|
}).href, '_blank') |
|
|
}, |
|
|
}, |
|
|
closePop(row,type){ |
|
|
closePop(row, type) { |
|
|
row[type + '_popover'] = false; // 关闭弹框 |
|
|
row[type + '_popover'] = false; // 关闭弹框 |
|
|
}, |
|
|
}, |
|
|
handleClick(row, index, type) { |
|
|
handleClick(row, index, type) { |
|
@ -319,7 +371,8 @@ export default { |
|
|
}); |
|
|
}); |
|
|
// 打开当前行的弹框 |
|
|
// 打开当前行的弹框 |
|
|
row[type + '_popover'] = true; |
|
|
row[type + '_popover'] = true; |
|
|
this.getRankingList({date:row.value_1}); |
|
|
|
|
|
|
|
|
this.getRankingList({date: row.value_1}); |
|
|
}, |
|
|
}, |
|
|
popshow() { |
|
|
popshow() { |
|
|
var ariaEls = document.querySelectorAll('.el-popover') |
|
|
var ariaEls = document.querySelectorAll('.el-popover') |
|
@ -332,7 +385,7 @@ export default { |
|
|
item.removeAttribute('aria-hidden') |
|
|
item.removeAttribute('aria-hidden') |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
handleSortChange({ prop, order }) { |
|
|
handleSortChange({prop, order}) { |
|
|
this.currentPage = 1; |
|
|
this.currentPage = 1; |
|
|
|
|
|
|
|
|
let sortBy = 0; |
|
|
let sortBy = 0; |
|
@ -345,23 +398,23 @@ export default { |
|
|
sortBy = prop; |
|
|
sortBy = prop; |
|
|
sortOrder = 2; |
|
|
sortOrder = 2; |
|
|
} |
|
|
} |
|
|
if(this.type == 'agentnew'){ |
|
|
if (this.type == 'agentnew') { |
|
|
this.getAgentNew({ sortBy: sortBy, sortOrder: sortOrder }) |
|
|
this.getAgentNew({sortBy: sortBy, sortOrder: sortOrder}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.getRankingDetail({ sortBy: sortBy, sortOrder: sortOrder }) |
|
|
this.getRankingDetail({sortBy: sortBy, sortOrder: sortOrder}) |
|
|
}, |
|
|
}, |
|
|
handleRowHover(row) { |
|
|
handleRowHover(row) { |
|
|
this.show_detail_index = row.sort |
|
|
this.show_detail_index = row.sort |
|
|
}, |
|
|
}, |
|
|
getRankingDetail(obj) { |
|
|
getRankingDetail(obj) { |
|
|
const that = this |
|
|
const that = this |
|
|
that.tableData1 = [] |
|
|
that.tableData = [] |
|
|
this.$http('POST', '/supernew/ajax_get_rank_detail', { |
|
|
this.$http('POST', '/supernew/ajax_get_rank_detail', { |
|
|
rank_type: that.dataRank, |
|
|
rank_type: that.dataRank, |
|
|
aid:that.aid, |
|
|
aid: that.aid, |
|
|
ver_type:that.ver_type, |
|
|
ver_type: that.ver_type, |
|
|
check_type:that.check_type, |
|
|
check_type: that.check_type, |
|
|
date: that.text, |
|
|
date: that.text, |
|
|
...obj |
|
|
...obj |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
@ -372,7 +425,7 @@ export default { |
|
|
that.growth_list = response.data.growth_list |
|
|
that.growth_list = response.data.growth_list |
|
|
that.total = response.data.total |
|
|
that.total = response.data.total |
|
|
|
|
|
|
|
|
if(that.showfilterTitle) that.filterTitle = response.data.title |
|
|
if (that.showfilterTitle) that.filterTitle = response.data.title |
|
|
}) |
|
|
}) |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
console.error(error, 'error') |
|
|
console.error(error, 'error') |
|
@ -380,6 +433,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
getRankingList(obj) { |
|
|
getRankingList(obj) { |
|
|
const that = this |
|
|
const that = this |
|
|
|
|
|
that.tableData1 = [] |
|
|
this.$http('POST', '/supernew/ajax_get_agent_rank_list', { |
|
|
this.$http('POST', '/supernew/ajax_get_agent_rank_list', { |
|
|
rank_type: that.dataRank, |
|
|
rank_type: that.dataRank, |
|
|
cur_page: 1, |
|
|
cur_page: 1, |
|
@ -395,6 +449,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
getAgentNew(obj) { |
|
|
getAgentNew(obj) { |
|
|
const that = this |
|
|
const that = this |
|
|
|
|
|
that.tableData = [] |
|
|
this.$http('POST', '/supernew/ajax_new_agent_list', { |
|
|
this.$http('POST', '/supernew/ajax_new_agent_list', { |
|
|
...obj |
|
|
...obj |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
@ -409,22 +464,26 @@ export default { |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
.growth-up{ |
|
|
.growth-up { |
|
|
padding: 0 5px; |
|
|
padding: 0 5px; |
|
|
color:#22C55E; |
|
|
color: #22C55E; |
|
|
} |
|
|
} |
|
|
.growth-down{ |
|
|
|
|
|
|
|
|
.growth-down { |
|
|
padding: 0 5px; |
|
|
padding: 0 5px; |
|
|
color:#EF4444; |
|
|
color: #EF4444; |
|
|
} |
|
|
} |
|
|
.growth-text{ |
|
|
|
|
|
color:#9CA3AF; |
|
|
.growth-text { |
|
|
|
|
|
color: #9CA3AF; |
|
|
padding-left: 5px; |
|
|
padding-left: 5px; |
|
|
} |
|
|
} |
|
|
.edit_icon{ |
|
|
|
|
|
|
|
|
.edit_icon { |
|
|
padding: 0 5px; |
|
|
padding: 0 5px; |
|
|
vertical-align: middle; |
|
|
vertical-align: middle; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.demo-wrap { |
|
|
.demo-wrap { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
letter-spacing: 0.08em; |
|
|
letter-spacing: 0.08em; |
|
@ -438,22 +497,15 @@ export default { |
|
|
::v-deep .el-popover.el-popper { |
|
|
::v-deep .el-popover.el-popper { |
|
|
padding: 20px; |
|
|
padding: 20px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.pop-wrap { |
|
|
.pop-wrap { |
|
|
// width: 596px; |
|
|
|
|
|
// height: 320px; |
|
|
|
|
|
/* 自动布局 */ |
|
|
|
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
// padding: 20px; |
|
|
|
|
|
gap: 20px; |
|
|
gap: 20px; |
|
|
box-sizing: border-box; |
|
|
box-sizing: border-box; |
|
|
|
|
|
|
|
|
// background: #FFFFFF; |
|
|
|
|
|
/* 阴影/常规阴影 */ |
|
|
|
|
|
// box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.16); |
|
|
|
|
|
.pop-top { |
|
|
.pop-top { |
|
|
h3 { |
|
|
h3 { |
|
|
/* body/body 1_bold */ |
|
|
|
|
|
font-family: Microsoft YaHei UI; |
|
|
font-family: Microsoft YaHei UI; |
|
|
font-size: 16px; |
|
|
font-size: 16px; |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
@ -470,7 +522,8 @@ export default { |
|
|
color: #006AFF; |
|
|
color: #006AFF; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
img{ |
|
|
|
|
|
|
|
|
img { |
|
|
width: 20px; |
|
|
width: 20px; |
|
|
height: 20px; |
|
|
height: 20px; |
|
|
} |
|
|
} |
|
|