refactor duration.js

This commit is contained in:
Cindy Chang
2024-07-22 14:52:52 +08:00
parent 486baa6e54
commit 9f48c1d2b0
2 changed files with 111 additions and 46 deletions

View File

@@ -1259,6 +1259,29 @@ export default {
checkActivityDuration() {
return !this.selectDurationData?.length;
},
/**
* 檢查活動序列的邏輯
* @returns {boolean} 是否禁用按鈕
*/
checkActivitySequence() {
switch (this.selectedActivitySequence) {
case 'Start & End':
return checkStartAndEndSequence(this.selectCfmSeqStart, this.selectCfmSeqEnd);
case 'Sequence':
return checkSequenceMode(this.selectedMode);
default:
return true;
}
},
/**
* 檢查 Start & End 活動序列
* @param {string} start 活動開始
* @param {string} end 活動結束
* @returns {boolean} 是否禁用按鈕
*/
checkStartAndEndSequence(start, end) {
return !(start && end);
},
checkProcessingTime() {
let disabled = true;
switch (this.selectedProcessScope) {