|
@@ -0,0 +1,178 @@
|
|
|
+<template>
|
|
|
+ <div class="course">
|
|
|
+ <el-card class="box-card">
|
|
|
+ <div slot="header" class="clearfix topForm">
|
|
|
+ <div class="leftForm">
|
|
|
+ <div class="channelForm">
|
|
|
+ 技能选择:
|
|
|
+ <el-select v-model="orderParams.skillId" @change="channelChange" placeholder="请选择技能">
|
|
|
+ <el-option
|
|
|
+ v-for="item in skillList"
|
|
|
+ :key="item.skillId"
|
|
|
+ :label="item.skillName"
|
|
|
+ :value="item.skillId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="dateForm">
|
|
|
+ 查询日期:
|
|
|
+ <el-date-picker v-model="orderParams.startDate" type="date" placeholder="起"></el-date-picker>
|
|
|
+ <el-date-picker v-model="orderParams.endDate" type="date" placeholder="止"></el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-button type="primary" style="float: right;" @click="search">搜索</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table :data="skillData" border style="width: 100%" :height="tableHeight">
|
|
|
+ <el-table-column
|
|
|
+ label="日期"
|
|
|
+ prop="day"
|
|
|
+ align="left"
|
|
|
+ header-align="center"
|
|
|
+ min-width="120px"
|
|
|
+ ></el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="UV" prop="uv" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="VV" prop="vv" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="VIP用户 | UV1"
|
|
|
+ align="right"
|
|
|
+ header-align="center"
|
|
|
+ :render-header="renderheader"
|
|
|
+ prop="vipUv"
|
|
|
+ min-width="120px"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="非VIP用户 | UV2=UV-UV1"
|
|
|
+ align="right"
|
|
|
+ header-align="center"
|
|
|
+ :render-header="renderheader"
|
|
|
+ prop="waitVipUv"
|
|
|
+ min-width="140px"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="VIP用户占比 | UV1/UV"
|
|
|
+ align="right"
|
|
|
+ header-align="center"
|
|
|
+ :render-header="renderheader"
|
|
|
+ prop="vipProportion"
|
|
|
+ min-width="140px"
|
|
|
+ ></el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ label="付费订单数量"
|
|
|
+ align="right"
|
|
|
+ header-align="center"
|
|
|
+ :render-header="renderheader"
|
|
|
+ prop="totalPayment"
|
|
|
+ min-width="160px"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="转化率"
|
|
|
+ align="right"
|
|
|
+ header-align="center"
|
|
|
+ :render-header="renderheader"
|
|
|
+ prop="totalConversion"
|
|
|
+ min-width="190px"
|
|
|
+ ></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- <el-pagination
|
|
|
+ v-if="orderList.totalElements"
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :total="orderList.totalElements"
|
|
|
+ @current-change="changePage">
|
|
|
+ </el-pagination>-->
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import formatDate from "../../utils/formatTime";
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableHeight: 500,
|
|
|
+ dateValue: "",
|
|
|
+ orderParams: {
|
|
|
+ skillId: "",
|
|
|
+ startDate: "",
|
|
|
+ endDate: ""
|
|
|
+ }
|
|
|
+ // orderList:[]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ skillList: "skillList",
|
|
|
+ orderList: "orderList",
|
|
|
+ productList: "productList",
|
|
|
+ channeList: "channeList",
|
|
|
+ skillData: "skillData"
|
|
|
+ })
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.$store.dispatch("getSkillList");
|
|
|
+ console.log(1111, this.skillList);
|
|
|
+ // this.$store.dispatch("getOrderList", this.orderParams);
|
|
|
+ this.orderParams.startDate = this.getYesterDay();
|
|
|
+ this.orderParams.endDate = this.getYesterDay();
|
|
|
+
|
|
|
+ this.tableHeight = document.documentElement.clientHeight * 0.75;
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 搜索
|
|
|
+ search() {
|
|
|
+ console.log(this.dateValue[0]);
|
|
|
+ console.log(formatDate(this.dateValue[0], 2));
|
|
|
+ this.orderParams.startDate = this.orderParams.startDate
|
|
|
+ ? formatDate(this.orderParams.startDate, 2)
|
|
|
+ : "";
|
|
|
+ this.orderParams.endDate = this.orderParams.endDate
|
|
|
+ ? formatDate(this.orderParams.endDate, 2)
|
|
|
+ : "";
|
|
|
+ this.$store.dispatch("getSkillData", this.orderParams);
|
|
|
+ },
|
|
|
+ // 渠道下课程分页
|
|
|
+ changePage(e) {
|
|
|
+ this.orderParams.pageNo = e;
|
|
|
+ this.$store.dispatch("getSkillData", this.orderParams);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 表头折行
|
|
|
+ renderheader(h, { column, $index }) {
|
|
|
+ return h("span", {}, [
|
|
|
+ h("span", {}, column.label.split("|")[0]),
|
|
|
+ h("br"),
|
|
|
+ h("span", {}, column.label.split("|")[1])
|
|
|
+ ]);
|
|
|
+ },
|
|
|
+ getYesterDay() {
|
|
|
+ let yesterday = new Date().getTime() - 86400000;
|
|
|
+ return formatDate(yesterday, 2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="less">
|
|
|
+.pruductForm {
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+.topForm {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+.leftForm {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+.dateForm {
|
|
|
+ margin-left: 18px;
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|