Commit 0f2b4e7d by crushh

update: 生日场景

parent ce98716a
......@@ -114,16 +114,19 @@ export default {
let arr = [];
if (!res) return;
res.timeRangeList.forEach(item => {
arr.push(`${item.startTime}-${item.endTime}`);
if (Object.keys(item).length) {
arr.push(`${item.startTime}-${item.endTime}`);
}
});
this.$refs.form.validate(val => {
if (val) {
const { birth_type, call_flag, birthDate1, birthDate2 } = this.form;
const { birth_type, call_flag, birthDate1, birthDate2, callTime } = this.form;
const obj = {
startDate: birth_type == 2 ? birthDate2[0] : birthDate1[0],
endDate: birth_type == 2 ? birthDate2[1] : birthDate1[1],
call_flag,
birth_type
birth_type,
callTime
};
if (arr.length) {
obj.callTime = arr;
......
......@@ -298,7 +298,7 @@ export default {
async submit() {
const activeTimeData = await this.$refs.birthSense.submit();
if (!activeTimeData) return;
const { startDate, endDate, call_flag, birth_type } = activeTimeData;
const { startDate, endDate, call_flag, birth_type, callTime } = activeTimeData;
this.$refs.form.validate(async (val, obj) => {
console.log(val);
console.log(obj);
......@@ -331,6 +331,7 @@ export default {
call_flag,
labelFlag,
smsFlag,
callTime,
recallFlag
}
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment