Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-training-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-training-new
Commits
fa88e691
提交
fa88e691
authored
4月 29, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码提交
上级
074faf10
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
107 行增加
和
89 行删除
+107
-89
MailStepOne.vue
src/modules/market-tools/components/mail/MailStepOne.vue
+17
-28
MailStepTwo.vue
src/modules/market-tools/components/mail/MailStepTwo.vue
+6
-44
Mail.vue
src/modules/market-tools/views/Mail.vue
+84
-17
没有找到文件。
src/modules/market-tools/components/mail/MailStepOne.vue
浏览文件 @
fa88e691
...
...
@@ -7,7 +7,7 @@
<
script
>
import
CardList
from
'@/components/base/CardList.vue'
// import stepONeStep from '@/utils/stepOne'
import
{
cacheReport
}
from
'../../api'
//
import { cacheReport } from '../../api'
export
default
{
components
:
{
CardList
...
...
@@ -22,36 +22,25 @@ export default {
}
},
data
()
{
return
{
cardList
:
[],
caseId
:
''
}
return
{}
},
methods
:
{
// 下一步
// handleNext() {
// let flag = false
// this.cardList.forEach(item =>
// item.form.personAttribute.forEach(it => {
// console.log(it, '0000')
// if (it.equal === '' || it.personal === '' || it.range === '') {
// flag = true
// return false
// }
// })
// )
// if (flag) {
// this.$message.warning('请完善改步骤后才能进入下一步')
// return false
// } else {
// console.log(this.$store.state.case.id, '0000')
// const reports = { activeStep: 0, type: 2, commit_report: this.stepOneList }
// cacheReport(this.$store.state.case.id, { reports: JSON.stringify(reports) }).then(res => {
// this.caseId = res.data.id
// this.$parent.$parent.handleNext()
// })
// }
// }
handleStepOne
()
{
let
flag
=
true
this
.
stepOneList
.
forEach
(
item
=>
item
.
form
.
personAttribute
.
forEach
(
it
=>
{
console
.
log
(
it
,
'333'
)
if
(
it
.
equal
===
''
||
it
.
personal
===
''
||
it
.
range
===
''
)
{
flag
=
false
}
})
)
if
(
!
flag
)
{
this
.
$message
.
warning
(
'请完善改步骤后才能进入下一步'
)
}
return
flag
}
}
}
</
script
>
...
...
src/modules/market-tools/components/mail/MailStepTwo.vue
浏览文件 @
fa88e691
...
...
@@ -28,7 +28,6 @@
<
script
>
import
StepTab
from
'@/components/base/StepTab.vue'
import
StepTodoList
from
'./StepTodoList.vue'
import
{
cacheReport
}
from
'../../api'
export
default
{
components
:
{
StepTab
,
StepTodoList
},
props
:
{
...
...
@@ -58,38 +57,12 @@ export default {
tabName
:
'条件触发'
}
]
// 条件触发列表
// form: {
// triggerList: [
// {
// triggerValue: '',
// list: [
// { value: '0', label: '启动APP' },
// { value: '1', label: '用户登录' },
// { value: '2', label: '购买基金商品' },
// { value: '3', label: '购买理财产品' },
// { value: '4', label: '购买保险产品' },
// { value: '5', label: '浏览基金产品' },
// { value: '6', label: '浏览理财产品' },
// { value: '7', label: '浏览保险产品' },
// { value: '8', label: '关闭APP' }
// ]
// }
// ]
// }
}
},
mounted
()
{
console
.
log
(
this
.
time
,
'time'
)
this
.
times
=
this
.
time
console
.
log
(
this
.
stepTwoList
,
'9999'
)
// console.log(JSON.parse(window.localStorage.getItem('triggerList')), '123')
// if (JSON.parse(window.localStorage.getItem('triggerList'))) {
// this.form.triggerList = JSON.parse(window.localStorage.getItem('triggerList'))
// }
// if (window.localStorage.getItem('time')) {
// this.time = window.localStorage.getItem('time')
// }
},
methods
:
{
...
...
@@ -99,29 +72,18 @@ export default {
handlePrev
()
{
this
.
$parent
.
$parent
.
handlePrev
()
},
handle
Next
()
{
let
flag
=
false
console
.
log
(
this
.
stepTwoList
,
'990000'
)
handle
StepTwo
()
{
this
.
$emit
(
'getTime'
,
this
.
times
)
let
flag
=
true
this
.
stepTwoList
[
0
].
form
.
triggerList
.
forEach
(
item
=>
{
if
(
item
.
triggerValue
===
''
||
this
.
times
===
''
)
{
flag
=
true
return
false
flag
=
false
}
})
if
(
flag
)
{
if
(
!
flag
)
{
this
.
$message
.
warning
(
'请完善改步骤后才能进入下一步'
)
return
false
}
else
{
const
reports
=
{
activeStep
:
1
,
type
:
2
,
commit_report
:
[{
form
:
this
.
stepTwoList
},
{
time
:
this
.
times
}]
}
cacheReport
(
this
.
$store
.
state
.
case
.
id
,
{
reports
:
JSON
.
stringify
(
reports
)
}).
then
(
res
=>
{
this
.
caseId
=
res
.
data
.
id
this
.
$parent
.
$parent
.
handleNext
()
})
}
return
flag
}
}
}
...
...
src/modules/market-tools/views/Mail.vue
浏览文件 @
fa88e691
...
...
@@ -3,13 +3,26 @@
<ToolCard
class=
"main_content"
>
<Step
:activeStep=
"activeStep"
class=
"pt50-pl60"
/>
<div>
<MailStepOne
v-if=
"activeStep === 0"
class=
"pt-50"
:activeStep=
"activeStep"
:stepOneList=
"stepOneList"
/>
<MailStepTwo
v-if=
"activeStep === 1"
class=
"pt-50"
:stepTwoList=
"stepTwoList"
:time=
"time"
/>
<MailStepOne
v-if=
"activeStep === 0"
class=
"pt-50"
:activeStep=
"activeStep"
:stepOneList=
"stepOneList"
ref=
"mailStepOne"
/>
<MailStepTwo
v-if=
"activeStep === 1"
class=
"pt-50"
:stepTwoList=
"stepTwoList"
:time=
"time"
@
getTime=
"getTime"
ref=
"mailStepTwo"
/>
<div
class=
"main_content_btn"
>
<div
class=
"step_prev step_btn"
@
click=
"handlePrev"
v-if=
"activeStep > 0"
>
上一步
</div>
<div
class=
"step_next step_btn"
@
click=
"handleNext"
v-if=
"activeStep >= 0 && activeStep
<
2
"
>
下一步
</div>
<div
class=
"step_finished step_btn"
@
click=
"handlePreview"
v-if=
"activeStep === 2"
>
点击生成预览
</div>
<div
class=
"step_finished step_btn"
@
click=
"handleP
review
"
v-if=
"activeStep === 3"
>
执行营销计划
</div>
<div
class=
"step_finished step_btn"
@
click=
"handleP
lan
"
v-if=
"activeStep === 3"
>
执行营销计划
</div>
</div>
</div>
</ToolCard>
...
...
@@ -17,9 +30,9 @@
</
template
>
<
script
>
import
stepO
N
e
from
'@/utils/stepOne'
import
stepO
n
e
from
'@/utils/stepOne'
import
stepTwo
from
'@/utils/stepTwo'
import
{
getReportDetail
}
from
'../api'
import
{
cacheReport
,
getReportDetail
,
checkRecord
}
from
'../api'
import
ToolCard
from
'@/components/base/ToolCard.vue'
import
MailStepOne
from
'../components/mail/MailStepOne.vue'
import
Step
from
'@/components/base/Step.vue'
...
...
@@ -36,30 +49,85 @@ export default {
activeStep
:
0
,
stepOneList
:
[],
stepTwoList
:
[],
time
:
''
time
:
''
,
caseId
:
''
,
times
:
''
}
},
methods
:
{
// 获取第二步时间
getTime
(
val
)
{
this
.
times
=
val
},
// 上一步
handlePrev
()
{
this
.
activeStep
--
if
(
this
.
$refs
.
mailStepTwo
.
handleStepTwo
())
{
const
reports
=
{
activeStep
:
this
.
activeStep
,
type
:
2
,
commit_report
:
[{
stepOneList
:
this
.
stepOneList
},
{
form
:
this
.
stepTwoList
},
{
time
:
this
.
times
}]
}
cacheReport
(
this
.
$store
.
state
.
case
.
id
,
{
reports
:
JSON
.
stringify
(
reports
)
}).
then
(
res
=>
{
this
.
caseId
=
res
.
data
.
id
this
.
activeStep
--
console
.
log
(
this
.
activeStep
,
'1111'
)
})
console
.
log
(
this
.
stepOneList
,
'this.stepOneList'
)
}
},
// 下一步
handleNext
()
{
this
.
activeStep
++
if
(
this
.
activeStep
===
0
)
{
if
(
this
.
$refs
.
mailStepOne
.
handleStepOne
())
{
// 保存步骤信息
const
reports
=
{
activeStep
:
0
,
type
:
2
,
commit_report
:
[{
stepOneList
:
this
.
stepOneList
}]
}
cacheReport
(
this
.
$store
.
state
.
case
.
id
,
{
reports
:
JSON
.
stringify
(
reports
)
}).
then
(
res
=>
{
this
.
caseId
=
res
.
data
.
id
this
.
activeStep
++
})
}
}
else
if
(
this
.
activeStep
===
1
)
{
if
(
this
.
$refs
.
mailStepTwo
.
handleStepTwo
())
{
const
reports
=
{
activeStep
:
1
,
type
:
2
,
commit_report
:
[{
stepOneList
:
this
.
stepOneList
},
{
form
:
this
.
stepTwoList
},
{
time
:
this
.
times
}]
}
cacheReport
(
this
.
$store
.
state
.
case
.
id
,
{
reports
:
JSON
.
stringify
(
reports
)
}).
then
(
res
=>
{
this
.
caseId
=
res
.
data
.
id
this
.
activeStep
++
})
}
}
},
// 预览
handlePreview
()
{},
handlePreview
()
{
this
.
activeStep
++
},
handlePlan
()
{},
// 获取步骤信息回显
getReportDetail
(
id
)
{
getReportDetail
(
id
).
then
(
res
=>
{
this
.
activeStep
=
res
.
data
.
detail
.
answer
.
activeStep
if
(
this
.
activeStep
===
0
)
{
this
.
stepOneList
=
res
.
data
.
detail
.
answer
.
commit_report
}
else
if
(
this
.
activeStep
===
1
)
{
this
.
time
=
res
.
data
.
detail
.
answer
.
commit_report
[
1
].
time
this
.
stepTwoList
=
res
.
data
.
detail
.
answer
.
commit_report
[
0
].
form
console
.
log
(
res
,
this
.
time
,
'----'
)
this
.
stepOneList
=
res
.
data
.
detail
.
answer
.
commit_report
[
0
].
stepOneList
this
.
time
=
res
.
data
.
detail
.
answer
.
commit_report
[
2
].
time
this
.
stepTwoList
=
res
.
data
.
detail
.
answer
.
commit_report
[
1
].
form
console
.
log
(
this
.
activeStep
,
'activeStep'
,
this
.
stepOneList
,
'---'
,
'123'
)
})
},
// 验证是否有未完成的答题记录
checkRecord
()
{
checkRecord
(
this
.
$store
.
state
.
case
.
id
,
2
).
then
(
res
=>
{
console
.
log
(
res
,
'res000'
)
if
(
res
.
data
.
status
===
true
)
{
if
(
res
.
data
.
items
.
length
)
{
this
.
getReportDetail
(
res
.
data
.
items
[
0
].
id
)
}
}
else
{
this
.
stepOneList
=
stepOne
this
.
stepTwoList
=
stepTwo
this
.
time
=
this
.
times
}
})
}
...
...
@@ -68,8 +136,7 @@ export default {
if
(
this
.
$route
.
query
.
type
)
{
this
.
getReportDetail
(
this
.
$route
.
query
.
id
)
}
else
{
this
.
stepOneList
=
stepONe
this
.
stepTwoList
=
stepTwo
this
.
checkRecord
()
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论