Issue #102: done.

This commit is contained in:
chiayin
2023-09-13 11:47:09 +08:00
parent 7e48007e4e
commit 4b0cf87414
2 changed files with 16 additions and 7 deletions

View File

@@ -150,6 +150,7 @@ export default {
selectCfmCtEteSEStart: null,
selectCfmCtEteSEEnd: null,
isSubmit: false,
isSubmitData: null, // 已 Apply 後,沒有重新改變規則的 Data
isSubmitTask: null,
isSubmitStartAndEnd: null,
isSubmitListSeq: [],
@@ -201,6 +202,11 @@ export default {
return (this.selectedRuleType === 'Activity sequence' && this.selectedActivitySequence === 'Sequence' && (this.selectedMode === 'Short loop(s)' || this.selectedMode === 'Self loop(s)')) || (this.selectedRuleType === 'Processing time' && this.selectedProcessScope === 'End to end' && this.selectedActSeqMore === 'All') || (this.selectedRuleType === 'Waiting time' && this.selectedProcessScope === 'End to end' && this.selectedActSeqMore === 'All') || (this.selectedRuleType === 'Cycle time' && this.selectedProcessScope === 'End to end' && this.selectedActSeqMore === 'All')
}
},
watch: {
isSubmitData: function(newValue) {
this.isSubmitData = newValue;
}
},
methods: {
/**
* get min total seconds
@@ -256,6 +262,7 @@ export default {
* is submit select Reset
*/
isSubmitReset() {
// 沒有 isSubmitData
this.isSubmitTask = null;
this.isSubmitStartAndEnd = null;
this.isSubmitListSeq = [];
@@ -294,7 +301,6 @@ export default {
this.isSubmitTimeCfmCtEteStart = null;
this.isSubmitTimeCfmCtEteEnd = null;
this.isSubmitTimeCfmCtEteSE = null;
},
/**
* @param {boolean} massage true | false 清空選單選項, 選擇的結果
@@ -304,6 +310,7 @@ export default {
this.$emitter.emit('coverPlate', true);
// is submit select Reset
this.isSubmitReset();
this.isSubmitData = null; // 已 Apply 後,沒有重新改變規則的 Data
this.isSubmit = false;
// 其他子元件 reset
@@ -723,9 +730,11 @@ export default {
default:
break;
};
if(JSON.stringify(data) === JSON.stringify(this.isSubmitData)) return this.$toast.error('Please set the new rule.');
this.isLoading = true;
this.isSubmit = true;
this.isSubmitData = data; // 已 Apply 後,沒有重新改變規則的 Data
await this.conformanceStore.addLogConformanceTempCheckerId(data);
await this.conformanceStore.getLogConformanceTempReport();
this.isShowBar = false;