fix: Issues #218 done.
This commit is contained in:
@@ -180,25 +180,25 @@ export default {
|
|||||||
isSubmitCfmCtEteStart: null, // Cycle time
|
isSubmitCfmCtEteStart: null, // Cycle time
|
||||||
isSubmitCfmCtEteEnd: null,
|
isSubmitCfmCtEteEnd: null,
|
||||||
isSubmitCfmCtEteSE: null,
|
isSubmitCfmCtEteSE: null,
|
||||||
isSubmitDurationTime: null, // Activity duration Time Range
|
isSubmitDurationTime: { base: {}, rule: {}}, // Activity duration Time Range
|
||||||
isSubmitTimeCfmPtEteAll: null, // Processing time Time Range
|
isSubmitTimeCfmPtEteAll: { base: {}, rule: {}}, // Processing time Time Range
|
||||||
isSubmitTimeCfmPtEteStart: null,
|
isSubmitTimeCfmPtEteStart: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmPtEteEnd: null,
|
isSubmitTimeCfmPtEteEnd: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmPtEteSE: null,
|
isSubmitTimeCfmPtEteSE: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmPtPStart: null,
|
isSubmitTimeCfmPtPStart: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmPtPEnd: null,
|
isSubmitTimeCfmPtPEnd: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmPtPSE: null,
|
isSubmitTimeCfmPtPSE: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmWtEteAll: null, // Waiting time Time Range
|
isSubmitTimeCfmWtEteAll: { base: {}, rule: {}}, // Waiting time Time Range
|
||||||
isSubmitTimeCfmWtEteStart: null,
|
isSubmitTimeCfmWtEteStart: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmWtEteEnd: null,
|
isSubmitTimeCfmWtEteEnd: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmWtEteSE: null,
|
isSubmitTimeCfmWtEteSE: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmWtPStart: null,
|
isSubmitTimeCfmWtPStart: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmWtPEnd: null,
|
isSubmitTimeCfmWtPEnd: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmWtPSE: null,
|
isSubmitTimeCfmWtPSE: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmCtEteAll: null, // Cycle time Time Range
|
isSubmitTimeCfmCtEteAll: { base: {}, rule: {}}, // Cycle time Time Range
|
||||||
isSubmitTimeCfmCtEteStart: null,
|
isSubmitTimeCfmCtEteStart: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmCtEteEnd: null,
|
isSubmitTimeCfmCtEteEnd: { base: {}, rule: {}},
|
||||||
isSubmitTimeCfmCtEteSE: null,
|
isSubmitTimeCfmCtEteSE: { base: {}, rule: {}},
|
||||||
isSubmitShowDataSeq: {
|
isSubmitShowDataSeq: {
|
||||||
task: null,
|
task: null,
|
||||||
taskStart: null,
|
taskStart: null,
|
||||||
@@ -405,7 +405,6 @@ export default {
|
|||||||
// 打開 rule 檔要顯示儲存的選項、規則、時間
|
// 打開 rule 檔要顯示儲存的選項、規則、時間
|
||||||
conformanceTempReportData: {
|
conformanceTempReportData: {
|
||||||
handler: function(newValue) {
|
handler: function(newValue) {
|
||||||
console.log('conformanceTempReportData', newValue);
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if(newValue !== null) {
|
if(newValue !== null) {
|
||||||
const rule = newValue.rule;
|
const rule = newValue.rule;
|
||||||
@@ -451,13 +450,19 @@ export default {
|
|||||||
this.selectedRuleType = 'Activity duration';
|
this.selectedRuleType = 'Activity duration';
|
||||||
this.selectDurationData = [rule.task];
|
this.selectDurationData = [rule.task];
|
||||||
this.isSubmitDurationData = [rule.task];
|
this.isSubmitDurationData = [rule.task];
|
||||||
this.isSubmitDurationTime = { min: rule.min, max: rule.max};
|
this.isSubmitDurationTime = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'processing-time-end-to-end-whole': // Rule Type 選 Processing time 的行為
|
case 'processing-time-end-to-end-whole': // Rule Type 選 Processing time 的行為
|
||||||
this.selectedRuleType = 'Processing time';
|
this.selectedRuleType = 'Processing time';
|
||||||
this.selectedProcessScope = 'End to end';
|
this.selectedProcessScope = 'End to end';
|
||||||
this.selectedActSeqMore = 'All';
|
this.selectedActSeqMore = 'All';
|
||||||
this.isSubmitTimeCfmPtEteAll = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmPtEteAll = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'processing-time-end-to-end-starts-with':
|
case 'processing-time-end-to-end-starts-with':
|
||||||
this.selectedRuleType = 'Processing time';
|
this.selectedRuleType = 'Processing time';
|
||||||
@@ -467,7 +472,10 @@ export default {
|
|||||||
this.isSubmitCfmPtEteStart = [
|
this.isSubmitCfmPtEteStart = [
|
||||||
{category: 'Start', task: rule.task}
|
{category: 'Start', task: rule.task}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtEteStart = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmPtEteStart = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'processing-time-end-to-end-ends-with':
|
case 'processing-time-end-to-end-ends-with':
|
||||||
this.selectedRuleType = 'Processing time';
|
this.selectedRuleType = 'Processing time';
|
||||||
@@ -477,7 +485,10 @@ export default {
|
|||||||
this.isSubmitCfmPtEteEnd = [
|
this.isSubmitCfmPtEteEnd = [
|
||||||
{category: 'End', task: rule.task}
|
{category: 'End', task: rule.task}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtEteEnd = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmPtEteEnd = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'processing-time-end-to-end-start-end':
|
case 'processing-time-end-to-end-start-end':
|
||||||
this.selectedRuleType = 'Processing time';
|
this.selectedRuleType = 'Processing time';
|
||||||
@@ -487,7 +498,11 @@ export default {
|
|||||||
{category: 'Start', task: rule.start},
|
{category: 'Start', task: rule.start},
|
||||||
{category: 'End', task: rule.end}
|
{category: 'End', task: rule.end}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtEteSE = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmPtEteSE = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
|
this.isSubmitShowDataPtEte = this.setSubmitShowData(rule.start, rule.end);
|
||||||
break;
|
break;
|
||||||
case 'processing-time-partial-starts-with':
|
case 'processing-time-partial-starts-with':
|
||||||
this.selectedRuleType = 'Processing time';
|
this.selectedRuleType = 'Processing time';
|
||||||
@@ -497,7 +512,10 @@ export default {
|
|||||||
this.isSubmitCfmPtPStart = [
|
this.isSubmitCfmPtPStart = [
|
||||||
{category: 'From', task: rule.task}
|
{category: 'From', task: rule.task}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtPStart = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmPtPStart = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'processing-time-partial-ends-with':
|
case 'processing-time-partial-ends-with':
|
||||||
this.selectedRuleType = 'Processing time';
|
this.selectedRuleType = 'Processing time';
|
||||||
@@ -507,7 +525,10 @@ export default {
|
|||||||
this.isSubmitCfmPtPEnd = [
|
this.isSubmitCfmPtPEnd = [
|
||||||
{category: 'To', task: rule.task}
|
{category: 'To', task: rule.task}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtPEnd = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmPtPEnd = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'processing-time-partial-start-end':
|
case 'processing-time-partial-start-end':
|
||||||
this.selectedRuleType = 'Processing time';
|
this.selectedRuleType = 'Processing time';
|
||||||
@@ -517,14 +538,20 @@ export default {
|
|||||||
{category: 'From', task: rule.start},
|
{category: 'From', task: rule.start},
|
||||||
{category: 'To', task: rule.end}
|
{category: 'To', task: rule.end}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtPSE = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmPtPSE = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
this.isSubmitShowDataPtP = this.setSubmitShowData(rule.start, rule.end);
|
this.isSubmitShowDataPtP = this.setSubmitShowData(rule.start, rule.end);
|
||||||
break;
|
break;
|
||||||
case 'waiting-time-end-to-end-whole': // Rule Type 選 Waiting time 的行為
|
case 'waiting-time-end-to-end-whole': // Rule Type 選 Waiting time 的行為
|
||||||
this.selectedRuleType = 'Waiting time';
|
this.selectedRuleType = 'Waiting time';
|
||||||
this.selectedProcessScope = 'End to end';
|
this.selectedProcessScope = 'End to end';
|
||||||
this.selectedActSeqMore = 'All';
|
this.selectedActSeqMore = 'All';
|
||||||
this.isSubmitTimeCfmWtEteAll = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmWtEteAll = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'waiting-time-end-to-end-starts-with':
|
case 'waiting-time-end-to-end-starts-with':
|
||||||
this.selectedRuleType = 'Waiting time';
|
this.selectedRuleType = 'Waiting time';
|
||||||
@@ -534,7 +561,10 @@ export default {
|
|||||||
this.isSubmitCfmWtEteStart = [
|
this.isSubmitCfmWtEteStart = [
|
||||||
{category: 'Start', task: rule.task}
|
{category: 'Start', task: rule.task}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtEteStart = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmWtEteStart = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'waiting-time-end-to-end-ends-with':
|
case 'waiting-time-end-to-end-ends-with':
|
||||||
this.selectedRuleType = 'Waiting time';
|
this.selectedRuleType = 'Waiting time';
|
||||||
@@ -544,7 +574,10 @@ export default {
|
|||||||
this.isSubmitCfmWtEteEnd = [
|
this.isSubmitCfmWtEteEnd = [
|
||||||
{category: 'End', task: rule.task}
|
{category: 'End', task: rule.task}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtEteEnd = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmWtEteEnd = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'waiting-time-end-to-end-start-end':
|
case 'waiting-time-end-to-end-start-end':
|
||||||
this.selectedRuleType = 'Waiting time';
|
this.selectedRuleType = 'Waiting time';
|
||||||
@@ -554,7 +587,10 @@ export default {
|
|||||||
{category: 'Start', task: rule.start},
|
{category: 'Start', task: rule.start},
|
||||||
{category: 'End', task: rule.end}
|
{category: 'End', task: rule.end}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtEteSE = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmWtEteSE = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
this.isSubmitShowDataWtEte = this.setSubmitShowData(rule.start, rule.end);
|
this.isSubmitShowDataWtEte = this.setSubmitShowData(rule.start, rule.end);
|
||||||
break;
|
break;
|
||||||
case 'waiting-time-partial-starts-with':
|
case 'waiting-time-partial-starts-with':
|
||||||
@@ -565,7 +601,10 @@ export default {
|
|||||||
this.isSubmitCfmWtPStart = [
|
this.isSubmitCfmWtPStart = [
|
||||||
{category: 'From', task: rule.task}
|
{category: 'From', task: rule.task}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtPStart = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmWtPStart = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'waiting-time-partial-ends-with':
|
case 'waiting-time-partial-ends-with':
|
||||||
this.selectedRuleType = 'Waiting time';
|
this.selectedRuleType = 'Waiting time';
|
||||||
@@ -575,7 +614,10 @@ export default {
|
|||||||
this.isSubmitCfmWtPEnd = [
|
this.isSubmitCfmWtPEnd = [
|
||||||
{category: 'To', task: rule.task}
|
{category: 'To', task: rule.task}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtPEnd = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmWtPEnd = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'waiting-time-partial-start-end':
|
case 'waiting-time-partial-start-end':
|
||||||
this.selectedRuleType = 'Waiting time';
|
this.selectedRuleType = 'Waiting time';
|
||||||
@@ -585,14 +627,20 @@ export default {
|
|||||||
{category: 'From', task: rule.start},
|
{category: 'From', task: rule.start},
|
||||||
{category: 'To', task: rule.end}
|
{category: 'To', task: rule.end}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtPSE = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmWtPSE = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
this.isSubmitShowDataWtP = this.setSubmitShowData(rule.start, rule.end);
|
this.isSubmitShowDataWtP = this.setSubmitShowData(rule.start, rule.end);
|
||||||
break;
|
break;
|
||||||
case 'cycle-time-end-to-end-whole': // Rule Type 選 Cycle time 的行為
|
case 'cycle-time-end-to-end-whole': // Rule Type 選 Cycle time 的行為
|
||||||
this.selectedRuleType = 'Cycle time';
|
this.selectedRuleType = 'Cycle time';
|
||||||
this.selectedProcessScope = 'End to end';
|
this.selectedProcessScope = 'End to end';
|
||||||
this.selectedActSeqMore = 'All';
|
this.selectedActSeqMore = 'All';
|
||||||
this.isSubmitTimeCfmCtEteAll = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmCtEteAll = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'cycle-time-end-to-end-starts-with':
|
case 'cycle-time-end-to-end-starts-with':
|
||||||
this.selectedRuleType = 'Cycle time';
|
this.selectedRuleType = 'Cycle time';
|
||||||
@@ -602,7 +650,10 @@ export default {
|
|||||||
this.isSubmitCfmCtEteStart = [
|
this.isSubmitCfmCtEteStart = [
|
||||||
{category: 'Start', task: rule.task}
|
{category: 'Start', task: rule.task}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmCtEteStart = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmCtEteStart = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'cycle-time-end-to-end-ends-with':
|
case 'cycle-time-end-to-end-ends-with':
|
||||||
this.selectedRuleType = 'Cycle time';
|
this.selectedRuleType = 'Cycle time';
|
||||||
@@ -612,7 +663,10 @@ export default {
|
|||||||
this.isSubmitCfmCtEteEnd = [
|
this.isSubmitCfmCtEteEnd = [
|
||||||
{category: 'End', task: rule.task}
|
{category: 'End', task: rule.task}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmCtEteEnd = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmCtEteEnd = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 'cycle-time-end-to-end-start-end':
|
case 'cycle-time-end-to-end-start-end':
|
||||||
this.selectedRuleType = 'Cycle time';
|
this.selectedRuleType = 'Cycle time';
|
||||||
@@ -622,7 +676,10 @@ export default {
|
|||||||
{category: 'Start', task: rule.start},
|
{category: 'Start', task: rule.start},
|
||||||
{category: 'End', task: rule.end}
|
{category: 'End', task: rule.end}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmCtEteSE = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmCtEteSE = {
|
||||||
|
base: newValue.charts.time.x_axis,
|
||||||
|
rule: { min: rule.min, max: rule.max},
|
||||||
|
};
|
||||||
this.isSubmitShowDataCt = this.setSubmitShowData(rule.start, rule.end);
|
this.isSubmitShowDataCt = this.setSubmitShowData(rule.start, rule.end);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -691,7 +748,7 @@ export default {
|
|||||||
this.isSubmitCfmSeqDirectly = [];
|
this.isSubmitCfmSeqDirectly = [];
|
||||||
this.isSubmitCfmSeqEventually = [];
|
this.isSubmitCfmSeqEventually = [];
|
||||||
this.isSubmitDurationData = null;
|
this.isSubmitDurationData = null;
|
||||||
this.isSubmitDurationTime = null;
|
this.isSubmitDurationTime = { base: {}, rule: {}};
|
||||||
this.isSubmitCfmPtEteStart = null; // Processing time
|
this.isSubmitCfmPtEteStart = null; // Processing time
|
||||||
this.isSubmitCfmPtEteEnd = null;
|
this.isSubmitCfmPtEteEnd = null;
|
||||||
this.isSubmitCfmPtEteSE = null;
|
this.isSubmitCfmPtEteSE = null;
|
||||||
@@ -707,24 +764,24 @@ export default {
|
|||||||
this.isSubmitCfmCtEteStart = null; // Cycle time
|
this.isSubmitCfmCtEteStart = null; // Cycle time
|
||||||
this.isSubmitCfmCtEteEnd = null;
|
this.isSubmitCfmCtEteEnd = null;
|
||||||
this.isSubmitCfmCtEteSE = null;
|
this.isSubmitCfmCtEteSE = null;
|
||||||
this.isSubmitTimeCfmPtEteAll = null; // Processing time Time Range
|
this.isSubmitTimeCfmPtEteAll = { base: {}, rule: {}}; // Processing time Time Range
|
||||||
this.isSubmitTimeCfmPtEteStart = null;
|
this.isSubmitTimeCfmPtEteStart = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmPtEteEnd = null;
|
this.isSubmitTimeCfmPtEteEnd = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmPtEteSE = null;
|
this.isSubmitTimeCfmPtEteSE = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmPtPStart = null;
|
this.isSubmitTimeCfmPtPStart = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmPtPEnd = null;
|
this.isSubmitTimeCfmPtPEnd = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmPtPSE = null;
|
this.isSubmitTimeCfmPtPSE = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmWtEteAll = null; // Waiting time Time Range
|
this.isSubmitTimeCfmWtEteAll = { base: {}, rule: {}}; // Waiting time Time Range
|
||||||
this.isSubmitTimeCfmWtEteStart = null;
|
this.isSubmitTimeCfmWtEteStart = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmWtEteEnd = null;
|
this.isSubmitTimeCfmWtEteEnd = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmWtEteSE = null;
|
this.isSubmitTimeCfmWtEteSE = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmWtPStart = null;
|
this.isSubmitTimeCfmWtPStart = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmWtPEnd = null;
|
this.isSubmitTimeCfmWtPEnd = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmWtPSE = null;
|
this.isSubmitTimeCfmWtPSE = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmCtEteAll = null; // Cycle time Time Range
|
this.isSubmitTimeCfmCtEteAll = { base: {}, rule: {}}; // Cycle time Time Range
|
||||||
this.isSubmitTimeCfmCtEteStart = null;
|
this.isSubmitTimeCfmCtEteStart = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmCtEteEnd = null;
|
this.isSubmitTimeCfmCtEteEnd = { base: {}, rule: {}};
|
||||||
this.isSubmitTimeCfmCtEteSE = null;
|
this.isSubmitTimeCfmCtEteSE = { base: {}, rule: {}};
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @param {boolean} massage true | false 清空選單選項, 選擇的結果
|
* @param {boolean} massage true | false 清空選單選項, 選擇的結果
|
||||||
@@ -851,7 +908,7 @@ export default {
|
|||||||
};
|
};
|
||||||
this.isSubmitReset();
|
this.isSubmitReset();
|
||||||
this.isSubmitDurationData = this.selectDurationData;
|
this.isSubmitDurationData = this.selectDurationData;
|
||||||
this.isSubmitDurationTime = this.selectDurationTime;
|
this.isSubmitDurationTime.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'Processing time': // Rule Type 選 Processing time 的行為
|
case 'Processing time': // Rule Type 選 Processing time 的行為
|
||||||
switch (this.selectedProcessScope) {
|
switch (this.selectedProcessScope) {
|
||||||
@@ -864,7 +921,7 @@ export default {
|
|||||||
type: 'processing-time-end-to-end-whole',
|
type: 'processing-time-end-to-end-whole',
|
||||||
};
|
};
|
||||||
this.isSubmitReset();
|
this.isSubmitReset();
|
||||||
this.isSubmitTimeCfmPtEteAll = this.selectDurationTime;
|
this.isSubmitTimeCfmPtEteAll.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'Start':
|
case 'Start':
|
||||||
data = {
|
data = {
|
||||||
@@ -877,7 +934,7 @@ export default {
|
|||||||
this.isSubmitCfmPtEteStart = [
|
this.isSubmitCfmPtEteStart = [
|
||||||
{category: 'Start', task: this.selectCfmPtEteStart},
|
{category: 'Start', task: this.selectCfmPtEteStart},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtEteStart = this.selectDurationTime;
|
this.isSubmitTimeCfmPtEteStart.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'End':
|
case 'End':
|
||||||
data = {
|
data = {
|
||||||
@@ -890,7 +947,7 @@ export default {
|
|||||||
this.isSubmitCfmPtEteEnd = [
|
this.isSubmitCfmPtEteEnd = [
|
||||||
{category: 'End', task: this.selectCfmPtEteEnd},
|
{category: 'End', task: this.selectCfmPtEteEnd},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtEteEnd = this.selectDurationTime;
|
this.isSubmitTimeCfmPtEteEnd.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'Start & End':
|
case 'Start & End':
|
||||||
data = {
|
data = {
|
||||||
@@ -905,7 +962,7 @@ export default {
|
|||||||
{category: 'Start', task: this.selectCfmPtEteSEStart},
|
{category: 'Start', task: this.selectCfmPtEteSEStart},
|
||||||
{category: 'End', task: this.selectCfmPtEteSEEnd},
|
{category: 'End', task: this.selectCfmPtEteSEEnd},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtEteSE = this.selectDurationTime;
|
this.isSubmitTimeCfmPtEteSE.rule = this.selectDurationTime;
|
||||||
this.isSubmitShowDataPtEte = this.setSubmitShowData(this.selectCfmPtEteSEStart, this.selectCfmPtEteSEEnd);
|
this.isSubmitShowDataPtEte = this.setSubmitShowData(this.selectCfmPtEteSEStart, this.selectCfmPtEteSEEnd);
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
@@ -923,7 +980,7 @@ export default {
|
|||||||
this.isSubmitCfmPtPStart = [
|
this.isSubmitCfmPtPStart = [
|
||||||
{category: 'From', task: this.selectCfmPtPStart},
|
{category: 'From', task: this.selectCfmPtPStart},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtPStart = this.selectDurationTime;
|
this.isSubmitTimeCfmPtPStart.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'To':
|
case 'To':
|
||||||
data = {
|
data = {
|
||||||
@@ -936,7 +993,7 @@ export default {
|
|||||||
this.isSubmitCfmPtPEnd = [
|
this.isSubmitCfmPtPEnd = [
|
||||||
{category: 'To', task: this.selectCfmPtPEnd},
|
{category: 'To', task: this.selectCfmPtPEnd},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtPEnd = this.selectDurationTime;
|
this.isSubmitTimeCfmPtPEnd.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'From & To':
|
case 'From & To':
|
||||||
data = {
|
data = {
|
||||||
@@ -951,7 +1008,7 @@ export default {
|
|||||||
{category: 'From', task: this.selectCfmPtPSEStart},
|
{category: 'From', task: this.selectCfmPtPSEStart},
|
||||||
{category: 'To', task: this.selectCfmPtPSEEnd},
|
{category: 'To', task: this.selectCfmPtPSEEnd},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtPSE = this.selectDurationTime;
|
this.isSubmitTimeCfmPtPSE.rule = this.selectDurationTime;
|
||||||
this.isSubmitShowDataPtP = this.setSubmitShowData(this.selectCfmPtPSEStart, this.selectCfmPtPSEEnd);
|
this.isSubmitShowDataPtP = this.setSubmitShowData(this.selectCfmPtPSEStart, this.selectCfmPtPSEEnd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -973,7 +1030,7 @@ export default {
|
|||||||
type: 'waiting-time-end-to-end-whole',
|
type: 'waiting-time-end-to-end-whole',
|
||||||
};
|
};
|
||||||
this.isSubmitReset();
|
this.isSubmitReset();
|
||||||
this.isSubmitTimeCfmWtEteAll = this.selectDurationTime;
|
this.isSubmitTimeCfmWtEteAll.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'Start':
|
case 'Start':
|
||||||
data = {
|
data = {
|
||||||
@@ -986,7 +1043,7 @@ export default {
|
|||||||
this.isSubmitCfmWtEteStart = [
|
this.isSubmitCfmWtEteStart = [
|
||||||
{category: 'Start', task: this.selectCfmWtEteStart},
|
{category: 'Start', task: this.selectCfmWtEteStart},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtEteStart = this.selectDurationTime;
|
this.isSubmitTimeCfmWtEteStart.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'End':
|
case 'End':
|
||||||
data = {
|
data = {
|
||||||
@@ -999,7 +1056,7 @@ export default {
|
|||||||
this.isSubmitCfmWtEteEnd = [
|
this.isSubmitCfmWtEteEnd = [
|
||||||
{category: 'End', task: this.selectCfmWtEteEnd},
|
{category: 'End', task: this.selectCfmWtEteEnd},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtEteEnd = this.selectDurationTime;
|
this.isSubmitTimeCfmWtEteEnd.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'Start & End':
|
case 'Start & End':
|
||||||
data = {
|
data = {
|
||||||
@@ -1014,7 +1071,7 @@ export default {
|
|||||||
{category: 'Start', task: this.selectCfmWtEteSEStart},
|
{category: 'Start', task: this.selectCfmWtEteSEStart},
|
||||||
{category: 'End', task: this.selectCfmWtEteSEEnd},
|
{category: 'End', task: this.selectCfmWtEteSEEnd},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtEteSE = this.selectDurationTime;
|
this.isSubmitTimeCfmWtEteSE.rule = this.selectDurationTime;
|
||||||
this.isSubmitShowDataWtEte = this.setSubmitShowData(this.selectCfmWtEteSEStart, this.selectCfmWtEteSEEnd);
|
this.isSubmitShowDataWtEte = this.setSubmitShowData(this.selectCfmWtEteSEStart, this.selectCfmWtEteSEEnd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1034,7 +1091,7 @@ export default {
|
|||||||
this.isSubmitCfmWtPStart = [
|
this.isSubmitCfmWtPStart = [
|
||||||
{category: 'From', task: this.selectCfmWtPStart},
|
{category: 'From', task: this.selectCfmWtPStart},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtPStart = this.selectDurationTime;
|
this.isSubmitTimeCfmWtPStart.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'To':
|
case 'To':
|
||||||
data = {
|
data = {
|
||||||
@@ -1047,7 +1104,7 @@ export default {
|
|||||||
this.isSubmitCfmWtPEnd = [
|
this.isSubmitCfmWtPEnd = [
|
||||||
{category: 'To', task: this.selectCfmWtPEnd},
|
{category: 'To', task: this.selectCfmWtPEnd},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtPEnd = this.selectDurationTime;
|
this.isSubmitTimeCfmWtPEnd.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'From & To':
|
case 'From & To':
|
||||||
data = {
|
data = {
|
||||||
@@ -1062,7 +1119,7 @@ export default {
|
|||||||
{category: 'From', task: this.selectCfmWtPSEStart},
|
{category: 'From', task: this.selectCfmWtPSEStart},
|
||||||
{category: 'To', task: this.selectCfmWtPSEEnd},
|
{category: 'To', task: this.selectCfmWtPSEEnd},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmWtPSE = this.selectDurationTime;
|
this.isSubmitTimeCfmWtPSE.rule = this.selectDurationTime;
|
||||||
this.isSubmitShowDataWtP = this.setSubmitShowData(this.selectCfmWtPSEStart, this.selectCfmWtPSEEnd);
|
this.isSubmitShowDataWtP = this.setSubmitShowData(this.selectCfmWtPSEStart, this.selectCfmWtPSEEnd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1082,7 +1139,7 @@ export default {
|
|||||||
type: 'cycle-time-end-to-end-whole',
|
type: 'cycle-time-end-to-end-whole',
|
||||||
};
|
};
|
||||||
this.isSubmitReset();
|
this.isSubmitReset();
|
||||||
this.isSubmitTimeCfmCtEteAll = this.selectDurationTime;
|
this.isSubmitTimeCfmCtEteAll.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'Start':
|
case 'Start':
|
||||||
data = {
|
data = {
|
||||||
@@ -1095,7 +1152,7 @@ export default {
|
|||||||
this.isSubmitCfmCtEteStart = [
|
this.isSubmitCfmCtEteStart = [
|
||||||
{category: 'Start', task: this.selectCfmCtEteStart},
|
{category: 'Start', task: this.selectCfmCtEteStart},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmCtEteStart = this.selectDurationTime;
|
this.isSubmitTimeCfmCtEteStart.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'End':
|
case 'End':
|
||||||
data = {
|
data = {
|
||||||
@@ -1108,7 +1165,7 @@ export default {
|
|||||||
this.isSubmitCfmCtEteEnd = [
|
this.isSubmitCfmCtEteEnd = [
|
||||||
{category: 'End', task: this.selectCfmCtEteEnd},
|
{category: 'End', task: this.selectCfmCtEteEnd},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmCtEteEnd = this.selectDurationTime;
|
this.isSubmitTimeCfmCtEteEnd.rule = this.selectDurationTime;
|
||||||
break;
|
break;
|
||||||
case 'Start & End':
|
case 'Start & End':
|
||||||
data = {
|
data = {
|
||||||
@@ -1123,7 +1180,7 @@ export default {
|
|||||||
{category: 'Start', task: this.selectCfmCtEteSEStart},
|
{category: 'Start', task: this.selectCfmCtEteSEStart},
|
||||||
{category: 'End', task: this.selectCfmCtEteSEEnd},
|
{category: 'End', task: this.selectCfmCtEteSEEnd},
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmCtEteSE = this.selectDurationTime;
|
this.isSubmitTimeCfmCtEteSE.rule = this.selectDurationTime;
|
||||||
this.isSubmitShowDataCt = this.setSubmitShowData(this.selectCfmCtEteSEStart, this.selectCfmCtEteSEEnd);
|
this.isSubmitShowDataCt = this.setSubmitShowData(this.selectCfmCtEteSEStart, this.selectCfmCtEteSEEnd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -181,10 +181,12 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'cfmPtEteSEStart':
|
case 'cfmPtEteSEStart':
|
||||||
this.selectCfmPtEteSEStart = data.task;
|
this.selectCfmPtEteSEStart = data.task;
|
||||||
|
this.timeCfmPtEteSE = {min: 0, max: 0};
|
||||||
if(this.selectCfmPtEteSEEnd) this.timeCfmPtEteSE = this.getDurationTime(this.cfmPtEteSE, 'double', data.task, this.selectCfmPtEteSEEnd);
|
if(this.selectCfmPtEteSEEnd) this.timeCfmPtEteSE = this.getDurationTime(this.cfmPtEteSE, 'double', data.task, this.selectCfmPtEteSEEnd);
|
||||||
break;
|
break;
|
||||||
case 'cfmPtEteSEEnd':
|
case 'cfmPtEteSEEnd':
|
||||||
this.selectCfmPtEteSEEnd = data.task;
|
this.selectCfmPtEteSEEnd = data.task;
|
||||||
|
this.timeCfmPtEteSE = {min: 0, max: 0};
|
||||||
if(this.selectCfmPtEteSEStart) this.timeCfmPtEteSE = this.getDurationTime(this.cfmPtEteSE, 'double', this.selectCfmPtEteSEStart, data.task);
|
if(this.selectCfmPtEteSEStart) this.timeCfmPtEteSE = this.getDurationTime(this.cfmPtEteSE, 'double', this.selectCfmPtEteSEStart, data.task);
|
||||||
break;
|
break;
|
||||||
case 'cfmPtPStart':
|
case 'cfmPtPStart':
|
||||||
@@ -195,10 +197,12 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'cfmPtPSEStart':
|
case 'cfmPtPSEStart':
|
||||||
this.selectCfmPtPSEStart = data.task;
|
this.selectCfmPtPSEStart = data.task;
|
||||||
|
this.timeCfmPtPSE = {min: 0, max: 0};
|
||||||
if(this.selectCfmPtPSEEnd) this.timeCfmPtPSE = this.getDurationTime(this.cfmPtPSE, 'double', data.task, this.selectCfmPtPSEEnd);
|
if(this.selectCfmPtPSEEnd) this.timeCfmPtPSE = this.getDurationTime(this.cfmPtPSE, 'double', data.task, this.selectCfmPtPSEEnd);
|
||||||
break;
|
break;
|
||||||
case 'cfmPtPSEEnd':
|
case 'cfmPtPSEEnd':
|
||||||
this.selectCfmPtPSEEnd = data.task;
|
this.selectCfmPtPSEEnd = data.task;
|
||||||
|
this.timeCfmPtPSE = {min: 0, max: 0};
|
||||||
if(this.selectCfmPtPSEStart) this.timeCfmPtPSE = this.getDurationTime(this.cfmPtPSE, 'double', this.selectCfmPtPSEStart, data.task);
|
if(this.selectCfmPtPSEStart) this.timeCfmPtPSE = this.getDurationTime(this.cfmPtPSE, 'double', this.selectCfmPtPSEStart, data.task);
|
||||||
break;
|
break;
|
||||||
// Waiting time
|
// Waiting time
|
||||||
@@ -210,10 +214,12 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'cfmWtEteSEStart':
|
case 'cfmWtEteSEStart':
|
||||||
this.selectCfmWtEteSEStart = data.task;
|
this.selectCfmWtEteSEStart = data.task;
|
||||||
|
this.timeCfmWtEteSE = {min: 0, max: 0};
|
||||||
if(this.selectCfmWtEteSEEnd) this.timeCfmWtEteSE = this.getDurationTime(this.cfmWtEteSE, 'double', data.task, this.selectCfmWtEteSEEnd);
|
if(this.selectCfmWtEteSEEnd) this.timeCfmWtEteSE = this.getDurationTime(this.cfmWtEteSE, 'double', data.task, this.selectCfmWtEteSEEnd);
|
||||||
break;
|
break;
|
||||||
case 'cfmWtEteSEEnd':
|
case 'cfmWtEteSEEnd':
|
||||||
this.selectCfmWtEteSEEnd = data.task;
|
this.selectCfmWtEteSEEnd = data.task;
|
||||||
|
this.timeCfmWtEteSE = {min: 0, max: 0};
|
||||||
if(this.selectCfmWtEteSEStart) this.timeCfmWtEteSE = this.getDurationTime(this.cfmWtEteSE, 'double', this.selectCfmWtEteSEStart, data.task);
|
if(this.selectCfmWtEteSEStart) this.timeCfmWtEteSE = this.getDurationTime(this.cfmWtEteSE, 'double', this.selectCfmWtEteSEStart, data.task);
|
||||||
break;
|
break;
|
||||||
case 'cfmWtPStart':
|
case 'cfmWtPStart':
|
||||||
@@ -224,10 +230,12 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'cfmWtPSEStart':
|
case 'cfmWtPSEStart':
|
||||||
this.selectCfmWtPSEStart = data.task;
|
this.selectCfmWtPSEStart = data.task;
|
||||||
|
this.timeCfmWtPSE = {min: 0, max: 0};
|
||||||
if(this.selectCfmWtPSEEnd) this.timeCfmWtPSE = this.getDurationTime(this.cfmWtPSE, 'double', data.task, this.selectCfmWtPSEEnd);
|
if(this.selectCfmWtPSEEnd) this.timeCfmWtPSE = this.getDurationTime(this.cfmWtPSE, 'double', data.task, this.selectCfmWtPSEEnd);
|
||||||
break;
|
break;
|
||||||
case 'cfmWtPSEEnd':
|
case 'cfmWtPSEEnd':
|
||||||
this.selectCfmWtPSEEnd = data.task;
|
this.selectCfmWtPSEEnd = data.task;
|
||||||
|
this.timeCfmWtPSE = {min: 0, max: 0};
|
||||||
if(this.selectCfmWtPSEStart) this.timeCfmWtPSE = this.getDurationTime(this.cfmWtPSE, 'double', this.selectCfmWtPSEStart, data.task);
|
if(this.selectCfmWtPSEStart) this.timeCfmWtPSE = this.getDurationTime(this.cfmWtPSE, 'double', this.selectCfmWtPSEStart, data.task);
|
||||||
break;
|
break;
|
||||||
// Cycle time
|
// Cycle time
|
||||||
@@ -239,10 +247,12 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'cfmCtEteSEStart':
|
case 'cfmCtEteSEStart':
|
||||||
this.selectCfmCtEteSEStart = data.task;
|
this.selectCfmCtEteSEStart = data.task;
|
||||||
|
this.timeCfmCtEteSEE = {min: 0, max: 0};
|
||||||
if(this.selectCfmCtEteSEEnd) this.timeCfmCtEteSE = this.getDurationTime(this.cfmCtEteSE, 'double', data.task, this.selectCfmCtEteSEEnd);
|
if(this.selectCfmCtEteSEEnd) this.timeCfmCtEteSE = this.getDurationTime(this.cfmCtEteSE, 'double', data.task, this.selectCfmCtEteSEEnd);
|
||||||
break;
|
break;
|
||||||
case 'cfmCtEteSEEnd':
|
case 'cfmCtEteSEEnd':
|
||||||
this.selectCfmCtEteSEEnd = data.task;
|
this.selectCfmCtEteSEEnd = data.task;
|
||||||
|
this.timeCfmCtEteSEE = {min: 0, max: 0};
|
||||||
if(this.selectCfmCtEteSEStart) this.timeCfmCtEteSE = this.getDurationTime(this.cfmCtEteSE, 'double', this.selectCfmCtEteSEStart, data.task);
|
if(this.selectCfmCtEteSEStart) this.timeCfmCtEteSE = this.getDurationTime(this.cfmCtEteSE, 'double', this.selectCfmCtEteSEStart, data.task);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- select:{{ select }} -->
|
|
||||||
<div class="flex justify-between items-center" id="cyp-timerange">
|
<div class="flex justify-between items-center" id="cyp-timerange">
|
||||||
<Durationjs :max="minVuemax" :min="minVuemin" :size="'min'" :updateMax="updateMax" @total-seconds="minTotalSeconds" :value="durationMin"></Durationjs>
|
<Durationjs :max="minVuemax" :min="minVuemin" :size="'min'" :updateMax="updateMax" @total-seconds="minTotalSeconds" :value="durationMin"></Durationjs>
|
||||||
<span>~</span>
|
<span>~</span>
|
||||||
<Durationjs :max="maxVuemax" :min="maxVuemin" :size="'max'" @total-seconds="maxTotalSeconds" :value="durationMax"></Durationjs>
|
<Durationjs :max="maxVuemax" :min="maxVuemin" :size="'max'" :updateMin="updateMin" @total-seconds="maxTotalSeconds" :value="durationMax"></Durationjs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -24,6 +23,7 @@ export default {
|
|||||||
maxVuemin: 0,
|
maxVuemin: 0,
|
||||||
maxVuemax: 0,
|
maxVuemax: 0,
|
||||||
updateMax: null,
|
updateMax: null,
|
||||||
|
updateMin: null,
|
||||||
durationMin: null,
|
durationMin: null,
|
||||||
durationMax: null,
|
durationMax: null,
|
||||||
}
|
}
|
||||||
@@ -34,6 +34,8 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
time: {
|
time: {
|
||||||
handler: function(newValue, oldValue) {
|
handler: function(newValue, oldValue) {
|
||||||
|
this.durationMax = null
|
||||||
|
this.durationMin = null
|
||||||
if(newValue == null) {
|
if(newValue == null) {
|
||||||
this.timeData = {
|
this.timeData = {
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -70,6 +72,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
minTotalSeconds(e) {
|
minTotalSeconds(e) {
|
||||||
this.timeRangeMin = e;
|
this.timeRangeMin = e;
|
||||||
|
this.updateMin = e;
|
||||||
this.$emit('min-total-seconds', e);
|
this.$emit('min-total-seconds', e);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -84,15 +87,14 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if(this.select){
|
if(this.select){
|
||||||
// 缺:
|
if(Object.keys(this.select.base).length !== 0) {
|
||||||
// 1. 外面傳入的原始資料最大最小值
|
this.timeData = this.select.base;
|
||||||
// 2. isSubmit 的值
|
|
||||||
// this.timeData = {min: 63320, max: 1489525};
|
|
||||||
this.timeData = this.select;
|
|
||||||
this.setTimeValue();
|
this.setTimeValue();
|
||||||
// console.log('select',this.select);
|
}
|
||||||
// this.durationMin = 70000;
|
if(Object.keys(this.select.rule).length !== 0) {
|
||||||
// this.durationMax = 84700;
|
this.durationMin = this.select.rule.min;
|
||||||
|
this.durationMax = this.select.rule.max;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,13 @@ export default {
|
|||||||
return value >= 0;
|
return value >= 0;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
updateMin: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
validator(value) {
|
||||||
|
return value >= 0;
|
||||||
|
},
|
||||||
|
},
|
||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
default: false,
|
default: false,
|
||||||
@@ -133,6 +140,12 @@ export default {
|
|||||||
this.calculateTotalSeconds();
|
this.calculateTotalSeconds();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
updateMin: {
|
||||||
|
handler: function(newValue, oldValue) {
|
||||||
|
this.minTotal = newValue;
|
||||||
|
this.calculateTotalSeconds();
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onClose () {
|
onClose () {
|
||||||
@@ -235,6 +248,10 @@ export default {
|
|||||||
// 箭頭向上,數字加一
|
// 箭頭向上,數字加一
|
||||||
newVal += this.tUnits[tUnit].inc;
|
newVal += this.tUnits[tUnit].inc;
|
||||||
if(newVal > this.tUnits[tUnit].max) {
|
if(newVal > this.tUnits[tUnit].max) {
|
||||||
|
if(this.tUnits[tUnit].dsp === 'd'){
|
||||||
|
// 超過 maxDays 要等於最大值
|
||||||
|
this.totalSeconds = this.maxTotal;
|
||||||
|
} else {
|
||||||
// 超過該單位最大值時要進位為零
|
// 超過該單位最大值時要進位為零
|
||||||
newVal = newVal % (this.tUnits[tUnit].max + 1);
|
newVal = newVal % (this.tUnits[tUnit].max + 1);
|
||||||
// 前一個更大的單位要進位
|
// 前一個更大的單位要進位
|
||||||
@@ -243,6 +260,7 @@ export default {
|
|||||||
this.actionUpDown(prevUnit, true);
|
this.actionUpDown(prevUnit, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 箭頭向下,數字減一
|
// 箭頭向下,數字減一
|
||||||
newVal -= this.tUnits[tUnit].inc;
|
newVal -= this.tUnits[tUnit].inc;
|
||||||
@@ -309,6 +327,9 @@ export default {
|
|||||||
totalSeconds = this.minTotal;
|
totalSeconds = this.minTotal;
|
||||||
this.secondToDate(this.minTotal, 'min');
|
this.secondToDate(this.minTotal, 'min');
|
||||||
this.totalSeconds = totalSeconds;
|
this.totalSeconds = totalSeconds;
|
||||||
|
} else if((this.size === 'min' && totalSeconds <= this.maxTotal)) {
|
||||||
|
this.maxDays = Math.floor(this.maxTotal / (3600 * 24));
|
||||||
|
this.totalSeconds = totalSeconds;
|
||||||
} else {
|
} else {
|
||||||
this.totalSeconds = totalSeconds;
|
this.totalSeconds = totalSeconds;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user