sonar 1 left
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import LoadingStore from '@/stores/loading.js';
|
import LoadingStore from '@/stores/loading.js';
|
||||||
import AllMapDataStore from '@/stores/allMapData.js';
|
import AllMapDataStore from '@/stores/allMapData.js';
|
||||||
|
import { delaySecond, } from '@/utils/timeUtil.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
@@ -97,8 +98,9 @@ export default {
|
|||||||
if(!this.postRuleData?.length) return this.$toast.error('Not selected');
|
if(!this.postRuleData?.length) return this.$toast.error('Not selected');
|
||||||
await this.allMapDataStore.checkHasResult(); // 後端快速檢查有沒有結果
|
await this.allMapDataStore.checkHasResult(); // 後端快速檢查有沒有結果
|
||||||
|
|
||||||
if(this.hasResultRule === null) return;
|
if(this.hasResultRule === null) {
|
||||||
else if(this.hasResultRule) {
|
return;
|
||||||
|
} else if(this.hasResultRule) {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
await this.allMapDataStore.addTempFilterId();
|
await this.allMapDataStore.addTempFilterId();
|
||||||
await this.allMapDataStore.getAllMapData();
|
await this.allMapDataStore.getAllMapData();
|
||||||
@@ -109,12 +111,14 @@ export default {
|
|||||||
await this.$emit('submit-all');
|
await this.$emit('submit-all');
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.$toast.success('Filter(s) applied.');
|
this.$toast.success('Filter(s) applied.');
|
||||||
}else {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// sonar-qube "This statement will not be executed conditionally"
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
await delaySecond(1);
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.$toast.warning('No result.');
|
this.$toast.warning('No result.');
|
||||||
};
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user