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 => { ...@@ -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 => { const getCustomerCrowdApi = params => {
params.method = 'entmicro.api.customer.crowd.page' params.method = 'entmicro.api.customer.crowd.page'
...@@ -225,4 +235,14 @@ const getMomentListApi = params => { ...@@ -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 => { ...@@ -101,6 +101,17 @@ const crowdfundingActivity = params => {
sign: true 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 => { const templatePage = params => {
params.method = `${path}template.page.search` params.method = `${path}template.page.search`
...@@ -165,5 +176,6 @@ export default { ...@@ -165,5 +176,6 @@ export default {
templateUpdate, templateUpdate,
templateSave, templateSave,
templateDetail, 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 { ...@@ -57,7 +57,6 @@ export default {
this.activeName = obj.activeName this.activeName = obj.activeName
}, },
handleInfoConfirm(info) { 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.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.phone = info.predictCountObj.phone
this.$refs.baseInfoRef.parentCustomerObj.qiwei = info.predictCountObj.qiwei this.$refs.baseInfoRef.parentCustomerObj.qiwei = info.predictCountObj.qiwei
...@@ -66,7 +65,6 @@ export default { ...@@ -66,7 +65,6 @@ export default {
}, },
jumpEvent(obj) { jumpEvent(obj) {
console.log(obj)
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit) this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info) this.$set(this.eventObj, 'info', obj.info)
this.parentCustomerObj = obj.parentCustomerObj 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 @@ ...@@ -10,37 +10,44 @@
<div class="analysis-box flex-default"> <div class="analysis-box flex-default">
<div class="analysis-block"> <div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
营销事件总数 <img src="@/assets/sop/complete1.png"/>
<img src="@/assets/sop/sop-event.png" /> <div class="analysis-name">
<div class="analysis-tips">完成率</div>
<p class="analysis-num">{{sopInfo.completedPercent }}</p></div>
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.eventCount : '-' }}</p>
</div> </div>
<div class="analysis-block back-image-green">
<div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
已完成事件数 <img src="@/assets/sop/complete2.png"/>
<img src="@/assets/sop/completed-event.png" /> <div class="analysis-name">
<div class="analysis-tips">已完成事件数</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.finishEventCount : '-' }}</p></div>
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.finishEventCount : '-' }}</p>
</div> </div>
<div class="analysis-block back-image-orange">
<div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
<div> <img src="@/assets/sop/complete3.png"/>
失败事件数 <div class="analysis-name">
<el-popover placement="top" width="200" trigger="hover" content="因企微、短信等限制无法正常执行的事件"> <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" /> <img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" />
</el-popover> </el-popover></div>
</div> <p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p></div>
<img src="@/assets/sop/completed-fail.png" />
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p>
</div> </div>
<div class="analysis-block back-image-blue">
<div class="analysis-block">
<div class="analysis-title-block m-b-20"> <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> </div>
<p class="analysis-num">{{ sopInfo.completedPercent }}</p>
<div id="completePie" class="chart-pie"></div>
</div> </div>
</div> </div>
<p class="m-b-10">日营销事件明细</p> <p class="m-b-10">日营销事件明细</p>
...@@ -210,7 +217,7 @@ export default { ...@@ -210,7 +217,7 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.sop-analysis { .sop-analysis {
.title { .title {
height: 32px; height: 32px;
...@@ -218,28 +225,46 @@ export default { ...@@ -218,28 +225,46 @@ export default {
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
} }
.analysis-box { .analysis-box {
margin-bottom: 40px; margin-bottom: 40px;
display: flex;
//background: #F9FAFC;
.analysis-block { .analysis-block {
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
width: 216px; width: 216px;
height: 116px; height: 116px;
padding: 10px 20px 20px; padding: 30px 20px 20px;
margin-right: 20px; margin-right: 20px;
flex-basis: 0 0 auto; //flex-basis: 0 0 auto;;
background: #ffffff; //box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f7ff 100%); background: #F9FAFC;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1); display: flex;
align-items: center;
.analysis-title-block { .analysis-title-block {
display: flex; display: flex;
justify-content: space-between; //justify-content: space-between;
margin-left: 16px;
align-items: center; align-items: center;
height: 40px; height: 40px;
line-height: 40px; //line-height: 40px;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
.analysis-name{
margin-left: 16px;
color: #333333;
.analysis-tips{
display: flex;
.tips{
margin-left: 3px;
}
}
}
} }
.chart-pie { .chart-pie {
position: absolute; position: absolute;
top: 20px; top: 20px;
...@@ -247,17 +272,18 @@ export default { ...@@ -247,17 +272,18 @@ export default {
width: 70px; width: 70px;
height: 74px; height: 74px;
} }
.analysis-num { .analysis-num {
font-size: 26px; font-size: 26px;
font-weight: 600; font-weight: 600;
margin-top: 16px;
} }
} }
.analysis-block.back-image-green { .analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%); 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 { .analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%); 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 @@ ...@@ -10,29 +10,36 @@
<div class="analysis-box flex-default"> <div class="analysis-box flex-default">
<div class="analysis-block"> <div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
已下发任务总数 <img src="@/assets/sop/complete1.png"/>
<img src="@/assets/sop/task-total.png" /> <div class="analysis-name"> 总任务完成率
<p class="analysis-num">{{ sopInfo.taskPercent }}%</p></div>
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics.issuedTaskCount }}</p>
</div> </div>
<div class="analysis-block"> <div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
已完成任务数 <img src="@/assets/sop/complete2.png"/>
<img src="@/assets/sop/task.png" /> <div class="analysis-name"> 已完成任务数
<p class="analysis-num">{{ sopInfo.sopStatistics.finishTaskCount }}</p></div>
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics.finishTaskCount }}</p>
</div> </div>
<div class="analysis-block"> <div class="analysis-block">
<div class="analysis-title-block m-b-20">总任务完成率</div> <div class="analysis-title-block m-b-20">
<p class="analysis-num">{{ sopInfo.taskPercent }}</p> <img src="@/assets/sop/staff03.png"/>
<div id="completePie" class="chart-pie"></div> <div class="analysis-name"> 已下发任务总数
<p class="analysis-num">{{ sopInfo.sopStatistics.issuedTaskCount }}</p></div>
</div>
</div> </div>
</div> </div>
<p class="m-b-10">员工任务明细</p> <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 --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
...@@ -41,7 +48,8 @@ ...@@ -41,7 +48,8 @@
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { pieOption } from './pieOption' import {pieOption} from './pieOption'
export default { export default {
name: 'staffList', name: 'staffList',
data() { data() {
...@@ -81,7 +89,7 @@ export default { ...@@ -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 { ...@@ -124,7 +132,7 @@ export default {
// }, // },
getBaseInfo() { getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => { this.$apis.sop.getSopBaseInfoApi({sopId: this.sopId}).then(res => {
this.sopInfo = 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.sopInfo.taskPercent = this.sopInfo.sopStatistics.issuedTaskCount ? Math.round((this.sopInfo.sopStatistics.finishTaskCount / this.sopInfo.sopStatistics.issuedTaskCount) * 100).toFixed(0) + '%' : '-'
this.drawPie() this.drawPie()
...@@ -156,7 +164,7 @@ export default { ...@@ -156,7 +164,7 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.sop-analysis { .sop-analysis {
.title { .title {
height: 32px; height: 32px;
...@@ -164,28 +172,46 @@ export default { ...@@ -164,28 +172,46 @@ export default {
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
} }
.analysis-box { .analysis-box {
margin-bottom: 40px; margin-bottom: 40px;
display: flex;
//background: #F9FAFC;
.analysis-block { .analysis-block {
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
width: 216px; width: 216px;
height: 116px; height: 116px;
padding: 10px 20px 20px; padding: 30px 20px 20px;
margin-right: 20px; margin-right: 20px;
flex-basis: 0 0 auto; //flex-basis: 0 0 auto;;
background: #ffffff; //box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
background-image: linear-gradient(0deg, #f8f8fc 0%, #f4f4ff 100%); background: #F9FAFC;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1); display: flex;
align-items: center;
.analysis-title-block { .analysis-title-block {
display: flex; display: flex;
justify-content: space-between; //justify-content: space-between;
margin-left: 16px;
align-items: center; align-items: center;
height: 40px; height: 40px;
line-height: 40px; //line-height: 40px;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
.analysis-name{
margin-left: 16px;
color: #333333;
.analysis-tips{
display: flex;
.tips{
margin-left: 3px;
}
}
}
} }
.chart-pie { .chart-pie {
position: absolute; position: absolute;
top: 20px; top: 20px;
...@@ -193,11 +219,21 @@ export default { ...@@ -193,11 +219,21 @@ export default {
width: 70px; width: 70px;
height: 74px; height: 74px;
} }
.analysis-num { .analysis-num {
font-size: 26px; font-size: 26px;
font-weight: 600; 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> </style>
...@@ -8,42 +8,71 @@ ...@@ -8,42 +8,71 @@
</div> </div>
<div v-loading="loading"> <div v-loading="loading">
<div> <div class="tagUpdate-warp">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<!-- <span slot="footer"> <!-- <span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span> --> </span> -->
</glsx-combi-form> </glsx-combi-form>
<p class="tag-update">标签更新:{{ sopInfo.customerOptUpdate == 1 ? '开启' : '关闭' }}</p>
</div> </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-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
客户总数 <img src="@/assets/sop/sop02.png"/>
<img src="@/assets/sop/customer-total.png" /> <div class="analysis-name"> 已执行客户数
<p class="analysis-num">{{ baseData.sopEventList.length && sopInfo.executedTargetCount ? sopInfo.executedTargetCount : '-' }}</p></div>
</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>
<div class="analysis-block back-image-green">
<div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
已触达客户数 <img src="@/assets/sop/sop04.png"/>
<img src="@/assets/sop/touch-customer.png" /> <div class="analysis-name">
已触达客户数
<p class="analysis-num">
{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div>
</div> </div>
<p class="analysis-num">{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div> </div>
<div class="analysis-block back-image-blue"> <div class="analysis-block">
<div class="analysis-title-block m-b-20"> <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> </div>
<p class="analysis-num">{{ sopInfo.touchPercent }}</p>
<div id="completePie" class="chart-pie"></div> <!-- <div id="completePie" class="chart-pie"></div>-->
</div> </div>
</div> </div>
<p class="m-b-10">客户触达明细</p> <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 --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
...@@ -54,7 +83,8 @@ ...@@ -54,7 +83,8 @@
import * as echarts from 'echarts' import * as echarts from 'echarts'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { pieOption } from './pieOption' import {pieOption} from './pieOption'
export default { export default {
name: 'touchList', name: 'touchList',
data() { data() {
...@@ -95,6 +125,10 @@ export default { ...@@ -95,6 +125,10 @@ export default {
listName: 'list', listName: 'list',
tableColumns: [ tableColumns: [
{ {
label: '群名称',
prop: 'groupName',
},
{
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
formatter: cellValue => { formatter: cellValue => {
...@@ -130,14 +164,21 @@ export default { ...@@ -130,14 +164,21 @@ export default {
formatter: cellValue => { formatter: cellValue => {
return cellValue.viewCount || '0' 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: { baseData: {
sopEventList: [] sopEventList: []
} }
...@@ -158,7 +199,8 @@ export default { ...@@ -158,7 +199,8 @@ export default {
methods: { methods: {
getBaseInfo() { 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 = res
this.sopInfo.touchPercent = this.baseData.sopEventList.length && this.sopInfo.customerCount ? Math.round((this.selectedEventInfo.eventStatistics.reachCustomerCount / this.sopInfo.customerCount) * 100).toFixed(0) + '%' : '-' this.sopInfo.touchPercent = this.baseData.sopEventList.length && this.sopInfo.customerCount ? Math.round((this.selectedEventInfo.eventStatistics.reachCustomerCount / this.sopInfo.customerCount) * 100).toFixed(0) + '%' : '-'
this.drawPie() this.drawPie()
...@@ -179,23 +221,23 @@ export default { ...@@ -179,23 +221,23 @@ export default {
3: '微信朋友圈' 3: '微信朋友圈'
} }
this.$apis.sop this.$apis.sop
.getEventListApi(params) .getEventListApi(params)
.then(res => { .then(res => {
this.baseData.sopEventList = res.list this.baseData.sopEventList = res.list
if (this.baseData.sopEventList.length) { if (this.baseData.sopEventList.length) {
this.baseData.sopEventList.forEach(item => { this.baseData.sopEventList.forEach(item => {
item.confName = item.eventStartDate + (item.repeatFlag == 'Y' ? '-' + item.eventEndDate : '') + ' ' + item.eventTime + ' ' + pushChannelTypeList[item.pushChannelType] item.confName = item.eventStartDate + (item.repeatFlag == 'Y' ? '-' + item.eventEndDate : '') + ' ' + item.eventTime + ' ' + pushChannelTypeList[item.pushChannelType]
}) })
this.getOptionsList('searchFormData', false) this.getOptionsList('searchFormData', false)
this.searchForm.eventId = this.baseData.sopEventList[0].id this.searchForm.eventId = this.baseData.sopEventList[0].id
this.selectedEventInfo = this.baseData.sopEventList[0] this.selectedEventInfo = this.baseData.sopEventList[0]
} }
this.getBaseInfo() this.getBaseInfo()
this.$refs.touchListRef.refreshTable() this.$refs.touchListRef.refreshTable()
}) })
.finally(() => { .finally(() => {
this.loading = false this.loading = false
}) })
}, },
beforeSearchFn() { beforeSearchFn() {
...@@ -259,7 +301,7 @@ export default { ...@@ -259,7 +301,7 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.sop-analysis { .sop-analysis {
.title { .title {
height: 32px; height: 32px;
...@@ -267,28 +309,46 @@ export default { ...@@ -267,28 +309,46 @@ export default {
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
} }
.analysis-box { .analysis-box {
margin-bottom: 40px; margin-bottom: 40px;
display: flex;
//background: #F9FAFC;
.analysis-block { .analysis-block {
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
width: 216px; width: 216px;
height: 116px; height: 116px;
padding: 10px 20px 20px; padding: 30px 20px 20px;
margin-right: 20px; margin-right: 20px;
flex-basis: 0 0 auto; //flex-basis: 0 0 auto;;
background: #ffffff; //box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f7ff 100%); background: #F9FAFC;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1); display: flex;
align-items: center;
.analysis-title-block { .analysis-title-block {
display: flex; display: flex;
justify-content: space-between; //justify-content: space-between;
margin-left: 16px;
align-items: center; align-items: center;
height: 40px; height: 40px;
line-height: 40px; //line-height: 40px;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
.analysis-name{
margin-left: 16px;
color: #333333;
.analysis-tips{
display: flex;
.tips{
margin-left: 3px;
}
}
}
} }
.chart-pie { .chart-pie {
position: absolute; position: absolute;
top: 20px; top: 20px;
...@@ -296,17 +356,31 @@ export default { ...@@ -296,17 +356,31 @@ export default {
width: 70px; width: 70px;
height: 74px; height: 74px;
} }
.analysis-num { .analysis-num {
font-size: 26px; font-size: 26px;
font-weight: 600; font-weight: 600;
margin-top: 16px;
} }
} }
.analysis-block.back-image-green { .analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%); background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
} }
.analysis-block.back-image-blue { .analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%); 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> </style>
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
<el-tab-pane label="员工完成率分析" name="staffList"> <el-tab-pane label="员工完成率分析" name="staffList">
<staff-list v-if="activeName == 'staffList'" :sopId="routeInfo.id"></staff-list> <staff-list v-if="activeName == 'staffList'" :sopId="routeInfo.id"></staff-list>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="效果分析" name="resultList">
<ResultList v-if="activeName == 'resultList'" :sopId="routeInfo.id"></ResultList>
</el-tab-pane>
</el-tabs> </el-tabs>
<el-button :size="size" class="sop-back-btn" type="primary" @click="handleBack">返回</el-button> <el-button :size="size" class="sop-back-btn" type="primary" @click="handleBack">返回</el-button>
</div> </div>
...@@ -20,6 +23,7 @@ ...@@ -20,6 +23,7 @@
import completeList from './sopAnalysis/completeList.vue' import completeList from './sopAnalysis/completeList.vue'
import touchList from './sopAnalysis/touchList.vue' import touchList from './sopAnalysis/touchList.vue'
import staffList from './sopAnalysis/staffList.vue' import staffList from './sopAnalysis/staffList.vue'
import ResultList from './sopAnalysis/resultList.vue'
export default { export default {
name: 'gitfBag', name: 'gitfBag',
data() { data() {
...@@ -36,11 +40,14 @@ export default { ...@@ -36,11 +40,14 @@ export default {
components: { components: {
completeList, completeList,
touchList, touchList,
staffList staffList,
ResultList
}, },
created() { created() {
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
console.log(this.$route.query)
console.log(this.routeInfo)
}, },
methods: { methods: {
......
<!-- sop管理 --> <!-- sop管理 -->
<template> <template>
<div class="marketing sop-list"> <div class="marketing sop-list">
<div class="m-b-20 p-relative"> <SopNav @clickNav="handleClick" :activeName="'second'"/>
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit('add')">新建SOP</el-button> <div class="m-b-20 m-t-20 p-relative">
<el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button> <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>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
...@@ -22,15 +23,18 @@ ...@@ -22,15 +23,18 @@
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import SopNav from "views/sop/SopNav";
export default { export default {
name: 'sopList', name: 'sopList',
components:{SopNav},
data() { data() {
return { return {
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
sopName: '', sopName: '',
sopStatus: '' sopStatus: '',
sopType:''
}, },
// 搜索 // 搜索
searchFormData: [ searchFormData: [
...@@ -42,6 +46,15 @@ export default { ...@@ -42,6 +46,15 @@ export default {
maxlength: 20 maxlength: 20
}, },
{ {
label: '类型',
name: 'sopType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'sopTypeList'
},
{
label: '营销状态', label: '营销状态',
name: 'sopStatus', name: 'sopStatus',
type: 'select', type: 'select',
...@@ -79,19 +92,19 @@ export default { ...@@ -79,19 +92,19 @@ export default {
click: this.handleEnd click: this.handleEnd
} }
}, },
// { {
// type: 'el-button', type: 'el-button',
// name: '查看', name: '查看',
// attrs: { attrs: {
// type: 'text' type: 'text'
// }, },
// condition: row => { condition: row => {
// return row.sopStatus == 3 return row.sopStatus == 3
// }, },
// listeners: { listeners: {
// click: row => this.handleEdit('look', row) click: row => this.handleJump('viewSop', row)
// } }
// }, },
{ {
type: 'el-button', type: 'el-button',
name: '复制', name: '复制',
...@@ -142,6 +155,15 @@ export default { ...@@ -142,6 +155,15 @@ export default {
line: 1 line: 1
}, },
{ {
label: '类型',
prop: 'sopType',
width: 240,
line: 1,
formatter: cellValue => {
return cellValue.sopType == 2 ? '群sop' :'客户sop'
}
},
{
label: '营销时间', label: '营销时间',
prop: 'startDate', prop: 'startDate',
width: '220', width: '220',
...@@ -192,6 +214,16 @@ export default { ...@@ -192,6 +214,16 @@ export default {
confId: 3, confId: 3,
confName: '已结束' confName: '已结束'
} }
],
sopTypeList: [
{
confId: 1,
confName: '客户sop'
},
{
confId: 2,
confName: '群sop'
},
] ]
} }
} }
...@@ -202,6 +234,9 @@ export default { ...@@ -202,6 +234,9 @@ export default {
}, },
methods: { methods: {
handleClick(tab) {
tab == 'first' ? this.handleJump('index') : ''
},
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
path: '/sop/' + path, path: '/sop/' + path,
...@@ -305,7 +340,28 @@ export default { ...@@ -305,7 +340,28 @@ export default {
} }
</script> </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 { .sop-list .sop-back-btn {
position: absolute; position: absolute;
right: 0; right: 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!