|
@@ -3,7 +3,7 @@
|
|
|
<div class="m-container">
|
|
|
<el-page-header
|
|
|
@back="onCancel"
|
|
|
- :content="'2021双十一活动'"
|
|
|
+ :content="year === '2021'? '2021双十一活动' : '2022双十一活动'"
|
|
|
></el-page-header>
|
|
|
<!-- <h2>
|
|
|
<div class="squrt"></div>
|
|
@@ -188,6 +188,7 @@
|
|
|
prop="targetAmount"
|
|
|
label="乐理课成交金额/人数"
|
|
|
width="150px"
|
|
|
+ v-if="year === '2021'"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
@@ -200,6 +201,7 @@
|
|
|
prop="giveMemberNum"
|
|
|
label="赠送会员人数"
|
|
|
width="150px"
|
|
|
+ v-if="year === '2021'"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
@@ -238,7 +240,7 @@ import { getToken } from "@/utils/auth";
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import QrCode from "@/components/QrCode/index";
|
|
|
import { vaildTeachingUrl } from "@/utils/validate";
|
|
|
-import { getDoubleElevenList } from "./api";
|
|
|
+import { getDoubleElevenList, getDoubleElevenList2022 } from "./api";
|
|
|
import { Export } from "@/utils/downLoadFile";
|
|
|
import cleanDeep from "clean-deep";
|
|
|
import qs from "qs";
|
|
@@ -271,6 +273,7 @@ export default {
|
|
|
},
|
|
|
qrcodeStatus: false,
|
|
|
codeUrl: "",
|
|
|
+ year: "2021",
|
|
|
};
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
@@ -279,6 +282,7 @@ export default {
|
|
|
async mounted() {
|
|
|
// 获取分部
|
|
|
await this.$store.dispatch("setBranchs");
|
|
|
+ this.year = this.$route.query.year || "2021"
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
@@ -287,10 +291,18 @@ export default {
|
|
|
},
|
|
|
async getList() {
|
|
|
try {
|
|
|
- const res = await getDoubleElevenList({
|
|
|
- organId: this.searchForm.organId,
|
|
|
- ...this.searchList
|
|
|
- });
|
|
|
+ let res = null
|
|
|
+ if (this.year === "2021") {
|
|
|
+ res = await getDoubleElevenList({
|
|
|
+ organId: this.searchForm.organId,
|
|
|
+ ...this.searchList
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ res = await getDoubleElevenList2022({
|
|
|
+ organId: this.searchForm.organId,
|
|
|
+ ...this.searchList
|
|
|
+ });
|
|
|
+ }
|
|
|
// ...this.searchList,
|
|
|
this.tableList = res.data;
|
|
|
// this.head = res.data.head;
|
|
@@ -323,14 +335,25 @@ export default {
|
|
|
onCreateQRCode(row) {
|
|
|
// 生成报名二维码
|
|
|
this.qrcodeStatus = true;
|
|
|
- this.codeUrl = vaildTeachingUrl() + "/#/statistic-20211111";
|
|
|
+ if (this.year === "2022") {
|
|
|
+ this.codeUrl = vaildTeachingUrl() + "/#/statistic-20221111";
|
|
|
+ } else {
|
|
|
+ this.codeUrl = vaildTeachingUrl() + "/#/statistic-20211111";
|
|
|
+ }
|
|
|
},
|
|
|
gotoDetail(row) {
|
|
|
// console.log('跳转详情')
|
|
|
- this.$router.push({
|
|
|
- path: "/operateManager/2021doubleDetail",
|
|
|
- query: { organId: row.organId, organName: row.organName },
|
|
|
- });
|
|
|
+ if (this.year === "2022") {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/operateManager/2021doubleDetail",
|
|
|
+ query: { organId: row.organId, organName: row.organName },
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/operateManager/2021doubleDetail",
|
|
|
+ query: { organId: row.organId, organName: row.organName },
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
async onExport() {
|
|
|
let obj = {
|
|
@@ -340,8 +363,8 @@ export default {
|
|
|
await Export(
|
|
|
this,
|
|
|
{
|
|
|
- url: "/api-web/export/organDoubleEleven2021Statis",
|
|
|
- fileName: "2021双十一活动.xls",
|
|
|
+ url: this.year === "2021" ? "/api-web/export/organDoubleEleven2021Statis" : "/api-web/export/organDoubleEleven2022Statis",
|
|
|
+ fileName: this.year === "2021" ? "2021双十一活动.xls" : "2022双十一活动.xls",
|
|
|
method: "post",
|
|
|
params: qs.stringify(cleanDeep(obj)),
|
|
|
},
|