Commit d2056904 by 张卿

修复了 marketing 和addmarketing的页面接口

parent 2f908dc2
......@@ -5,7 +5,9 @@
<span class="top-title title">新建图文素材推送</span>
<span class="top-tips gray">
<span class="star-red">*</span>
<a href="#">微信公众平台</a>的图文素材,通过<a href="#">会员标签</a>分类投放,实现精准投放
<a href="#">微信公众平台</a>的图文素材,通过
<a href="#">会员标签</a>分类投放,实现精准投放
</span>
</el-col>
</el-row>
......@@ -15,10 +17,27 @@
<img src="@/assets/images/picture.png" class="iconimg">
</el-col>
<el-col :span="18" class="subtitle-tips">
<p>在微信触达域中,公众号作为最通用的触达渠道,微信为品牌号提供了 <span class="star-red">适配大批量会员触达</span> 的图文素材触达方式。</p>
<p><span><i class="el-icon-check"></i></span> 通过会员标签画像分群的分批精准推送,建议编辑不同的图文素材面向不同的会员群体。前往 <a href="#">微信公众平台</a> -管理-素材管理</p>
<p><span><i class="el-icon-check"></i></span> 最大化的利用微信“用户每月只能接受4条”的规则限制,通过舞象云实现多次投放,但每日上限为 <span class="star-red">100次</span></p>
<p><span><i class="el-icon-check"></i></span> 大批量的微信消息推送,微信端控制最大为80W/分钟,平台将进行资源的动态优化,请耐心等待,推送成功后将发送邮件通知。</p>
<p>
在微信触达域中,公众号作为最通用的触达渠道,微信为品牌号提供了
<span class="star-red">适配大批量会员触达</span> 的图文素材触达方式。
</p>
<p>
<span>
<i class="el-icon-check"></i>
</span> 通过会员标签画像分群的分批精准推送,建议编辑不同的图文素材面向不同的会员群体。前往
<a href="#">微信公众平台</a> -管理-素材管理
</p>
<p>
<span>
<i class="el-icon-check"></i>
</span> 最大化的利用微信“用户每月只能接受4条”的规则限制,通过舞象云实现多次投放,但每日上限为
<span class="star-red">100次</span>
</p>
<p>
<span>
<i class="el-icon-check"></i>
</span> 大批量的微信消息推送,微信端控制最大为80W/分钟,平台将进行资源的动态优化,请耐心等待,推送成功后将发送邮件通知。
</p>
</el-col>
</el-row>
</div>
......
......@@ -2,101 +2,170 @@
<div class="step-info">
<el-form ref="form" :model="form" label-width="100px">
<el-form-item label="新建推送名称">
<span class="gray"><span class="star-red">*</span> 推送名称仅供数据中心操作记录查询,您推送的会员将不会看到此信息。</span>
<span class="gray">
<span class="star-red">*</span> 推送名称仅供数据中心操作记录查询,您推送的会员将不会看到此信息。
</span>
</el-form-item>
<el-form-item label="推送名称">
<el-input v-model.trim="form.name" maxlength="10" placeholder="请输入推送名称,10字以内"></el-input>
</el-form-item>
<el-form-item label="选择推送素材" class="step-choose">
<span class="gray"><span class="star-red">*</span> 推送素材需前往<a href="#">微信公众平台</a>-管理-素材管理维护。</span>
<div class="add-material" @click="centerDialogVisible = true">
<span class="gray">
<span class="star-red">*</span> 推送素材需前往
<a href="#">微信公众平台</a>-管理-素材管理维护。
</span>
<div class="add-material" @click="showMaterList()" v-if="!isHaveMater">
<div v-if="!chooseItem">
<el-button type="text" class="add-title">
<p><i class="el-icon-plus add-plus"></i></p>
添加微信素材
<p>
<i class="el-icon-plus add-plus"></i>
</p>添加微信素材
</el-button>
</div>
<div v-else>
<span v-if="item.content.news_item.length===1" v-for="(art,index) in item.content.news_item" :key="index">
<div>
<p style="white-space:normal;
word-break:break-all;
word-wrap:break-word;padding:15px 0 0 15px;height:30px">{{art.title}}</p>
<img :src="art.thumb_url" style="width:240px;height:125px;margin:5px 10px;border:1px solid #ccc">
<p v-html="art.content" style="padding-left:10px;
font-size: 8px;
line-height: 1.3em;
color: #a49d96;
word-wrap: break-word;"></p>
<span style="padding-left:10px;">查看全文</span>
</div>
</span>
<span v-if="item.content.news_item.length===2" v-for="(art,index) in item.content.news_item" :key="index" class="two-item">
<div style="border-top:1px solid #eee;height:60px;">
<p style="width:185px;
white-space:normal;
word-break:break-all;
word-wrap:break-word;padding: 5px 0 0 5px;display:inline-block;">{{art.title}}</p>
<img style="width:40px;heigth:40px; margin-top: 8px;" :src="art.thumb_url">
<div v-else>
<div
class="mater-item"
@click="showMaterList()"
style=" border: 1px solid #ececec; padding:10px; width:270px;height:230px; margin: 0 20px 20px 0; position: relative;"
>
<div class="mater-wrap">
<span
style=" position: absolute;
left: 35%;
top: 45%;
font-size: 16px;
color: white;"
>替换素材</span>
</div>
</span>
<span v-if="item.content.news_item.length>2" v-for="(art,index) in item.content.news_item" :key="index" class="three-item">
<div class="dv clear">
<p>{{art.title}}</p>
<img :src="art.thumb_url">
<div
class="m-title"
style=" font-size: 14px; color: #3b3a46; line-height:33px"
>{{selectedItem.title}}</div>
<div class="m-img">
<img
width="256px"
:src="selectedItem.thumb_url"
height="135px; font-weight: normal; padding:10px;"
>
</div>
</span>
<div class="box-mask"><span>替换素材</span></div>
<!-- <div class="m-content" v-html="item.content"></div> -->
</div>
</div>
<el-dialog title="微信消息素材" :visible.sync="centerDialogVisible" width="1000px" center class="add-subtitle title">
<el-dialog
title="微信消息素材"
:visible.sync="centerDialogVisible"
width="1000px"
center
class="add-subtitle title"
>
<el-row>
<el-col :span="24">
<div class="add-line"></div>
</el-col>
</el-row>
<el-row :gutter="20" class="add-container">
<el-col v-if="!materList.length">
暂无素材
</el-col>
<el-col v-else :span="8" v-for="(item,index) in materList" :key="index">
<div class="add-content" @click="handleChoose(item)">
<span v-if="item.content.news_item.length===1" v-for="(art,index) in item.content.news_item" :key="index">
<el-col v-if="!materList.length">暂无素材</el-col>
<el-col
v-else
:span="8"
v-for="(item,index) in materList"
:key="index"
style=" width: 100%;
display: flex; flex-wrap: wrap;"
>
<div
class="mater-item"
@click="selectMater(item)"
style=" border: 1px solid #ececec; padding:10px; width:270px;height:230px; margin: 0 20px 20px 0; position: relative;"
>
<div class="mater-wrap">
<span
style=" position: absolute;
left: 35%;
top: 45%;
font-size: 16px;
color: white;"
>选择素材</span>
</div>
<div
class="m-title"
style=" font-size: 14px; color: #3b3a46; line-height:33px"
>{{item.title}}</div>
<div class="m-img">
<img
:src="item.thumb_url"
width="256px"
height="135px; font-weight: normal; padding:10px;"
>
</div>
<!-- <div class="m-content" v-html="item.content"></div> -->
</div>
<!-- <div class="add-content" @click="handleChoose(item)">
<span
v-if="item.content.news_item.length===1"
v-for="(art,index) in item.content.news_item"
:key="index"
>
<div>
<p style="white-space:normal;
<p
style="white-space:normal;
word-break:break-all;
word-wrap:break-word;padding:15px 0 0 15px;height:30px">{{art.title}}</p>
<img :src="art.thumb_url" style="width:240px;height:125px;margin:5px 10px;border:1px solid #ccc">
<p v-html="art.content" style="padding-left:10px;
word-wrap:break-word;padding:15px 0 0 15px;height:30px"
>{{art.title}}</p>
<img
:src="art.thumb_url"
style="width:240px;height:125px;margin:5px 10px;border:1px solid #ccc"
>
<p
v-html="art.content"
style="padding-left:10px;
font-size: 8px;
line-height: 1.3em;
color: #a49d96;
word-wrap: break-word;"></p>
word-wrap: break-word;"
></p>
<span style="padding-left:10px;">查看全文</span>
</div>
</span>
<span v-if="item.content.news_item.length===2" v-for="(art,index) in item.content.news_item" :key="index" class="two-item">
<span
v-if="item.content.news_item.length===2"
v-for="(art,index) in item.content.news_item"
:key="index"
class="two-item"
>
<div style="border-top:1px solid #eee;height:60px;">
<p style="width:185px;
<p
style="width:185px;
white-space:normal;
word-break:break-all;
word-wrap:break-word;padding: 5px 0 0 5px;display:inline-block;">{{art.title}}</p>
word-wrap:break-word;padding: 5px 0 0 5px;display:inline-block;"
>{{art.title}}</p>
<img style="width:40px;heigth:40px; margin-top: 8px;" :src="art.thumb_url">
</div>
</span>
<span v-if="item.content.news_item.length>2" v-for="(art,index) in item.content.news_item" :key="index" class="three-item">
<span
v-if="item.content.news_item.length>2"
v-for="(art,index) in item.content.news_item"
:key="index"
class="three-item"
>
<div class="dv clear">
<p>{{art.title}}</p>
<img :src="art.thumb_url">
</div>
</span>
<div class="box-mask"><span>选择素材</span></div>
<div class="box-mask">
<span>选择素材</span>
</div>
</div>-->
</el-col>
</el-row>
<span slot="footer" class="add-footer">
<el-button @click="centerDialogVisible = false" style="color: #fff;background-color: #204d74; border-color: #122b40;">取 消</el-button>
<el-button
@click="centerDialogVisible = false"
style="color: #fff;background-color: #204d74; border-color: #122b40;"
>取 消</el-button>
</span>
</el-dialog>
</el-form-item>
......@@ -110,21 +179,25 @@
<div v-if="form.resource === '精准推送'">
<div class="form-tags">
<span v-for="(item,index) in tagList" :key="item.tagId">
<span @click="handleClickTag(item, index)" class="el-tag tag-info" :class="{active:item.isActive}">
{{item.name}}
</span>
<span
@click="handleClickTag(item, index)"
class="el-tag tag-info"
:class="{active:item.isActive}"
>{{item.name}}</span>
</span>
</div>
</div>
</el-form-item>
<el-form-item label="预览推送数量">
<span class="gray"><span class="star-red">*</span>实际推送成功数量将略有偏差,选中多个标签为同时满足选中标签群体的会员。推送人数必须大于1人。</span>
<span class="gray">
<span class="star-red">*</span>实际推送成功数量将略有偏差,选中多个标签为同时满足选中标签群体的会员。推送人数必须大于1人。
</span>
<div v-if="isCount">
<el-button class="form-button">选中标签,预览</el-button>
<span>统计中,请稍候</span>
</div>
<div v-else>
<el-button class="form-button">重新预览</el-button>
<el-button class="form-button" @click="reCheckNum()">重新预览</el-button>
<span class="form-checknum" v-if="form.resource === '全体推送'">{{this.currentTagCount}}</span>
<span class="form-checknum" v-else>{{successNum}}</span>
<span class="form-vipnum">标签会员数: {{tagNum}}</span>
......@@ -133,14 +206,21 @@
</div>
</el-form-item>
<el-form-item label="执行推送任务">
<span class="gray"><span class="star-red">*</span>填写邮箱后,勾选免责说明,确认进行推送,推送完成后将发送邮件通知至指定邮箱。</span>
<span class="gray">
<span class="star-red">*</span>填写邮箱后,勾选免责说明,确认进行推送,推送完成后将发送邮件通知至指定邮箱。
</span>
<el-checkbox v-model="checked">本次推送为t测试组商户123自发行为,发放内容请遵守国家相关法律规定..</el-checkbox>
</el-form-item>
<el-form-item label="指定接收邮箱">
<el-input v-model="email" type="email" placeholder="请输入您要接收任务信息的邮箱"></el-input>
</el-form-item>
<el-form-item class="submit-dialog">
<el-button class="form-button" @click="handleConfirmPush" :style="isBtnCheckd" :disabled="!checked">确认推送</el-button>
<el-button
class="form-button"
@click="handleConfirmPush"
:style="isBtnCheckd"
:disabled="!checked"
>确认推送</el-button>
<el-dialog title="推送确认" :visible.sync="submitDialogVisible" width="30%" center>
<div>
<img :src="currentImgUrl">
......@@ -181,12 +261,15 @@ export default {
fourthNum: 0,
successNum: 0,
currentTagIndex: 0,
isHaveMater: false,
tagIds: [],
tagIdsSave: [],
tagList: [],
tagIdsList: [],
chooseTag: [],
chooseItem: ''
chooseItem: '',
selectedItem:{},
materListId: ''
}
},
created() {
......@@ -212,6 +295,27 @@ export default {
this.CHOOSE_ITEM(item)
this.centerDialogVisible = false
},
selectMater(item) {
console.log(item);
this.centerDialogVisible = false;
this.isHaveMater = true;
this.selectedItem = item;
},
async showMaterList() {
this.centerDialogVisible = true;
await this.axios.post(api.add.getMaterial, {
pageNo: 1,
pageSize: 20,
})
.then( res => {
let result = res.data.result;
if(result.result && result.result.length >0 )
this.materList = result.result[0].content.news_item;
this.materListId = result.result[0].media_id;
console.log(this.materList)
})
},
getAll() {
this.isCount = true
this.getTagCountAll()
......@@ -227,18 +331,13 @@ export default {
type: 'warning',
})
}
if (!this.currentImgUrl) {
return this.$message({
message: '请选择推送素材',
type: 'warning',
})
}
if (!this.currentImgUrl) {
if (!this.isHaveMater) {
return this.$message({
message: '请选择推送素材',
type: 'warning',
})
}
var reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/
if (!this.email) {
......@@ -255,6 +354,7 @@ export default {
this.submitDialogVisible = true
},
handleClickTag(item, index) {
console.log(arguments)
item.isActive = !item.isActive
this.currentTagIndex = index
this.isCount = true
......@@ -278,6 +378,7 @@ export default {
})
}
this.tagList = this.tagList.splice(0)
console.log(this.tagList )
this.getTagCount()
this.getViewCount()
},
......@@ -291,27 +392,65 @@ export default {
this.submitDialogVisible = false
this.save()
},
reCheckNum() {
this.getViewCount();
},
// 确认推送
async save() {
await this.axios
.post(api.add.save, {
mediaId: this.currentImgId,
msgId: '',
scope: this.form.resource === '全体推送' ? '0' : '1',
tagArrays: this.form.resource === '全体推送' ? this.tagList : this.tagIdsSave,
console.log(this.selectedItem)
// 构建post对象
let responseData = {
title: this.form.name,
tmplId: '',
type: 1,
scope: this.form.resource === '全体推送' ? 0 :1,
pushCount:this.currentTagCount,
email: this.email,
type:1,
mediaId: this.materListId,
}
// 如果是精准推送的话,把所有选中的标签扔进去
if(responseData.scope == '1') {
let tagIds = ''
this.tagList.filter(tag => tag.isActive ) .forEach(tag => {
tagIds = tagIds + tag.tagId +','
})
.then(res => {
if (res && res.data && res.data.code === 0) {
tagIds = tagIds.substring(0, tagIds.length - 1);
responseData.tagIds = tagIds;
}
console.log(responseData);
await this.axios.post(api.add.save, responseData)
.then(res =>{
if(res.data.code === 0) {
this.$message({
message: res.data.message,
type: 'success',
type: 'success'
})
this.$router.push({ path: '/home/marketing' })
}
})
// await this.axios
// .post(api.add.save, {
// mediaId: this.currentImgId,
// msgId: '',
// scope: this.form.resource === '全体推送' ? '0' : '1',
// tagArrays: this.form.resource === '全体推送' ? this.tagList : this.tagIdsSave,
// title: this.form.name,
// tmplId: '',
// type: 1,
// })
// .then(res => {
// if (res && res.data && res.data.code === 0) {
// this.$message({
// message: res.data.message,
// type: 'success',
// })
// this.$router.push({ path: '/home/marketing' })
// }
// })
},
// tagcount
async getTagCount() {
......@@ -340,7 +479,8 @@ export default {
// 初始化 taglist
async getTagList() {
await this.axios.post(api.add.customerCacheList).then(res => {
this.tagList = res.data
console.log(res);
this.tagList = res.data;
this.tagList.forEach(item => {
this.tagIdsList.push(item.tagId)
})
......@@ -510,4 +650,21 @@ export default {
display inline-block
padding-left 26px
margin-left 26px
.mater-item:hover .mater-wrap {
// background: black;
display: block;
}
.mater-wrap {
left: -2px;
top: -2px;
padding-right: 2px;
padding-bottom: 2px;
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.4);
display: none;
cursor: pointer;
}
</style>
......@@ -80,10 +80,10 @@ export default {
msgUrl: ""
};
},
created() {
this.authUrl = ctx + "/back/wechat/auth";
this.msgUrl = platformCtx + "/message/marketingSms/list.do";
}
// created() {
// this.authUrl = ctx + "/back/wechat/auth";
// this.msgUrl = platformCtx + "/message/marketingSms/list.do";
// }
};
</script>
......
......@@ -31,7 +31,14 @@
</div>
</el-col>
<el-col :span="10" class="articleChart">
<ve-line :data="item.chartData" height="110px" :grid="grid" :extend="extend" :tooltip-visible="false" :legend-visible="false"></ve-line>
<ve-line
:data="item.chartData"
height="110px"
:grid="grid"
:extend="extend"
:tooltip-visible="false"
:legend-visible="false"
></ve-line>
</el-col>
</el-row>
</div>
......@@ -85,6 +92,7 @@ export default {
rows: item.tempList,
}
})
console.log( this.GetarticleList)
return this.GetarticleList
},
},
......@@ -111,6 +119,10 @@ export default {
font-size 16px
height 30px
line-height 30px
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
span
height 50px
line-height 50px
......
......@@ -7,7 +7,12 @@
</div>
</el-row>
<el-form :inline="true" :model="form" class="demo-form-inline" style="min-width:980px;padding:0 25px;">
<el-form
:inline="true"
:model="form"
class="demo-form-inline"
style="min-width:980px;padding:0 25px;"
>
<el-row class="temp-input">
<el-col :span="10">
<el-form-item label="推送名称:">
......@@ -16,9 +21,21 @@
</el-col>
<el-col :span="14">
<el-form-item label="活动时间:">
<el-date-picker type="date" placeholder="推送时间" v-model="queryDateStart" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker
type="date"
placeholder="推送时间"
v-model="queryDateStart"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
></el-date-picker>
<span class="line time-line" :span="2">-</span>
<el-date-picker type="date" placeholder="推送时间" v-model="queryDateEnd" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker
type="date"
placeholder="推送时间"
v-model="queryDateEnd"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
......@@ -34,17 +51,24 @@
<el-col :span="10">
<el-form-item label="创建推送节点:">
<el-select v-model="clerkId" placeholder="--全部--">
<el-option v-for="(item,index) in dataList" :key="index" :label="item.clerkName" :value="item.clerkId">
</el-option>
<el-option
v-for="(item,index) in dataList"
:key="index"
:label="item.clerkName"
:value="item.clerkId"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="dataList" style="width: 100%" :header-cell-style="{background:'#374a5e', color:'#fff'}">
<el-table-column prop="title" label="推送名称" min-width="100" align="center">
</el-table-column>
<el-table
:data="dataList"
style="width: 100%"
:header-cell-style="{background:'#374a5e', color:'#fff'}"
>
<el-table-column prop="title" label="推送名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="type" label="推送类型" min-width="76" align="center">
<template slot-scope="scope">
<span v-if="scope.row.type === 1">微信素材</span>
......@@ -53,23 +77,27 @@
</template>
</el-table-column>
<el-table-column label="推送时间" min-width="150" align="center">
<template slot-scope="scope">
{{scope.row.pushTime | formatedDate}}
</template>
<template slot-scope="scope">{{scope.row.pushTime | formatedDate}}</template>
</el-table-column>
<el-table-column prop="scope" label="推送范围" min-width="260" align="center">
<template slot-scope="scope">
<span v-if="scope.row.scope === 0">全体推送</span>
<template v-if="scope.row.scope === 1 && scope.row.tagList ">
<span class="temp-tablespan">
{{scope.row.tagList && scope.row.tagList[0]}}
</span>
<span class="temp-tablespan">
{{scope.row.tagList && scope.row.tagList[1]}}
</span>
<el-popover v-if="scope.row.tagList" placement="bottom" title="标签" width="200" trigger="click">
<span class="temp-tablespan">{{scope.row.tagList && scope.row.tagList[0]}}</span>
<span class="temp-tablespan">{{scope.row.tagList && scope.row.tagList[1]}}</span>
<el-popover
v-if="scope.row.tagList"
placement="bottom"
title="标签"
width="200"
trigger="click"
>
<div>
<span v-for="(item,index) in scope.row.tagList" :key="index" class="table-tag" style="
<span
v-for="(item,index) in scope.row.tagList"
:key="index"
class="table-tag"
style="
display: inline-block;
width: 90px;
border: 1px solid transparent;
......@@ -83,21 +111,17 @@
vertical-align: top;
margin: 0 5px 5px 0;
font-size: 13px;
line-height: 28px;">
{{item}}
</span>
line-height: 28px;"
>{{item}}</span>
</div>
<el-button class="fr temp-tablesmore" slot="reference">更多</el-button>
</el-popover>
</template>
</template>
</el-table-column>
<el-table-column prop="pushCount" label="推送人数" align="center">
</el-table-column>
<el-table-column prop="sentCount" label="推送成功人数" align="center">
</el-table-column>
<el-table-column prop="clerkName" label="创建消息节点" align="center">
</el-table-column>
<el-table-column prop="pushCount" label="推送人数" align="center"></el-table-column>
<el-table-column prop="sentCount" label="推送成功人数" align="center"></el-table-column>
<el-table-column prop="clerkName" label="创建消息节点" align="center"></el-table-column>
<el-table-column prop="statusMsg" label="推送进度" align="center">
<template slot-scope="scope">
<span v-if="scope.row.statusMsg === '推送失败'" style="color:red">推送失败</span>
......@@ -106,10 +130,14 @@
</template>
</el-table-column>
</el-table>
<el-pagination @current-change="handleCurrentChange" :current-page="pageNo" :page-size="10" :total="total" layout="total, prev, pager, next, jumper">
</el-pagination>
<el-pagination
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-size="10"
:total="total"
layout="total, prev, pager, next, jumper"
></el-pagination>
</div>
</template>
<script>
export default {
......@@ -150,12 +178,13 @@ export default {
const paramsSearch = {
pageNo: 1,
pageSize: 10,
title: '',
queryDateStart: '',
queryDateEnd: '',
pushCountStart: '',
pushCountEnd: '',
clerkId: '',
type: 2
// title: '',
// queryDateStart: '',
// queryDateEnd: '',
// pushCountStart: '',
// pushCountEnd: '',
// clerkId: '',
}
this.$emit('reset', paramsSearch)
this.title = ''
......@@ -169,13 +198,26 @@ export default {
const paramsSearch = {
pageNo: this.pageNo,
pageSize: this.pageSize,
title: this.title,
queryDateStart: this.queryDateStart,
queryDateEnd: this.queryDateEnd,
pushCountStart: this.pushCountStart,
pushCountEnd: this.pushCountEnd,
clerkId: this.clerkId,
type: 2
// title: this.title,
// queryDateStart: this.queryDateStart,
// queryDateEnd: this.queryDateEnd,
// pushCountStart: this.pushCountStart,
// pushCountEnd: this.pushCountEnd,
// clerkId: this.clerkId,
}
if(this.title)
paramsSearch.title = this.title;
if(this.queryDateStart)
paramsSearch.queryDateStart = this.queryDateStart;
if(this.queryDateEnd)
paramsSearch.queryDateEnd = this.queryDateEnd;
if(this.pushCountStart)
paramsSearch.pushCountStart = this.pushCountStart;
if(this.pushCountEnd)
paramsSearch.pushCountEnd = this.pushCountEnd;
this.$emit('search', paramsSearch)
},
},
......
......@@ -7,7 +7,12 @@
</div>
</el-row>
<el-form :inline="true" :model="form" class="demo-form-inline" style="min-width:980px;padding:0 25px;">
<el-form
:inline="true"
:model="form"
class="demo-form-inline"
style="min-width:980px;padding:0 25px;"
>
<el-row class="temp-input">
<el-col :span="10">
<el-form-item label="推送名称:">
......@@ -16,9 +21,21 @@
</el-col>
<el-col :span="14">
<el-form-item label="活动时间:">
<el-date-picker type="date" placeholder="推送时间" v-model="queryDateStart" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker
type="date"
placeholder="推送时间"
v-model="queryDateStart"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
></el-date-picker>
<span class="line time-line" :span="2">-</span>
<el-date-picker type="date" placeholder="推送时间" v-model="queryDateEnd" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker
type="date"
placeholder="推送时间"
v-model="queryDateEnd"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
......@@ -34,17 +51,24 @@
<el-col :span="10">
<el-form-item label="创建推送节点:">
<el-select v-model="clerkId" placeholder="--全部--">
<el-option v-for="(item,index) in dataList" :key="index" :label="item.clerkName" :value="item.clerkId">
</el-option>
<el-option
v-for="(item,index) in dataList"
:key="index"
:label="item.clerkName"
:value="item.clerkId"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="dataList" style="width: 100%" :header-cell-style="{background:'#374a5e', color:'#fff'}">
<el-table-column prop="title" label="推送名称" min-width="100" align="center">
</el-table-column>
<el-table
:data="dataList"
style="width: 100%"
:header-cell-style="{background:'#374a5e', color:'#fff'}"
>
<el-table-column prop="title" label="推送名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="type" label="推送类型" min-width="76" align="center">
<template slot-scope="scope">
<span v-if="scope.row.type === 1">微信素材</span>
......@@ -53,23 +77,26 @@
</template>
</el-table-column>
<el-table-column label="推送时间" min-width="150" align="center">
<template slot-scope="scope">
{{scope.row.pushTime | formatedDate}}
</template>
<template slot-scope="scope">{{scope.row.pushTime | formatedDate}}</template>
</el-table-column>
<el-table-column prop="scope" label="推送范围" min-width="260" align="center">
<template slot-scope="scope">
<span v-if="scope.row.scope === 0">全体推送</span>
<template v-if="scope.row.scope === 1 && scope.row.tagList ">
<span class="temp-tablespan">
{{scope.row.tagList && scope.row.tagList[0]}}
</span>
<span class="temp-tablespan">
{{scope.row.tagList && scope.row.tagList[1]}}
</span>
<el-popover v-if="scope.row.tagList" placement="bottom" title="标签" width="200" trigger="click">
<span class="temp-tablespan">{{scope.row.tagList && scope.row.tagList[0]}}</span>
<span class="temp-tablespan">{{scope.row.tagList && scope.row.tagList[1]}}</span>
<el-popover
v-if="scope.row.tagList"
placement="bottom"
title="标签"
width="200"
trigger="click"
>
<div>
<span v-for="(item,index) in scope.row.tagList" :key="index" style="
<span
v-for="(item,index) in scope.row.tagList"
:key="index"
style="
display: inline-block;
width: 90px;
border: 1px solid transparent;
......@@ -83,21 +110,17 @@
vertical-align: top;
margin: 0 5px 5px 0;
font-size: 13px;
line-height: 28px;">
{{item}}
</span>
line-height: 28px;"
>{{item}}</span>
</div>
<el-button class="fr temp-tablesmore" slot="reference">更多</el-button>
</el-popover>
</template>
</template>
</el-table-column>
<el-table-column prop="pushCount" label="推送人数" align="center">
</el-table-column>
<el-table-column prop="sentCount" label="推送成功人数" align="center">
</el-table-column>
<el-table-column prop="clerkName" label="创建消息节点" align="center">
</el-table-column>
<el-table-column prop="pushCount" label="推送人数" align="center"></el-table-column>
<el-table-column prop="sentCount" label="推送成功人数" align="center"></el-table-column>
<el-table-column prop="clerkName" label="创建消息节点" align="center"></el-table-column>
<el-table-column prop="statusMsg" label="推送进度" align="center">
<template slot-scope="scope">
<span v-if="scope.row.statusMsg === '推送失败'" style="color:red">推送失败</span>
......@@ -106,10 +129,14 @@
</template>
</el-table-column>
</el-table>
<el-pagination @current-change="handleCurrentChange" :current-page="pageNo" :page-size="10" :total="total" layout="total, prev, pager, next, jumper">
</el-pagination>
<el-pagination
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-size="10"
:total="total"
layout="total, prev, pager, next, jumper"
></el-pagination>
</div>
</template>
<script>
export default {
......@@ -150,12 +177,7 @@ export default {
const paramsSearch = {
pageNo: 1,
pageSize: 10,
title: '',
queryDateStart: '',
queryDateEnd: '',
pushCountStart: '',
pushCountEnd: '',
clerkId: '',
type: 1
}
this.$emit('reset', paramsSearch)
this.title = ''
......@@ -168,14 +190,25 @@ export default {
search() {
const paramsSearch = {
pageNo: this.pageNo,
type: 1,
pageSize: this.pageSize,
title: this.title,
queryDateStart: this.queryDateStart,
queryDateEnd: this.queryDateEnd,
pushCountStart: this.pushCountStart,
pushCountEnd: this.pushCountEnd,
clerkId: this.clerkId,
// title: this.title,
// queryDateStart: this.queryDateStart,
// queryDateEnd: this.queryDateEnd,
// pushCountStart: this.pushCountStart,
// pushCountEnd: this.pushCountEnd,
// clerkId: this.clerkId,
}
if(this.title)
paramsSearch.title = this.title;
if(this.queryDateStart)
paramsSearch.queryDateStart = this.queryDateStart;
if(this.queryDateEnd)
paramsSearch.queryDateEnd = this.queryDateEnd;
if(this.pushCountStart)
paramsSearch.pushCountStart = this.pushCountStart;
if(this.pushCountEnd)
paramsSearch.pushCountEnd = this.pushCountEnd;
this.$emit('search', paramsSearch)
},
},
......
......@@ -3,14 +3,31 @@
<el-tab-pane label="图文素材消息" name="first">
<materia-list :imgList="imgList" @sendid="handleId"></materia-list>
<push-detail v-loading="loading" v-if="pushlist" :mediaId="mediaId" :pushlist="pushlist"></push-detail>
<material-details v-if="materialChartList&&materialChartList.length" :MediaList="MediaList" :materialChartList="materialChartList"></material-details>
<article-details v-if="GetarticleList&&GetarticleList.length" :GetarticleList="GetarticleList"></article-details>
<material-details
v-if="materialChartList&&materialChartList.length"
:MediaList="MediaList"
:materialChartList="materialChartList"
></material-details>
<article-details
v-if="GetarticleList&&GetarticleList.length"
:GetarticleList="GetarticleList"
></article-details>
</el-tab-pane>
<el-tab-pane label="营销模版消息" name="second">
<temp-list :templist="templist" @search="handleSearch" @reset="handleReset" @pageChange="pageChange"></temp-list>
<temp-list
:templist="templist"
@search="handleSearch"
@reset="handleReset"
@pageChange="pageChange"
></temp-list>
</el-tab-pane>
<el-tab-pane label="短信营销消息" name="third">
<message-list :msgList="msgList" @search="handleMsgSearch" @reset="handleMsgReset" @pageChange="msgPageChange"></message-list>
<message-list
:msgList="msgList"
@search="handleMsgSearch"
@reset="handleMsgReset"
@pageChange="msgPageChange"
></message-list>
</el-tab-pane>
</el-tabs>
</template>
......@@ -77,6 +94,7 @@ export default {
},
async handleGetSearchData(params) {
await this.axios.post(api.getTempList, params).then(res => {
console.log(res);
this.templist = res.data.result
this.msgList = res.data.result
})
......@@ -109,6 +127,7 @@ export default {
let getPushRes = await this.axios.post(api.getPushList, params)
if (getPushRes.data.code === 0) {
console.log(getPushRes.data.result)
this.loading = false
this.pushlist = getPushRes.data.result
......@@ -116,12 +135,58 @@ export default {
mediaId: imgId,
}
let getArticleRes = await this.axios.post(api.getarticlesummary, params)
console.log(getArticleRes)
if (getArticleRes.data.code === 0) {
// 素材总流量分析
this.MediaList = getArticleRes.data.result.wechatMediaSummary
// 素材单日流量分析
this.materialChartList = getArticleRes.data.result.wechatMediaSummary.mediaGetarticles.reverse()
// this.materialChartList = [
// {
// "refDate": "2018-11-01",
// "intPageReadUser": 10,
// "intPageReadCount": 0,
// "oriPageReadUser": 0,
// "oriPageReadCount": 0,
// "shareUser": 0,
// "shareCount": 0,
// "addToFavUser": 0,
// "addToFavCount": 0
// },
// {
// "refDate": "2018-11-01",
// "intPageReadUser": 100,
// "intPageReadCount": 0,
// "oriPageReadUser": 0,
// "oriPageReadCount": 0,
// "shareUser": 0,
// "shareCount": 0,
// "addToFavUser": 0,
// "addToFavCount": 0
// },
// {
// "refDate": "2018-11-01",
// "intPageReadUser":300,
// "intPageReadCount": 0,
// "oriPageReadUser": 0,
// "oriPageReadCount": 0,
// "shareUser": 0,
// "shareCount": 0,
// "addToFavUser": 0,
// "addToFavCount": 0
// },
// {
// "refDate": "2018-11-01",
// "intPageReadUser": 400,
// "intPageReadCount": 0,
// "oriPageReadUser": 0,
// "oriPageReadCount": 0,
// "shareUser": 0,
// "shareCount": 0,
// "addToFavUser": 0,
// "addToFavCount": 0
// }
// ]
// 文章流量分析
this.GetarticleList = getArticleRes.data.result.mediaGetarticle
}
......@@ -207,6 +272,7 @@ export default {
mediaId: imgId,
})
.then(res => {
console.log(res);
if (res && res.data && res.data.code === 0) {
this.msgList = res.data.result
}
......
import config from '@/config'
import config from "@/config";
export default {
getMenu: `${config.host}/crm/back/menu/getMenu`,
......@@ -10,11 +10,12 @@ export default {
getMaterialsList: `${config.host}/back/marketing/push/materials-list`,
getPushList: `${config.host}/back/wechat/msg-tmpl/list`,
getarticlesummary: `${config.host}/back/marketing/push/graphic-analysis`,
getTempList: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/list-data', // 营销模板列表
getTempList: `${config.host}/back/marketing/push/msg-list`, // 营销模板列表
add: {
save: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/save', // 确认推送
tagCount: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/tag-count', // 标签数量
customerCacheList: 'http://testcenter.bigaka.net/crm/back/tag/customer-cache-list', // 标签列表
getPreViewCount: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/pre_view_count', // 图文推送预览人数
},
}
save: `${config.host}/back/marketing/push/saveWechatMsgMass`, // 确认推送
tagCount: `${config.host}/back/wechat/msg-mass/tag-count`, // 标签数量
customerCacheList: `${config.host}/back/tag/customer-cache-list`, // 标签列表
getPreViewCount: `${config.host}/back/marketing/push/preview-count`, // 图文推送预览人数
getMaterial: `${config.host}/back/marketing/push/materials-list`
}
};
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