feat: Conformance Save Logout done.
This commit is contained in:
@@ -24,6 +24,8 @@ import loginStore from '@/stores/login.js';
|
||||
import DspLogo from '@/components/icons/DspLogo.vue';
|
||||
import IconMember from '@/components/icons/IconMember.vue';
|
||||
import AllMapDataStore from '@/stores/allMapData.js';
|
||||
import ConformanceStore from '@/stores/conformance.js';
|
||||
import { leaveFilter, leaveConformance } from '@/module/alertModal.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -35,9 +37,11 @@ export default {
|
||||
const store = loginStore();
|
||||
const { logOut } = store;
|
||||
const allMapDataStore = AllMapDataStore();
|
||||
const conformanceStore = ConformanceStore();
|
||||
const { tempFilterId, temporaryData, postRuleData, ruleData } = storeToRefs(allMapDataStore);
|
||||
const { conformanceLogTempCheckId, conformanceFilterTempCheckId, conformanceFileName } = storeToRefs(conformanceStore);
|
||||
|
||||
return { logOut, temporaryData, tempFilterId, postRuleData, ruleData, allMapDataStore}
|
||||
return { logOut, temporaryData, tempFilterId, postRuleData, ruleData, conformanceLogTempCheckId, conformanceFilterTempCheckId, allMapDataStore, conformanceStore, conformanceFileName }
|
||||
},
|
||||
components: {
|
||||
DspLogo,
|
||||
@@ -45,13 +49,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
logOutButton() {
|
||||
if (this.$route.name === 'Map' && this.$route.params.type === 'log') {
|
||||
this.tempFilterId = null;
|
||||
this.temporaryData = [];
|
||||
this.postRuleData = [];
|
||||
this.ruleData = [];
|
||||
};
|
||||
this.logOut();
|
||||
if ((this.$route.name === 'Map' || this.$route.name === 'CheckMap') && this.tempFilterId) {
|
||||
// 傳給 Map,通知 Sidebar 要關閉。
|
||||
this.$emitter.emit('leaveFilter', false);
|
||||
leaveFilter(false, this.allMapDataStore.addFilterId, false, this.logOut)
|
||||
} else if((this.$route.name === 'Conformance' || this.$route.name === 'CheckConformance') && (this.conformanceLogTempCheckId || this.conformanceFilterTempCheckId)) {
|
||||
leaveConformance(false, this.conformanceStore.addConformanceCreateCheckId, false, this.logOut)
|
||||
} else this.logOut();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
Reference in New Issue
Block a user