Commit 6cdf8762 authored by youjie's avatar youjie

no message

parent 3ec952d6
<template>
<div class="customerManage border" style="display:flex;height:calc(100% - 20px);flex-direction:column;">
<div class="tools" style="border:none;">
<div class="tools-item">
<h1>引流排名统计</h1>
</div>
<div class="rightmenu">
<el-button type="primary" @click="download">导出</el-button>
</div>
</div>
<div class="query-box">
<el-row :gutter="20">
<el-col :xs="14" :sm="12" :md="10" :lg="8" :xl="6">
<span class="font-size-12" style="padding-right: 10px;flex-shrink: 0;">期数:</span>
<el-date-picker
v-model="times"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期" @change="getTime">
</el-date-picker>
</el-col>
</el-row>
</div>
<div style="padding: 0 0;background: #ffffff;">
<el-table
:data="dataList"
style="width: 100%"
border
:span-method="objectSpanMethod">
<el-table-column width="150" fixed prop="EmpName" label="姓名"></el-table-column>
<el-table-column width="100" prop="ranking" label="排名">
<template slot="header" slot-scope="scope">
排名
</template>
<template slot-scope="scope">
{{scope.row.ranking}}
</template>
</el-table-column>
<el-table-column :label="i.Name" align="center" v-for="i in PlatformTypeList">
<el-table-column
v-for="item in ModuleTypeList"
prop="province"
:label="item.Name"
width="80">
<template slot-scope="scope">
<template v-for="items in scope.row.xhs">
<template v-if="item.Name==items.name">
{{items.num}}
</template>
</template>
</template>
</el-table-column>
</el-table-column>
<!-- <el-table-column label="微博" align="center">
<el-table-column
v-for="item in ModuleTypeList"
prop="province"
:label="item.Name"
width="80">
<template slot-scope="scope">
<template v-for="items in scope.row.wb">
<template v-if="item.Name==items.name">
{{items.num}}
</template>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="抖音" align="center">
<el-table-column
v-for="item in ModuleTypeList"
prop="province"
:label="item.Name"
width="80">
<template slot-scope="scope">
<template v-for="items in scope.row.dy">
<template v-if="item.Name==items.name">
{{items.num}}
</template>
</template>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column fixed="right" prop="hj" label="合计"></el-table-column>
</el-table>
</div>
</div>
</template>
<script>
export default {
data() {
return {
formEdit:{
Id:'',// :'',//明细ID(以小红书为蓝本) 是 [string] 查看
FansNum:'',// 粉丝数量 是 [string] 查看
AddFansNum:'',// 添加分数数量 是 [string] 查看
CollectNum:'',// 收藏数量 是 [string] 查看
VisitorNum:'',// 访客数量 是 [string] 查看
LookNum:'',// 观看数量 是 [string] 查看
InteractionNum:'',// 互动数量 是 [string] 查看
DiscussNum:'',// 评论数量 是 [string] 查看
SecondsNum:'',// 观看总时长 是 [string] 查看
NoteNum:'',// 笔记数量
},
errText:'',
rankingTitle3:[
'排名项目',
'第一名',
'第二名',
],
rankingTitle:[
'第一名',
'第二名',
'第三名',
],
activeList:[
{Name:'小红书',Id:1},
{Name:'微博',Id:2},
{Name:'抖音',Id:3},
],
ModuleTypeList:[],
PlatformTypeList:[],
dataList: [
// {
// name:'李四',
// ranking:'第一名',
// xhs:[
// {
// name:'机票',
// num:1
// }
// ],
// wb:[
// {
// name:'机票',
// num:1
// }
// ],
// dy:[
// {
// name:'机票',
// num:1
// }
// ],
// hj: 3
// },
// {
// name:'李四',
// ranking:'第二名',
// xhs:[
// {
// name:'机票',
// num:2
// }
// ],
// wb:[
// {
// name:'机票',
// num:3
// }
// ],
// dy:[
// {
// name:'机票',
// num:3
// }
// ],
// hj: 8
// },
// {
// name:'李四',
// ranking:'第三名',
// xhs:[
// {
// name:'机票',
// num:2
// }
// ],
// wb:[
// {
// name:'机票',
// num:3
// }
// ],
// dy:[
// {
// name:'机票',
// num:3
// }
// ],
// hj: 8
// },
// {
// name:'张三',
// ranking:'第一名',
// xhs:[
// {
// name:'机票',
// num:1
// }
// ],
// wb:[
// {
// name:'机票',
// num:1
// }
// ],
// dy:[
// {
// name:'机票',
// num:1
// }
// ],
// hj: 3
// },
// {
// name:'张三',
// ranking:'第二名',
// xhs:[
// {
// name:'机票',
// num:2
// }
// ],
// wb:[
// {
// name:'机票',
// num:3
// }
// ],
// dy:[
// {
// name:'机票',
// num:3
// }
// ],
// hj: 8
// },
// {
// name:'张三',
// ranking:'第三名',
// xhs:[
// {
// name:'机票',
// num:2
// }
// ],
// wb:[
// {
// name:'机票',
// num:3
// }
// ],
// dy:[
// {
// name:'机票',
// num:3
// }
// ],
// hj: 8
// },
],
loading: false,
msg: {
StartTime:'',
EndTime:''
},
times:[]
};
},
mounted() {
this.getEnumerate()
this.init();
},
methods: {
getTime(){
this.msg.StartTime = this.times[0]
this.msg.EndTime = this.times[1]
},
getEnumerate(){
// 平台枚举
this.apipost(
"/api/IntroduceFlowStat/GetPlatformTypeEnumList",{},
(res) => {
this.PlatformTypeList = res.data.data
},
(e) => {
}
);
// 板块枚举
this.apipost(
"/api/IntroduceFlowStat/GetModuleTypeEnumList",{},
(res) => {
this.ModuleTypeList = res.data.data
},
(e) => {
}
);
},
init() {
if (this.loading) return;
this.loading = true;
this.apipost(
"/api/IntroduceFlowStat/GetFlowRankStatList",
this.msg,
(res) => {
this.loading = false;
if(res.data.data){
if(res.data.data){
let allList = JSON.parse(JSON.stringify(res.data.data))
let RankList = []
let list = []
for(let i = 0;i<allList.length;i++){
allList[i].ranking
let j = 0
for(j;j<allList[i].RankList.length;j++){
allList[i].ranking = j
list.push(allList[i])
}
}
// allList.forEach(item => {
// item.ranking = ''
// for(let i=0;i<2;i++){
// item.ranking = i+1
// }
// list.push(item)
// });
this.dataList = list
console.log(this.dataList)
}
}
},
(e) => {
this.loading = false;
}
);
},
download() {
let text = '排名统计'
this.downloadHandler(
"/api/IntroduceFlowStat/DownLoadFlowRankStat",
text
);
},
// 导出
downloadHandler(url, name) {
this.GetLocalFile(url, this.msg, `${name}.xls`, (res) => {
this.$message({
message: "导出成功",
type: "success",
});
});
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex % 3 === 0) {
return {
rowspan: 3,
colspan: 1
};
} else {
return {
rowspan: 0,
colspan: 0
};
}
}
}
},
};
</script>
<style>
@import "../../assets/css/customerManage.css";
.customerManage.border .el-table--border td{
border-right: 1px solid #EBEEF5 !important;
}
.el-table__fixed-body-wrapper table {
padding-bottom: 8px !important;
}
.el-table .xiaoji-row {
background: #ffff00;
}
.el-table .sum-row {
background: #00b0f0;
}
.el-table .warning-col {
background: red;
}
.diy-eltabs .el-tabs__content {
height: calc(100% - 40px);
}
.diy-eltabs .data-box-item {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment