Commit ae8b0e15 by shaojiawen

Merge branch 'feature/act-code' of http://git.gicdev.com/office/haoban-3 into feature/act-code

parents a2842083 f7949167
<template>
<div class="iphone">
<span class="pageTitle">{{ pageTitle }}</span>
<div class="content">
<div class="enterpriseInfo">
<div class="logo"></div>
<div class="name">{{ merchantName }}</div>
</div>
<div class="QRcode"></div>
<div class="leadingText">{{ guideComment }}</div>
<div class="enterpriseNum">
<i class="iconfont-hb3 iconhuawushuju"></i>
<p>{{ merchantPhoneNumber }}</p>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {};
},
props: {
pageTitle: {
type: String,
default: '标题'
},
merchantName: {
type: String,
default: '商户名称'
},
merchantPhoneNumber: {
type: String,
default: '0571-82345678'
},
merchantLogo: {
type: String,
default: ''
},
pageBackgroudImg: {
type: String,
default: ''
},
guideComment: {
type: String,
default: '长按保存/识别二维码,添加您的专属导购'
}
},
watch: {
mediaList(val) {
console.log(val);
}
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.iphone {
position: relative;
margin-left: 117px;
display: inline-block;
font-size: 0;
line-height: 0;
background-image: url('../assets/iphone3.png');
background-repeat: no-repeat;
background-size: 280px auto;
width: 280px;
height: 543px;
.pageTitle {
font-size: 14px;
position: sticky;
color: #000000;
font-weight: 500;
top: 64px;
width: 100%;
height: 20px;
display: flex;
justify-content: center;
}
.content {
width: 228px;
height: 410px;
box-sizing: border-box;
padding: 20px 16px;
position: absolute;
top: 97px;
left: 26px;
background: #ffffff;
display: flex;
align-items: center;
flex-direction: column;
border-radius: 10px 10px 24px 24px;
.enterpriseInfo {
display: flex;
justify-content: flex-start;
align-items: center;
width: 100%;
.logo {
width: 36px;
height: 36px;
background: #f6f6f6;
border-radius: 60px;
}
.name {
margin-left: 10px;
font-size: 12px;
font-weight: 500;
color: #242835;
line-height: 17px;
width: 80%;
}
}
.QRcode {
width: 176px;
height: 176px;
margin: 11px 0 16px 0;
background: #f6f6f6;
background-image: url('../assets/QRcode.png');
background-size: 176px auto;
}
.leadingText {
font-size: 10px;
color: #7f818a;
line-height: 14px;
width: 88%;
text-align: center;
}
.enterpriseNum {
width: 130px;
margin-top: 68px;
height: 32px;
box-sizing: border-box;
border-radius: 40px;
border: 1px solid #9da0a6;
display: flex;
align-items: center;
padding: 9px 12px;
line-height: 14px;
color: #63666b;
font-size: 12px;
i {
font-size: 12px;
}
p {
margin-left: 5px;
}
}
}
}
</style>
<template>
<div class="iphone">
<div class="infoList">
<div class="infoListBox">
<div class="infoAvatar">
<img src="@/assets/head_default.jpg" />
</div>
<div class="textInfo">
<div class="content" v-html="welcomeContent"></div>
</div>
</div>
<div class="infoListBox" v-for="(item, index) in mediaList" :key="index">
<div>
<div class="infoAvatar">
<img src="@/assets/head_default.jpg" />
</div>
<div v-if="item.mediaType == 1 || item.mediaType == 7" class="imgInfo">
<img :src="item.mediaUrl" />
</div>
<div v-if="item.mediaType == 2" class="videoInfo" @click="blank(item.mediaUrl)">
<video :src="item.mediaUrl" />
</div>
<div v-if="item.mediaType == 3" class="docInfo">
<div class="docTitle">
<b>{{ item.mediaTitle }}</b>
<p>{{ item.mediaSize }} KB</p>
</div>
<svg-icon iconname="iconwenjianleixing-wenjian" size="40"> </svg-icon>
</div>
<div v-if="item.mediaType == 4" class="urlInfo">
<div class="urlTitle">{{ item.mediaTitle }}</div>
<div class="urlContent">
<b>{{ item.mediaTitle }}</b>
<svg-icon iconname="iconwenjianleixing-lianjie" size="40"> </svg-icon>
</div>
</div>
<div v-if="item.mediaType == 5 || item.mediaType == 6" class="appletsInfo">
<div class="appletsTitle">{{ item.miniProgramName }}</div>
<div class="appletsTitle" style="font-size:12px">{{ item.mediaTitle }}</div>
<img :src="item.mediaUrl" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {};
},
props: {
welcomeContent: {
type: String,
default: ''
},
mediaList: {
type: Array,
default: () => []
}
},
watch: {
mediaList(val) {
console.log(val);
}
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.iphone {
border-radius: 4px;
position: relative;
margin-left: 117px;
display: inline-block;
font-size: 0;
line-height: 0;
background-image: url('../assets/iphone2.png');
background-repeat: no-repeat;
width: 240px;
min-height: 495px;
background-size: 240px auto;
color: #303133;
.infoList {
padding: 0 10px;
margin-top: 80px;
border-radius: 6px;
max-height: 360px;
overflow: auto;
.infoListBox {
.infoAvatar {
display: inline-block;
vertical-align: top;
margin-right: 10px;
img {
vertical-align: top;
width: 26px;
height: 26px;
}
}
.imgInfo,
.videoInfo {
display: inline-block;
overflow: hidden;
border-radius: 4px;
position: relative;
cursor: default;
img {
min-height: 27px;
max-width: 140px;
}
}
.videoInfo {
video {
min-height: 27px;
max-width: 140px;
max-height: 250px;
cursor: pointer;
}
}
.textInfo,
.docInfo,
.urlInfo,
.appletsInfo {
min-height: 28px;
background-color: #fff;
border: 1px solid #e4e6e9;
max-width: 166px;
display: inline-block;
text-align: left;
padding: 5px 6px;
border-radius: 4px;
min-width: 24px;
box-sizing: border-box;
position: relative;
&::before {
top: 10px;
display: block;
content: ' ';
width: 0;
line-height: 0;
font-size: 0;
border-style: solid;
border-color: transparent;
position: absolute;
left: -6px;
border-width: 4px 6px;
border-left: 0;
border-right-color: #fff;
}
.content {
font-size: 12px;
word-break: break-all;
letter-spacing: 0;
line-height: 18px;
height: auto;
}
}
.docInfo {
display: inline-flex;
align-items: center;
}
.docTitle {
padding-right: 10px;
max-width: 100px;
float: left;
overflow-wrap: break-word;
b {
font-size: 12px;
text-align: left;
line-height: 16px;
}
p {
margin-top: 5px;
font-size: 12px;
color: #787878;
text-align: left;
line-height: 14px;
}
}
.urlTitle,
.appletsTitle {
font-size: 14px;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 3px;
}
.urlInfo {
.urlContent {
overflow-wrap: break-word;
b {
color: #606266;
padding-right: 10px;
font-size: 12px;
text-align: left;
line-height: 17px;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
max-width: 100px;
float: left;
}
}
}
.appletsInfo {
.appletsTitle {
color: #606266;
}
img {
width: 144px;
height: 144px;
}
}
}
.infoListBox + .infoListBox {
margin-top: 15px;
}
}
}
</style>
...@@ -5,6 +5,11 @@ const attractFlowLinkRouter = [ ...@@ -5,6 +5,11 @@ const attractFlowLinkRouter = [
path: '/attractFlowLink', path: '/attractFlowLink',
name: '引流链接', name: '引流链接',
component: _import('salesleads/actCodeManage/attractFlowLink', 'index') component: _import('salesleads/actCodeManage/attractFlowLink', 'index')
},
{
path: '/ladingPageInfo',
name: '落地页详情',
component: _import('salesleads/actCodeManage/attractFlowLink/landingPage', 'detail')
} }
]; ];
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</div> </div>
</div> </div>
<div class="flex flex-space-between m-b-20 m-t-20"> <div class="flex flex-space-between m-b-20 m-t-20">
<el-input placeholder="请输入标题" maxlength="50" v-model="title" class="w-264" style="width: 264px;" @keyup.native="value => toInput(value, searchInput)" clearable @clear="clearSearch"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input> <el-input placeholder="请输入标题" maxlength="50" v-model="form.title" class="w-264" style="width: 264px;" @keyup.native="value => toInput(value, searchInput)" clearable @clear="clearSearch"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
<el-button v-if="$getButtonLimit($buttonCode.addSalutatory)" :limit-code="$buttonCode.addSalutatory" type="primary" @click="changeRoute">新建欢迎语</el-button> <el-button v-if="$getButtonLimit($buttonCode.addSalutatory)" :limit-code="$buttonCode.addSalutatory" type="primary" @click="changeRoute">新建欢迎语</el-button>
</div> </div>
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%' }" v-loading="loading"> <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%' }" v-loading="loading">
...@@ -80,23 +80,11 @@ ...@@ -80,23 +80,11 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="block common-wrap__page text-right m-t-24" v-if="tableData.length != 0">
<dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="form.pageNum" :page-sizes="[20, 40, 60, 80]" :page-size="form.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </dm-pagination>
</div> </div>
</div> </div>
<!-- <el-dialog title="加好友配置" :visible.sync="dialogVisible" width="590px" :before-close="handleClose">
<span class="tips">好办欢迎语支持文字、图片、视频、文件、链接</span>
<el-form label-width="100px" style="margin-top:20px">
<el-form-item label="加好友配置">
<div v-for="(val, key) in friendSettingTypeOption" :key="key">
<el-radio :label="val.label" v-model="type">{{ val.content }}</el-radio>
<el-tag size="small" v-show="val.label == 2">推荐使用</el-tag>
</div> </div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" :loading="btnLoading" @click="saveSetting">确 定</el-button>
</span>
</el-dialog> -->
</div> </div>
</template> </template>
<script> <script>
...@@ -106,17 +94,16 @@ export default { ...@@ -106,17 +94,16 @@ export default {
props: {}, props: {},
data() { data() {
return { return {
// friendSettingTypeOption: [ form: {
// { label: 2, content: '发送【好办欢迎语】+【带导购参数的公众号二维码】' },
// { label: 1, content: '发送【好办欢迎语】+【带导购参数的会员小程序卡片】' }
// ],
title: '', title: '',
pageSize: 20,
pageNum: 1
},
total: 0,
wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
// friendSettingType: '',
type: 1, type: 1,
friendSettingId: '', friendSettingId: '',
btnLoading: false, btnLoading: false,
// dialogVisible: false,
iconType: { iconType: {
1: 'iconwenjianleixingtupian', 1: 'iconwenjianleixingtupian',
2: 'iconwenjianleixingshipin', 2: 'iconwenjianleixingshipin',
...@@ -135,15 +122,6 @@ export default { ...@@ -135,15 +122,6 @@ export default {
that.getData(); that.getData();
// this.getSetting(); // this.getSetting();
}, },
computed: {
// echoFriendData() {
// let content = '';
// if (this.friendSettingType) {
// content = this.friendSettingTypeOption.filter(item => item.label == this.friendSettingType)[0].content;
// }
// return content;
// }
},
methods: { methods: {
/** /**
* 输入 * 输入
...@@ -157,20 +135,6 @@ export default { ...@@ -157,20 +135,6 @@ export default {
clearSearch() { clearSearch() {
this.getData(); this.getData();
}, },
// openDialog() {
// this.dialogVisible = true;
// },
// getSetting() {
// getRequest('/haoban-manage3-web/welcome/get/friend-setting', { wxEnterpriseId: this.wxEnterpriseId }).then(res => {
// let resData = res.data;
// if (resData.code == 0 && resData.result) {
// const { friendSettingId, friendSettingType } = resData.result;
// this.friendSettingId = friendSettingId;
// this.type = friendSettingType ? friendSettingType : 1;
// this.friendSettingType = friendSettingType;
// }
// });
// },
saveSetting() { saveSetting() {
let data = { let data = {
friendSettingId: this.friendSettingId, friendSettingId: this.friendSettingId,
...@@ -226,11 +190,11 @@ export default { ...@@ -226,11 +190,11 @@ export default {
*/ */
getData() { getData() {
this.loading = true; this.loading = true;
postJsonRequest('/haoban-manage3-web/welcome/list', { title: this.title, wxEnterpriseId: this.wxEnterpriseId }) postJsonRequest('/haoban-manage3-web/welcome/list', { ...this.form, wxEnterpriseId: this.wxEnterpriseId })
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.code == 0 && resData.result) { if (resData.code == 0 && resData.result) {
this.tableData = resData.result; this.tableData = resData.result.list;
this.tableData.forEach(item => { this.tableData.forEach(item => {
item.suitDepartmentName = []; item.suitDepartmentName = [];
if (item.suitDepartmentList && item.suitDepartmentList.length) { if (item.suitDepartmentList && item.suitDepartmentList.length) {
...@@ -239,6 +203,7 @@ export default { ...@@ -239,6 +203,7 @@ export default {
}); });
} }
}); });
this.total = resData.result.pageInfo.total;
this.$nextTick(() => { this.$nextTick(() => {
const span = document.createElement('span'); const span = document.createElement('span');
span.style.position = 'fixed'; span.style.position = 'fixed';
...@@ -264,6 +229,15 @@ export default { ...@@ -264,6 +229,15 @@ export default {
.finally(() => { .finally(() => {
this.loading = false; this.loading = false;
}); });
},
handleSizeChange(val) {
this.form.pageNum = 1;
this.form.pageSize = val;
this.getData(this.selectRadio);
},
handleCurrentChange(val) {
this.form.pageNum = val;
this.getData(this.selectRadio);
} }
}, },
watch: {}, watch: {},
......
...@@ -77,50 +77,7 @@ ...@@ -77,50 +77,7 @@
<el-button type="primary" style="margin-left:117px;margin-bottom:20px" :loading="submitbtnLoading" @click="submit">保存</el-button> <el-button type="primary" style="margin-left:117px;margin-bottom:20px" :loading="submitbtnLoading" @click="submit">保存</el-button>
<el-button style="margin-bottom:20px" @click="$router.go(-1)">返回</el-button> <el-button style="margin-bottom:20px" @click="$router.go(-1)">返回</el-button>
</el-form> </el-form>
<div class="iphone"> <preview :welcomeContent="form.welcomeContent" :mediaList="form.welcomeMediaList" />
<div class="infoList">
<div class="infoListBox" v-if="form.welcomeContent || form.title">
<div class="infoAvatar">
<img src="@/assets/head_default.jpg" />
</div>
<div class="textInfo">
<div class="content" v-html="form.welcomeContent"></div>
</div>
</div>
<div class="infoListBox" v-for="(item, index) in form.welcomeMediaList" :key="index">
<div>
<div class="infoAvatar">
<img src="@/assets/head_default.jpg" />
</div>
<div v-if="item.mediaType == 1 || item.mediaType == 7" class="imgInfo">
<img :src="item.mediaUrl" />
</div>
<div v-if="item.mediaType == 2" class="videoInfo" @click="blank(item.mediaUrl)">
<video :src="item.mediaUrl" />
</div>
<div v-if="item.mediaType == 3" class="docInfo">
<div class="docTitle">
<b>{{ item.mediaTitle }}</b>
<p>{{ item.mediaSize }} KB</p>
</div>
<svg-icon iconname="iconwenjianleixing-wenjian" size="40"> </svg-icon>
</div>
<div v-if="item.mediaType == 4" class="urlInfo">
<div class="urlTitle">{{ item.mediaTitle }}</div>
<div class="urlContent">
<b>{{ item.mediaTitle }}</b>
<svg-icon iconname="iconwenjianleixing-lianjie" size="40"> </svg-icon>
</div>
</div>
<div v-if="item.mediaType == 5 || item.mediaType == 6" class="appletsInfo">
<div class="appletsTitle">{{ item.miniProgramName }}</div>
<div class="appletsTitle" style="font-size:12px">{{ item.mediaTitle }}</div>
<img :src="item.mediaUrl" />
</div>
</div>
</div>
</div>
</div>
</div> </div>
<el-dialog title="添加公众号" width="585px" class="replay-link-dialog" :visible.sync="addReplayDialog" @closed="onClosed"> <el-dialog title="添加公众号" width="585px" class="replay-link-dialog" :visible.sync="addReplayDialog" @closed="onClosed">
<el-form label-position="right" ref="form" :model="{}" label-width="100px" @submit.native.prevent> <el-form label-position="right" ref="form" :model="{}" label-width="100px" @submit.native.prevent>
...@@ -216,6 +173,8 @@ import limitTextarea from '@/components/limit-textarea.vue'; ...@@ -216,6 +173,8 @@ import limitTextarea from '@/components/limit-textarea.vue';
import { emojiArr } from '@/utils/emoji'; import { emojiArr } from '@/utils/emoji';
import multUpload from '@/components/mult-upload-img.vue'; import multUpload from '@/components/mult-upload-img.vue';
import singleUpload from '@/components/single-upload.vue'; import singleUpload from '@/components/single-upload.vue';
import iphone2 from '@/assets/iphone2.png';
import preview from '@/components/preview-welcome.vue';
export default { export default {
props: {}, props: {},
data() { data() {
...@@ -298,7 +257,8 @@ export default { ...@@ -298,7 +257,8 @@ export default {
appletDialogVisible: false, appletDialogVisible: false,
defaultWelcomeFlag: false, defaultWelcomeFlag: false,
isNew: true, isNew: true,
echoDefaultWelcomeFlag: 0 echoDefaultWelcomeFlag: 0,
iphone2
}; };
}, },
watch: { watch: {
...@@ -332,7 +292,8 @@ export default { ...@@ -332,7 +292,8 @@ export default {
components: { components: {
limitTextarea, limitTextarea,
singleUpload, singleUpload,
multUpload multUpload,
preview
}, },
methods: { methods: {
getExistDefaultWelcome(isNew) { getExistDefaultWelcome(isNew) {
......
<template>
<div>
<previewPage />
</div>
</template>
<script>
import previewPage from '@/components/preview-page.vue';
export default {
components: {
previewPage
}
};
</script>
<template>
<div class="m20">
<dm-sub-title class="mb16">
<div class="title">
<span>查看明细</span>
<span class="info-content cur-po"><i class="el-icon-info info-icon"></i>指标说明</span>
</div>
</dm-sub-title>
<el-row>
<div class="leftBox">
<el-input class="w260 mr10" placeholder="请输入门店名称/code" v-model="pageParam.search1" prefix-icon="el-icon-search"></el-input>
<el-input class="w260 mr10" placeholder="请输入导购名称/code" v-model="pageParam.search2" prefix-icon="el-icon-search"></el-input>
</div>
<div class="rightBox">
<ul class="datebox" v-for="(lis, index) in dateLis" :key="lis.key">
<li :class="active == index ? 'activeClass' : 'noActive'" class="dateLisBox" @click="btnChange(index)">{{ lis.value }}</li>
</ul>
<el-date-picker class="w256" v-model="pageParam.dateDefault" type="daterange" range-separator="~" start-placeholder="创建开始日期" end-placeholder="创建结束日期" :default-time="['00:00:00', '23:59:59']" :picker-options="pickerOptions()" @change="onDateChange"> </el-date-picker>
</div>
</el-row>
<el-table class="mt18" :data="tableData" @sort-change="sortChange">
<el-table-column label="导购信息">
<template slot-scope="{ row }">
<p class="overflow-ellipsis" :title="row.guideMsg">{{ row.guideMsg }}</p>
<p>{{ row.guideMsgs }}</p>
</template>
</el-table-column>
<el-table-column label="导购所属门店">
<template slot-scope="{ row }">
<p class="overflow-ellipsis" :title="row.guideStore">{{ row.guideStore }}</p>
<p>{{ row.guideStoreCode }}</p>
</template>
</el-table-column>
<el-table-column label="企微号">
<template slot-scope="{ row }">
<p class="overflow-ellipsis" :title="row.qw">{{ row.qw }}</p>
<p>{{ row.qwCode }}</p>
</template>
</el-table-column>
<el-table-column label="新增总人数" prop="addTotal" sortable></el-table-column>
<el-table-column label="今日新增总人数" prop="todayAddTotal" sortable></el-table-column>
<el-table-column label="今日流失人数" prop="toadyLess" sortable></el-table-column>
<el-table-column label="流失总人数" prop="lessTotal" sortable></el-table-column>
<el-table-column label="今日已达上限" prop="status">
<template slot-scope="{ row }">
<p>{{ row.status == 1 ? '是' : '否' }}</p>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="{ row }">
<el-button type="text" @change="looks(row)">查看记录</el-button>
</template>
</el-table-column>
</el-table>
<dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageParam.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="pageParam.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalCount"> </dm-pagination>
</div>
</template>
<script>
export default {
name: 'DateDetail',
props: {
id: {
type: String,
default: ''
}
},
data() {
return {
active: 0,
dateLis: [
{ key: 1, value: '近7天' },
{ key: 2, value: '近30天' },
{ key: 3, value: '近三个月' },
{ key: 4, value: '近半年' }
],
tableData: [],
pageParam: {
search1: '',
search2: '',
dateDefault: [],
currentPage: 1,
pageSize: 20
},
totalCount: 0,
pickerOptions() {
let pickerMinDate;
return {
onPick(obj) {
pickerMinDate = obj.minDate;
// console.log(pickerMinDate);
},
disabledDate(time) {
// const date = new Date();
// const year = date.getFullYear();
// return time.getTime() > Date.now() || time.getTime() < date.setFullYear(year - 2);
let start = new Date();
start = new Date(`${start.getFullYear()}-${start.getMonth() + 1}-${start.getDate()}`);
let start2 = new Date(pickerMinDate);
let end = new Date();
end = new Date(`${end.getFullYear()}-${end.getMonth() + 1}-${end.getDate()} 23:59:59`);
let end2 = new Date(pickerMinDate);
if (pickerMinDate) {
start = start.setFullYear(start.getFullYear() - 2);
start2 = start2.setDate(start2.getDate() - 60);
start = start > start2 ? start : start2;
end2 = end2.setDate(end2.getDate() + 60);
end = end.getTime() > end2 ? end2 : end.getTime();
// console.log('end2', end2, end);
} else {
start = start.setFullYear(start.getFullYear() - 2);
end = end.getTime();
}
return time.getTime() < start || time.getTime() > end;
}
};
}
};
},
created() {
this.getTableList();
// 默认显示近七天
this.btnChange(0);
},
methods: {
getDateRange(setEndDate) {
const start = new Date();
let end = new Date();
end = setEndDate(end);
function getDate(date) {
const result = [];
result.push(date.getFullYear());
result.push((date.getMonth() + 1).toString().padStart(2, '0'));
result.push(
date
.getDate()
.toString()
.padStart(2, '0')
);
return result.join('-');
}
// yyyy-MM-dd
return [getDate(start), getDate(end)];
},
btnChange(index) {
//把index值赋给active,点击改变样式
this.active = index;
this.pageParam.dateDefault = [];
let setDate;
if (index == 0) {
// 近7天
setDate = endDate => {
endDate.setDate(endDate.getDate() - 6);
return new Date(endDate);
};
} else if (index == 1) {
// 近30天
setDate = endDate => {
endDate.setDate(endDate.getDate() - 29);
return new Date(endDate);
};
} else if (index == 2) {
// 近三个月
setDate = endDate => {
endDate.setMonth(endDate.getMonth() - 3);
return new Date(endDate);
};
} else if (index == 3) {
// 近半年
setDate = endDate => {
endDate.setMonth(endDate.getMonth() - 6);
return new Date(endDate);
};
}
const [start, end] = this.getDateRange(setDate);
this.pageParam.dateDefault.push(end);
this.pageParam.dateDefault.push(start);
},
onDateChange() {
this.active = -1;
},
// 当前页变化
handleCurrentChange(val) {
this.pageParam.currentPage = val;
sessionStorage.setItem('currentPage', val);
},
// 页码
handleSizeChange(val) {
this.pageParam.currentPage = 1;
this.pageParam.pageSize = val;
this.getTableList();
},
// 排序
sortChange(e) {
console.log(e);
},
// 列表数据
getTableList() {
this.tableData = [
{
guideMsg: '导购信息1索尼大法根据历史的快乐风格问题',
guideMsgs: '2364756qre',
guideStore: '门店名称1哈金斯的看法和大家说法可接受的垡健康是的发送到',
guideStoreCode: '4564564',
qw: '趣味',
qwCode: '23674726',
addTotal: 1,
todayAddTotal: 2,
toadyLess: 89,
lessTotal: 23,
staus: 1
},
{
guideMsg: '导购信息1索尼大法根据历史的快乐风格问题',
guideMsgs: '2364756qre',
guideStore: '门店名称1哈金斯的看法和大家说法可接受的垡健康是的发送到',
guideStoreCode: '4564564',
qw: '趣味',
qwCode: '23674726',
addTotal: 9,
todayAddTotal: 5,
toadyLess: 77,
lessTotal: 66,
staus: 0
}
];
}
}
};
</script>
<style lang="scss" scoped>
.activeClass {
color: #2f54eb;
}
.noActive {
color: #303133;
}
.m20 {
margin: 20px;
}
.mb16 {
margin-bottom: 16px;
}
.w260 {
width: 260px;
}
.w256 {
width: 256px;
}
.mr10 {
margin-right: 10px;
}
.mr24 {
margin-right: 24px;
}
.mr12 {
margin-right: 12px;
}
.mt18 {
margin-top: 18px;
}
.leftBox {
float: left;
}
.rightBox {
float: right;
line-height: 32px;
.datebox {
display: inline-block;
.dateLisBox {
font-size: 14px;
margin-right: 24px;
cursor: pointer;
}
}
}
.title {
width: 100%;
display: flex;
justify-content: space-between;
.info-content {
color: #2f54eb;
font-size: 14px;
}
.info-icon {
margin-right: 8px;
}
}
.cur-po {
cursor: pointer;
}
.el-button--text {
color: #2f54eb;
}
</style>
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