Commit 501ffdc3 by 前端

更新六月份版本sop代码

1 parent d56fe0f3
......@@ -225,4 +225,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, 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
}
......@@ -11,10 +11,16 @@
</div>
<div class="checkbox-group-box" :style="{ height: heightBox + 'px' }" v-loading="loading">
<div style="margin-bottom: 8px" v-for="(item, index) in labelTreeRets" :key="index">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click.self="item.checked = !item.checked"></span>
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAllChange(item.checkAll, index)">{{ item.labelGroup.name }}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)</el-checkbox>
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }"
@click.self="item.checked = !item.checked"></span>
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll"
@change="handleCheckAllChange(item.checkAll, index)">{{
item.labelGroup.name
}}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)
</el-checkbox>
<div style="margin: 15px 0"></div>
<el-checkbox-group class="tag-group" v-model="item.tagChecked" @change="handleCheckedChange(item.tagChecked, index)" v-if="item.checked">
<el-checkbox-group class="tag-group" v-model="item.tagChecked"
@change="handleCheckedChange(item.tagChecked, index)" v-if="item.checked">
<el-checkbox v-for="(itm, idx) in item.labelList" :label="itm" :key="idx">{{ itm.name }}</el-checkbox>
</el-checkbox-group>
</div>
......@@ -35,7 +41,8 @@
<p class="tag-selected-label" v-show="item.tagChecked.length">{{ item.labelGroup.name }}:</p>
<span v-for="(tag, idx) in item.tagChecked" :key="idx">
<span class="tag-txt" v-show="idx != 0">或</span>
<el-tag :title="tag.name" type="info" class="customer-tag-selected-item" :key="idx" v-if="tag" closable :disable-transitions="false" @close="remove(item, idx)">
<el-tag :title="tag.name" type="info" class="customer-tag-selected-item" :key="idx" v-if="tag"
closable :disable-transitions="false" @close="remove(item, idx)">
{{ tag.name.length > 11 ? tag.name.slice(0, 11) + '...' : tag.name }}
</el-tag>
</span>
......@@ -46,7 +53,8 @@
</div>
</div>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl" v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a>
<a class="dialog-jump" @click="jumpUrl"
v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a>
<el-button size="small" @click="handleClose">
取 消
</el-button>
......@@ -57,14 +65,19 @@
</template>
<script>
import { utils } from 'glsx-common'
import {utils} from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'activityModel',
props:{
labelTypesStr:{
type:String,
default:'自店标签,企业标签,系统标签'
props: {
labelTypesStr: {
type: String,
default: '自店标签,企业标签,系统标签'
},
isGroupTag: {
type: Boolean,
default: false
}
},
data() {
......@@ -107,87 +120,89 @@ export default {
querylabeltree(selectItem) {
this.loading = true
this.$apis.common
.querylabeltree({
labelTreeReq: {
pageNum: 1,
pageSize: 1000,
shopId: this.$globalState.session.merchantId,
labelGroupName: this.labelGroupName,
labelTypesStr: this.labelTypesStr,
edition: this.$globalState.session.merchantModel
}
})
.then(res => {
if (selectItem && selectItem.length > 0) {
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
labelType: item.labelType,
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false
}
})
//回显
selectItem.forEach(item => {
this.labelTreeRets.forEach(tag => {
if (item.labelGroup.id == tag.labelGroup.id) {
let labelList = []
item.labelList.forEach(x => {
labelList.push(x.id)
})
this.$nextTick(() => {
tag.tagChecked = tag.labelList.filter(i => labelList.includes(i.id))
})
.querylabeltree({
labelTreeReq: {
pageNum: 1,
pageSize: 1000,
// shopId: this.$globalState.session.merchantId,
shopId:'44209846',
labelGroupName: this.labelGroupName,
labelTypesStr: this.labelTypesStr,
edition: this.$globalState.session.merchantModel,
belongType: this.isGroupTag ? 2 : 1
}
})
.then(res => {
if (selectItem && selectItem.length > 0) {
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
labelType: item.labelType,
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false
}
})
})
this.labelTreeRets.forEach((item, index) => {
//回显
selectItem.forEach(item => {
this.labelTreeRets.forEach(tag => {
if (item.labelGroup.id == tag.labelGroup.id) {
let labelList = []
item.labelList.forEach(x => {
labelList.push(x.id)
})
this.$nextTick(() => {
tag.tagChecked = tag.labelList.filter(i => labelList.includes(i.id))
})
}
})
})
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index, 1)
})
})
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index, 1)
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets)
})
})
this.$nextTick(() => {
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets)
})
} else {
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
labelType: item.labelType,
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false
}
})
this.labelTreeRets.forEach((item, index) => {
this.labelTreeRetSelect.forEach(itm => {
if (itm.labelGroup.id == item.labelGroup.id && itm.tagChecked.length > 0) {
let tagChecked = []
itm.tagChecked.forEach(x => {
tagChecked.push(x.id)
})
this.$nextTick(() => {
item.tagChecked = item.labelList.filter(i => tagChecked.includes(i.id))
})
this.$nextTick(() => {
this.handleCheckedChange(itm.tagChecked, index, 1)
})
} else {
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
labelType: item.labelType,
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false
}
})
})
if (this.labelTreeRetSelect.length == 0) {
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets)
this.labelTreeRets.forEach((item, index) => {
this.labelTreeRetSelect.forEach(itm => {
if (itm.labelGroup.id == item.labelGroup.id && itm.tagChecked.length > 0) {
let tagChecked = []
itm.tagChecked.forEach(x => {
tagChecked.push(x.id)
})
this.$nextTick(() => {
item.tagChecked = item.labelList.filter(i => tagChecked.includes(i.id))
})
this.$nextTick(() => {
this.handleCheckedChange(itm.tagChecked, index, 1)
})
}
})
})
if (this.labelTreeRetSelect.length == 0) {
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets)
}
}
}
this.$nextTick(() => {
this.loading = false
this.$nextTick(() => {
this.loading = false
})
})
})
},
handleClose() {
this.labelTreeRetSelect = []
......@@ -223,17 +238,17 @@ export default {
handleSelect() {
this.dialogVisible = false
let labelTreeRets = this.labelTreeRetSelect
.map(item => {
if (item.tagChecked.length) {
console.log(item)
return {
labelGroup: item.labelGroup,
labelList: item.tagChecked,
labelType: item.labelType
.map(item => {
if (item.tagChecked.length) {
console.log(item)
return {
labelGroup: item.labelGroup,
labelList: item.tagChecked,
labelType: item.labelType
}
}
}
})
.filter(item => item)
})
.filter(item => item)
console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets)
},
......@@ -287,18 +302,22 @@ export default {
text-decoration: underline;
cursor: pointer;
}
.select-tag {
.label-box {
margin-left: 42px;
height: 100%;
overflow-y: scroll;
}
.tag-selected-label {
margin: 9px 0;
}
.tag-line-and {
position: relative;
}
.tag-line {
position: absolute;
left: 17px;
......@@ -306,6 +325,7 @@ export default {
border-width: 0 0 0 1px;
height: 100%;
}
.tag-and {
position: absolute;
background: #efeeff;
......@@ -314,9 +334,11 @@ export default {
padding: 10px;
z-index: 20;
}
.tag-txt {
padding: 0 8px;
}
.customer-tag-selected-item {
background: #f4f6fc !important;
border: 1px solid rgba(232, 232, 234, 1) !important;
......@@ -326,10 +348,13 @@ export default {
margin-bottom: 10px;
}
}
.tag-panel {
display: flex;
.tag-panel-select {
width: 60%;
/deep/ {
.el-checkbox__label {
width: 100%;
......@@ -341,9 +366,11 @@ export default {
}
}
}
.tag-panel-selected {
width: 40%;
margin-left: 10px;
.tag-box-header {
font-size: 14px;
font-weight: 400;
......@@ -352,17 +379,20 @@ export default {
padding-left: 20px !important;
}
}
.tag-title {
font-size: 16px;
font-weight: 400;
color: #333333;
line-height: 22px;
}
.tag-select-box {
margin-top: 10px;
border-radius: 2px;
border: 1px solid #eeeeee;
padding: 6px;
.tag-box-header {
box-sizing: border-box;
display: flex;
......@@ -372,6 +402,7 @@ export default {
margin: -6px;
margin-bottom: 10px;
padding: 0px 6px;
/deep/ {
.el-input {
width: 60%;
......@@ -379,6 +410,7 @@ export default {
}
}
}
.tag-selected-item {
margin: 0px 6px 6px 0px;
height: 26px;
......@@ -390,14 +422,17 @@ export default {
overflow: hidden;
white-space: nowrap;
}
.el-tree-node__expand-icon {
color: #5850ff;
font-size: 16px;
}
.tag-group {
margin-left: 40px;
display: flex;
flex-wrap: wrap;
.el-checkbox {
width: 40%;
margin-bottom: 6px;
......@@ -407,9 +442,11 @@ export default {
}
}
}
.checkbox-group-box {
overflow: auto;
}
.tag-selected-box {
min-height: 200px;
display: flex;
......
<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",
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,16 +57,17 @@ export default {
this.activeName = obj.activeName
},
handleInfoConfirm(info) {
console.log(this.eventObj.addOrEdit == 'add')
console.log(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.qiwei = info.predictCountObj.qiwei
this.$refs.baseInfoRef.dealSopTime()
console.log(this.$refs.baseInfoRef.editForm.eventList)
this.jumpBaseInfo({ activeName: 'baseInfo' })
},
jumpEvent(obj) {
console.log(obj)
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info)
this.parentCustomerObj = obj.parentCustomerObj
......
......@@ -14,12 +14,14 @@
:placeholder="!editForm.eventList.length ? '设置营销事件后自动补充' : editForm.startDate + (editForm.endDate ? ' - ' + editForm.endDate : '')"
disabled></el-input>
</div>
<!-- <div v-if="editForm.sopType =='1'">-->
<div slot="customerInfoList" slot-scope="scope">
<div v-if="!scope.scope.isDisabled">
<!-- <el-button class="default-blue-btn" :size="size" @click="handleSelectCustomer">选择客户</el-button>
<el-button v-show="editForm.customerInfoList.length" :size="size" @click="handleResetCustomer">重置客户</el-button> -->
<el-radio-group v-model="editForm[scope.scope.name]" @change="handleCustTypeChange">
<el-radio v-for="(item, index) in scope.scope.customerRadioList" :key="index" :label="item.confId">
<el-radio v-for="(item, index) in handleTypeSelect(scope.scope.customerRadioList)" :key="index"
:label="item.confId">
{{ item.confName }}
</el-radio>
</el-radio-group>
......@@ -32,9 +34,12 @@
<!-- <div v-show="editForm.customerInfoList.length != 0" class="customer-box m-t-10"> -->
<div v-show="item.list.length != 0">
<div class="customer-box m-t-10">
<div class="customer-title">{{ item.confName }}客户:预估{{ item.customerCount }}人</div>
<div class="customer-title">
{{ item.confName }}客户
:预估{{ item.customerCount }}人
</div>
<div :key="key" class="el-input-tag input-tag-wrapper">
<template v-if="item.confName == '标签'">
<template v-if="item.confName == '标签' || item.confName == '群标签'">
<div v-for="(subItem, subIdx) in item.list" :key="subIdx">
<el-tag v-for="(k, n) in subItem.labelList" :key="n" class="customer-tag" :size="size"
type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false"
......@@ -44,7 +49,8 @@
</div>
</template>
<template v-else>
<el-tag v-for="(subItem, subIdx) in item.list" :key="subIdx" class="customer-tag" :size="size"
<el-tag v-for="(subItem, subIdx) in item.list" :key="subIdx" class="customer-tag"
:size="size"
type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false"
@close="handleDeleteCustomer(subIdx)">
<!-- <i class="el-icon-user-solid"></i> -->
......@@ -59,9 +65,12 @@
</div>
</div>
</div>
<!-- </div>-->
</glsx-combi-form>
</div>
</div>
<!-- 营销事件设置-->
<div class="container edit-container" v-loading="marketingEventLoading">
<div class="edit-title flex" style="align-items: center">
<p>营销事件设置</p>
......@@ -69,7 +78,7 @@
content="请先完善sop名称和营销对象" placement="top">
<div>
<el-button class="m-r-20" :disabled="!editForm.customerInfoList.length || !editForm.sopName" :size="size"
type="primary" v-if="this.routeInfo.addOrEdit !=='look'" @click="handleEventEdit('add')">添加事件
type="primary" @click="handleEventEdit('add')">添加事件
</el-button>
</div>
</el-tooltip>
......@@ -92,7 +101,7 @@
item.repeatTime
}}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y'">{{ item.eventEndDate }}</p>
<p class="m-r-20 txt-blue">
<p class="m-r-20 txt-blue" v-if="editForm.sopType == 1">
{{ baseData.channelTypeList.find(k => k.confId == item.pushChannelType).confName }}</p>
</div>
<div>
......@@ -125,7 +134,7 @@
</div>
</div>
</div>
<div v-if="obj.attType == 7">
<div v-if="obj.attType == 7 || obj.attType == 4" >
<div class="welcome-activity-panel">
<div class="welcome-activity-box">
<div class="welcome-activity-icon">
......@@ -161,6 +170,20 @@
<span>{{ marketingContentJSON(obj).residueAmount }}</span>
</div>
</template>
<template v-else-if="marketingContentJSON(obj).selectType == 'crowdfunding'">
<div class="model-item-title" :title="marketingContentJSON(obj).activityName">
{{ marketingContentJSON(obj).activityName }}
</div>
<div class="model-item-content"></div>
<div class="model-item-content">
开始时间:
{{ marketingContentJSON(obj).startTime }}
</div>
<div class="model-item-content">
结束时间:
{{ marketingContentJSON(obj).endTime }}
</div>
</template>
<template v-else-if="marketingContentJSON(obj).selectType == 'activity'">
<div class="model-item-title" :title="marketingContentJSON(obj).activityName">
{{ marketingContentJSON(obj).activityName }}
......@@ -222,7 +245,8 @@
:selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))"
@handleCrowdCustClose="handleCrowdCustClose"
@handleCrowdCustConfirm="handleDialogConfirm"></select-Crowd>
<select-tag ref="selectTagForm" @tagSelected="handleDialogConfirm" :dialogVisible="isTagVisible"></select-tag>
<select-tag ref="selectTagForm" :isGroupTag="isGroupTag" @tagSelected="handleDialogConfirm"
:dialogVisible="isTagVisible"></select-tag>
<select-customer v-if="isAppointCustVisible" :dialogVisible="isAppointCustVisible"
:parentSelectedCustomerList="customerDataList[2].list"
@handleAppointCustClose="handleAppointCustClose"
......@@ -240,6 +264,8 @@ export default {
name: 'baseInfo',
data() {
return {
isGroupTag: false,
pageStatus: '',
size: 'small',
title: '基本信息',
url: url,
......@@ -303,7 +329,14 @@ export default {
otherConfName: 'customerPhone'
},
list: []
}
},
{
confId: 4,
confName: '群标签',
reqListName: 'labelList',
customerCount: '',
list: []
},
],
editForm: {
sopName: '',
......@@ -315,13 +348,15 @@ export default {
customerInfoList: [],
// customerIds: [],
customerOptUpdate: '1',
sopType: '1',
eventList: []
},
editRule: {
sopName: [{required: true, message: '请输入SOP名称', trigger: 'change'}],
customerOptUpdate: [{required: true, message: '请选择更新人群', trigger: 'change'}],
customerOptType: [{required: true, message: '请选择有效对象', trigger: 'change'}],
customerInfoList: [{required: true, message: '请选择营销对象', trigger: 'change'}]
customerInfoList: [{required: true, message: '请选择营销对象', trigger: 'change'}],
sopType: [{required: true, message: '请选择类型', trigger: 'change'}]
},
isEdit: true,
editFormData: [
......@@ -333,6 +368,24 @@ export default {
isDisabled: false
},
{
label: '类型',
name: 'sopType',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
isDisabled: false,
optionList: [
{
confId: '1',
confName: '客户sop'
},
{
confId: '2',
confName: '群sop'
}
]
},
{
label: '营销时间',
name: 'startDate',
addHtml: 'startDate'
......@@ -345,15 +398,23 @@ export default {
customerRadioList: [
{
confId: 2,
confName: '按人群选择客户'
confName: '按人群选择客户',
sopType: 1
},
{
confId: 3,
confName: '按标签选择客户'
confName: '按标签选择客户',
sopType: 1
},
{
confId: 1,
confName: '选择指定客户'
confName: '选择指定客户',
sopType: 1
},
{
confId: 4,
confName: '按群标签选择群聊',
sopType: 2
}
],
isDisabled: false
......@@ -430,14 +491,31 @@ export default {
},
deep: true
},
'editForm.sopType'(val) {
let show = false
this.isGroupTag = val == 1 ? false : true
this.editForm.customerOptType = val == 1 ? '' : 4
if (this.editForm.eventList.length ){
this.$confirm(`切换sop类型,系统将自动重置已配置的营销对象和营销事件。是否确定切换?`, '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
})
.then(() => {
this.cancelJump()
})
.catch(() => {
})
}
}
},
async mounted() {
this.setMinHeight('.sop-base-info')
// this.routeInfo.addOrEdit == 'edit'
await this.getTheMaterialActivityCollection()
if (['edit', 'copy', 'look'].includes(this.routeInfo.addOrEdit)) {
if (['edit', 'copy'].includes(this.routeInfo.addOrEdit)) {
this.pageStatus = this.routeInfo.addOrEdit
this.getInfo()
} else if (this.routeInfo.info) {
this.setCustomer()
......@@ -446,6 +524,10 @@ export default {
},
methods: {
handleTypeSelect(val) {
return val.filter(item => item.sopType == this.editForm.sopType)
},
async getTheMaterialActivityCollection() {
await this.$apis.welcomeword.getMaterialListApi({
pageNum: 1,
......@@ -456,6 +538,7 @@ export default {
this.materialGroupSet = res.data
)
},
async getEachActivity(interfaceName) {
let params = {
pageNum: 1,
......@@ -504,6 +587,7 @@ export default {
)
return htm
},
backupContentJson(val) {
if (typeof (val) == 'string') {
return JSON.parse(val)
......@@ -511,6 +595,7 @@ export default {
return val
}
},
marketingContentJSON(val) {
if (typeof (val.attContent) == 'string') {
return JSON.parse(val.attContent).marketingContent
......@@ -607,6 +692,9 @@ export default {
case '指定':
this.recoverAppointList()
break
case '群标签':
this.recoverLabelList()
break
}
},
......@@ -785,7 +873,31 @@ export default {
this.customerDataList[this.currentCustomerIdx].customerCount = res.count
})
},
// 群标签 预估
getGroupByTagList(){
var params = {
combineType: 2,
pageSize: 1,
pageNum: 1,
tagLists: []
}
this.customerDataList[this.currentCustomerIdx].list &&
this.customerDataList[this.currentCustomerIdx].list.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
})
this.$apis.sop.getCustomerByTagListApi(params).then(res => {
this.customerDataList[this.currentCustomerIdx].customerCount = res.count
})
},
getCustomerByTagList() {
var params = {
combineType: 2,
......@@ -823,6 +935,9 @@ export default {
case '指定':
this.customerDataList[this.currentCustomerIdx].customerCount = this.customerDataList[this.currentCustomerIdx].list.length
break
case '群标签':
this.customerDataList[this.currentCustomerIdx].list.length && this.getGroupByTagList()
break
}
this.editForm.customerInfoList = JSON.parse(JSON.stringify(this.customerDataList[this.currentCustomerIdx].list))
this.$refs.editFormRef && this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
......@@ -840,8 +955,11 @@ export default {
case '指定':
this.handleAppointCustClose()
break
case '群标签':
break
}
this.customerDataList[this.currentCustomerIdx].list = obj
console.log(this.customerDataList)
this.changeCustomer()
},
......@@ -862,7 +980,7 @@ export default {
handleSelectCustomer(idx) {
this.currentCustomerIdx = idx
// 0-人群;1-标签;2-指定客户
// 0-人群;1-标签;2-指定客户 3 群聊
switch (idx) {
case 0:
this.handleCrowdCustClose()
......@@ -874,6 +992,9 @@ export default {
case 2:
this.handleAppointCustClose()
break
case 3:
this.isTagVisible = !this.isTagVisible
this.$refs.selectTagForm.init(JSON.parse(JSON.stringify(this.customerDataList[idx].list)))
}
},
......@@ -982,7 +1103,7 @@ export default {
addOrEdit: addOrEdit,
eventIndex: addOrEdit == 'add' ? '-1' : idx,
parentCustomerObj: this.parentCustomerObj,
info: {...row, sopName: this.editForm.sopName}
info: {...row, sopName: this.editForm.sopName,sopType:this.editForm.sopType}
})
},
......@@ -991,6 +1112,7 @@ export default {
return list
},
reqLabelAttrs() {
var list = []
this.customerDataList[this.currentCustomerIdx].list.forEach(item => {
......@@ -1004,6 +1126,7 @@ export default {
})
})
})
console.log(list)
return list
},
......@@ -1038,6 +1161,8 @@ export default {
return this.reqLabelAttrs()
case '指定':
return this.reqAppointAttrs()
case '群标签':
return this.reqLabelAttrs()
}
},
......@@ -1055,7 +1180,7 @@ export default {
params.customerCount = this.customerDataList[this.currentCustomerIdx].customerCount
delete params.customerInfoList
this.customerDataList.forEach((item, index) => {
if (index != this.currentCustomerIdx) {
if (index != this.currentCustomerIdx && item.reqListName !== 'labelList') {
delete params[item.reqListName]
}
})
......@@ -1111,7 +1236,7 @@ export default {
videoImageStorage = []
}
// 活动
if (obj && obj.attType == 7) {
if (obj && (obj.attType == 7 || obj.attType == 4)) {
params.eventList[index].additionalType = 2
let attContentCopy = JSON.parse(obj.attContent)
if (attContentCopy.marketingContent.selectType == 'coupon') {
......@@ -1129,7 +1254,7 @@ export default {
params.eventList[index].objectId = attContentCopy.marketingId
}
// 还差一个秒杀活动
if (attContentCopy.marketingContent.selectType == 'activity') {
if (attContentCopy.marketingContent.selectType == 'activity' || attContentCopy.marketingContent.selectType == 'crowdfunding' ) {
params.eventList[index].objectType = 8
params.eventList[index].objectId = attContentCopy.marketingId
......@@ -1158,7 +1283,7 @@ export default {
let backupattContent = typeof (obj.attContent) == 'string' ? JSON.parse(obj.attContent) : obj.attContent
params.eventList[index].objectId = backupattContent.objectId
}
if (obj && obj.attType == 7) {
if (obj && (obj.attType == 7 || obj.attTye ==4)) {
let attContentCopy = JSON.parse(obj.attContent)
if (attContentCopy.marketingContent.selectType == 'coupon') {
params.eventList[index].objectType = 16
......@@ -1172,7 +1297,7 @@ export default {
params.eventList[index].objectType = 15
params.eventList[index].objectCombId = attContentCopy.marketingId
}
if (attContentCopy.marketingContent.selectType == 'activity') {
if (attContentCopy.marketingContent.selectType == 'activity' || attContentCopy.marketingContent.selectType == 'crowdfunding') {
params.eventList[index].objectType = 13
params.eventList[index].objectCombId = attContentCopy.marketingId
}
......@@ -1228,7 +1353,7 @@ export default {
let backupattContent = typeof (obj.attContent) == 'string' ? JSON.parse(obj.attContent) : obj.attContent
params.eventList[index].objectId = backupattContent.objectId
}
if (obj && obj.attType == 7) {
if (obj && (obj.attType == 7 || obj.attType == 4 )) {
params.eventList[index].additionalType = 2
let attContentCopy = JSON.parse(obj.attContent)
if (attContentCopy.marketingContent.selectType == 'coupon') {
......@@ -1244,7 +1369,7 @@ export default {
params.eventList[index].objectType = 7
params.eventList[index].objectId = attContentCopy.marketingId
}
if (attContentCopy.marketingContent.selectType == 'activity') {
if (attContentCopy.marketingContent.selectType == 'activity' || attContentCopy.marketingContent.selectType == 'crowdfunding') {
params.eventList[index].objectType = 8
params.eventList[index].objectId = attContentCopy.marketingId
}
......@@ -1267,7 +1392,7 @@ export default {
let backupattContent = typeof (obj.attContent) == 'string' ? JSON.parse(obj.attContent) : obj.attContent
params.eventList[index].objectId = backupattContent.objectId
}
if (obj && obj.attType == 7) {
if (obj && (obj.attType == 7 || obj.attType == 4)) {
let attContentCopy = JSON.parse(obj.attContent)
if (attContentCopy.marketingContent.selectType == 'coupon') {
params.eventList[index].objectType = 16
......@@ -1281,7 +1406,7 @@ export default {
params.eventList[index].objectType = 15
params.eventList[index].objectCombId = attContentCopy.marketingId
}
if (attContentCopy.marketingContent.selectType == 'activity') {
if (attContentCopy.marketingContent.selectType == 'activity' || attContentCopy.marketingContent.selectType == 'crowdfunding') {
params.eventList[index].objectType = 13
params.eventList[index].objectCombId = attContentCopy.marketingId
}
......@@ -1608,4 +1733,9 @@ export default {
color: #f56c6c;
font-size: 12px;
}
.group-select {
font-size: 14px;
color: #999999;
}
</style>
......@@ -4,9 +4,11 @@
<!-- 营销时间 -->
<div class="container m-b-20">
<p class="edit-title">营销时间</p>
<glsx-combi-form class="edit-form-container m-r-20" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"
:isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="sopNameFormData"
:formRules="editRule"></glsx-combi-form>
<!-- sop名称-->
<!-- <glsx-combi-form class="edit-form-container m-r-20" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"-->
<!-- :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="sopNameFormData"-->
<!-- :formRules="editRule"></glsx-combi-form>-->
<glsx-combi-form ref="editFormRefDate" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"
:formRef="editChildRef" :formObj="editForm" :formData="editFormDataDate" :formRules="editRule">
<div slot="eventStartDate" slot-scope="scope">
......@@ -23,9 +25,11 @@
:placeholder="scope.scope.placeholder"></el-time-picker>
</div>
</glsx-combi-form>
<glsx-combi-form ref="editFormRefRepeat" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"
:isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormDataRepeat"
:formRules="editRule"></glsx-combi-form>
<glsx-combi-form ref="editFormRefTime" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"
:formRef="editChildRef" :formObj="editForm" :formData="editFormDataTime" :formRules="editRule">
<div class="flex-default m-r-20" slot="repeatTime" slot-scope="scope">
......@@ -70,15 +74,15 @@
</el-form>
</div>
<div class="preview">
<Preview :previewVal="previewList" v-if="editForm.pushChannelType == 1"></Preview>
<Preview :previewVal="previewList" v-if="editForm.pushChannelType == 1 && sopType ==1"></Preview>
<!-- <MessagePreview :previewView="previewList" v-if="editForm.pushChannelType == 2"></MessagePreview>-->
<FriendGroupPreview :previewView="previewList" v-if="editForm.pushChannelType == 3"></FriendGroupPreview>
</div>
</div>
</div>
<!-- 营销渠道 -->
<!-- 营销设置 -->
<div class="container edit-container">
<p class="edit-title">营销渠道</p>
<p class="edit-title">营销设置</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRefChannel" :isEdit="isEdit"
:labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef"
:formObj="editForm" :formData="editFormDataChannel" :formRules="editRule">
......@@ -219,7 +223,7 @@ export default {
activityStatus: 2,
currentPage: 1
}
}
},
// {
// itemName: '无忧服务',
// itemValue: 6,
......@@ -235,16 +239,25 @@ export default {
// merchantId: this.$globalState.session.merchantId
// }
// }
// {
// itemName: '众筹活动',
// itemValue: 7,
// itemType: 'crowdfunding',
// getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
// params: {
// currentPage: 1,
// activityStatus: 2
// }
// }
{
itemName: '众筹活动',
itemValue: 6,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: {
currentPage: 1
}
},
// 膨胀金活动
{
itemName: '膨胀金活动',
itemValue: 7,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.bulgeActivity,
params: {
currentPage: 1
}
},
]
},
{
......@@ -288,10 +301,11 @@ export default {
eventContent: '',
// eventCount: '',
object: {},
//营销渠道
//营销设置
followerTypeId: '',
reachesType: 1,
reachesTypeSet: ''
reachesTypeSet: '',
labelOptUpdate: 1
},
// 营销内容
previewList: [],
......@@ -330,10 +344,11 @@ export default {
eventEndDate: [{required: true, message: '请选择营销结束日期', trigger: 'change'}],
// eventContent: [{required: true, message: '', trigger: 'input'}],
repeatFlag: [{required: true, message: '请选择是否重复', trigger: 'change'}],
pushChannelType: [{required: true, message: '请选择营销渠道', trigger: 'change'}],
pushChannelType: [{required: true, message: '请选择营销设置', trigger: 'change'}],
followerTypeId: [{required: true, message: '请选择跟进员工类型', trigger: 'change'}],
reachesType: [{required: true, message: '请选择参与次数', trigger: 'change'}],
reachesTypeSet: [{required: true, message: '请输入参与次数', trigger: 'change'}]
reachesType: [{required: true, message: '请选择营销次数', trigger: 'change'}],
reachesTypeSet: [{required: true, message: '请输入营销次数', trigger: 'change'}],
labelOptUpdate: [{required: true, message: '请选择标签更新', trigger: 'change'}]
},
isEdit: true,
sopNameFormData: [
......@@ -410,7 +425,7 @@ export default {
this.editForm.repeatMode = 1
this.editForm.repeatTime = ''
this.editForm.eventEndDate = ''
// 参与次数
// 营销次数
this.editForm.reachesType = 1
this.editForm.reachesTypeSet = 1
}
......@@ -472,7 +487,7 @@ export default {
],
editFormDataChannel: [
{
label: '营销渠道',
label: '营销设置',
name: 'pushChannelType',
tips: '企业微信和微信朋友圈会自动给客户的跟进专员派发群发任务;短信会自动推送至客户手机。',
type: 'radio',
......@@ -511,7 +526,7 @@ export default {
optionsName: 'staffTypeList'
},
{
label: '参与次数',
label: '营销次数',
name: 'reachesType',
addHtml: 'reachesType',
optionId: 'confId',
......@@ -528,7 +543,26 @@ export default {
isDisabled: false
}
],
}
},
{
label: '标签更新',
name: 'labelOptUpdate',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: 1,
confName: '开启',
isDisabled: false
},
{
confId: 2,
confName: '关闭',
isDisabled: false
},
],
},
],
baseData: {
weekList: [],
......@@ -609,6 +643,15 @@ export default {
mounted() {
Object.assign(this.editForm, this.eventObj.info)
// 客户sop还是群sop做营销设置处理
if (this.editForm.sopType == 2) {
this.editForm.pushChannelType = 1
this.editFormDataChannel = this.editFormDataChannel.filter(item => {
return item.name !== 'pushChannelType' && item.name !== 'followerTypeId'
})
}
this.getStaffTypeList()
this.$nextTick(() => {
this.editStatus = false
......@@ -630,6 +673,7 @@ export default {
}
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
......@@ -718,17 +762,25 @@ export default {
this.recoveryEndTime()
this.getCustomerNum()
},
getWelcomeDetails() {
let backupContent = typeof (this.editForm.backupContent) == 'string' ? JSON.parse(this.editForm.backupContent) : this.editForm.backupContent
console.log(backupContent)
if (backupContent) {
const previewList = backupContent.map(item => {
if (item.attType == 7) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
if (item.attType == 7 || item.attType == 4) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
if (item.attType == 4) {
item.attType = 7
}
return item
})
this.$refs.welcome.updateList(previewList)
} else if (this.editForm.object && this.editForm.object.length != 0) {
const previewList = JSON.parse(backupContent).map(item => {
if (item.attType == 7) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
if (item.attType == 7 || item.attType == 4) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
if (item.attType == 4) {
item.attType = 7
}
return item
})
this.$refs.welcome.updateList(previewList)
......@@ -744,6 +796,7 @@ export default {
handleMarketingContent() {
let params = {}
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
console.log(previewList)
if ((previewList[0] && previewList[0].attType == 1 && previewList[0].attContent == '') || !previewList.length || (previewList[0] && previewList[0].attType !== 1)) {
this.hasEventContentDisplaySpecial = true
} else {
......@@ -954,10 +1007,12 @@ export default {
this.submit = false
return true
}
console.log(this.editForm)
this.$emit('handleInfoConfirm', {baseInfo: this.editForm, predictCountObj: this.predictCountObj})
})
} else {
// this.editForm.eventCount = 1
console.log(this.editForm)
this.$emit('handleInfoConfirm', {baseInfo: this.editForm, predictCountObj: this.predictCountObj})
}
},
......
<template>
<div class="sop-overview marketing edit-box">
<SopNav @clickNav="handleClick"/>
<div class="overview-describe">
<img src="@/assets/icon-info.png" alt=""/>
<p class="describe-text">
锁定目标客户群,设置触发时间、场景事件、策略内容和触点,自动触发场景营销SOP推送,完成保养提醒、事故车送修等智能线索推送、新用户培育、客户关怀、激活沉默客户、转化复购等。
</p>
</div>
<div class="container edit-container m-b-20">
<p class="edit-title">营销SOP</p>
<div class="sop-box">
<p class="box-txt">锁定目标客户群,设置触发时间、场景事件、策略内容和触点,自动触发场景营销SOP推送,完成保养提醒、事故车送修等智能线索推送、新用户培育、客户关怀、激活沉默客户、转化复购等。</p>
<!-- <div class="flex-center">-->
<!-- <p class="step-circle">1</p>-->
<!-- <p class="step-txt">创建SOP</p>-->
<!-- <p class="step-line"></p>-->
<!-- <p class="step-circle">2</p>-->
<!-- <p class="step-txt">添加推送客户</p>-->
<!-- <p class="step-line"></p>-->
<!-- <p class="step-circle">3</p>-->
<!-- <p class="step-txt">设置推送内容及时间</p>-->
<!-- <p class="step-line"></p>-->
<!-- <p class="step-circle">4</p>-->
<!-- <p class="step-txt">系统定时自动推送/任务下发</p>-->
<!-- </div>-->
<div class="flex-center">
<p class="step-circle">1</p>
<p class="step-txt">创建SOP</p>
<div>
<p class="step-circle">1</p>
<p class="step-txt">创建SOP</p>
</div>
<p class="step-line"></p>
<p class="step-circle">2</p>
<p class="step-txt">添加推送客户</p>
<div>
<p class="step-circle">2</p>
<p class="step-txt">添加推送客户</p>
</div>
<p class="step-line"></p>
<p class="step-circle">3</p>
<p class="step-txt">设置推送内容及时间</p>
<div>
<p class="step-circle">3</p>
<p class="step-txt">设置推送内容及时间</p>
</div>
<p class="step-line"></p>
<p class="step-circle">4</p>
<p class="step-txt">系统定时自动推送/任务下发</p>
<div>
<p class="step-circle">4</p>
<p class="step-txt">系统定时自动推送/任务下发</p>
</div>
</div>
</div>
</div>
<div class="container edit-container m-b-20">
<div class="edit-title flex p-r-20">
<p>SOP监测</p>
<div>
<GLButton :size="size" type="default" class="default-blue-btn" fn="创建SOP" @click="handleEdit('add')">创建SOP</GLButton>
<GLButton :size="size" type="default" class="default-blue-btn" fn="管理SOP" @click="handleJump('sopList')">管理全部SOP</GLButton>
</div>
<!-- <div>-->
<!-- <GLButton :size="size" type="default" class="default-blue-btn" fn="创建SOP" @click="handleEdit('add')">-->
<!-- 创建SOP-->
<!-- </GLButton>-->
<!-- <GLButton :size="size" type="default" class="default-blue-btn" fn="管理SOP" @click="handleJump('sopList')">管理全部SOP</GLButton>-->
<!-- </div>-->
</div>
<div class="sop-box" :style="{ 'padding-bottom': sopList.length ? '2px' : '12px', 'padding-right': sopList.length ? '0' : '20px' }">
<div class="sop-box"
:style="{ 'padding-bottom': sopList.length ? '2px' : '12px', 'padding-right': sopList.length ? '0' : '20px' }">
<div class="chart-box sop-flex" v-show="sopList.length">
<div class="chart-item" v-for="item in sopList" :key="item.id">
<span :class="item.sopType == 2 ? 'sop-type-orange':'sop-type-green'">
{{ item.sopType == 2 ? '群sop' : '客户sop' }}
</span>
<p class="sop-name">{{ item.sopName }}</p>
<div :id="'sopPie' + item.id" class="chart-pie"></div>
<p>{{ item.dateRange }}</p>
<div class="sop-btns">
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="分析SOP" @click="handleJump('sopAnalysisList', item)">SOP分析</GLButton>
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="编辑SOP" @click="handleEdit('edit', item)">编辑</GLButton>
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="结束SOP" @click="handleEnd(item)">结束</GLButton>
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="分析SOP"
@click="handleJump('sopAnalysisList', item)">SOP分析
</GLButton>
<GLButton class="btn-item" :size="size" type="primary" plain display="disabled" fn="编辑SOP"
@click="handleEdit('edit', item)">编辑
</GLButton>
<GLButton class="btn-item" :size="size" type="default" display="disabled" fn="结束SOP"
@click="handleEnd(item)">结束
</GLButton>
</div>
</div>
</div>
<div v-show="!sopList.length" class="txt-center" style="height: 400px;">
<img style="margin-top: 140px;" src="@/assets/empty.png" />
<img style="margin-top: 140px;" src="@/assets/empty.png"/>
<p class="m-t-10">暂无数据</p>
</div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts'
import * as moment from 'moment'
import SopNav from "views/sop/SopNav";
export default {
name: 'sopIndex',
components: {SopNav},
data() {
return {
activeName: 'first',
size: 'small',
// 环形图配置
pieOption: {
......@@ -104,10 +149,13 @@ export default {
},
methods: {
handleClick(tab) {
tab == 'second' ? this.handleJump('sopList') : ''
},
handleJump(path, row = {}) {
this.$router.push({
path: '/sop/' + path,
query: row ? { id: row.id, fromPage: '/marketing/sop/index' } : ''
query: row ? {id: row.id, fromPage: '/marketing/sop/index'} : ''
})
},
......@@ -153,15 +201,15 @@ export default {
this.sopList.forEach(item => {
item.completedPercent = Math.round((item.sopStatistics.finishEventCount / item.sopStatistics.eventCount) * 100).toFixed(0)
item.dateRange =
moment(item.startDate)
.format('YYYY-MM-DD')
.replace(/-/g, '.') +
(item.endDate
? '-' +
moment(item.endDate)
.format('YYYY-MM-DD')
.replace(/-/g, '.')
: '')
moment(item.startDate)
.format('YYYY-MM-DD')
.replace(/-/g, '.') +
(item.endDate
? '-' +
moment(item.endDate)
.format('YYYY-MM-DD')
.replace(/-/g, '.')
: '')
})
},
drawPie() {
......@@ -190,7 +238,7 @@ export default {
// 结束
handleEnd(row) {
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id })
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', {sopId: row.id})
},
// 1-新增;2-编辑
......@@ -210,36 +258,71 @@ export default {
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.sop-overview {
.overview-describe {
display: flex;
background: #E4E3FF;
color: #000000;
font-size: 14px;
padding: 10px;
margin: 16px 0;
img {
width: 14px;
height: 14px;
margin-right: 6px;
margin-top: 3px;
}
.describe-text {
line-height: 20px;
}
}
.sop-box {
padding: 32px 20px 12px;
.box-txt {
line-height: 24px;
margin-bottom: 28px;
}
.step-circle {
width: 32px;
height: 32px;
line-height: 32px;
text-align: center;
color: #5058ff;
background: rgba(80, 88, 255, 0.1);
border: 1px solid #5058ff;
//color: #5058ff;
//background: rgba(80, 88, 255, 0.1);
//border: 1px solid #5058ff;
color: #fff;
background: #5850FF;
border-radius: 32px;
margin-right: 8px;
margin: 0 auto;
flex: 0 0 auto;
}
.step-txt {
margin-top: 16px;
text-align: center;
width: 100%;
}
.step-line {
width: 120px;
width: 17%;
height: 1px;
background: #5850ff;
margin: 0 20px;
background: #F0F1F7;
margin: -25px 10px 0;
}
.sop-flex {
display: flex;
flex-wrap: wrap;
}
.chart-box {
.chart-item {
position: relative;
......@@ -252,13 +335,48 @@ export default {
border: 1px solid #eaeaea;
padding: 16px;
margin: 0 20px 20px 0;
.sop-type-orange {
position: absolute;
right: 0;
top: 0;
text-align: center;
padding: 0 8px;
line-height: 20px;
//width: 49px;
height: 20px;
font-size: 12px;
background: #FDEAE0;
color: #BE8C72;
border-radius: 1px 0 0 2px;
}
.sop-type-green {
position: absolute;
//width: 45px;
padding: 0 8px;
height: 17px;
right: 0;
top: 0;
text-align: center;
line-height: 20px;
width: 49px;
height: 20px;
font-size: 12px;
background: #DEF6E4;
color: #6FA17C;
border-radius: 1px 0 0 2px;
}
.chart-pie {
height: 104px;
margin: 8px 0;
}
.sop-name {
font-weight: 600;
}
.sop-btns {
display: none;
box-sizing: border-box;
......@@ -269,16 +387,19 @@ export default {
left: 0;
background: rgba(244, 244, 252, 0.85);
padding: 28px 0;
.btn-item {
display: block;
width: 89px;
margin: 0 auto;
}
.btn-item:nth-child(2) {
margin: 16px auto;
}
}
}
// .chart-item:nth-child(4n + 0) {
// margin-right: 0px;
// }
......@@ -287,6 +408,7 @@ export default {
}
}
}
.p-r-20 {
padding-right: 20px;
}
......
<template>
<div class="marketing">
<div class="container">
<div class="sop-title">SOP名称:</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] }}%</div>
</div>
</div>
</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;
}
}
}
}
</style>
......@@ -8,42 +8,73 @@
</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 flex-default">
<div class="analysis-box">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
客户总数
<img src="@/assets/sop/customer-total.png" />
<img src="@/assets/sop/sop01.png"/>
<div class="analysis-name"> 客户总数
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</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/sop02.png"/>
<div class="analysis-name"> 已执行客户数
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.executedTargetCount : '-' }}111</p></div>
</div>
</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 : '-' }}</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 +85,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 +127,10 @@ export default {
listName: 'list',
tableColumns: [
{
label: '群名称',
prop: 'groupName',
},
{
label: '客户名称',
prop: 'customerName',
formatter: cellValue => {
......@@ -130,14 +166,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 +201,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 +223,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 +303,7 @@ export default {
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.sop-analysis {
.title {
height: 32px;
......@@ -267,28 +311,40 @@ 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;
//display: flex;
//justify-content: space-between;
margin-left: 16px;
align-items: center;
height: 40px;
line-height: 40px;
font-size: 14px;
color: #666666;
.analysis-name{
margin-left: 16px;
color: #333333;
}
}
.chart-pie {
position: absolute;
top: 20px;
......@@ -296,17 +352,30 @@ export default {
width: 70px;
height: 74px;
}
.analysis-num {
font-size: 26px;
font-weight: 600;
}
}
.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"/>
<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;
......
<template>
<div>?????</div>
</template>
<script>
export default {
name: "viewEvent",
mounted() {
console.log(this.$router)
}
}
</script>
<style scoped>
</style>
<template>
<div class="marketing edit-box">
<div class="sop-base-info">
<div class="container m-b-20">
<p class="edit-title">{{ title }}</p>
<div class="base-info-list">
<div class="base-info-item">
<span>sop名称:</span>
<span>{{ editForm.sopName }}</span>
</div>
<div class="base-info-item">
<span>sop类型:</span>
<span>{{ editForm.sopType == '2' ? '群sop' : '客户sop' }}</span>
</div>
<div class="base-info-item">
<span>营销时间:</span>
<span>{{ editForm.startDate }}~{{ editForm.endDate }}</span>
</div>
<div class="base-info-item">
<span>更新人群:</span>
<span>{{ editForm.customerOptUpdate == '1' ? '从不更新' : '自动更新' }}</span>
</div>
<div class="base-info-item">
<span>营销对象:</span>
<span>{{
editForm.customerOptType == '1' ? '选择指定客户' : editForm.customerOptType == '2' ? '按人群选择客户' : editForm.customerOptType == '3' ? '按标签选择客户' : ''
}}</span>
<div class="base-info-obj">
<el-tag v-for="(item,index) in marketingObj" :key="index" class="customer-tag" :size="size"
type="info" :disable-transitions="false"
>
<span v-if="editForm.customerOptType == '1'">{{ item.customerName }}</span>
<span v-if="editForm.customerOptType == '2'">{{ item.crowdName }}</span>
<span v-if="editForm.customerOptType == '3'">{{ item.labelGroupName }}:{{ item.labelName }}</span>
</el-tag>
</div>
</div>
</div>
</div>
<!-- 营销事件设置-->
<div class="container edit-container" v-loading="marketingEventLoading">
<div class="edit-title flex" style="align-items: center">
<p>营销事件设置</p>
</div>
<div v-show="!editForm.eventList.length" class="event-empty">
<img class="empty-img" :src="url"/>
<p class="empty-txt">暂无营销事件</p>
</div>
<div v-show="editForm.eventList.length" class="event-box">
<div class="event-item" v-for="(item, index) in editForm.eventList" :key="index">
<div class="flex-default event-title">
<p class="m-r-20">{{ item.eventTime }}</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 1">每天重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 2">每周{{
item.repeatTime
}}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 3">每月{{
item.repeatTime
}}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y'">{{ item.eventEndDate }}</p>
<p class="m-r-20 txt-blue">
{{ baseData.channelTypeList.find(k => k.confId == item.pushChannelType).confName }}</p>
</div>
<div>
<div v-for="(obj,index) in backupContentJson(item.backupContent)" :key="index">
<div class="textHidden" :title="obj.attContent" v-if="obj.attType == 1"
v-html="tramWord(obj.attContent)"></div>
</div>
<div class="event-inline" v-for="(obj,index) in backupContentJson(item.backupContent)" :key="index">
<div>
<div v-if="obj.attType == 2">
<img class="model-item-img"
:src="obj.attContent" alt/>
</div>
<div v-if="obj.attType == 3">
<video class="model-item-img" :src="obj.attContent" controls="controls"/>
</div>
<div v-if="obj.attType == 6">
<div class="welcome-activity-panel">
<div class="welcome-activity-box">
<img src="@/assets/welcomeWord/material-icon.png" alt=""/>
<div class="welcome-activity-desc">
<div class="model-item-title">{{ backupContentJson(obj.attContent).fileName }}</div>
</div>
</div>
</div>
</div>
<div v-if="obj.attType == 7">
<div class="welcome-activity-panel">
<div class="welcome-activity-box">
<img src="@/assets/welcomeWord/activity-icon.png" alt=""/>
<div class="welcome-activity-desc">
<template v-if="marketingContentJSON(obj).selectType == 'card'">
<div class="model-item-title" :title="marketingContentJSON(obj).equityName">
{{ marketingContentJSON(obj).equityName }}
</div>
</template>
<template v-else-if="marketingContentJSON(obj).selectType == 'package'">
<div class="model-item-title" :title="marketingContentJSON(obj).packageName">
{{ marketingContentJSON(obj).packageName }}
</div>
</template>
<template v-else-if="marketingContentJSON(obj).selectType == 'coupon'">
<div class="model-item-title" :title="marketingContentJSON(obj).couponName">
{{ marketingContentJSON(obj).couponName }}
</div>
</template>
<template v-else-if="marketingContentJSON(obj).selectType == 'activity'">
<div class="model-item-title" :title="marketingContentJSON(obj).activityName">
{{ marketingContentJSON(obj).activityName }}
</div>
</template>
<template v-else>
<div class="model-item-title" :title="marketingContentJSON(obj.attContent).couponName">
{{ marketingContentJSON(obj).equityName }}
</div>
</template>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="event-btns">
<el-button type="primary" size="small" @click="handleViewEvent">查看</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
import emoji from '@/utils/emo'
export default {
name: 'baseInfo',
data() {
return {
size: 'small',
title: '基本信息',
url: url,
marketingEventLoading: false,
deleteIdList: [],
labelWidth: '144px',
imgIcon: {
1: 'material',
2: 'activity',
3: 'coupon',
4: 'nickname'
},
baseData: {
channelTypeList: [
{
confId: 1,
confName: '企业微信'
},
{
confId: 2,
confName: '短信'
},
{
confId: 3,
confName: '微信朋友圈'
}
]
},
currentCustomerIdx: -1,
editForm: {
sopName: '',
startDate: '',
endDate: '',
customerOptType: '',
customerInfoList: [],
customerOptUpdate: '1',
sopType: '1',
eventList: []
},
// 素材活动集合
marketingObj: []
}
},
async mounted() {
this.setMinHeight('.sop-base-info')
this.getInfo()
},
methods: {
handleViewEvent() {
console.log(this.editForm)
this.$router.push('/sop/viewEvent/' + this.editForm)
},
tramWord(val) {
let htm = val.replace(
/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/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:25px;height:25px' src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
}
)
return htm
},
backupContentJson(val) {
if (typeof (val) == 'string') {
return JSON.parse(val)
} else {
return val
}
},
marketingContentJSON(val) {
if (typeof (val.attContent) == 'string') {
return JSON.parse(val.attContent).marketingContent
} else {
return val.attContent.marketingContent
}
},
getInfo() {
this.$apis.sop.getSopInfoDetailApi({sopId: this.$route.query.id}).then(async res => {
this.editForm = res
this.marketingObj = res.customerOptType == '1' ? res.customerList : res.customerOptType == '2' ? res.crowdList : res.customerOptType == '3' ? res.labelList : ''
}
)
},
}
}
</script>
<style lang="scss">
.sop-base-info {
.customer-box {
width: 567px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
.customer-title {
box-sizing: border-box;
height: 39px;
line-height: 39px;
padding: 0 10px;
// border-bottom: 1px solid #dcdfe6;
}
.input-tag-wrapper {
max-height: 227px;
overflow: auto;
position: relative;
font-size: 14px;
padding: 0 10px 10px;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
display: flex;
align-items: center;
font-size: 14px;
.el-tag.el-tag--info .el-tag__close {
color: #909399 !important;
background: transparent !important;
}
.customer-tag {
margin: 4px;
}
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
.event-empty {
height: 234px;
text-align: center;
.empty-img {
margin: 80px 0 12px;
}
.empty-txt {
color: #000000;
font-size: 14px;
opacity: 0.65;
}
}
.event-box {
padding: 32px 20px;
.event-item {
position: relative;
padding: 16px;
background: #f7f7f7;
border: 1px solid rgba(220, 223, 230, 1);
margin-bottom: 20px;
.event-title {
height: 32px;
line-height: 32px;
margin-bottom: 12px;
}
.model-item-img {
width: 90px;
height: 78px;
margin-right: 5px;
}
.event-link {
margin-top: 12px;
display: flex;
align-items: center;
}
.event-content {
line-height: 24px;
}
.event-flex {
display: flex;
}
.event-btns {
position: absolute;
top: 16px;
right: 16px;
display: flex;
.newBtnSty {
margin-right: 8px;
}
}
}
.event-item:last-child {
margin-bottom: 0;
}
}
}
.welcome-activity-panel {
display: flex;
margin-right: 10px;
.welcome-activity-box {
cursor: pointer;
position: relative;
min-width: 180px;
//background: #fafbfe;
border-radius: 2px;
//border: 1px solid #e8e8ea;
//padding: 8px;
box-sizing: border-box;
display: flex;
&:hover {
.delete-solid {
opacity: 1;
}
}
.welcome-activity-icon {
width: 36px;
height: 36px;
margin-right: 8px;
position: relative;
background-size: 100% 100%;
img {
width: 100%;
height: 100%;
}
video {
object-fit: fill;
}
.el-icon-video-play {
position: absolute;
top: 7px;
left: 7px;
font-size: 22px;
color: rgba(255, 255, 255, 0.8);
}
.img-filter-box {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
display: flex;
font-size: 13px;
align-items: center;
justify-content: center;
}
}
.delete-solid {
transition: all 0.5s;
opacity: 0;
position: absolute;
top: 0px;
right: 0px;
width: 14px;
height: 14px;
background: rgba(0, 0, 0, 0.5);
display: flex;
font-size: 12px;
align-items: center;
justify-content: center;
}
.el-icon-delete-solid {
color: rgba(255, 255, 255, 0.5);
}
.model-item-title {
margin-left: 3px;
font-size: 14px;
color: #999999;
line-height: 20px;
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.model-item-content {
font-size: 12px;
font-weight: 400;
color: #999999;
line-height: 17px;
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
span {
color: #5850ff;
}
}
}
}
.textHidden {
max-width: 1000px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.event-inline {
margin-top: 8px;
display: inline-block
}
.base-info-list {
padding: 32px 84px;
display: grid;
grid-template-columns: repeat(2, 50%);
width: 100%;
.base-info-item {
padding-bottom: 16px;
color: #666666;
font-size: 14px;
.base-info-obj {
background: #F9F9F9;
margin: 10px 0 0 64px;
padding: 8px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!