Commit c4fc42ef by 徐忆琳

Merge branch 'v3.19.0_10' into 'v3.19.0'

更新客户旅程代码

See merge request !5
2 parents e7ea2c2e a00b84e2
......@@ -12,7 +12,7 @@
<div v-if="currentIndex == '1'">
<!-- <div class="journey-step-info" v-for="(val, k) in configList" :key="k">-->
<!-- configList-->
<collapse-item ref="collapseRef" :configList="configList" :isDisabled="isDisabled"></collapse-item>
<collapse-item-tpl ref="collapseRef" :configList="configList" :isDisabled="isDisabled"></collapse-item-tpl>
<!-- </div>-->
</div>
<DistributionStore v-if="currentIndex == '2'"></DistributionStore>
......@@ -27,7 +27,7 @@
<script>
import StepBar from './components/StepBar.vue'
import CollapseItem from './components/CollapseItem'
import CollapseItemTpl from './components/CollapseItemTpl'
import SelJourneyTemplate from "./components/selJourneyTemplate";
import DistributionStore from "./components/DistributionStore";
......@@ -35,7 +35,7 @@ export default {
components: {
StepBar,
SelJourneyTemplate,
CollapseItem,
CollapseItemTpl,
DistributionStore
},
name: "add",
......@@ -162,15 +162,16 @@ export default {
for (let k in stages) {
let list = []
for (let v of nodes) {
if (v.nodeParamDef && JSON.parse(v.nodeParamDef).stage == stages[k].value) {
console.log(JSON.parse(v.nodeParamDef))
if (v.nodeParamDef && JSON.parse(v.nodeParamDef).stage.defaultValue == stages[k].value) {
list.push({...JSON.parse(v.nodeParamDef),nodeSkipable: v.nodeSkipable,nodeId:v.nodeId})
}
}
list = list.filter(item => item.day)
list.sort((a, b) => {
return a.day - b.day
return a.day.defaultValue - b.day.defaultValue
})
const sopList = this.groupBy(list, 'day')
const sopList = this.groupBy(list, 'day.defaultValue')
configList.push({
label: stages[k].value,
isExpaned: false,
......
......@@ -9,8 +9,8 @@
<template>
<div class="border-content">
<div class="journey-step-info" v-for="(stepItem, k) in configList" :key="k">
<!-- v-if="stepItem.sopList.flat(Initify).length>0"-->
<div >
<!-- v-if="stepItem.sopList.flat(Initify).length>0"-->
<div>
<div :class="{ 'collapse-item': true, 'is-active': stepItem.isExpaned }">
<div class="collapse-item-tab flex-column-center pl20">
<i class="el-icon-caret-bottom" v-show="stepItem.isExpaned" @click="handleExpand(stepItem)"></i>
......@@ -62,7 +62,7 @@
<div v-for="(value, key) in v" :key="key" class="step-time-item flex-column-center">
<div style="width: 100%">
<div class="step-item-desc">
<span>[ 9:00 ]发送 | {{ stage[value.taskType] }} |{{
<span>[{{ stage_time[value.taskType] }}]发送 | {{ stage[value.taskType] }} |{{
des[value.taskType]
}}</span>
<el-switch
......@@ -78,7 +78,9 @@
>
</el-switch>
</div>
<div class="step-item-name">活动名称</div>
<!-- <div class="step-item-name">活动名称</div>-->
<!-- {{ value.textContent.defaultValue }}-->
<div class="step-item-name" >{{ stage_prefix[value.taskType] }}</div>
</div>
<!-- <div class="step-detail-btn" @click="getEmpDetail">详情</div> -->
</div>
......@@ -112,7 +114,7 @@
<div :class="['stage-icon', `stage-${value.taskType}`]"></div>
</div>
<div slot="reference" class="flex-column-center" v-if="v.length > 2 && key == 0">
<span>{{v.length}}个任务</span>
<span>{{ v.length }}个任务</span>
</div>
</el-popover>
</div>
......@@ -148,6 +150,22 @@ const DES = {
5: '本功能将给跟进员工推送跟进提醒,提醒员工给客户打一个电话或其他跟进行为。',
6: '本功能配合第三方平台,定时获取客户信息并更新。'
}
const STAGE_TIME = Object.freeze({
4: '09:00',
3: '09:00',
1: '09:00',
2: '16:00',
5: '09:00',
6: '09:00'
})
const STAGE_PREFIX = Object.freeze({
4: '',
3: '',
1: '短信模版:',
2: 'AI话术模版:',
5: '提醒模版:',
6: '查询内容:'
})
// import empDetail from './empDetail'
export default {
components: {
......@@ -190,6 +208,8 @@ export default {
return {
stage: STAGE,
des: DES,
stage_time: STAGE_TIME,
stage_prefix: STAGE_PREFIX,
empVisible: false,
nodes: null,
sopList: [],
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-23 15:28:49
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="border-content">
<div class="journey-step-info" v-for="(stepItem, k) in configList" :key="k">
<!-- v-if="stepItem.sopList.flat(Initify).length>0"-->
<div >
<div :class="{ 'collapse-item': true, 'is-active': stepItem.isExpaned }">
<div class="collapse-item-tab flex-column-center pl20">
<i class="el-icon-caret-bottom" v-show="stepItem.isExpaned" @click="handleExpand(stepItem)"></i>
<i class="el-icon-caret-right" v-show="!stepItem.isExpaned" @click="handleExpand(stepItem)"></i>
<div class="tab-label">
{{ stepItem.label }}
</div>
<div v-if="!isDisabled" class="count-num">已启用数量/全部sop数量:{{
computedSopSet[k].flat(Inifity).filter(item => item.nodeSkip !== "1").length
}}/{{ stepItem.sopList.flat(Inifity).length }}
</div>
</div>
<div class="collapse-item-panel" :style="{ display: stepItem.isExpaned ? 'block' : 'none' }">
<div class="task-item">
<template v-if="stepItem.conditionsList.length">
<div class="task-item-head flex-column-center">
<div class="task-item-icon">
<img src="@/assets/config/log.png"/>
</div>
<div class="task-item-name">进入条件</div>
<div class="task-item-desc">(描述用户触发何种条件后,将自动变更为该旅程阶段)</div>
</div>
<div class="progress-item-content bg-fff">
<div class="progress-item" v-for="(v, k) in stepItem.conditionsList" :key="k">
<span>条件{{ k + 1 }}</span>
<span>{{ v.split("-")[0] }}</span>
<img src="@/assets/config/arrow.png"/>
<span>{{ v.split("-")[1] }}</span>
</div>
</div>
</template>
<template v-if="stepItem.sopList.length">
<div class="task-item-sop flex">
<div class="task-sop-l">
<div class="task-item-head flex-column-center">
<div class="task-item-icon">
<img src="@/assets/config/sop.png"/>
</div>
<div class="task-item-name">SOP任务</div>
<div class="task-item-desc">(系统面向当前旅程阶段客户的营销计划)</div>
</div>
<div class="task-item-content bg-fff">
<div class="step-item" v-for="(v, k) in stepItem.sopList" :key="k">
<div class="step-item-day" v-if="v.length > 0">
<img src="@/assets/config/step-border.png"/>
<span v-if="v[0].day">第{{ v[0].day.defaultValue }}天</span>
</div>
<div class="step-item-content">
<div v-for="(value, key) in v" :key="key" class="step-time-item flex-column-center">
<div style="width: 100%">
<div class="step-item-desc" v-if="value.taskType">
{{value.defaultValue}}
<span>[ 9:00 ]发送 | {{ stage[value.taskType.defaultValue] }} |{{
des[value.taskType.defaultValue]
}}</span>
<el-switch
v-model="value.nodeSkipable"
active-color="#5850FF"
inactive-color="#c6c6c6"
active-text="开"
inactive-text="关"
active-value="0"
inactive-value="1"
:disabled="isDisabled"
v-if="!isDisabled"
>
</el-switch>
</div>
<div class="step-item-name" v-if="value.taskType.defaultValue">{{ stage_prefix[value.taskType.defaultValue] }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="task-sop-calendar">
<div class="task-item-head flex-column-center">
<div class="task-item-icon">
<img src="@/assets/config/calendar.png"/>
</div>
<div class="task-item-name">SOP日历</div>
</div>
<div class="task-item-content bg-fff">
<div class="calendar-panel">
<div class="calendar-item" v-for="(v, k) in stepItem.sopList" :key="k">
<div class="calendar-day">第{{ k + 1 }}天</div>
<div class="calendar-time flex-column-center" v-for="(value, key) in v" :key="key">
<el-popover placement="top-start" width="100" trigger="click">
<div class="popover-panel" v-for="(t, pkey) in v" :key="pkey">
<div class="flex-column-center">
<span> 9:00 </span>
<div :class="['stage-icon', `stage-${t.taskType}`]"></div>
</div>
<div class="stage-desc">{{ stage[t.taskType] }}</div>
</div>
<div slot="reference" class="flex-column-center" v-if="v.length <= 2">
<span>9:00 </span>
<div :class="['stage-icon', `stage-${value.taskType}`]"></div>
</div>
<div slot="reference" class="flex-column-center" v-if="v.length > 2 && key == 0">
<span>{{v.length}}个任务</span>
</div>
</el-popover>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</div>
</div>
<!-- <emp-detail v-if="empVisible" :empVisible="empVisible"></emp-detail> -->
</div>
</div>
</div>
</div>
</template>
<script>
const STAGE = {
4: '门店助手1v1',
3: '门店助手朋友圈',
1: '发送短信',
2: 'AI外呼',
5: '跟进提醒',
6: '查询到保'
}
const DES = {
4: '本功能将给跟进员工推送微信1v1任务,由员工向每个客户微信转发对应的营销内容。',
3: '本功能将给跟进员工推送微信朋友圈任务,由员工一键将营销内容发布微信朋友圈。',
1: '本功能将给跟进员工推送短信营销任务,由员工一键确认后系统自动推送营销短信给客户。',
2: '本功能将给跟进员工推送AI外呼任务,由员工一键确认后AI外呼平台自动对客户进行外呼。',
5: '本功能将给跟进员工推送跟进提醒,提醒员工给客户打一个电话或其他跟进行为。',
6: '本功能配合第三方平台,定时获取客户信息并更新。'
}
const STAGE_PREFIX = Object.freeze({
4: '',
3: '',
1: '短信模版:',
2: 'AI话术模版:',
5: '提醒模版:',
6: '查询内容:'
})
// import empDetail from './empDetail'
export default {
components: {
// empDetail
},
props: {
// stepItem: {
// type: Object,
// default: () => {
// }
// }
configList: {
type: Array,
default: () => []
},
isDisabled: {
type: Boolean,
default: () => false
}
},
watch: {
configList: {
handler(newValue, oldValue) {
let sopList = Array.from(newValue, item =>
Array.from(item.sopList, sub =>
Array.from(sub, subItem => ({nodeId: subItem.nodeId, nodeSkip: subItem.nodeSkipable}))
)
)
;
this.computedSopSet = JSON.parse(JSON.stringify(sopList))
sopList = sopList.flat(Infinity)
this.$bus.$emit('sopListSet', {sopList})
},
deep: true,
immediate: true
}
},
data() {
return {
stage: STAGE,
des: DES,
stage_prefix: STAGE_PREFIX,
empVisible: false,
nodes: null,
sopList: [],
computedSopSet: []
}
},
created() {
},
methods: {
//查看详情
getEmpDetail() {
this.empVisible = true
},
//展开收起
handleExpand(stepItem) {
stepItem.isExpaned = !stepItem.isExpaned
},
changeNode() {
this.$emit('changeNode', this.nodes)
}
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
.border-content {
margin: 20px;
border-top: 1px solid #e5e5e5;
border-left: 1px solid #e5e5e5;
border-right: 1px solid #e5e5e5;
}
.collapse-item {
overflow: hidden;
height: 51px;
&.is-active {
height: auto;
}
.collapse-item-tab {
height: 50px;
border-bottom: 1px solid #e5e5e5;
padding-left: 16px;
i {
cursor: pointer;
margin-right: 2px;
}
.tab-label {
font-weight: 600;
font-size: 14px;
color: #1d2129;
}
}
.count-num {
position: absolute;
float: right;
right: 80px;
color: #666666;
font-size: 12px;
}
.collapse-item-panel {
background: #f7f7fc;
padding: 16px;
transition: all 0.3s;
.task-item {
&-head {
.task-item-icon {
img {
width: 20px;
height: 20px;
}
}
.task-item-name {
color: #333333;
font-size: 14px;
margin-left: 10px;
}
.task-item-desc {
color: #999999;
font-size: 12px;
}
}
.task-sop-l {
flex: 1;
}
.task-sop-calendar {
width: 296px;
margin-left: 16px;
}
}
.progress-item-content {
padding: 16px;
margin: 10px 0px;
display: grid;
grid-template-columns: 50% 50%;
row-gap: 20px;
.progress-item {
position: relative;
padding-left: 20px;
min-width: 50%;
display: flex;
align-items: center;
img {
width: 32px;
height: 4px;
margin: 0 10px;
}
span {
&:first-child {
margin-right: 40px;
}
}
&::before {
content: '';
position: absolute;
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 50%;
left: 0px;
top: 5px;
}
}
}
.task-item-content {
padding: 16px;
margin-top: 10px;
height: calc(100% - 70px);
.step-item-day {
position: relative;
img {
width: 216px;
height: 52px;
}
span {
position: absolute;
top: 18px;
left: 52px;
}
}
.step-item {
.step-time-item {
padding: 12px 16px;
background: #f9fafe;
.step-detail-btn {
margin-left: auto;
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
&:not(:first-child) {
margin-top: 20px;
}
}
&:last-child {
.step-item-content {
border: none;
}
}
}
.step-item-content {
padding: 16px 22px 20px;
border-left: 1px dashed #b8b9ff;
margin: -10px 0px -10px 20px;
}
.step-item-desc {
font-size: 14px;
color: #c6c6c6;
}
.step-item-name {
font-size: 14px;
color: #333333;
margin-top: 8px;
}
.calendar-panel {
display: grid;
grid-template-columns: repeat(4, 25%);
row-gap: 12px;
.calendar-item {
.calendar-day {
font-size: 12px;
color: #c6c6c6;
}
.calendar-time {
line-height: 20px;
/deep/ {
.el-popover__reference-wrapper {
display: flex;
align-items: center;
.el-popover__reference {
height: 32px;
line-height: 32px;
}
&:hover {
span {
color: #5850ff;
}
.stage-1 {
background: url('../../../assets/config/calendar-icon.png') -114px -62px;
}
.stage-2 {
background: url('../../../assets/config/calendar-icon.png') -10px -10px;
}
.stage-3 {
background: url('../../../assets/config/calendar-icon.png') -62px -10px;
}
.stage-4 {
background: url('../../../assets/config/calendar-icon.png') -62px -166px;
}
.stage-5 {
background: url('../../../assets/config/calendar-icon.png') -10px -114px;
}
.stage-6 {
background: url('../../../assets/config/calendar-icon.png') -62px -114px;
}
.stage-7 {
background: url('../../../assets/config/calendar-icon.png') -114px -114px;
}
}
}
}
span {
font-size: 14px;
color: #666666;
text-decoration: underline;
cursor: pointer;
}
}
}
}
}
}
}
.stage-desc {
font-size: 12px;
color: #333333;
}
.stage-icon {
width: 32px;
height: 32px;
transform: scale(0.5);
}
.stage-2 {
background: url('../../../assets/config/calendar-icon.png') -62px -62px;
}
.stage-3 {
background: url('../../../assets/config/calendar-icon.png') -114px -10px;
}
.stage-1 {
background: url('../../../assets/config/calendar-icon.png') -10px -62px;
}
.stage-4 {
background: url('../../../assets/config/calendar-icon.png') -166px -10px;
}
.stage-5 {
background: url('../../../assets/config/calendar-icon.png') -166px -62px;
}
.stage-6 {
background: url('../../../assets/config/calendar-icon.png') -166px -114px;
}
.stage-7 {
background: url('../../../assets/config/calendar-icon.png') -10px -166px;
}
::v-deep .el-switch {
float: right;
right: 10px;
}
::v-deep .el-switch__core {
width: 50px !important;
}
::v-deep .el-switch__label {
position: absolute;
display: none;
color: #fff;
}
/*打开时文字位置设置*/
::v-deep .el-switch__label--right {
z-index: 1;
right: 25px;
}
/*关闭时文字位置设置*/
::v-deep .el-switch__label--left {
z-index: 1;
left: 25px;
}
/*显示文字*/
::v-deep .el-switch__label.is-active {
display: block;
}
::v-deep .el-switch .el-switch__core,
.el-switch .el-switch__label {
width: 70px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!