Commit b8c284b0 by 王志慧

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

2 parents 6c9bfeb0 80a7eef6
......@@ -2,90 +2,78 @@
<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 v-if="previewList.length==1">
<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"
alt/>
<template v-if="item.attType == 1">
<div class="preview-text text" v-html="textContent"></div>
</template>
<template v-if="item.attType == 6 || item.attType == 4 || item.attType == 7">
<div class="preview-text text">https//dwz.cn/Fk9vs7ri</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>
</div>
</template>
<template v-else>
<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">
<template v-if="item.attType == 1 || item.attType == 4 || item.attType == 6 || item.attType == 7">
<template v-if="item.attType == 1 && item.attContent">
<img class="avatar"
src="@/assets/guestCustom/default-customer.png"
alt/>
<div class="preview-text text" v-html="textContent"></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 v-if="previewList.length ==2 && ((item.attType == 4 || item.attType == 7) && item.attType == 6)">
<img class="avatar"
src="@/assets/guestCustom/default-customer.png"
alt/>
<div class="preview-text text">https//dwz.cn/Fk9vs7ri</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 v-if="!hasAttTypeOne && (item.attType == 4 || item.attType == 6 || item.attType == 7)">
<img class="avatar"
src="@/assets/guestCustom/default-customer.png"
alt/>
<div class="preview-text text">https//dwz.cn/Fk9vs7ri</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>
<template v-else-if="item.attType == 2">
<img class="avatar"
src="@/assets/guestCustom/default-customer.png"
alt/>
<el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image>
</template>
<template v-else-if="item.attType == 3">
<img class="avatar"
src="@/assets/guestCustom/default-customer.png"
alt/>
<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>
{{ 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>
</template>
</div>
</template>
</div>
</div>
</template>
......@@ -99,10 +87,12 @@ export default {
props: {eventBus: Object, previewVal: Array},
data() {
return {
textContent: '',
previewList: [],
currentTime: '',
hasSixType: false,
hasSevenType: false
hasSevenType: false,
hasAttTypeOne: false
}
},
watch: {
......@@ -110,8 +100,10 @@ export default {
if (val.length) {
this.hasSixType = val.some(item => item.attType == 6)
this.hasSevenType = val.some(item => item.attType == 7)
this.hasFourType = val.some(item => item.attType == 4)
val.forEach(item => {
if (item.attType == 1) {
this.hasAttTypeOne = true
const attContent = item.attContent
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '')
......@@ -124,9 +116,10 @@ export default {
}
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)
this.textContent = htm
} else if (item.attType == 4 || item.attType == 6 || item.attType == 7) {
let str = 'https//dwz.cn/Fk9vs7ri'
this.textContent = this.textContent ? this.textContent + str : str
}
})
}
......
......@@ -6,7 +6,6 @@
SOP名称:
<span>{{ sopInfo.sopName }}</span>
</div>
<div v-loading="loading">
<div class="tagUpdate-warp">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
......@@ -14,7 +13,7 @@
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span> -->
</glsx-combi-form>
<p class="tag-update">标签更新:{{ sopInfo.customerOptUpdate == 1 ? '开启' : '关闭' }}</p>
<p class="tag-update">标签更新:{{ sopInfo.labelOptUpdate == 1 ? '开启' : '关闭' }}</p>
</div>
<div class="analysis-box">
<div class="analysis-block">
......@@ -29,7 +28,10 @@
<div class="analysis-title-block m-b-20">
<img src="@/assets/sop/sop02.png"/>
<div class="analysis-name"> 已执行客户数
<p class="analysis-num">{{ baseData.sopEventList.length && sopInfo.executedTargetCount ? sopInfo.executedTargetCount : '-' }}</p></div>
<p class="analysis-num">
{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.executedTargetCount : '-' }}
</p></div>
</div>
</div>
......@@ -38,7 +40,7 @@
<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>
<p class="analysis-num"> {{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.executedRatio : '-' }}%</p></div>
</div>
</div>
......@@ -70,9 +72,7 @@
<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>
......@@ -80,10 +80,8 @@
</template>
<script>
import * as echarts from 'echarts'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import {pieOption} from './pieOption'
export default {
name: 'touchList',
......@@ -195,15 +193,19 @@ export default {
mounted() {
this.getBaseData()
this.$refs.touchListRef.tableHeightValues = '400px'
this.$refs.touchListRef.refreshTable()
},
methods: {
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({sopId: this.sopId}).then(res => {
console.log(res)
this.sopInfo = res
if (this.sopInfo.sopType == 1){
this.tableParams.tableColumns.splice(0,1,1)
}
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()
})
},
......@@ -277,26 +279,26 @@ export default {
this.$refs.touchListRef.data.length ? (this.$refs.touchListRef.tableHeightValues = '') : this.$refs.touchListRef.setTableHeightFun()
},
drawPie() {
if (this.baseData.sopEventList.length) {
let chartDom = document.getElementById('completePie')
let myChart = echarts.init(chartDom)
let option = JSON.parse(JSON.stringify(pieOption))
option.series[0].data = [
{
value: this.selectedEventInfo.eventStatistics.reachCustomerCount ? this.selectedEventInfo.eventStatistics.reachCustomerCount : 0,
name: '已触达的客户数'
},
{
value: this.sopInfo.customerCount - this.selectedEventInfo.eventStatistics.reachCustomerCount,
name: '未触达的客户数'
}
]
option && myChart.setOption(option)
}
}
// drawPie() {
// if (this.baseData.sopEventList.length) {
// let chartDom = document.getElementById('completePie')
// let myChart = echarts.init(chartDom)
// let option = JSON.parse(JSON.stringify(pieOption))
//
// option.series[0].data = [
// {
// value: this.selectedEventInfo.eventStatistics.reachCustomerCount ? this.selectedEventInfo.eventStatistics.reachCustomerCount : 0,
// name: '已触达的客户数'
// },
// {
// value: this.sopInfo.customerCount - this.selectedEventInfo.eventStatistics.reachCustomerCount,
// name: '未触达的客户数'
// }
// ]
//
// option && myChart.setOption(option)
// }
// }
}
}
</script>
......
......@@ -203,6 +203,7 @@ export default {
let info = this.editForm.eventList && this.editForm.eventList[0]
this.$router.push({path: '/sop/viewEvent', query: {info}});
},
tramWord(val) {
let htm = val.replace(
/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!