refactor: Discover Router done.
This commit is contained in:
@@ -12,8 +12,6 @@ export default defineStore('conformanceStore', {
|
||||
conformanceFilterTempCheckId: null, // Filter 檔存檔前的 check Id
|
||||
conformanceLogCreateCheckId: null, // log 檔存檔後的 check Id(rule)
|
||||
conformanceFilterCreateCheckId: null, // Filter 檔存檔後的 check Id(rule)
|
||||
conformanceType: null, // log-check | filter-check 已存檔的 rule
|
||||
conformanceParent: null, // parent log or parent filter
|
||||
allConformanceTask: [],
|
||||
allCfmSeqStart: [],
|
||||
allCfmSeqEnd: [],
|
||||
@@ -21,6 +19,7 @@ export default defineStore('conformanceStore', {
|
||||
allWaitingTime: {},
|
||||
allCycleTime: {},
|
||||
allConformanceTempReportData: null,
|
||||
allRouteFile: null,
|
||||
allIssueTraces: null,
|
||||
allTaskSeq: null,
|
||||
allCases: null,
|
||||
@@ -110,6 +109,9 @@ export default defineStore('conformanceStore', {
|
||||
conformanceTempReportData: state => {
|
||||
return state.allConformanceTempReportData;
|
||||
},
|
||||
routeFile: state => {
|
||||
return state.allRouteFile;
|
||||
},
|
||||
issueTraces: state => {
|
||||
return state.allIssueTraces;
|
||||
},
|
||||
@@ -228,8 +230,9 @@ export default defineStore('conformanceStore', {
|
||||
},
|
||||
/**
|
||||
* Get the Temporary Log Conformance Report
|
||||
* @param {boolean} getRouteFile 是否為了取得 route file 而呼叫?使用在非 Conformance page
|
||||
*/
|
||||
async getConformanceReport() {
|
||||
async getConformanceReport(getRouteFile = false) {
|
||||
let logTempCheckId = this.conformanceLogTempCheckId;
|
||||
let filterTempCheckId = this.conformanceFilterTempCheckId;
|
||||
let logCreateCheckId = this.conformanceLogCreateCheckId;
|
||||
@@ -244,7 +247,7 @@ export default defineStore('conformanceStore', {
|
||||
|
||||
try {
|
||||
const response = await this.$axios.get(api);
|
||||
this.allConformanceTempReportData = response.data;
|
||||
!getRouteFile ? this.allConformanceTempReportData = response.data : this.allRouteFile = response.data.file;
|
||||
} catch(error) {
|
||||
apiError(error, 'Failed to Get the Temporary Log Conformance Report.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user