Commit 7d962fff by 王志慧

Merge branch 'v3.12.0' of http://192.168.3.233:8090/saas/scrm-micro-marketing into v3.12.0

2 parents 8be743cf 4060b5ad
......@@ -23,6 +23,16 @@ const getCustomerByTagListApi = params => {
})
}
//群标签获取客户列表
const getCustomerByGroupTagListApi = params => {
params.method = 'entmicro.api.customer.base.page'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 人群获取客户列表
const getCustomerCrowdApi = params => {
params.method = 'entmicro.api.customer.crowd.page'
......@@ -225,4 +235,14 @@ const getMomentListApi = params => {
})
}
export default { getCustomerListApi, getCustomerByTagListApi, getCustomerCrowdApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getFailEventList, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi }
// 根据sopId获取SOP营销效果分析
const getEffectAnalysisApi = params => {
params.method = 'scrm.api.sop.sopEvent.effectAnalysis'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getCustomerListApi, getCustomerByGroupTagListApi,getCustomerByTagListApi, getCustomerCrowdApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getFailEventList, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi,getEffectAnalysisApi }
......@@ -101,6 +101,17 @@ const crowdfundingActivity = params => {
sign: true
})
}
//膨胀金活动
const bulgeActivity = params => {
params.method = 'scrm.api.shopmall.bulge.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//模板列表
const templatePage = params => {
params.method = `${path}template.page.search`
......@@ -165,5 +176,6 @@ export default {
templateUpdate,
templateSave,
templateDetail,
crowdfundingActivity
crowdfundingActivity,
bulgeActivity
}
<template>
<div>
<el-tabs class="gl-tabs" v-model="activeName" @tab-click="clickNav(activeName)">
<el-tab-pane label="SOP概览" name='first'></el-tab-pane>
<el-tab-pane label="SOP列表" name='second'></el-tab-pane>
</el-tabs>
</div>
</template>
<script>
export default {
name: "SopNav",
props: {
activeName:{
type: String,
default: 'first'
}
},
data() {
return {
// activeName: 'first'
}
},
methods: {
clickNav(name) {
this.$emit('clickNav', name)
}
}
}
</script>
<style lang="scss" scoped>
.gl-tabs {
/deep/ .el-tabs__header {
margin: 0 0 10px;
}
/deep/ .el-tabs__nav-wrap::after {
content: none;
}
/deep/ .el-tabs__item {
font-size: 16px;
color: #717171;
letter-spacing: 0.8px;
background: #f0f1f7 !important;
}
/deep/ .is-active {
color: #5850ff;
font-weight: 600;
background: #f0f1f7;
border-bottom: 2px solid #5850ff !important;
}
}
</style>
......@@ -57,7 +57,6 @@ export default {
this.activeName = obj.activeName
},
handleInfoConfirm(info) {
this.eventObj.addOrEdit == 'add' ? this.$refs.baseInfoRef.editForm.eventList.push(info.baseInfo) : this.$set(this.$refs.baseInfoRef.editForm.eventList, this.eventIndex, info.baseInfo)
this.$refs.baseInfoRef.parentCustomerObj.phone = info.predictCountObj.phone
this.$refs.baseInfoRef.parentCustomerObj.qiwei = info.predictCountObj.qiwei
......@@ -66,7 +65,6 @@ export default {
},
jumpEvent(obj) {
console.log(obj)
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info)
this.parentCustomerObj = obj.parentCustomerObj
......
<template>
<div class="img-bg">
<div class="preview-content">
<div class="preview-time">{{ currentTime }}</div>
<div
:class="{'preview-info':true,'isMargin':(previewList && previewList[2] && previewList[2].attType == 6 && item.attType ==6) || previewList && previewList[1] && previewList[0].attType == 7 && previewList[1].attType ==6 &&item.attType ==6}"
v-for="item in previewList" :key="item.id">
<img class="avatar" src="@/assets/guestCustom/default-customer.png"
v-if="!(hasSixType && hasSevenType) || item.attType !== 7" alt/>
<template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent"></div>
</template>
<template v-else-if="hasSixType || hasSevenType">
<temlate v-if="hasSixType && hasSevenType">
<template v-if="item.attType == 6">
<div class="preview-pdf">
<div class="pdf-title">{{ item.attContent.fileName }}</div>
<div class="preview-link">
<img src="@/assets/guestCustom/preview-link.png" alt=""/>
</div>
</div>
</template>
</temlate>
<template v-else>
<template v-if="item.attType == 6">
<div class="preview-pdf">
<div class="pdf-title">{{ item.attContent.fileName }}</div>
<div class="preview-link">
<img src="@/assets/guestCustom/preview-link.png" alt=""/>
</div>
</div>
</template>
<template v-if="item.attType == 7">
<div class="preview-activity">
<div class="activity-name">{{ item.attContent.marketingName }}</div>
<img
v-if="item.attContent.marketingType != 5 && item.attContent.marketingType != 6 && item.attContent.marketingType != 7"
class="activity-logo" src="@/assets/guestCustom/activity-logo.png" alt/>
<img v-if="item.attContent.marketingType == 5" class="activity-logo"
src="@/assets/guestCustom/activity-spike.png" alt/>
<img v-if="item.attContent.marketingType == 6" class="activity-logo"
src="@/assets/guestCustom/activity-service.png" alt/>
<img v-if="item.attContent.marketingType == 7" class="link-logo" src="@/assets/guestCustom/link.png"
alt/>
<div class="activity-footer" v-if="item.attContent.marketingType != 7">
<img src="@/assets/guestCustom/applet-footer.png" alt/>
</div>
</div>
</template>
</template>
</template>
<template v-else-if="item.attType == 4">
<div class="preview-activity">
<div class="activity-name">{{ item.attContent.title }}</div>
<img class="link-logo" src="@/assets/guestCustom/link.png" alt/>
</div>
</template>
<template v-else-if="item.attType == 2">
<el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image>
</template>
<template v-else-if="item.attType == 3">
<div class="video-panel" :key="itm">
<video id="video" width="95">
<source :src="item.attContent" type="video/mp4"/>
</video>
<i class="el-icon-video-play"></i>
</div>
</template>
<template v-else-if="item.attType == 5">
<div class="preview-text text preview-applet">
<div class="preview-applet-title">
<img :src="item.attContent.picUrl" alt/>
<span>{{ item.attContent.title }}</span>
</div>
{{ item.attContent.page }}
</div>
</template>
<!-- <template v-else-if="item.attType == 6">-->
<!-- <div class="preview-pdf">-->
<!-- <div class="pdf-title">{{ item.attContent.fileName }}</div>-->
<!-- <div class="preview-link">-->
<!-- <img src="@/assets/guestCustom/preview-link.png" alt="" />-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
</div>
</div>
</div>
</template>
<script>
import {utils} from 'glsx-common'
import emoji from '@/utils/emo'
export default {
name: 'Preview',
props: {eventBus: Object, previewVal: Array},
data() {
return {
previewList: [],
currentTime: '',
hasSixType: false,
hasSevenType: false
}
},
watch: {
previewList(val) {
if (val.length) {
this.hasSixType = val.some(item => item.attType == 6)
this.hasSevenType = val.some(item => item.attType == 7)
val.forEach(item => {
if (item.attType == 1) {
const attContent = item.attContent
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
return `<img style="width: 16px;height: 16px;vertical-align: middle;" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
})
item.attContent = htm
} else if (item.attType != 2 && item.attType != 3 && item.attType != 7) {
item.attContent = JSON.parse(item.attContent)
}
})
}
},
previewVal: {
handler(val) {
this.previewList = utils.deepClone(val).filter(item => item.attContent)
},
deep: true
}
},
created() {
if (this.eventBus) {
this.eventBus.$on('update', val => {
this.previewList = val
})
}
},
mounted() {
const date = new Date()
let hours = date.getHours()
hours = hours < 10 ? `0${hours}` : hours
let minutes = date.getMinutes()
minutes = minutes < 10 ? `0${minutes}` : minutes
this.currentTime = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日 ${hours}:${minutes}`
},
}
</script>
<style lang="scss" scoped>
.isMargin {
margin-top: -20px;
}
.img-bg {
position: relative;
width: 290px;
height: 566px;
background-image: url(../../../../../assets/guestCustom/groupchat-bg.png);
background-size: 100%;
.preview-content {
position: absolute;
width: 250px;
height: 350px;
overflow-y: auto;
top: 115px;
left: 20px;
// background-color: cornflowerblue;
.preview-time {
font-size: 10px;
color: #999;
text-align: center;
margin-bottom: 15px;
}
.preview-info {
display: flex;
padding: 0 44px 20px 9px;
.avatar {
width: 26px;
height: 26px;
margin-right: 8px;
}
.preview-text {
position: relative;
max-width: 169px;
color: #333;
background-color: #fff;
border-radius: 4px;
word-break: break-all;
display: flex;
// img {
// width: 16px;
// height: 16px;
// vertical-align: middle;
// }
}
.text {
display: inline-block;
font-size: 12px;
padding: 8px 11px;
line-height: 16px;
white-space: pre-wrap;
}
.preview-link {
display: flex;
justify-content: flex-end;
img {
width: 30px;
height: 30px;
}
}
.preview-text::before {
content: '';
position: absolute;
left: -10px;
top: 20%;
border-width: 5px;
border-style: dashed solid dashed dashed;
border-color: transparent #fff transparent transparent;
// background-color: cornflowerblue;
}
.preview-applet {
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
&-title {
display: flex;
align-self: center;
color: #999;
margin-bottom: 5px;
}
}
.preview-activity {
width: 160px;
// height: 184px;
background-color: #fff;
border-radius: 4px;
border: 1px solid #dce1e5;
padding: 7px 7px 0;
.activity-name {
font-size: 12px;
color: #333;
margin: 7px 0 4px;
width: 160px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.applet-logo {
width: 95px;
height: 24px;
}
.activity-footer {
margin-top: 4px;
border-top: 1px solid #edeff3;
}
}
.preview-pdf {
width: 158px;
height: 62px;
background-color: #fff;
padding: 5px 13px;
box-sizing: border-box;
.pdf-title {
font-size: 12px;
color: #333;
line-height: 16px;
max-width: 90px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.video-panel {
position: relative;
.el-icon-video-play {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
font-size: 20px;
color: #fff;
// cursor: pointer;
}
}
}
}
}
.link-logo {
width: 30px;
height: 30px;
margin-left: 131px;
margin-bottom: 5px;
}
</style>
......@@ -10,37 +10,44 @@
<div class="analysis-box flex-default">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
营销事件总数
<img src="@/assets/sop/sop-event.png" />
<img src="@/assets/sop/complete1.png"/>
<div class="analysis-name">
<div class="analysis-tips">完成率</div>
<p class="analysis-num">{{sopInfo.completedPercent }}</p></div>
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.eventCount : '-' }}</p>
</div>
<div class="analysis-block back-image-green">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
已完成事件数
<img src="@/assets/sop/completed-event.png" />
<img src="@/assets/sop/complete2.png"/>
<div class="analysis-name">
<div class="analysis-tips">已完成事件数</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.finishEventCount : '-' }}</p></div>
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.finishEventCount : '-' }}</p>
</div>
<div class="analysis-block back-image-orange">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
<div>
失败事件数
<el-popover placement="top" width="200" trigger="hover" content="因企微、短信等限制无法正常执行的事件">
<img src="@/assets/sop/complete3.png"/>
<div class="analysis-name">
<div class="analysis-tips">失败事件数
<el-popover class="tips" placement="top" width="200" trigger="hover" content="因企微、短信等限制无法正常执行的事件">
<img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" />
</el-popover>
</div>
<img src="@/assets/sop/completed-fail.png" />
</el-popover></div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p></div>
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p>
</div>
<div class="analysis-block back-image-blue">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
完成率
<img src="@/assets/sop/complete4.png"/>
<div class="analysis-name">
<div class="analysis-tips">营销事件总数</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.eventCount : '-' }}</p></div>
</div>
<p class="analysis-num">{{ sopInfo.completedPercent }}</p>
<div id="completePie" class="chart-pie"></div>
</div>
</div>
<p class="m-b-10">日营销事件明细</p>
......@@ -210,7 +217,7 @@ export default {
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.sop-analysis {
.title {
height: 32px;
......@@ -218,28 +225,46 @@ export default {
font-size: 20px;
font-weight: 600;
}
.analysis-box {
margin-bottom: 40px;
display: flex;
//background: #F9FAFC;
.analysis-block {
position: relative;
box-sizing: border-box;
width: 216px;
height: 116px;
padding: 10px 20px 20px;
padding: 30px 20px 20px;
margin-right: 20px;
flex-basis: 0 0 auto;
background: #ffffff;
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f7ff 100%);
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
//flex-basis: 0 0 auto;;
//box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
background: #F9FAFC;
display: flex;
align-items: center;
.analysis-title-block {
display: flex;
justify-content: space-between;
//justify-content: space-between;
margin-left: 16px;
align-items: center;
height: 40px;
line-height: 40px;
//line-height: 40px;
font-size: 14px;
color: #666666;
.analysis-name{
margin-left: 16px;
color: #333333;
.analysis-tips{
display: flex;
.tips{
margin-left: 3px;
}
}
}
}
.chart-pie {
position: absolute;
top: 20px;
......@@ -247,17 +272,18 @@ export default {
width: 70px;
height: 74px;
}
.analysis-num {
font-size: 26px;
font-weight: 600;
margin-top: 16px;
}
}
.analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
}
.analysis-block.back-image-orange {
background-image: linear-gradient(0deg, #f8f8fc 0%, #fff6f0 100%);
}
.analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%);
}
......
<template>
<div class="marketing">
<div class="container">
<div class="sop-title">SOP名称:{{ list.sopName }}</div>
<div class="funnel-box">
<div class="funnel-bg">
<img class="funnel-img" src="@/assets/sop/funel.png"/>
</div>
<div class="funnel-content">
<div class="left">
<div v-for="(item,index) in numList" :key="index">
{{ item.title }}
<span class="left-num">{{ list[item.num] || 0 }}</span>
</div>
</div>
<div class="right">
<div class="sort-box" v-for="(item,index) in sortList" :key="index">
<div>{{ item.title }}</div>
<div class="sort">{{ rates[item.sort] ? rates[item.sort] : 0 }}%</div>
</div>
</div>
</div>
</div>
<div class="text-box">
<div class="box-left">
<p>营销客户:当前sop已营销的客户,即全部营销事件的营销客户汇总</p>
<p>触达客户:当前sop已营销且已触达的客户,即全部营销事件的触达客户汇总</p>
<p>潜在客户:在营销客户中,客户意向标签为“潜在客户”的客户汇总</p>
<p> 下单客户:在营销客户中,客户意向标签为“下单客户”的客户汇总,即客户产生业务订单</p>
</div>
<div class="box-line"></div>
<div class="box-right">
<p>触达率:(触达客户数量/营销客户数量)*100%</p>
<p>转化率:(潜在客户数量/触达客户数量)*100%</p>
<p>触达率:(下单客户数量/潜在客户数量)*100%</p>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "resultList",
props: {
sopId: {
type: String,
default: ''
}
},
data() {
return {
numList: [
{title: '营销客户', num: 'marketingCustomerCount'},
{title: '触达客户', num: 'reachCustomerCount'},
{title: '潜在客户', num: 'potentialCustomerCount'},
{title: '成单客户', num: 'dealCustomerCount'}
],
sortList: [
{title: '触达率', sort: 'reachRate'},
{title: '转化率', sort: 'percentConversion'},
{title: '成单率', sort: 'turnoverRatio'}
],
list: null,
rates: {
reachRate: '',
percentConversion: '',
turnoverRatio: ''
}
}
},
async mounted() {
await this.getResult()
this.handleRates()
},
methods: {
async getResult() {
await this.$apis.sop.getEffectAnalysisApi({sopId: this.sopId}).then(res => {
this.list = res
}
)
},
handleRates() {
const {marketingCustomerCount, reachCustomerCount, potentialCustomerCount, dealCustomerCount} = this.list
this.rates.reachRate = (reachCustomerCount / marketingCustomerCount).toFixed(2) * 100
this.rates.percentConversion
= (potentialCustomerCount / marketingCustomerCount).toFixed(2) * 100
this.rates.turnoverRatio = (dealCustomerCount / marketingCustomerCount).toFixed(2) * 100
}
}
}
</script>
<style lang="scss" scoped>
.sop-title {
display: flex;
justify-content: center;
font-weight: 600;
font-size: 20px;
color: #1B233D;
line-height: 48px;
}
.funnel-box {
padding: 40px 0;
position: relative;
.funnel-bg {
position: absolute;
top: 40px;
left: 50%;
transform: translate(-50%);
width: 406px;
height: 288px;
.funnel-img {
width: 406px;
height: 288px;
}
}
.funnel-content {
display: flex;
justify-content: center;
height: 248px;
width: 100%;
padding-top: 40px;
//left: 50%;
//transform: translate(-50%);
.left,
.right {
display: flex;
}
.left {
//flex: 0 0 900px;
flex-flow: column;
justify-content: space-around;
align-items: flex-end;
// align-items: center;
z-index: 1;
font-size: 14px;
color: #2D2D33;
box-sizing: border-box;
padding-right: 20px;
margin-left: 200px;
div {
display: flex;
align-items: center;
margin-right: 28px;
.left-num {
font-size: 20px;
font-weight: 500;
margin-left: 4px;
}
}
}
.right {
//flex: 1;
//flex-flow: column;
//align-items: flex-start;
//margin-left: 130px;
color: #4466F0;
//padding-top: 20px;
font-size: 14px;
display: inline;
margin-left: 125px;
//position: relative;
.sort-box {
margin: 38px 0;
}
.sort-box:nth-last-child(2) {
margin-left: -40px;
}
.sort-box:last-child {
//position: absolute;
margin-left: -90px;
//top: 50%;
}
.sort {
font-size: 20px;
font-weight: bold;
margin-top: 6px;
}
}
}
}
.text-box{
background: #E2E1FF;
display: flex;
font-size: 14px;
color: #0E0B4F;
padding: 20px 40px;
line-height: 25px;
margin: 0 50px;
//justify-content: space-between;
.box-line{
width: 2px;
height:100px;
background: #0e0b4f52;
margin: 0 60px;
}
}
</style>
......@@ -10,29 +10,36 @@
<div class="analysis-box flex-default">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
已下发任务总数
<img src="@/assets/sop/task-total.png" />
<img src="@/assets/sop/complete1.png"/>
<div class="analysis-name"> 总任务完成率
<p class="analysis-num">{{ sopInfo.taskPercent }}%</p></div>
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics.issuedTaskCount }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
已完成任务数
<img src="@/assets/sop/task.png" />
<img src="@/assets/sop/complete2.png"/>
<div class="analysis-name"> 已完成任务数
<p class="analysis-num">{{ sopInfo.sopStatistics.finishTaskCount }}</p></div>
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics.finishTaskCount }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">总任务完成率</div>
<p class="analysis-num">{{ sopInfo.taskPercent }}</p>
<div id="completePie" class="chart-pie"></div>
<div class="analysis-title-block m-b-20">
<img src="@/assets/sop/staff03.png"/>
<div class="analysis-name"> 已下发任务总数
<p class="analysis-num">{{ sopInfo.sopStatistics.issuedTaskCount }}</p></div>
</div>
</div>
</div>
<p class="m-b-10">员工任务明细</p>
<!-- 表格区域 开始 -->
<GLTable v-loading="loading" ref="staffListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<GLTable v-loading="loading" ref="staffListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
......@@ -41,7 +48,8 @@
<script>
import * as echarts from 'echarts'
import url from '@/assets/empty.png'
import { pieOption } from './pieOption'
import {pieOption} from './pieOption'
export default {
name: 'staffList',
data() {
......@@ -81,7 +89,7 @@ export default {
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'}
}
},
......@@ -124,7 +132,7 @@ export default {
// },
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.$apis.sop.getSopBaseInfoApi({sopId: this.sopId}).then(res => {
this.sopInfo = res
this.sopInfo.taskPercent = this.sopInfo.sopStatistics.issuedTaskCount ? Math.round((this.sopInfo.sopStatistics.finishTaskCount / this.sopInfo.sopStatistics.issuedTaskCount) * 100).toFixed(0) + '%' : '-'
this.drawPie()
......@@ -156,7 +164,7 @@ export default {
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.sop-analysis {
.title {
height: 32px;
......@@ -164,28 +172,46 @@ export default {
font-size: 20px;
font-weight: 600;
}
.analysis-box {
margin-bottom: 40px;
display: flex;
//background: #F9FAFC;
.analysis-block {
position: relative;
box-sizing: border-box;
width: 216px;
height: 116px;
padding: 10px 20px 20px;
padding: 30px 20px 20px;
margin-right: 20px;
flex-basis: 0 0 auto;
background: #ffffff;
background-image: linear-gradient(0deg, #f8f8fc 0%, #f4f4ff 100%);
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
//flex-basis: 0 0 auto;;
//box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
background: #F9FAFC;
display: flex;
align-items: center;
.analysis-title-block {
display: flex;
justify-content: space-between;
//justify-content: space-between;
margin-left: 16px;
align-items: center;
height: 40px;
line-height: 40px;
//line-height: 40px;
font-size: 14px;
color: #666666;
.analysis-name{
margin-left: 16px;
color: #333333;
.analysis-tips{
display: flex;
.tips{
margin-left: 3px;
}
}
}
}
.chart-pie {
position: absolute;
top: 20px;
......@@ -193,11 +219,21 @@ export default {
width: 70px;
height: 74px;
}
.analysis-num {
font-size: 26px;
font-weight: 600;
margin-top: 16px;
}
}
.analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
}
.analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%);
}
}
}
</style>
......@@ -8,42 +8,71 @@
</div>
<div v-loading="loading">
<div>
<div class="tagUpdate-warp">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<!-- <span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span> -->
</glsx-combi-form>
<p class="tag-update">标签更新:{{ sopInfo.customerOptUpdate == 1 ? '开启' : '关闭' }}</p>
</div>
<div class="analysis-box">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
<img src="@/assets/sop/sop01.png"/>
<div class="analysis-name"> 客户总数
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</p></div>
</div>
</div>
<div class="analysis-box flex-default">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
客户总数
<img src="@/assets/sop/customer-total.png" />
<img src="@/assets/sop/sop02.png"/>
<div class="analysis-name"> 已执行客户数
<p class="analysis-num">{{ baseData.sopEventList.length && sopInfo.executedTargetCount ? sopInfo.executedTargetCount : '-' }}</p></div>
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
<img src="@/assets/sop/sop03.png"/>
<div class="analysis-name"> 执行率
<p class="analysis-num">{{ baseData.sopEventList.length && sopInfo.executedRatio ? sopInfo.executedRatio : '-' }}%</p></div>
</div>
</div>
<div class="analysis-block back-image-green">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
已触达客户数
<img src="@/assets/sop/touch-customer.png" />
<img src="@/assets/sop/sop04.png"/>
<div class="analysis-name">
已触达客户数
<p class="analysis-num">
{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div>
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div>
<div class="analysis-block back-image-blue">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
触达率
<img src="@/assets/sop/sop05.png"/>
<div class="analysis-name">
触达率
<p class="analysis-num">{{ sopInfo.touchPercent }}</p>
</div>
</div>
<p class="analysis-num">{{ sopInfo.touchPercent }}</p>
<div id="completePie" class="chart-pie"></div>
<!-- <div id="completePie" class="chart-pie"></div>-->
</div>
</div>
<p class="m-b-10">客户触达明细</p>
<!-- 表格区域 开始 -->
<GLTable ref="touchListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<GLTable ref="touchListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
......@@ -54,7 +83,8 @@
import * as echarts from 'echarts'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { pieOption } from './pieOption'
import {pieOption} from './pieOption'
export default {
name: 'touchList',
data() {
......@@ -95,6 +125,10 @@ export default {
listName: 'list',
tableColumns: [
{
label: '群名称',
prop: 'groupName',
},
{
label: '客户名称',
prop: 'customerName',
formatter: cellValue => {
......@@ -130,14 +164,21 @@ export default {
formatter: cellValue => {
return cellValue.viewCount || '0'
}
},
{
label: '查看总时长',
prop: 'viewDuration',
},
{
label: '点赞数',
prop: 'likeCount',
}, {
label: '评论数',
prop: 'commentCount',
}
// {
// label: '查看总时长',
// prop: ''
// }
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
baseData: {
sopEventList: []
}
......@@ -158,7 +199,8 @@ export default {
methods: {
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.$apis.sop.getSopBaseInfoApi({sopId: this.sopId}).then(res => {
console.log(res)
this.sopInfo = res
this.sopInfo.touchPercent = this.baseData.sopEventList.length && this.sopInfo.customerCount ? Math.round((this.selectedEventInfo.eventStatistics.reachCustomerCount / this.sopInfo.customerCount) * 100).toFixed(0) + '%' : '-'
this.drawPie()
......@@ -179,23 +221,23 @@ export default {
3: '微信朋友圈'
}
this.$apis.sop
.getEventListApi(params)
.then(res => {
this.baseData.sopEventList = res.list
if (this.baseData.sopEventList.length) {
this.baseData.sopEventList.forEach(item => {
item.confName = item.eventStartDate + (item.repeatFlag == 'Y' ? '-' + item.eventEndDate : '') + ' ' + item.eventTime + ' ' + pushChannelTypeList[item.pushChannelType]
})
this.getOptionsList('searchFormData', false)
this.searchForm.eventId = this.baseData.sopEventList[0].id
this.selectedEventInfo = this.baseData.sopEventList[0]
}
this.getBaseInfo()
this.$refs.touchListRef.refreshTable()
})
.finally(() => {
this.loading = false
})
.getEventListApi(params)
.then(res => {
this.baseData.sopEventList = res.list
if (this.baseData.sopEventList.length) {
this.baseData.sopEventList.forEach(item => {
item.confName = item.eventStartDate + (item.repeatFlag == 'Y' ? '-' + item.eventEndDate : '') + ' ' + item.eventTime + ' ' + pushChannelTypeList[item.pushChannelType]
})
this.getOptionsList('searchFormData', false)
this.searchForm.eventId = this.baseData.sopEventList[0].id
this.selectedEventInfo = this.baseData.sopEventList[0]
}
this.getBaseInfo()
this.$refs.touchListRef.refreshTable()
})
.finally(() => {
this.loading = false
})
},
beforeSearchFn() {
......@@ -259,7 +301,7 @@ export default {
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.sop-analysis {
.title {
height: 32px;
......@@ -267,28 +309,46 @@ export default {
font-size: 20px;
font-weight: 600;
}
.analysis-box {
margin-bottom: 40px;
display: flex;
//background: #F9FAFC;
.analysis-block {
position: relative;
box-sizing: border-box;
width: 216px;
height: 116px;
padding: 10px 20px 20px;
padding: 30px 20px 20px;
margin-right: 20px;
flex-basis: 0 0 auto;
background: #ffffff;
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f7ff 100%);
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
//flex-basis: 0 0 auto;;
//box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
background: #F9FAFC;
display: flex;
align-items: center;
.analysis-title-block {
display: flex;
justify-content: space-between;
//justify-content: space-between;
margin-left: 16px;
align-items: center;
height: 40px;
line-height: 40px;
//line-height: 40px;
font-size: 14px;
color: #666666;
.analysis-name{
margin-left: 16px;
color: #333333;
.analysis-tips{
display: flex;
.tips{
margin-left: 3px;
}
}
}
}
.chart-pie {
position: absolute;
top: 20px;
......@@ -296,17 +356,31 @@ export default {
width: 70px;
height: 74px;
}
.analysis-num {
font-size: 26px;
font-weight: 600;
margin-top: 16px;
}
}
.analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
}
.analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%);
}
}
}
.tagUpdate-warp {
display: flex;
//align-items: center;
.tag-update {
color: #5850FF;
font-size: 14px;
line-height: 32px;
}
}
</style>
......@@ -11,6 +11,9 @@
<el-tab-pane label="员工完成率分析" name="staffList">
<staff-list v-if="activeName == 'staffList'" :sopId="routeInfo.id"></staff-list>
</el-tab-pane>
<el-tab-pane label="效果分析" name="resultList">
<ResultList v-if="activeName == 'resultList'" :sopId="routeInfo.id"></ResultList>
</el-tab-pane>
</el-tabs>
<el-button :size="size" class="sop-back-btn" type="primary" @click="handleBack">返回</el-button>
</div>
......@@ -20,6 +23,7 @@
import completeList from './sopAnalysis/completeList.vue'
import touchList from './sopAnalysis/touchList.vue'
import staffList from './sopAnalysis/staffList.vue'
import ResultList from './sopAnalysis/resultList.vue'
export default {
name: 'gitfBag',
data() {
......@@ -36,11 +40,14 @@ export default {
components: {
completeList,
touchList,
staffList
staffList,
ResultList
},
created() {
this.routeInfo = this.$route.query
console.log(this.$route.query)
console.log(this.routeInfo)
},
methods: {
......
<!-- sop管理 -->
<template>
<div class="marketing sop-list">
<div class="m-b-20 p-relative">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit('add')">新建SOP</el-button>
<el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button>
<SopNav @clickNav="handleClick" :activeName="'second'"/>
<div class="m-b-20 m-t-20 p-relative">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit('add')"> 新建SOP</el-button>
<!-- <el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button>-->
</div>
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
......@@ -22,15 +23,18 @@
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import SopNav from "views/sop/SopNav";
export default {
name: 'sopList',
components:{SopNav},
data() {
return {
size: 'small',
url: url,
searchForm: {
sopName: '',
sopStatus: ''
sopStatus: '',
sopType:''
},
// 搜索
searchFormData: [
......@@ -42,6 +46,15 @@ export default {
maxlength: 20
},
{
label: '类型',
name: 'sopType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'sopTypeList'
},
{
label: '营销状态',
name: 'sopStatus',
type: 'select',
......@@ -79,19 +92,19 @@ export default {
click: this.handleEnd
}
},
// {
// type: 'el-button',
// name: '查看',
// attrs: {
// type: 'text'
// },
// condition: row => {
// return row.sopStatus == 3
// },
// listeners: {
// click: row => this.handleEdit('look', row)
// }
// },
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
condition: row => {
return row.sopStatus == 3
},
listeners: {
click: row => this.handleJump('viewSop', row)
}
},
{
type: 'el-button',
name: '复制',
......@@ -142,6 +155,15 @@ export default {
line: 1
},
{
label: '类型',
prop: 'sopType',
width: 240,
line: 1,
formatter: cellValue => {
return cellValue.sopType == 2 ? '群sop' :'客户sop'
}
},
{
label: '营销时间',
prop: 'startDate',
width: '220',
......@@ -192,6 +214,16 @@ export default {
confId: 3,
confName: '已结束'
}
],
sopTypeList: [
{
confId: 1,
confName: '客户sop'
},
{
confId: 2,
confName: '群sop'
},
]
}
}
......@@ -202,6 +234,9 @@ export default {
},
methods: {
handleClick(tab) {
tab == 'first' ? this.handleJump('index') : ''
},
handleJump(path, row = {}) {
this.$router.push({
path: '/sop/' + path,
......@@ -305,7 +340,28 @@ export default {
}
</script>
<style scoped>
<style lang="scss" scoped>
.gl-tabs{
/deep/ .el-tabs__header {
margin: 0 0 10px;
//background: #f0f1f7;
}
/deep/ .el-tabs__nav-wrap::after {
content: none;
}
/deep/ .el-tabs__item {
font-size: 16px;
color: #717171;
letter-spacing: 0.8px;
background: #f0f1f7 !important;
}
/deep/ .is-active {
color: #5850ff;
font-weight: 600;
background: #f0f1f7;
border-bottom: 2px solid #5850ff !important;
}
}
.sop-list .sop-back-btn {
position: absolute;
right: 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!