feat: Conformance Save leaved page done.
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
/* Navbar */
|
/* Navbar */
|
||||||
nav ul>li {
|
nav ul>li {
|
||||||
@apply px-2 py-3.5 duration-300 hover:bg-neutral-900 hover:text-neutral-10 active:bg-neutral-900 active:text-neutral-10;
|
@apply px-2 py-3.5 duration-300 hover:bg-neutral-900 hover:text-neutral-10 ;
|
||||||
|
}
|
||||||
|
nav ul>li.active {
|
||||||
|
@apply bg-neutral-900 text-neutral-10 duration-300;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
|
|||||||
@@ -400,7 +400,6 @@ export default {
|
|||||||
// 打開 rule 檔要顯示儲存的選項、規則、時間
|
// 打開 rule 檔要顯示儲存的選項、規則、時間
|
||||||
conformanceTempReportData: {
|
conformanceTempReportData: {
|
||||||
handler: function(newValue) {
|
handler: function(newValue) {
|
||||||
this.isLoading = true;
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if(newValue !== null) {
|
if(newValue !== null) {
|
||||||
const rule = newValue.rule;
|
const rule = newValue.rule;
|
||||||
@@ -418,7 +417,6 @@ export default {
|
|||||||
{category: 'Start', task: rule.starts_with},
|
{category: 'Start', task: rule.starts_with},
|
||||||
{category: 'End', task: rule.ends_with},
|
{category: 'End', task: rule.ends_with},
|
||||||
];
|
];
|
||||||
// this.isSubmitShowDataSeq = this.setSubmitShowData(rule.start, rule.end);
|
|
||||||
break;
|
break;
|
||||||
case 'directly-follows': // Activity Sequence 選 Sequence 的行為
|
case 'directly-follows': // Activity Sequence 選 Sequence 的行為
|
||||||
this.selectedRuleType = 'Sequence';
|
this.selectedRuleType = 'Sequence';
|
||||||
@@ -476,7 +474,6 @@ export default {
|
|||||||
{category: 'End', task: rule.end}
|
{category: 'End', task: rule.end}
|
||||||
];
|
];
|
||||||
this.isSubmitTimeCfmPtEteSE = { min: rule.min, max: rule.max};
|
this.isSubmitTimeCfmPtEteSE = { min: rule.min, max: rule.max};
|
||||||
// this.isSubmitShowDataPtEte = this.setSubmitShowData(rule.start, rule.end);
|
|
||||||
break;
|
break;
|
||||||
case 'processing-time-partial-starts-with':
|
case 'processing-time-partial-starts-with':
|
||||||
this.selectedRuleType = 'Processing time';
|
this.selectedRuleType = 'Processing time';
|
||||||
|
|||||||
@@ -1,15 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<nav class="bg-neutral-700">
|
<nav class="bg-neutral-700">
|
||||||
<div class="mx-auto px-4" :class="[showNavbarBreadcrumb? 'min-h-12': 'h-12']">
|
<div class="mx-auto px-4" :class="[showNavbarBreadcrumb? 'min-h-12': 'h-12']">
|
||||||
<p class="text-neutral-10">logId: {{ logId }}</p>
|
|
||||||
<p class="text-neutral-10">tempFilterId: {{ tempFilterId }}</p>
|
|
||||||
<p class="text-neutral-10">createFilterId: {{ createFilterId }}</p>
|
|
||||||
<p class="text-neutral-10">conformanceLogId: {{ conformanceLogId }}</p>
|
|
||||||
<p class="text-neutral-10">conformanceFilterId: {{ conformanceFilterId }}</p>
|
|
||||||
<p class="text-neutral-10">conformanceLogTempCheckId: {{ conformanceLogTempCheckId }}</p>
|
|
||||||
<p class="text-neutral-10">conformanceFilterTempCheckId: {{ conformanceFilterTempCheckId }}</p>
|
|
||||||
<p class="text-neutral-10">conformanceLogCreateCheckId: {{ conformanceLogCreateCheckId }}</p>
|
|
||||||
<p class="text-neutral-10">conformanceFilterCreateCheckId: {{ conformanceFilterCreateCheckId }}</p>
|
|
||||||
<div class="flex justify-between items-center flex-wrap" v-show="showNavbarBreadcrumb">
|
<div class="flex justify-between items-center flex-wrap" v-show="showNavbarBreadcrumb">
|
||||||
<div class="flex flex-1 items-center">
|
<div class="flex flex-1 items-center">
|
||||||
<!-- 回 Files 頁 -->
|
<!-- 回 Files 頁 -->
|
||||||
@@ -20,7 +11,7 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
<h2 class="mr-14 py-3 text-2xl font-black text-neutral-10">{{ navViewName }}</h2>
|
<h2 class="mr-14 py-3 text-2xl font-black text-neutral-10">{{ navViewName }}</h2>
|
||||||
<ul class="flex justify-center items-center space-x-4 text-xl font-semibold text-neutral-300 cursor-pointer">
|
<ul class="flex justify-center items-center space-x-4 text-xl font-semibold text-neutral-300 cursor-pointer">
|
||||||
<li @click="switchNavItem($event, index)" v-for="(item, index) in navViewData[navViewName]" :key="index">{{ item }}</li>
|
<li @click="switchNavItem($event, item)" v-for="(item, index) in navViewData[navViewName]" :key="index" :class="{'active': isActive === item}">{{ item }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- Files Page: Search and Upload -->
|
<!-- Files Page: Search and Upload -->
|
||||||
@@ -39,7 +30,7 @@
|
|||||||
</form>
|
</form>
|
||||||
<label class="btn btn-sm btn-neutral cursor-pointer">
|
<label class="btn btn-sm btn-neutral cursor-pointer">
|
||||||
<input id="uploadFiles" class="hidden" type="file">
|
<input id="uploadFiles" class="hidden" type="file">
|
||||||
upload
|
Upload
|
||||||
</label> -->
|
</label> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- Other Page: Save and Download -->
|
<!-- Other Page: Save and Download -->
|
||||||
@@ -75,8 +66,6 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
IconSearch,
|
IconSearch,
|
||||||
IconSetting,
|
IconSetting,
|
||||||
saveFilter,
|
|
||||||
savedSuccessfully
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -89,6 +78,7 @@ export default {
|
|||||||
DISCOVER: ['MAP', 'CONFORMANCE']
|
DISCOVER: ['MAP', 'CONFORMANCE']
|
||||||
},
|
},
|
||||||
navViewName: 'FILES',
|
navViewName: 'FILES',
|
||||||
|
isActive: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -123,6 +113,7 @@ export default {
|
|||||||
let type;
|
let type;
|
||||||
let fileId;
|
let fileId;
|
||||||
|
|
||||||
|
this.isActive = event.target.innerText;
|
||||||
switch (this.navViewName) {
|
switch (this.navViewName) {
|
||||||
case 'FILES':
|
case 'FILES':
|
||||||
this.store.filesTag = event.target.innerText;
|
this.store.filesTag = event.target.innerText;
|
||||||
@@ -141,7 +132,30 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getNavViewName() {
|
getNavViewName() {
|
||||||
|
let name = this.$route.name;
|
||||||
this.navViewName = this.$route.matched[1].name.toUpperCase();
|
this.navViewName = this.$route.matched[1].name.toUpperCase();
|
||||||
|
this.store.filesTag = 'ALL';
|
||||||
|
switch (this.navViewName) {
|
||||||
|
case 'FILES':
|
||||||
|
this.isActive = this.store.filesTag;
|
||||||
|
break;
|
||||||
|
case 'DISCOVER':
|
||||||
|
switch (name) {
|
||||||
|
case 'Map':
|
||||||
|
case 'CheckMap':
|
||||||
|
this.isActive = 'MAP'
|
||||||
|
break;
|
||||||
|
case 'Conformance':
|
||||||
|
case 'CheckConformance':
|
||||||
|
this.isActive = 'CONFORMANCE'
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// if(this.navViewName === 'DISCOVER') {
|
||||||
|
// if(name === 'Map' || name === 'CheckMap') this.isActive = 'MAP';
|
||||||
|
// else if(name === 'Conformance' || name === 'CheckConformance') this.isActive = 'CONFORMANCE';
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Save button' modal
|
* Save button' modal
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ export default defineStore('filesStore', {
|
|||||||
o.accessed_at = o.accessed_at ? moment(o.accessed_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm') : null;
|
o.accessed_at = o.accessed_at ? moment(o.accessed_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm') : null;
|
||||||
return this.allEventLog
|
return this.allEventLog
|
||||||
})
|
})
|
||||||
if(this.httpStatus < 300) loading.isLoading = false;
|
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
apiError(error, 'Failed to load the logs.');
|
apiError(error, 'Failed to load the logs.');
|
||||||
};
|
};
|
||||||
@@ -112,7 +111,6 @@ export default defineStore('filesStore', {
|
|||||||
o.updated_at = moment(o.updated_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm');
|
o.updated_at = moment(o.updated_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm');
|
||||||
o.accessed_at = o.accessed_at ? moment(o.accessed_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm') : null;
|
o.accessed_at = o.accessed_at ? moment(o.accessed_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm') : null;
|
||||||
});
|
});
|
||||||
if(this.httpStatus < 300) loading.isLoading = false;
|
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
apiError(error, 'Failed to load the filters.');
|
apiError(error, 'Failed to load the filters.');
|
||||||
};
|
};
|
||||||
@@ -137,7 +135,6 @@ export default defineStore('filesStore', {
|
|||||||
o.updated_at = moment(o.updated_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm');
|
o.updated_at = moment(o.updated_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm');
|
||||||
o.accessed_at = o.accessed_at ? moment(o.accessed_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm') : null;
|
o.accessed_at = o.accessed_at ? moment(o.accessed_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm') : null;
|
||||||
});
|
});
|
||||||
if(this.httpStatus < 300) loading.isLoading = false;
|
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
apiError(error, 'Failed to load the filters.');
|
apiError(error, 'Failed to load the filters.');
|
||||||
};
|
};
|
||||||
@@ -162,7 +159,6 @@ export default defineStore('filesStore', {
|
|||||||
o.updated_at = moment(o.updated_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm');
|
o.updated_at = moment(o.updated_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm');
|
||||||
o.accessed_at = o.accessed_at ? moment(o.accessed_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm') : null;
|
o.accessed_at = o.accessed_at ? moment(o.accessed_at).utcOffset('+08:00').format('YYYY-MM-DD HH:mm') : null;
|
||||||
});
|
});
|
||||||
if(this.httpStatus < 300) loading.isLoading = false;
|
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
apiError(error, 'Failed to load the filters.');
|
apiError(error, 'Failed to load the filters.');
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -74,6 +74,7 @@
|
|||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import filesStore from '@/stores/files.js';
|
import filesStore from '@/stores/files.js';
|
||||||
import AllMapDataStore from '@/stores/allMapData.js';
|
import AllMapDataStore from '@/stores/allMapData.js';
|
||||||
|
import LoadingStore from '@/stores/loading.js';
|
||||||
import IconDataFormat from '@/components/icons/IconDataFormat.vue';
|
import IconDataFormat from '@/components/icons/IconDataFormat.vue';
|
||||||
import IconRule from '@/components/icons/IconRule.vue';
|
import IconRule from '@/components/icons/IconRule.vue';
|
||||||
import IconsFilter from '@/components/icons/IconsFilter.vue';
|
import IconsFilter from '@/components/icons/IconsFilter.vue';
|
||||||
@@ -91,9 +92,11 @@
|
|||||||
setup() {
|
setup() {
|
||||||
const store = filesStore();
|
const store = filesStore();
|
||||||
const allMapDataStore = AllMapDataStore();
|
const allMapDataStore = AllMapDataStore();
|
||||||
|
const loadingStore = LoadingStore();
|
||||||
const { createFilterId, baseLogId } = storeToRefs(allMapDataStore);
|
const { createFilterId, baseLogId } = storeToRefs(allMapDataStore);
|
||||||
|
const { isLoading } = storeToRefs(loadingStore);
|
||||||
|
|
||||||
return { store, allMapDataStore, createFilterId, baseLogId }
|
return { store, allMapDataStore, createFilterId, baseLogId, isLoading }
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
IconDataFormat,
|
IconDataFormat,
|
||||||
@@ -170,10 +173,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.isLoading = true;
|
||||||
this.store.fetchEventLog();
|
this.store.fetchEventLog();
|
||||||
this.store.fetchFilter();
|
this.store.fetchFilter();
|
||||||
this.store.fetchConformanceLog();
|
this.store.fetchConformanceLog();
|
||||||
this.store.fetchConformanceFilter();
|
this.store.fetchConformanceFilter();
|
||||||
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -15,10 +15,11 @@ import { storeToRefs } from 'pinia';
|
|||||||
import LoginStore from '@/stores/login.js';
|
import LoginStore from '@/stores/login.js';
|
||||||
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 ConformanceStore from '@/stores/conformance.js';
|
||||||
import Header from "@/components/Header.vue";
|
import Header from "@/components/Header.vue";
|
||||||
import Navbar from "@/components/Navbar.vue";
|
import Navbar from "@/components/Navbar.vue";
|
||||||
import Loading from '@/components/Loading.vue';
|
import Loading from '@/components/Loading.vue';
|
||||||
import { saveFilter, leaveFilter } from '@/module/alertModal.js';
|
import { leaveFilter, leaveConformance } from '@/module/alertModal.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MainContainer',
|
name: 'MainContainer',
|
||||||
@@ -26,17 +27,17 @@ export default {
|
|||||||
const loginStore = LoginStore();
|
const loginStore = LoginStore();
|
||||||
const loadingStore = LoadingStore();
|
const loadingStore = LoadingStore();
|
||||||
const allMapDataStore = AllMapDataStore();
|
const allMapDataStore = AllMapDataStore();
|
||||||
|
const conformanceStore = ConformanceStore();
|
||||||
const { checkLogin } = loginStore;
|
const { checkLogin } = loginStore;
|
||||||
const { tempFilterId, createFilterId, temporaryData, postRuleData, ruleData } = storeToRefs(allMapDataStore);
|
const { tempFilterId, createFilterId, temporaryData, postRuleData, ruleData } = storeToRefs(allMapDataStore);
|
||||||
|
const { conformanceLogTempCheckId, conformanceFilterTempCheckId } = storeToRefs(conformanceStore);
|
||||||
|
|
||||||
return { checkLogin, loadingStore, temporaryData, tempFilterId, createFilterId, postRuleData, ruleData, allMapDataStore };
|
return { checkLogin, loadingStore, temporaryData, tempFilterId, createFilterId, postRuleData, ruleData, conformanceLogTempCheckId, conformanceFilterTempCheckId, allMapDataStore, conformanceStore };
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Header,
|
Header,
|
||||||
Navbar,
|
Navbar,
|
||||||
Loading,
|
Loading
|
||||||
saveFilter,
|
|
||||||
leaveFilter
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// Save token in Headers.
|
// Save token in Headers.
|
||||||
@@ -53,7 +54,7 @@ export default {
|
|||||||
this.$emitter.emit('leaveFilter', false);
|
this.$emitter.emit('leaveFilter', false);
|
||||||
leaveFilter(next, this.allMapDataStore.addFilterId, to.path)
|
leaveFilter(next, this.allMapDataStore.addFilterId, to.path)
|
||||||
} else if((this.$route.name === 'Conformance' || this.$route.name === 'CheckConformance') && (this.conformanceLogTempCheckId || this.conformanceFilterTempCheckId)) {
|
} else if((this.$route.name === 'Conformance' || this.$route.name === 'CheckConformance') && (this.conformanceLogTempCheckId || this.conformanceFilterTempCheckId)) {
|
||||||
leaveFilter(false, this.conformanceStore.addConformanceCreateCheckId, false, this.logOut)
|
leaveConformance(next, this.conformanceStore.addConformanceCreateCheckId, to.path)
|
||||||
} else next();
|
} else next();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user