|
|
@ -145,19 +145,19 @@ |
|
|
|
dayValue: '*', |
|
|
|
dayValue: '*', |
|
|
|
weekValue: '?', |
|
|
|
weekValue: '?', |
|
|
|
everyDayVal: '*', |
|
|
|
everyDayVal: '*', |
|
|
|
WkintervalWeekPerformVal: 2, // 每隔几天执行 |
|
|
|
WkintervalWeekPerformVal: 2, // Every few days |
|
|
|
WkintervalWeekStartVal: 2, // 从周几开始 |
|
|
|
WkintervalWeekStartVal: 2, // What day of the week |
|
|
|
selectWeekList: _.map(_.cloneDeep(selectList['week']), v => { |
|
|
|
selectWeekList: _.map(_.cloneDeep(selectList['week']), v => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
value: v.value, |
|
|
|
value: v.value, |
|
|
|
label: `${this.$t(v.label)}` |
|
|
|
label: `${this.$t(v.label)}` |
|
|
|
} |
|
|
|
} |
|
|
|
}), |
|
|
|
}), |
|
|
|
intervalDayPerformVal: 1, // 每隔天执行 |
|
|
|
intervalDayPerformVal: 1, // Every other day |
|
|
|
intervalDayStartVal: 1, // 从第几天开始 |
|
|
|
intervalDayStartVal: 1, // From the day |
|
|
|
WkspecificWeekVal: [], // 具体星期几 |
|
|
|
WkspecificWeekVal: [], // Specific day of the week |
|
|
|
selectSpecificWeekList: selectList['specificWeek'], |
|
|
|
selectSpecificWeekList: selectList['specificWeek'], |
|
|
|
WkspecificDayVal: [], // 具体星期几 |
|
|
|
WkspecificDayVal: [], // Specific day of the week |
|
|
|
selectSpecificDayList: selectList['day'], |
|
|
|
selectSpecificDayList: selectList['day'], |
|
|
|
monthLastDaysVal: 'L', |
|
|
|
monthLastDaysVal: 'L', |
|
|
|
monthLastWorkingDays: 'LW', |
|
|
|
monthLastWorkingDays: 'LW', |
|
|
@ -185,7 +185,7 @@ |
|
|
|
weekVal: String |
|
|
|
weekVal: String |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 每隔几周执行 |
|
|
|
// Every few weeks |
|
|
|
onWkintervalWeekPerform (val) { |
|
|
|
onWkintervalWeekPerform (val) { |
|
|
|
this.WkintervalWeekPerformVal = val |
|
|
|
this.WkintervalWeekPerformVal = val |
|
|
|
if (this.radioDay === 'WkintervalWeek') { |
|
|
|
if (this.radioDay === 'WkintervalWeek') { |
|
|
@ -193,81 +193,81 @@ |
|
|
|
this.weekValue = `${this.WkintervalWeekStartVal}/${this.WkintervalWeekPerformVal}` |
|
|
|
this.weekValue = `${this.WkintervalWeekStartVal}/${this.WkintervalWeekPerformVal}` |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 每隔天执行 |
|
|
|
// Every other day |
|
|
|
onIntervalDayPerform (val) { |
|
|
|
onIntervalDayPerform (val) { |
|
|
|
this.intervalDayPerformVal = val |
|
|
|
this.intervalDayPerformVal = val |
|
|
|
if (this.radioDay === 'intervalDay') { |
|
|
|
if (this.radioDay === 'intervalDay') { |
|
|
|
this.dayValue = `${this.intervalDayStartVal}/${this.intervalDayPerformVal}` |
|
|
|
this.dayValue = `${this.intervalDayStartVal}/${this.intervalDayPerformVal}` |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 从第天周开始 |
|
|
|
// From week day |
|
|
|
onIntervalDayStart (val) { |
|
|
|
onIntervalDayStart (val) { |
|
|
|
this.intervalDayStartVal = val |
|
|
|
this.intervalDayStartVal = val |
|
|
|
if (this.radioDay === 'intervalDay') { |
|
|
|
if (this.radioDay === 'intervalDay') { |
|
|
|
this.dayValue = `${this.intervalDayStartVal}/${this.intervalDayPerformVal}` |
|
|
|
this.dayValue = `${this.intervalDayStartVal}/${this.intervalDayPerformVal}` |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 在本月底前 |
|
|
|
// By the end of this month |
|
|
|
onMonthTailBefore (val) { |
|
|
|
onMonthTailBefore (val) { |
|
|
|
this.monthTailBeforeVal = val |
|
|
|
this.monthTailBeforeVal = val |
|
|
|
if (this.radioDay === 'monthTailBefore') { |
|
|
|
if (this.radioDay === 'monthTailBefore') { |
|
|
|
this.dayValue = `L-${this.monthTailBeforeVal}` |
|
|
|
this.dayValue = `L-${this.monthTailBeforeVal}` |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 最近工作日 |
|
|
|
// Last working day |
|
|
|
onRecentlyWorkingDaysMonth (val) { |
|
|
|
onRecentlyWorkingDaysMonth (val) { |
|
|
|
this.recentlyWorkingDaysMonthVal = val |
|
|
|
this.recentlyWorkingDaysMonthVal = val |
|
|
|
if (this.radioDay === 'recentlyWorkingDaysMonth') { |
|
|
|
if (this.radioDay === 'recentlyWorkingDaysMonth') { |
|
|
|
this.dayValue = `${this.recentlyWorkingDaysMonthVal}W` |
|
|
|
this.dayValue = `${this.recentlyWorkingDaysMonthVal}W` |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 在这个月的天 |
|
|
|
// On the day of this month |
|
|
|
onWkmonthNumWeeksDay (val) { |
|
|
|
onWkmonthNumWeeksDay (val) { |
|
|
|
this.WkmonthNumWeeksDayVal = val |
|
|
|
this.WkmonthNumWeeksDayVal = val |
|
|
|
this.weekValue = `${this.WkmonthNumWeeksWeekVal}#${this.WkmonthNumWeeksDayVal}` |
|
|
|
this.weekValue = `${this.WkmonthNumWeeksWeekVal}#${this.WkmonthNumWeeksDayVal}` |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 重置每一天 |
|
|
|
// Reset every day |
|
|
|
everyDayReset () { |
|
|
|
everyDayReset () { |
|
|
|
this.dayValue = _.cloneDeep(this.everyDayVal) |
|
|
|
this.dayValue = _.cloneDeep(this.everyDayVal) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 重置间隔周 从*开始 |
|
|
|
// Reset interval week starts from * |
|
|
|
WkintervalWeekReset () { |
|
|
|
WkintervalWeekReset () { |
|
|
|
this.weekValue = `${this.WkintervalWeekStartVal}/${this.WkintervalWeekPerformVal}` |
|
|
|
this.weekValue = `${this.WkintervalWeekStartVal}/${this.WkintervalWeekPerformVal}` |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 重置间隔天 从*开始 |
|
|
|
// Reset interval days from * |
|
|
|
intervalDayReset () { |
|
|
|
intervalDayReset () { |
|
|
|
this.dayValue = `${this.intervalDayStartVal}/${this.intervalDayPerformVal}` |
|
|
|
this.dayValue = `${this.intervalDayStartVal}/${this.intervalDayPerformVal}` |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 具体周(多选) |
|
|
|
// Specific week (multiple choices) |
|
|
|
WkspecificWeekReset () { |
|
|
|
WkspecificWeekReset () { |
|
|
|
this.weekValue = this.WkspecificWeekVal.length ? this.WkspecificWeekVal.join(',') : '*' |
|
|
|
this.weekValue = this.WkspecificWeekVal.length ? this.WkspecificWeekVal.join(',') : '*' |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 具体天数(多选) |
|
|
|
// Specific days (multiple choices) |
|
|
|
specificDayReset () { |
|
|
|
specificDayReset () { |
|
|
|
this.dayValue = this.WkspecificDayVal.length ? this.WkspecificDayVal.join(',') : '*' |
|
|
|
this.dayValue = this.WkspecificDayVal.length ? this.WkspecificDayVal.join(',') : '*' |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 在这个月的最后一天 |
|
|
|
// On the last day of the month |
|
|
|
monthLastDaysReset () { |
|
|
|
monthLastDaysReset () { |
|
|
|
this.dayValue = _.cloneDeep(this.monthLastDaysVal) |
|
|
|
this.dayValue = _.cloneDeep(this.monthLastDaysVal) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 在这个月的最后一个工作日 |
|
|
|
// On the last working day of the month |
|
|
|
monthLastWorkingDaysReset () { |
|
|
|
monthLastWorkingDaysReset () { |
|
|
|
this.dayValue = _.cloneDeep(this.monthLastWorkingDays) |
|
|
|
this.dayValue = _.cloneDeep(this.monthLastWorkingDays) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 在这个月的最后一个* |
|
|
|
// At the end of the month* |
|
|
|
monthLastWeeksReset () { |
|
|
|
monthLastWeeksReset () { |
|
|
|
this.dayValue = _.cloneDeep(this.monthLastWeeksVal) |
|
|
|
this.dayValue = _.cloneDeep(this.monthLastWeeksVal) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 在本月底前 |
|
|
|
// By the end of this month |
|
|
|
monthTailBeforeReset () { |
|
|
|
monthTailBeforeReset () { |
|
|
|
this.dayValue = `L-${this.monthTailBeforeVal}` |
|
|
|
this.dayValue = `L-${this.monthTailBeforeVal}` |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 最近的工作日(周一至周五)至本月 |
|
|
|
// Last working day (Monday to Friday) to this month |
|
|
|
recentlyWorkingDaysMonthReset () { |
|
|
|
recentlyWorkingDaysMonthReset () { |
|
|
|
this.dayValue = `${this.recentlyWorkingDaysMonthVal}W` |
|
|
|
this.dayValue = `${this.recentlyWorkingDaysMonthVal}W` |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 在这个月的第 |
|
|
|
// On the day of this month |
|
|
|
WkmonthNumReset () { |
|
|
|
WkmonthNumReset () { |
|
|
|
this.weekValue = `${this.WkmonthNumWeeksWeekVal}#${this.WkmonthNumWeeksDayVal}` |
|
|
|
this.weekValue = `${this.WkmonthNumWeeksWeekVal}#${this.WkmonthNumWeeksDayVal}` |
|
|
|
} |
|
|
|
} |
|
|
@ -281,7 +281,7 @@ |
|
|
|
this.$emit('on-week-value', val) |
|
|
|
this.$emit('on-week-value', val) |
|
|
|
// console.log('weekValue=> ' + val) |
|
|
|
// console.log('weekValue=> ' + val) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 选中类型 |
|
|
|
// Selected type |
|
|
|
radioDay (val) { |
|
|
|
radioDay (val) { |
|
|
|
switch (val) { |
|
|
|
switch (val) { |
|
|
|
case 'everyDay': |
|
|
|
case 'everyDay': |
|
|
@ -336,14 +336,14 @@ |
|
|
|
this.weekValue = `${val}/${this.WkintervalWeekPerformVal}` |
|
|
|
this.weekValue = `${val}/${this.WkintervalWeekPerformVal}` |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 具体星期几(多选) |
|
|
|
// Specific day of the week (multiple choice) |
|
|
|
WkspecificWeekVal (val) { |
|
|
|
WkspecificWeekVal (val) { |
|
|
|
if (this.radioDay === 'WkspecificWeek') { |
|
|
|
if (this.radioDay === 'WkspecificWeek') { |
|
|
|
this.dayValue = `?` |
|
|
|
this.dayValue = `?` |
|
|
|
this.weekValue = val.join(',') |
|
|
|
this.weekValue = val.join(',') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 具体天数(多选) |
|
|
|
// Specific days (multiple choices) |
|
|
|
WkspecificDayVal (val) { |
|
|
|
WkspecificDayVal (val) { |
|
|
|
if (this.radioDay === 'specificDay') { |
|
|
|
if (this.radioDay === 'specificDay') { |
|
|
|
this.weekValue = `?` |
|
|
|
this.weekValue = `?` |
|
|
@ -371,19 +371,19 @@ |
|
|
|
let isWeek1 = $weekVal.indexOf('/') !== -1 |
|
|
|
let isWeek1 = $weekVal.indexOf('/') !== -1 |
|
|
|
let isWeek2 = $weekVal.indexOf('#') !== -1 |
|
|
|
let isWeek2 = $weekVal.indexOf('#') !== -1 |
|
|
|
|
|
|
|
|
|
|
|
// 初始化 |
|
|
|
// Initialization |
|
|
|
if ($dayVal === '*' && $weekVal === '?') { |
|
|
|
if ($dayVal === '*' && $weekVal === '?') { |
|
|
|
console.log('初始化') |
|
|
|
console.log('Initialization') |
|
|
|
this.radioDay = 'everyDay' |
|
|
|
this.radioDay = 'everyDay' |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 周 |
|
|
|
// week |
|
|
|
if (isWeek1 || isWeek2 || isWeek($weekVal)) { |
|
|
|
if (isWeek1 || isWeek2 || isWeek($weekVal)) { |
|
|
|
this.dayValue = `?` |
|
|
|
this.dayValue = `?` |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 按顺序标序号处理(除去天) |
|
|
|
* Processing by sequence number (excluding days) |
|
|
|
* @param [ |
|
|
|
* @param [ |
|
|
|
* WkintervalWeek=>(/), |
|
|
|
* WkintervalWeek=>(/), |
|
|
|
* WkspecificWeek=>(TUE,WED), |
|
|
|
* WkspecificWeek=>(TUE,WED), |
|
|
@ -414,7 +414,7 @@ |
|
|
|
this.radioDay = 'WkmonthNumWeeks' |
|
|
|
this.radioDay = 'WkmonthNumWeeks' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 处理周 |
|
|
|
// Processing week |
|
|
|
if (isStr($weekVal, '/')) { |
|
|
|
if (isStr($weekVal, '/')) { |
|
|
|
hanleWeekOne() |
|
|
|
hanleWeekOne() |
|
|
|
} else if (isStr($weekVal, '#')) { |
|
|
|
} else if (isStr($weekVal, '#')) { |
|
|
@ -426,7 +426,7 @@ |
|
|
|
this.weekValue = `?` |
|
|
|
this.weekValue = `?` |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 按顺序标序号处理(除去周) |
|
|
|
* Processing by sequence number (excluding week) |
|
|
|
* @param [ |
|
|
|
* @param [ |
|
|
|
* everyDay=>(*), |
|
|
|
* everyDay=>(*), |
|
|
|
* intervalDay=>(1/1), |
|
|
|
* intervalDay=>(1/1), |
|
|
|