Issues #170: done.

This commit is contained in:
chiayin
2023-11-01 11:17:45 +08:00
parent 1896b8d8cf
commit 4089b1c7b8
2 changed files with 27 additions and 27 deletions

View File

@@ -511,6 +511,7 @@ export default {
}, },
// header:Filter 發送選取的資料 // header:Filter 發送選取的資料
async submit(){ async submit(){
this.isLoading = true;
let data; let data;
let sele = this.selectValue; let sele = this.selectValue;
let isExclude = sele[5] === 'Exclude' ? true : false; let isExclude = sele[5] === 'Exclude' ? true : false;
@@ -644,7 +645,7 @@ export default {
await this.allMapDataStore.checkHasResult(); await this.allMapDataStore.checkHasResult();
// 有 Data 就加進 Funnel沒有 Data 不加進 Funnel 和跳錯誤訊息 // 有 Data 就加進 Funnel沒有 Data 不加進 Funnel 和跳錯誤訊息
if(this.hasResultRule === null) return; if(this.hasResultRule === null) return this.isLoading = false;
else if(this.hasResultRule) { else if(this.hasResultRule) {
if(!this.temporaryData?.length){ if(!this.temporaryData?.length){
this.temporaryData.push(...postData); this.temporaryData.push(...postData);
@@ -656,13 +657,13 @@ export default {
this.ruleData.push(...postData.map(e => this.setRule(e))) this.ruleData.push(...postData.map(e => this.setRule(e)))
} }
this.reset(false); this.reset(false);
this.isLoading = true; // this.isLoading = true;
await new Promise(resolve => setTimeout(resolve, 1000)); await new Promise(resolve => setTimeout(resolve, 1000));
this.isLoading = false; this.isLoading = false;
this.$toast.success('Filter applied. Go to Funnel to verify.'); this.$toast.success('Filter applied. Go to Funnel to verify.');
}else { }else {
this.reset(false); this.reset(false);
this.isLoading = true; // this.isLoading = true;
await new Promise(resolve => setTimeout(resolve, 1000)); await new Promise(resolve => setTimeout(resolve, 1000));
this.isLoading = false; this.isLoading = false;
this.$toast.warning('No Data.'); this.$toast.warning('No Data.');

View File

@@ -4,15 +4,14 @@
<section class="mb-4"> <section class="mb-4">
<h2 class="font-bold py-4 mb-4 border-b border-neutral-500">Recently Used</h2> <h2 class="font-bold py-4 mb-4 border-b border-neutral-500">Recently Used</h2>
<!-- card group 最多六個--> <!-- card group 最多六個-->
<ul class="flex justify-start items-center gap-4 overflow-x-auto w-full h-[192px] scrollbar whitespace-nowrap pb-4"> <ul class="flex justify-start items-center gap-4 overflow-x-auto w-full h-[192px] scrollbar pb-4">
<!-- card item v-for --> <!-- card item v-for -->
<li class="min-w-[216px] h-[168px] p-4 border rounded border-neutral-300 hover:bg-primary/10 hover:border-primary duration-300 <li class="w-[216px] min-w-[216px] h-[168px] p-4 border rounded border-neutral-300 hover:bg-primary/10 hover:border-primary duration-300 flex flex-col justify-between cursor-pointer" v-for="(file, index) in recentlyUsedFiles.slice(0, 6)" :key="file.id" @dblclick="enterDiscover(file)" :title="file.name">
flex flex-col justify-between cursor-pointer" v-for="(file, index) in recentlyUsedFiles.slice(0, 6)" :key="file.id" @dblclick="enterDiscover(file)"> <div class="">
<div>
<span class="material-symbols-outlined mb-2 text-[32px] block"> <span class="material-symbols-outlined mb-2 text-[32px] block">
{{ file.icon }} {{ file.icon }}
</span> </span>
<h3 class="text-sm font-medium mb-2"> <h3 class="text-sm font-medium mb-2 whitespace-nowrap break-keep overflow-hidden text-ellipsis">
{{ file.name }} {{ file.name }}
</h3> </h3>
<p class="text-sm text-neutral-500 whitespace-nowrap break-keep text-ellipsis overflow-hidden"> <p class="text-sm text-neutral-500 whitespace-nowrap break-keep text-ellipsis overflow-hidden">
@@ -47,26 +46,26 @@
<Column field="updated_at" header="Last Update" bodyClass="text-neutral-500" sortable></Column> <Column field="updated_at" header="Last Update" bodyClass="text-neutral-500" sortable></Column>
</DataTable> </DataTable>
</div> </div>
<!-- All Files type of grid --> <!-- All Files type of grid -->
<ul class="flex justify-start items-start gap-4 flex-wrap overflow-y-scroll overflow-x-hidden max-h-[calc(100vh_-_480px)] scrollbar" v-else> <ul class="flex justify-start items-start gap-4 flex-wrap overflow-y-scroll overflow-x-hidden max-h-[calc(100vh_-_480px)] scrollbar" v-else>
<li class="w-[216px] h-[168px] p-4 border rounded border-neutral-300 hover:bg-primary/10 hover:border-primary duration-300 flex flex-col justify-between cursor-pointer" <li class="w-[216px] h-[168px] p-4 border rounded border-neutral-300 hover:bg-primary/10 hover:border-primary duration-300 flex flex-col justify-between cursor-pointer"
v-for="(file, index) in allFiles" :key="file.id" @dblclick="enterDiscover(file)"> v-for="(file, index) in allFiles" :key="file.id" @dblclick="enterDiscover(file)" :title="file.name">
<div> <div>
<span class="material-symbols-outlined mb-2 text-[32px] block"> <span class="material-symbols-outlined mb-2 text-[32px] block">
{{ file.icon }} {{ file.icon }}
</span> </span>
<h3 class="text-sm font-medium mb-2"> <h3 class="text-sm font-medium mb-2 whitespace-nowrap break-keep overflow-hidden text-ellipsis">
{{ file.name }} {{ file.name }}
</h3> </h3>
<p class="text-sm text-neutral-500 whitespace-nowrap break-keep text-ellipsis overflow-hidden"> <p class="text-sm text-neutral-500 whitespace-nowrap break-keep text-ellipsis overflow-hidden">
{{ file.parentLog }} {{ file.parentLog }}
</p>
</div>
<p class="text-sm text-neutral-500">
{{ file.updated_at }}
</p> </p>
</div> </li>
<p class="text-sm text-neutral-500"> </ul>
{{ file.updated_at }}
</p>
</li>
</ul>
</section> </section>
</div> </div>
</template> </template>