Commit 13f0f422 by 徐忆琳

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

更新客户旅程代码

See merge request !6
2 parents c4fc42ef 9574816b
...@@ -155,16 +155,16 @@ export default { ...@@ -155,16 +155,16 @@ export default {
}, },
getDetail(val) { getDetail(val) {
this.$apis.journeyConfig.getSOPDetailsApi({tplId: val}).then(res => { this.$apis.journeyConfig.getSOPDetailsApi({tplId: val}).then(res => {
const tplParamDef = JSON.parse(res.tplParamDef)
const stages = JSON.parse(res.tplParamDef).stages.defaultValue const stages = tplParamDef.stages.defaultValue
const customData = tplParamDef.customData.defaultValue
const nodes = res.nodes const nodes = res.nodes
const configList = [] const configList = []
for (let k in stages) { for (let k in stages) {
let list = [] let list = []
for (let v of nodes) { for (let v of nodes) {
console.log(JSON.parse(v.nodeParamDef))
if (v.nodeParamDef && JSON.parse(v.nodeParamDef).stage.defaultValue == stages[k].value) { 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.push({...JSON.parse(v.nodeParamDef),nodeSkipable: v.nodeSkipable,nodeId:v.nodeId,customData})
} }
} }
list = list.filter(item => item.day) list = list.filter(item => item.day)
......
...@@ -78,9 +78,8 @@ ...@@ -78,9 +78,8 @@
> >
</el-switch> </el-switch>
</div> </div>
<!-- <div class="step-item-name">活动名称</div>-->
<!-- {{ value.textContent.defaultValue }}--> <div class="step-item-name" v-if="value.taskType">{{ value.customData[stage_prefix[value.taskType].key]}}</div>
<div class="step-item-name" >{{ stage_prefix[value.taskType] }}</div>
</div> </div>
<!-- <div class="step-detail-btn" @click="getEmpDetail">详情</div> --> <!-- <div class="step-detail-btn" @click="getEmpDetail">详情</div> -->
</div> </div>
...@@ -103,14 +102,14 @@ ...@@ -103,14 +102,14 @@
<el-popover placement="top-start" width="100" trigger="click"> <el-popover placement="top-start" width="100" trigger="click">
<div class="popover-panel" v-for="(t, pkey) in v" :key="pkey"> <div class="popover-panel" v-for="(t, pkey) in v" :key="pkey">
<div class="flex-column-center"> <div class="flex-column-center">
<span> 9:00 </span> <span>{{ stage_time[t.taskType] }} </span>
<div :class="['stage-icon', `stage-${t.taskType}`]"></div> <div :class="['stage-icon', `stage-${t.taskType}`]"></div>
</div> </div>
<div class="stage-desc">{{ stage[t.taskType] }}</div> <div class="stage-desc">{{ stage[t.taskType] }}</div>
</div> </div>
<div slot="reference" class="flex-column-center" v-if="v.length <= 2"> <div slot="reference" class="flex-column-center" v-if="v.length <= 2">
<span>9:00 </span> <span>{{ stage_time[value.taskType] }}</span>
<div :class="['stage-icon', `stage-${value.taskType}`]"></div> <div :class="['stage-icon', `stage-${value.taskType}`]"></div>
</div> </div>
<div slot="reference" class="flex-column-center" v-if="v.length > 2 && key == 0"> <div slot="reference" class="flex-column-center" v-if="v.length > 2 && key == 0">
...@@ -159,11 +158,24 @@ const STAGE_TIME = Object.freeze({ ...@@ -159,11 +158,24 @@ const STAGE_TIME = Object.freeze({
6: '09:00' 6: '09:00'
}) })
const STAGE_PREFIX = Object.freeze({ const STAGE_PREFIX = Object.freeze({
4: '', 4: {
3: '', key: 'activityName'
1: '短信模版:', },
2: 'AI话术模版:', 3: {
5: '提醒模版:', key: 'activityName'
},
1: {
key: 'textMessage',
label: '短信模版:'
},
2: {
key: 'aiSpeech',
label: 'AI话术模版:'
},
5: {
key: '',
label: '提醒模版:'
},
6: '查询内容:' 6: '查询内容:'
}) })
// import empDetail from './empDetail' // import empDetail from './empDetail'
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
> >
</el-switch> </el-switch>
</div> </div>
<div class="step-item-name" v-if="value.taskType.defaultValue">{{ stage_prefix[value.taskType.defaultValue] }}</div> <div class="step-item-name" v-if="value.taskType.defaultValue">{{ value.customData[stage_prefix[value.taskType.defaultValue].key]}}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -149,11 +149,24 @@ const DES = { ...@@ -149,11 +149,24 @@ const DES = {
6: '本功能配合第三方平台,定时获取客户信息并更新。' 6: '本功能配合第三方平台,定时获取客户信息并更新。'
} }
const STAGE_PREFIX = Object.freeze({ const STAGE_PREFIX = Object.freeze({
4: '', 4: {
3: '', key: 'activityName'
1: '短信模版:', },
2: 'AI话术模版:', 3: {
5: '提醒模版:', key: 'activityName'
},
1: {
key: 'textMessage',
label: '短信模版:'
},
2: {
key: 'aiSpeech',
label: 'AI话术模版:'
},
5: {
key: '',
label: '提醒模版:'
},
6: '查询内容:' 6: '查询内容:'
}) })
// import empDetail from './empDetail' // import empDetail from './empDetail'
......
...@@ -111,7 +111,9 @@ export default { ...@@ -111,7 +111,9 @@ export default {
methods: { methods: {
getDetail(val) { getDetail(val) {
this.$apis.journeyConfig.getInsDetailsApi({instId: val}).then(res => { this.$apis.journeyConfig.getInsDetailsApi({instId: val}).then(res => {
const stages = JSON.parse(res.instParam).stages const instParam = JSON.parse(res.instParam)
const stages = instParam.stages
const customData = instParam.customData
// .defaultValue // .defaultValue
const nodes = res.nodes const nodes = res.nodes
const configList = [] const configList = []
...@@ -119,7 +121,7 @@ export default { ...@@ -119,7 +121,7 @@ export default {
let list = [] let list = []
for (let v of nodes) { for (let v of nodes) {
if (v.nodeParam && JSON.parse(v.nodeParam).stage == stages[k].value) { if (v.nodeParam && JSON.parse(v.nodeParam).stage == stages[k].value) {
list.push({...JSON.parse(v.nodeParam), nodeSkipable: v.nodeSkip, nodeId: v.nodeId}) list.push({...JSON.parse(v.nodeParam), nodeSkipable: v.nodeSkip, nodeId: v.nodeId,customData})
} }
} }
list = list.filter(item => item.day) list = list.filter(item => item.day)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!