Commit 5ab831eb by 徐忆琳

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

修复一轮测试bug

See merge request !8
2 parents e01da5c5 cf1ab1a7
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
{{ titleConfig[currentIndex] }} {{ titleConfig[currentIndex] }}
</div> </div>
<div class="journey-step-body"> <div class="journey-step-body">
<SelJourneyTemplate v-if="currentIndex == '0'" ref="journeyTemplat"></SelJourneyTemplate> <SelJourneyTemplate v-show="currentIndex == '0'" ref="journeyTemplat"></SelJourneyTemplate>
<div v-if="currentIndex == '1'"> <div v-if="currentIndex == '1'">
<!-- <div class="journey-step-info" v-for="(val, k) in configList" :key="k">--> <!-- <div class="journey-step-info" v-for="(val, k) in configList" :key="k">-->
<!-- configList--> <!-- configList-->
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<div class="empty-text">暂无进入条件</div> <div class="empty-text">暂无进入条件</div>
</div> </div>
</template> </template>
<template v-if="stepItem.sopList.length"> <template v-if="stepItem.sopList.length">
<div class="task-item-sop flex"> <div class="task-item-sop flex">
<div class="task-sop-l"> <div class="task-sop-l">
...@@ -128,6 +129,12 @@ ...@@ -128,6 +129,12 @@
</div> </div>
</div> </div>
</template> </template>
<template v-if="stepItem.sopList.length == 0">
<div class="empty-sop">
<img src="@/assets/config/empty-sop.png"/>
<div class="empty-text">暂无sop任务</div>
</div>
</template>
</div> </div>
</div> </div>
<!-- <emp-detail v-if="empVisible" :empVisible="empVisible"></emp-detail> --> <!-- <emp-detail v-if="empVisible" :empVisible="empVisible"></emp-detail> -->
...@@ -144,7 +151,7 @@ const STAGE = { ...@@ -144,7 +151,7 @@ const STAGE = {
1: '发送短信', 1: '发送短信',
2: 'AI外呼', 2: 'AI外呼',
5: '跟进提醒', 5: '跟进提醒',
6: '查询到保' 6: '客户信息查询'
} }
const DES = { const DES = {
4: '本功能将给跟进员工推送微信1v1任务,由员工向每个客户微信转发对应的营销内容。', 4: '本功能将给跟进员工推送微信1v1任务,由员工向每个客户微信转发对应的营销内容。',
...@@ -162,6 +169,7 @@ const STAGE_TIME = Object.freeze({ ...@@ -162,6 +169,7 @@ const STAGE_TIME = Object.freeze({
5: '09:00', 5: '09:00',
6: '09:00' 6: '09:00'
}) })
const STAGE_PREFIX = Object.freeze({ const STAGE_PREFIX = Object.freeze({
4: { 4: {
key: 'activityName' key: 'activityName'
...@@ -209,7 +217,7 @@ export default { ...@@ -209,7 +217,7 @@ export default {
handler(newValue, oldValue) { handler(newValue, oldValue) {
let sopList = Array.from(newValue, item => let sopList = Array.from(newValue, item =>
Array.from(item.sopList, sub => Array.from(item.sopList, sub =>
Array.from(sub, subItem => ({nodeId: subItem.nodeId, nodeSkip: subItem.nodeSkipable})) Array.from(sub, subItem => ({nodeId: subItem.nodeId, nodeSkip: subItem.nodeSkip}))
) )
) )
; ;
......
...@@ -108,9 +108,11 @@ ...@@ -108,9 +108,11 @@
<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" v-if="t.nodeSkip == '0'"> <div class="flex-column-center" v-if="t.nodeSkip == '0'">
<span> 9:00 </span> <span> 9:00 </span>
<div :class="['stage-icon', `stage-${t.taskType}`]"></div> <div :class="['stage-icon', `stage-${value.taskType.defaultValue}`]"></div>
</div>
<div class="stage-desc">
{{ stage[value.taskType.defaultValue] }}
</div> </div>
<div class="stage-desc">{{ stage[t.taskType] }}</div>
</div> </div>
<div slot="reference" class="flex-column-center" v-if="v.length <= 2 && value.nodeSkip =='0'"> <div slot="reference" class="flex-column-center" v-if="v.length <= 2 && value.nodeSkip =='0'">
...@@ -128,6 +130,12 @@ ...@@ -128,6 +130,12 @@
</div> </div>
</div> </div>
</template> </template>
<div v-if="stepItem.sopList.length == 0">
<div class="empty-sop">
<img src="@/assets/config/empty-sop.png"/>
<div class="empty-text">暂无sop任务</div>
</div>
</div>
</div> </div>
</div> </div>
...@@ -145,7 +153,7 @@ const STAGE = { ...@@ -145,7 +153,7 @@ const STAGE = {
1: '发送短信', 1: '发送短信',
2: 'AI外呼', 2: 'AI外呼',
5: '跟进提醒', 5: '跟进提醒',
6: '查询到保' 6: '客户信息查询'
} }
const DES = { const DES = {
4: '本功能将给跟进员工推送微信1v1任务,由员工向每个客户微信转发对应的营销内容。', 4: '本功能将给跟进员工推送微信1v1任务,由员工向每个客户微信转发对应的营销内容。',
...@@ -570,6 +578,16 @@ export default { ...@@ -570,6 +578,16 @@ export default {
.el-switch .el-switch__label { .el-switch .el-switch__label {
width: 70px; width: 70px;
} }
.empty-sop{
background: #F9FAFE;
text-align: center;
padding: 16px 0;
margin-bottom: 10px;
.empty-text{
color: #666666;
font-size: 12px;
}
}
.empty-task{ .empty-task{
background: #FFFFFF; background: #FFFFFF;
......
...@@ -69,12 +69,14 @@ export default { ...@@ -69,12 +69,14 @@ export default {
sopTplGrants:this.sopTplGrants, sopTplGrants:this.sopTplGrants,
nodes:this.nodes nodes:this.nodes
} }
console.log(params)
if (this.isNext){ if (this.isNext){
this.$apis.journeyConfig.sopInstsApi(params).then(res=>{ this.$apis.journeyConfig.sopInstsApi(params).then(res=>{
if (res.code == 200 ){ if (res && res.code == 200 ){
console.log(res)
this.$message.success('创建模板实例成功') this.$message.success('创建模板实例成功')
this.$router.back() this.$router.back()
}else{
this.$message.error(res.message)
} }
}).catch(err => { }).catch(err => {
console.log(err + 'err') console.log(err + 'err')
......
...@@ -25,7 +25,7 @@ const tableConfig = { ...@@ -25,7 +25,7 @@ const tableConfig = {
label: '门店名称', label: '门店名称',
prop: 'sopTplGrant', prop: 'sopTplGrant',
formatter: cellValue => { formatter: cellValue => {
return cellValue.sopTplGrant.groupName return cellValue.sopTplGrant && cellValue.sopTplGrant.groupName
} }
}, },
{ {
......
...@@ -121,7 +121,13 @@ export default { ...@@ -121,7 +121,13 @@ 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,customData}) list.push({
...JSON.parse(v.nodeParam),
nodeSkip: v.nodeSkip,
nodeVisible: v.nodeVisible,
nodeId: v.nodeId,
customData
})
} }
} }
list = list.filter(item => item.day) list = list.filter(item => item.day)
...@@ -129,9 +135,11 @@ export default { ...@@ -129,9 +135,11 @@ export default {
return a.day - b.day return a.day - b.day
}) })
let sopList = this.groupBy(list, 'day') let sopList = this.groupBy(list, 'day')
sopList = sopList.map(function(arr) { sopList = sopList.map(function (arr) {
return arr.filter(function(obj) { return arr.filter(function (obj) {
return obj.nodeSkipable == 0; // nodeVisible 0 节点不可见 1 可见
// nodeSkip 0 节点不跳过 1 节点跳过
return obj.nodeSkip == 0 && obj.nodeVisible == 1;
}); });
}); });
configList.push({ configList.push({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!