Issue #144: Done.
This commit is contained in:
@@ -48,9 +48,9 @@ export default {
|
||||
const loadingStore = LoadingStore();
|
||||
const allMapDataStore = AllMapDataStore();
|
||||
const { isLoading } = storeToRefs(loadingStore);
|
||||
const { hasResultRule, temporaryData, postRuleData, ruleData, isRuleData} = storeToRefs(allMapDataStore);
|
||||
const { hasResultRule, temporaryData, postRuleData, ruleData, isRuleData, tempFilterId } = storeToRefs(allMapDataStore);
|
||||
|
||||
return { isLoading, hasResultRule, temporaryData, postRuleData, ruleData, isRuleData, allMapDataStore }
|
||||
return { isLoading, hasResultRule, temporaryData, postRuleData, ruleData, isRuleData, allMapDataStore, tempFilterId, allMapDataStore }
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -67,11 +67,19 @@ export default {
|
||||
/**
|
||||
* header:Funnel 刪除全部的 Funnel
|
||||
*/
|
||||
deleteRule(index) {
|
||||
async deleteRule(index) {
|
||||
if(index === 'all') {
|
||||
this.temporaryData = [];
|
||||
this.isRuleData = [];
|
||||
this.ruleData = [];
|
||||
if(this.tempFilterId) {
|
||||
this.isLoading = true;
|
||||
this.tempFilterId = await null;
|
||||
await this.allMapDataStore.getAllMapData();
|
||||
await this.allMapDataStore.getAllTrace(); // SidebarTrace 要連動
|
||||
await this.$emit('submit-all');
|
||||
this.isLoading = false;
|
||||
}
|
||||
this.$toast.success('All deleted.');
|
||||
}else{
|
||||
this.$toast.success(`Delete ${this.ruleData[index].label}.`);
|
||||
@@ -104,7 +112,7 @@ export default {
|
||||
this.$toast.warning('No Data.');
|
||||
};
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user