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,64 +2,69 @@ ...@@ -2,64 +2,69 @@
<div class="img-bg"> <div class="img-bg">
<div class="preview-content"> <div class="preview-content">
<div class="preview-time">{{ currentTime }}</div> <div class="preview-time">{{ currentTime }}</div>
<template v-if="previewList.length==1">
<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}" :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"> v-for="item in previewList" :key="item.id">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" <img class="avatar"
v-if="!(hasSixType && hasSevenType) || item.attType !== 7" alt/> src="@/assets/guestCustom/default-customer.png"
alt/>
<template v-if="item.attType == 1"> <template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent"></div> <div class="preview-text text" v-html="textContent"></div>
</template> </template>
<template v-else-if="hasSixType || hasSevenType"> <template v-if="item.attType == 6 || item.attType == 4 || item.attType == 7">
<temlate v-if="hasSixType && hasSevenType"> <div class="preview-text text">https//dwz.cn/Fk9vs7ri</div>
<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>
</temlate> <template v-else-if="item.attType == 2">
<template v-else> <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image>
<template v-if="item.attType == 6"> </template>
<div class="preview-pdf"> <template v-else-if="item.attType == 3">
<div class="pdf-title">{{ item.attContent.fileName }}</div> <div class="video-panel" :key="itm">
<div class="preview-link"> <video id="video" width="95">
<img src="@/assets/guestCustom/preview-link.png" alt=""/> <source :src="item.attContent" type="video/mp4"/>
</video>
<i class="el-icon-video-play"></i>
</div> </div>
</template>
</div> </div>
</template> </template>
<template v-if="item.attType == 7">
<div class="preview-activity">
<div class="activity-name">{{ item.attContent.marketingName }}</div>
<img <template v-else>
v-if="item.attContent.marketingType != 5 && item.attContent.marketingType != 6 && item.attContent.marketingType != 7" <div
class="activity-logo" src="@/assets/guestCustom/activity-logo.png" alt/> :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}"
<img v-if="item.attContent.marketingType == 5" class="activity-logo" v-for="item in previewList" :key="item.id">
src="@/assets/guestCustom/activity-spike.png" alt/> <template v-if="item.attType == 1 || item.attType == 4 || item.attType == 6 || item.attType == 7">
<img v-if="item.attContent.marketingType == 6" class="activity-logo" <template v-if="item.attType == 1 && item.attContent">
src="@/assets/guestCustom/activity-service.png" alt/> <img class="avatar"
<img v-if="item.attContent.marketingType == 7" class="link-logo" src="@/assets/guestCustom/link.png" src="@/assets/guestCustom/default-customer.png"
alt/> alt/>
<div class="activity-footer" v-if="item.attContent.marketingType != 7"> <div class="preview-text text" v-html="textContent"></div>
<img src="@/assets/guestCustom/applet-footer.png" alt/>
</div>
</div>
</template> </template>
<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>
<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 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>
<template v-else-if="item.attType == 2"> <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> <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image>
</template> </template>
<template v-else-if="item.attType == 3"> <template v-else-if="item.attType == 3">
<img class="avatar"
src="@/assets/guestCustom/default-customer.png"
alt/>
<div class="video-panel" :key="itm"> <div class="video-panel" :key="itm">
<video id="video" width="95"> <video id="video" width="95">
<source :src="item.attContent" type="video/mp4"/> <source :src="item.attContent" type="video/mp4"/>
...@@ -67,25 +72,8 @@ ...@@ -67,25 +72,8 @@
<i class="el-icon-video-play"></i> <i class="el-icon-video-play"></i>
</div> </div>
</template> </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> </div>
</template> </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>
</div> </div>
</template> </template>
...@@ -99,10 +87,12 @@ export default { ...@@ -99,10 +87,12 @@ export default {
props: {eventBus: Object, previewVal: Array}, props: {eventBus: Object, previewVal: Array},
data() { data() {
return { return {
textContent: '',
previewList: [], previewList: [],
currentTime: '', currentTime: '',
hasSixType: false, hasSixType: false,
hasSevenType: false hasSevenType: false,
hasAttTypeOne: false
} }
}, },
watch: { watch: {
...@@ -110,8 +100,10 @@ export default { ...@@ -110,8 +100,10 @@ export default {
if (val.length) { if (val.length) {
this.hasSixType = val.some(item => item.attType == 6) this.hasSixType = val.some(item => item.attType == 6)
this.hasSevenType = val.some(item => item.attType == 7) this.hasSevenType = val.some(item => item.attType == 7)
this.hasFourType = val.some(item => item.attType == 4)
val.forEach(item => { val.forEach(item => {
if (item.attType == 1) { if (item.attType == 1) {
this.hasAttTypeOne = true
const attContent = item.attContent const attContent = item.attContent
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) { const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '') let word = res.replace(/\[|\]/gi, '')
...@@ -124,9 +116,10 @@ export default { ...@@ -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">` 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 this.textContent = htm
} else if (item.attType != 2 && item.attType != 3 && item.attType != 7) { } else if (item.attType == 4 || item.attType == 6 || item.attType == 7) {
item.attContent = JSON.parse(item.attContent) let str = 'https//dwz.cn/Fk9vs7ri'
this.textContent = this.textContent ? this.textContent + str : str
} }
}) })
} }
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
SOP名称: SOP名称:
<span>{{ sopInfo.sopName }}</span> <span>{{ sopInfo.sopName }}</span>
</div> </div>
<div v-loading="loading"> <div v-loading="loading">
<div class="tagUpdate-warp"> <div class="tagUpdate-warp">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
...@@ -14,7 +13,7 @@ ...@@ -14,7 +13,7 @@
<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> <p class="tag-update">标签更新:{{ sopInfo.labelOptUpdate == 1 ? '开启' : '关闭' }}</p>
</div> </div>
<div class="analysis-box"> <div class="analysis-box">
<div class="analysis-block"> <div class="analysis-block">
...@@ -29,7 +28,10 @@ ...@@ -29,7 +28,10 @@
<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/sop02.png"/>
<div class="analysis-name"> 已执行客户数 <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>
</div> </div>
...@@ -38,7 +40,7 @@ ...@@ -38,7 +40,7 @@
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
<img src="@/assets/sop/sop03.png"/> <img src="@/assets/sop/sop03.png"/>
<div class="analysis-name"> 执行率 <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>
</div> </div>
...@@ -70,9 +72,7 @@ ...@@ -70,9 +72,7 @@
<p class="m-b-10">客户触达明细</p> <p class="m-b-10">客户触达明细</p>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="touchListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" <GLTable ref="touchListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
...@@ -80,10 +80,8 @@ ...@@ -80,10 +80,8 @@
</template> </template>
<script> <script>
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'
export default { export default {
name: 'touchList', name: 'touchList',
...@@ -195,15 +193,19 @@ export default { ...@@ -195,15 +193,19 @@ export default {
mounted() { mounted() {
this.getBaseData() this.getBaseData()
this.$refs.touchListRef.tableHeightValues = '400px' this.$refs.touchListRef.tableHeightValues = '400px'
this.$refs.touchListRef.refreshTable()
}, },
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
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.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 { ...@@ -277,26 +279,26 @@ export default {
this.$refs.touchListRef.data.length ? (this.$refs.touchListRef.tableHeightValues = '') : this.$refs.touchListRef.setTableHeightFun() this.$refs.touchListRef.data.length ? (this.$refs.touchListRef.tableHeightValues = '') : this.$refs.touchListRef.setTableHeightFun()
}, },
drawPie() { // drawPie() {
if (this.baseData.sopEventList.length) { // if (this.baseData.sopEventList.length) {
let chartDom = document.getElementById('completePie') // let chartDom = document.getElementById('completePie')
let myChart = echarts.init(chartDom) // let myChart = echarts.init(chartDom)
let option = JSON.parse(JSON.stringify(pieOption)) // let option = JSON.parse(JSON.stringify(pieOption))
//
option.series[0].data = [ // option.series[0].data = [
{ // {
value: this.selectedEventInfo.eventStatistics.reachCustomerCount ? this.selectedEventInfo.eventStatistics.reachCustomerCount : 0, // value: this.selectedEventInfo.eventStatistics.reachCustomerCount ? this.selectedEventInfo.eventStatistics.reachCustomerCount : 0,
name: '已触达的客户数' // name: '已触达的客户数'
}, // },
{ // {
value: this.sopInfo.customerCount - this.selectedEventInfo.eventStatistics.reachCustomerCount, // value: this.sopInfo.customerCount - this.selectedEventInfo.eventStatistics.reachCustomerCount,
name: '未触达的客户数' // name: '未触达的客户数'
} // }
] // ]
//
option && myChart.setOption(option) // option && myChart.setOption(option)
} // }
} // }
} }
} }
</script> </script>
......
...@@ -203,6 +203,7 @@ export default { ...@@ -203,6 +203,7 @@ export default {
let info = this.editForm.eventList && this.editForm.eventList[0] let info = this.editForm.eventList && this.editForm.eventList[0]
this.$router.push({path: '/sop/viewEvent', query: {info}}); this.$router.push({path: '/sop/viewEvent', query: {info}});
}, },
tramWord(val) { tramWord(val) {
let htm = val.replace( let htm = val.replace(
/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi, /\[([\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!