提交 0f86058b authored 作者: matian's avatar matian

updates

上级 9ec76527
......@@ -27,12 +27,6 @@ export default {
},
stepTwoList: {
type: Array
},
time: {
type: String
},
time2: {
type: String
}
},
......@@ -60,16 +54,30 @@ export default {
handleTab(index) {
this.showIndex = index
},
handlePrev() {
this.$parent.$parent.handlePrev()
},
handleStepTwo() {
if (this.showIndex === 0) {
this.activeIndexName = '单次触发'
} else {
this.activeIndexName = '条件触发'
}
this.$emit('getShowIndex', this.showIndex)
let flag = true
this.stepTwoList[0].form.triggerList.forEach(item => {
if (item.triggerValue === '') {
flag = false
}
})
console.log(this.showIndex, 'index')
if (this.showIndex === 0) {
this.stepTwoList[0].form.triggerList.forEach(item => {
if (item.startValue === '') {
flag = false
}
})
} else if (this.showIndex === 1) {
this.stepTwoList2[0].form.triggerList.forEach(item => {
if (item.triggerValue === '') {
flag = false
}
})
}
if (!flag) {
this.$message.warning('请完善改步骤后才能进入下一步')
}
......
......@@ -18,10 +18,7 @@
</div>
</template>
</StepTab>
<div class="main_content_btn">
<!-- <div class="step_prev step_btn" @click="handlePrev">上一步</div>
<div class="step_next step_btn" @click="handleNext">下一步</div> -->
</div>
<div class="main_content_btn"></div>
</div>
</template>
<script>
......@@ -59,7 +56,8 @@ export default {
iconActive: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon22.png',
tabName: '条件触发'
}
]
],
activeIndexName: ''
}
},
mounted() {
......@@ -71,17 +69,27 @@ export default {
handleTab(index) {
this.showIndex = index
},
handlePrev() {
this.$parent.$parent.handlePrev()
},
handleStepTwo() {
this.$emit('getTime', this.times, this.times2)
if (this.showIndex === 0) {
this.activeIndexName = '单次触发'
} else {
this.activeIndexName = '条件触发'
}
this.$emit('getShowIndex', this.activeIndexName)
let flag = true
this.stepTwoList[0].form.triggerList.forEach(item => {
if (item.triggerValue === '' || this.times === '' || this.times2 === '') {
if (this.showIndex === 1) {
this.stepTwoList[0].form.triggerList.forEach(item => {
if (item.triggerValue === '') {
flag = false
}
})
} else if (this.showIndex === 0) {
if (this.times === '' || this.times2 === '') {
flag = false
}
})
}
if (!flag) {
this.$message.warning('请完善改步骤后才能进入下一步')
}
......
......@@ -136,6 +136,7 @@ export default {
times_send: '', // 节日触发 触发时间
caseId: '',
showIndex: 0,
showIndexName: '',
// tab切换列表
tabList: [
{
......@@ -144,13 +145,13 @@ export default {
tabName: '单次触发'
},
{
icon: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon21.png',
iconActive: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon22.png',
icon: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon41.png',
iconActive: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon42.png',
tabName: '周期触发'
},
{
icon: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon21.png',
iconActive: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon22.png',
icon: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon31.png',
iconActive: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon32.png',
tabName: '节日触发'
}
],
......@@ -254,6 +255,16 @@ export default {
},
// 进去下一步之前的判断
handleStepTwo() {
if (this.showIndex === 0) {
this.showIndexName = '单次触发'
} else if (this.showIndex === 1) {
this.showIndexName = '周期触发'
} else {
this.showIndexName = '节日触发'
}
console.log(this.showIndexName, 'this.showIndexName')
this.$emit('getShowIndex', this.showIndexName)
const stepTwoData = {
triggerDate: this.triggerDate,
triggerTime: this.triggerTime,
......@@ -266,16 +277,21 @@ export default {
}
this.$emit('getTime', stepTwoData)
if (
this.triggerDate === '' ||
this.triggerTime === '' ||
this.time_range[0] === '' ||
this.time_range[1] === '' ||
this.times_every === '' ||
this.times_hour === '' ||
this.times_send === '' ||
this.festivalList.filter(item => item.isActive === false).length === this.festivalList.length ||
this.solarTermsList.filter(item => item.isActive === false).length === this.solarTermsList.length
console.log(this.time_range[0], this.time_range[1], this.times_every, '--000', this.times_send, '----')
if (this.showIndex === 0 && (this.triggerDate === '' || this.triggerTime === '')) {
this.$message.warning('请完善改步骤后才能进入下一步')
return false
} else if (
this.showIndex === 1 &&
(this.time_range[0] === '' || this.time_range[1] === '' || this.times_every === '' || this.times_hour === '')
) {
this.$message.warning('请完善改步骤后才能进入下一步')
return false
} else if (
this.showIndex === 2 &&
(this.times_send === null ||
this.festivalList.filter(item => item.isActive === false).length === this.festivalList.length ||
this.solarTermsList.filter(item => item.isActive === false).length === this.solarTermsList.length)
) {
this.$message.warning('请完善改步骤后才能进入下一步')
return false
......
......@@ -15,8 +15,8 @@
class="pt-50"
:stepTwoList="stepTwoList"
:stepTwoList2="stepTwoList2"
@getTime="getTime"
ref="mailStepTwo"
@getShowIndex="getShowIndex"
/>
<div class="main_content_btn">
<div class="step_prev step_btn" @click="handlePrev" v-if="activeStep > 0">上一步</div>
......@@ -51,11 +51,15 @@ export default {
stepOneList: [],
stepTwoList: [],
stepTwoList2: [],
caseId: ''
caseId: '',
activeIndexName: ''
}
},
methods: {
getShowIndex(name) {
this.activeIndexName = name
},
// 上一步
handlePrev() {
this.handleStep(2)
......@@ -114,8 +118,6 @@ export default {
this.stepOneList = answerList[0].answer.commit_report[0].stepOneList
this.stepTwoList = answerList[0].answer.commit_report[1].form
this.stepTwoList2 = answerList[0].answer.commit_report[1].form1
this.time = answerList[0].answer.commit_report[2].time || ''
this.time2 = answerList[0].answer.commit_report[2].time2 || ''
} else {
this.initStepList()
}
......
......@@ -17,6 +17,7 @@
:time="time"
:time2="time2"
@getTime="getTime"
@getShowIndex="getShowIndex"
ref="mailStepTwo"
/>
<MailStepThree :data="stepThreeData" ref="mailStepThree" v-if="activeStep === 2" />
......@@ -61,11 +62,15 @@ export default {
caseId: '',
times: '',
times2: '',
time2: ''
time2: '',
activeIndexName: ''
}
},
methods: {
getShowIndex(name) {
this.activeIndexName = name
},
// 获取第二步时间
getTime(val, val2) {
this.time = val
......@@ -74,7 +79,6 @@ export default {
// 上一步
handlePrev() {
this.activeStep--
// this.handleStep(2)
},
// 下一步
handleNext() {
......@@ -104,11 +108,7 @@ export default {
}
cacheReport(this.$store.state.case.id, { reports: JSON.stringify(reports) }).then(res => {
this.caseId = res.data.id
if (val === 2) {
this.activeStep++
} else {
this.activeStep++
}
this.activeStep++
})
},
// 预览
......
......@@ -15,6 +15,7 @@
class="pt-50"
ref="mailStepTwo"
@getTime="getTime"
@getShowIndex="getShowIndex"
:stepTwoData="stepTwoData"
/>
<div class="main_content_btn">
......@@ -56,12 +57,16 @@ export default {
times_hour: '',
times_send: '',
solarTermsList: [],
festivalList: []
festivalList: [],
activeName: ''
}
}
},
methods: {
getShowIndex(name) {
this.activeName = name
},
// 获取第二步时间
getTime(val) {
this.stepTwoData = val
......@@ -158,6 +163,7 @@ export default {
.main_content_btn {
display: flex;
justify-content: center;
margin-top: 41px;
padding-bottom: 70px;
.step_btn {
width: 119px;
......
......@@ -38,7 +38,6 @@ const cardList = [
value: 'occupation',
label: '职业',
disabled: false,
children: [
{ value: '0', label: '学生' },
{ value: '1', label: '人事' },
......@@ -49,7 +48,6 @@ const cardList = [
value: 'fund',
label: '是否交易过基金产品',
disabled: false,
children: [
{ value: '0', label: '是' },
{ value: '1', label: '否' }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论